diff --git a/Buffs/DamageOverTime/Bane.cs b/Buffs/DamageOverTime/Bane.cs new file mode 100644 index 0000000000..c429af3dda --- /dev/null +++ b/Buffs/DamageOverTime/Bane.cs @@ -0,0 +1,118 @@ +using System; +using CalamityMod.DataStructures; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.DamageOverTime +{ + public class Bane : ModBuff + { + public static Color baneColor1 = new Color(217, 115, 0); + public static Color baneColor2 = new Color(0, 232, 146); + public static DebuffData debuffData = new DebuffData() + { + EnemyLostRegen = 40, + NPCLifeRegenMethod = BaneNPCLifeRegen + }; + public override void SetStaticDefaults() + { + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + BuffID.Sets.LongerExpertDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; + } + public static void BaneNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage) + { + var cnpc = npc.Calamity(); + bool effected = (cnpc.abaddonEffected || cnpc.apollyonEffected); + bool strong = cnpc.apollyonEffected; + int baseDoTValue = (int)debuffData.EnemyLostRegen; + if (effected) + { + foreach (var player in Main.ActivePlayers) + { + { + float improvedDamage = baseDoTValue * player.Calamity().playerBaneDebuffDamage; + if (improvedDamage > baseDoTValue && (player.Calamity().abaddon || player.Calamity().apollyon)) + { + baseDoTValue = (int)improvedDamage; + } + } + } + } + cnpc.ApplyDPSDebuff(baseDoTValue, baseDoTValue / 20, ref npc.lifeRegen, ref damage); + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().bane = true; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.Calamity().bane = true; + } + + internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false) + { + Player player = drawInfo.drawPlayer; + Vector3 light = baneColor1.ToVector3(); + Lighting.AddLight(player.Center, light); + + float sine = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 9.0f) / MathHelper.Pi); + if (Main.rand.NextBool(20)) + { + bool start = !Main.rand.NextBool(4); + Vector2 baneVel = Vector2.UnitY * Main.rand.NextFloat(-0.5f, -1.5f) * (Main.rand.NextBool(5) ? 2 : 1) + player.velocity * 0.35f; + Vector2 banePos = player.Center + Main.rand.NextVector2Circular(3, 8) + (Vector2.UnitY * 14) + Vector2.UnitY * ((1 - sine) * 2.3f); + Particle baneRunes = new BaneParticle(banePos, baneVel, false, 55, 1f, start ? baneColor1 : baneColor2, start ? baneColor2 : baneColor1, Vector2.One, true, Main.rand.NextBool(3) ? Main.rand.NextFloat(-0.2f, 0.2f) : 0, 0.95f, MathHelper.PiOver2 * Main.rand.Next(4 + 1), sineRate: Main.rand.NextFloat(0.2f, 1f), sineIntensity: Main.rand.Next(14, 19 + 1)); + GeneralParticleHandler.SpawnParticle(baneRunes); + if (Main.rand.NextBool()) + baneRunes.DrawLayer = Enums.GeneralDrawLayer.BeforeNPCs; + } + } + + internal static void DrawEffects(NPC npc, ref Color drawColor) + { + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomRingAngled").Value; + Texture2D center = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + Vector2 drawPosition = npc.Center - Main.screenPosition; + Color color = baneColor1; + Color color2 = baneColor2; + float maxSizeMult = 10f; + float widthMult = MathF.Pow(Utils.Remap(npc.width, 10, 500, 1f, maxSizeMult, false), 0.8f); + float sine = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 9.0f) / MathHelper.Pi); + float sine2 = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 11.0f) / MathHelper.Pi); + float randSize = Main.rand.NextFloat(0.82f, 1.08f); + + float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * 60) % 120)), 5)); + + for (int i = 0; i < 2; i++) + { + float sizeMult = (i == 0 ? 1 : 0.8f); + float colorMult = (i == 0 ? 1 : 0.7f); + Main.EntitySpriteDraw(bloom, drawPosition + (Vector2.UnitY * npc.height / 2f) + Vector2.UnitY * ((1 - sine) * 2.3f * MathF.Pow(widthMult, 0.55f)), null, Color.Lerp(color2, Color.White, i * 0.7f) with { A = 0 } * colorMult, 0, bloom.Size() / 2, new Vector2((sine * 0.09f + 1.2f) * widthMult, 0.9f) * 0.18f * MathF.Pow(randSize, 0.3f) * npc.Calamity().baneVisual, SpriteEffects.None); + Main.EntitySpriteDraw(center, drawPosition + (Vector2.UnitY * npc.height / 2f) + Vector2.UnitY * ((1 - sine2) * 3.3f * MathF.Pow(widthMult, 0.55f)), null, Color.Lerp(color, Color.White, i * 0.7f) with { A = 0 } * colorMult, 0, center.Size() / 2, new Vector2((sine2 * 0.09f + 1.2f) * widthMult, 0.6f) * 0.18f * randSize * npc.Calamity().baneVisual, SpriteEffects.None); + } + + int chance = (int)(13 + 40 * (1 - npc.Calamity().baneVisual)); + if (Main.rand.NextBool(chance)) + { + bool start = !Main.rand.NextBool(4); + Vector2 baneVel = Vector2.UnitY * Main.rand.NextFloat(-0.5f, -1.5f) * widthMult * (Main.rand.NextBool(5) ? 2 : 1) + npc.velocity * 0.35f; + Vector2 banePos = npc.Center + Main.rand.NextVector2Circular(3 * widthMult, 8) + (Vector2.UnitY * npc.height / 3f) + Vector2.UnitY * ((1 - sine) * 2.3f); + Particle baneRunes = new BaneParticle(banePos, baneVel, false, 55, 1f * MathF.Pow(widthMult, 0.45f), start ? color : color2, start ? color2 : color, Vector2.One, true, Main.rand.NextBool(3) ? Main.rand.NextFloat(-0.2f, 0.2f) : 0, 0.95f, MathHelper.PiOver2 * Main.rand.Next(4 + 1), sineRate: Main.rand.NextFloat(0.2f, 1f), sineIntensity: Main.rand.Next(14, 19 + 1) * widthMult); + GeneralParticleHandler.SpawnParticle(baneRunes); + if (Main.rand.NextBool()) + baneRunes.DrawLayer = Enums.GeneralDrawLayer.BeforeNPCs; + } + Lighting.AddLight(npc.Center, color.ToVector3() * 0.6f); + } + } +} diff --git a/Projectiles/Rogue/LanceofDestiny.png b/Buffs/DamageOverTime/Bane.png similarity index 77% rename from Projectiles/Rogue/LanceofDestiny.png rename to Buffs/DamageOverTime/Bane.png index 72395d8fa7..f793baae8e 100644 Binary files a/Projectiles/Rogue/LanceofDestiny.png and b/Buffs/DamageOverTime/Bane.png differ diff --git a/Buffs/DamageOverTime/DemonicFlames.cs b/Buffs/DamageOverTime/DemonicFlames.cs index 7f6827f0bb..8e8fd369a5 100644 --- a/Buffs/DamageOverTime/DemonicFlames.cs +++ b/Buffs/DamageOverTime/DemonicFlames.cs @@ -16,11 +16,11 @@ namespace CalamityMod.Buffs.DamageOverTime { EnemyLostRegen = 60, //Unused in the method, this is the amount of DoT from Forbidden Oathblade demon flames HeatDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a heat debuff - NPCLifeRegenMethod = DemonFlamesNPCLifeRegen + NPCLifeRegenMethod = DemonicFlamesNPCLifeRegen }; - public static void DemonFlamesNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage) + public static void DemonicFlamesNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage) { - int baseDemonicFlamesDoTValue = (int)Math.Max(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(npc.Calamity().demonicFlamesBonusDamage), npc.Calamity().demonicFlamesBonusDamage); + int baseDemonicFlamesDoTValue = (int)Math.Max(Math.Max(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(npc.Calamity().demonicFlamesBonusDamage), npc.Calamity().demonicFlamesBonusDamage), (int)debuffData.EnemyLostRegen); npc.Calamity().ApplyDPSDebuff(baseDemonicFlamesDoTValue, baseDemonicFlamesDoTValue / 15, ref npc.lifeRegen, ref damage); } public override void SetStaticDefaults() @@ -30,7 +30,6 @@ namespace CalamityMod.Buffs.DamageOverTime Main.buffNoSave[Type] = true; BuffID.Sets.LongerExpertDebuff[Type] = true; BuffDatasets.DebuffDataset[Type] = debuffData; - } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/DamageOverTime/HadopelagicPressure.cs b/Buffs/DamageOverTime/HadopelagicPressure.cs index 7cde6908ed..6cc7804326 100644 --- a/Buffs/DamageOverTime/HadopelagicPressure.cs +++ b/Buffs/DamageOverTime/HadopelagicPressure.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs.DamageOverTime { public static DebuffData debuffData = new DebuffData() { - EnemyLostRegen = 400, + EnemyLostRegen = 350, //175 dps WaterDebuffScaling = 1 }; public override void SetStaticDefaults() diff --git a/Buffs/DamageOverTime/Shred.cs b/Buffs/DamageOverTime/Shred.cs index de47a1c423..6b893d8bc9 100644 --- a/Buffs/DamageOverTime/Shred.cs +++ b/Buffs/DamageOverTime/Shred.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.DataStructures; using CalamityMod.NPCs; using CalamityMod.Particles; using CalamityMod.Projectiles; @@ -19,7 +20,10 @@ namespace CalamityMod.Buffs.DamageOverTime // This deals 600 DPS per stack, is boosted by ranged stats and can supercrit. internal static int BaseDamage = 120; internal static int FramesPerDamageTick = 12; - + public static DebuffData debuffData = new DebuffData() + { + EnemyLostRegen = BaseDamage + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; diff --git a/Buffs/DamageOverTime/SulphuricPoisoning.cs b/Buffs/DamageOverTime/SulphuricPoisoning.cs index 79c6a49b58..614e9f0c56 100644 --- a/Buffs/DamageOverTime/SulphuricPoisoning.cs +++ b/Buffs/DamageOverTime/SulphuricPoisoning.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs.DamageOverTime { public static DebuffData debuffData = new DebuffData() { - EnemyLostRegen = 240, + EnemyLostRegen = 350, //175 dps SicknessDebuffScaling = 1 }; public override void SetStaticDefaults() diff --git a/Buffs/DamageOverTime/VermillionFlux.cs b/Buffs/DamageOverTime/VermillionFlux.cs index ab64762903..8e4f03ccc0 100644 --- a/Buffs/DamageOverTime/VermillionFlux.cs +++ b/Buffs/DamageOverTime/VermillionFlux.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs.DamageOverTime { public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric) { - EnemyLostRegen = 100, + EnemyLostRegen = 75, //150 dps when moving, 37.5 dps when stationary ElectricDebuffScaling = 1 }; public override void SetStaticDefaults() diff --git a/Buffs/DamageOverTime/Voidfrost.cs b/Buffs/DamageOverTime/Voidfrost.cs index 22f0ebda79..37280063fa 100644 --- a/Buffs/DamageOverTime/Voidfrost.cs +++ b/Buffs/DamageOverTime/Voidfrost.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs.DamageOverTime { public static DebuffData debuffData = new DebuffData() { - EnemyLostRegen = 400, + EnemyLostRegen = 500, //250 dps is extra strong for its tier due to being difficult to inflict ColdDebuffScaling = 1 }; public override void SetStaticDefaults() diff --git a/Buffs/StatBuffs/Mushy.cs b/Buffs/StatBuffs/Mushy.cs index 0ae91c9625..53a0e6b247 100644 --- a/Buffs/StatBuffs/Mushy.cs +++ b/Buffs/StatBuffs/Mushy.cs @@ -15,7 +15,6 @@ namespace CalamityMod.Buffs.StatBuffs public override void SetStaticDefaults() { - Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; } diff --git a/Buffs/StatBuffs/SmashedEvil.cs b/Buffs/StatBuffs/SmashedEvil.cs new file mode 100644 index 0000000000..9991a19dad --- /dev/null +++ b/Buffs/StatBuffs/SmashedEvil.cs @@ -0,0 +1,64 @@ +using System; +using CalamityMod.DataStructures; +using CalamityMod.Items.Accessories; +using Terraria; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatBuffs +{ + public class SmashedEvil : ModBuff + { + public static DebuffData debuffData = new DebuffData() + { + EnemyLostRegen = 40, + SicknessDebuffScaling = 1, + HeatDebuffScaling = 1, + ColdDebuffScaling = 1, + ElectricDebuffScaling = 1, + WaterDebuffScaling = 1, + NPCLifeRegenMethod = SmashedEvilNPCRegen + + }; + + public static void SmashedEvilNPCRegen(NPC npc, int buffType, ref int buffIndex, ref int damage) + { + var cnpc = npc.Calamity(); + float totalDPS = debuffData.EnemyLostRegen; + + var heat = cnpc.ActiveHeatDebuffMultiplier; + var cold = cnpc.ActiveColdDebuffMultiplier; + var sick = cnpc.ActiveSicknessDebuffMultiplier; + var elec = cnpc.ActiveElectricDebuffMultiplier; + var water = cnpc.ActiveWaterDebuffMultiplier; + StatModifier totalScaling = + DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveHeatDebuffMultiplier, debuffData.HeatDebuffScaling) + .CombineWith(DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveColdDebuffMultiplier, debuffData.ColdDebuffScaling) + .CombineWith(DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveSicknessDebuffMultiplier, debuffData.SicknessDebuffScaling) + .CombineWith(DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveWaterDebuffMultiplier, debuffData.WaterDebuffScaling) + .CombineWith(DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveElectricDebuffMultiplier, debuffData.ElectricDebuffScaling) + )))); + totalDPS = totalScaling.ApplyTo(totalDPS); + var totalDPSAdjusted = totalDPS - debuffData.EnemyVanillaRegenToCancelOut; + npc.Calamity().ApplyDPSDebuff((int)(totalDPSAdjusted), (int)Math.Max(totalDPS * debuffData.MultiplierDamageTickSize, debuffData.MinimumDamageTickSize), ref npc.lifeRegen, ref damage); + } + public override void SetStaticDefaults() + { + Main.debuff[Type] = false; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegenTime += 2; + player.GetDamage() += 0.1f; + player.moveSpeed += 0.2f; + } + + public override void Update(NPC npc, ref int buffIndex) + { + } + } +} diff --git a/Buffs/StatBuffs/SmashedEvil.png b/Buffs/StatBuffs/SmashedEvil.png new file mode 100644 index 0000000000..a75b74f944 Binary files /dev/null and b/Buffs/StatBuffs/SmashedEvil.png differ diff --git a/Buffs/StatDebuffs/GalvanicCorrosion.cs b/Buffs/StatDebuffs/GalvanicCorrosion.cs index 018e738c30..204c4884d9 100644 --- a/Buffs/StatDebuffs/GalvanicCorrosion.cs +++ b/Buffs/StatDebuffs/GalvanicCorrosion.cs @@ -1,4 +1,5 @@ -using CalamityMod.NPCs; +using CalamityMod.DataStructures; +using CalamityMod.NPCs; using CalamityMod.Systems.Collections; using Terraria; using Terraria.ID; @@ -14,7 +15,13 @@ namespace CalamityMod.Buffs.StatDebuffs Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; BuffID.Sets.LongerExpertDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } + // Purely to make it get electric color in tooltips + public static DebuffData debuffData = new DebuffData() + { + ElectricDebuffScaling = 1 + }; public override void Update(NPC npc, ref int buffIndex) { diff --git a/Buffs/Summon/DemonshadeSetDevilBuff.cs b/Buffs/Summon/DemonshadeSetDevilBuff.cs deleted file mode 100644 index b9c589fc3a..0000000000 --- a/Buffs/Summon/DemonshadeSetDevilBuff.cs +++ /dev/null @@ -1,12 +0,0 @@ -using CalamityMod.Projectiles.Typeless; -using Terraria.ModLoader; - -namespace CalamityMod.Buffs.Summon -{ - public class DemonshadeSetDevilBuff : BaseSummonBuff - { - protected override int MinionProjectileType => ModContent.ProjectileType(); - - protected override ref bool MinionBool => ref BuffModdedOwner.rDevil; - } -} diff --git a/Buffs/Summon/DemonshadeSetDevilBuff.png b/Buffs/Summon/DemonshadeSetDevilBuff.png deleted file mode 100644 index 2bf486ac3e..0000000000 Binary files a/Buffs/Summon/DemonshadeSetDevilBuff.png and /dev/null differ diff --git a/Buffs/Summon/WulfrumDroidBuff.png b/Buffs/Summon/WulfrumDroidBuff.png index bec3e3f78c..d64a5b4b9b 100644 Binary files a/Buffs/Summon/WulfrumDroidBuff.png and b/Buffs/Summon/WulfrumDroidBuff.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3a005c1529..2a86309ad8 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -326,15 +326,6 @@ namespace CalamityMod.CalPlayer public int deadSunCounter = 6; public int DragonsBreathAudioCooldown = 0; public int DragonsBreathAudioCooldown2 = 0; - public int darklightEnergy = 0; - public int darklightEnergyTimer = 0; - public bool darklightEnergyPaused = false; - public bool darklightEnergyMaxFXPlayed = false; - private int lucreciaParticleTimer = 0; - public int elementalMastery = 0; - public int elementalMasteryTimer = 0; - public bool elementalMasteryPaused = false; - public bool elementalMasterySFXPlayed = false; public float unstableCastersGauntletVis = 0; public int unstableCastersGauntletVisTimer = 0; public int PhotoAudioCooldown = 0; @@ -343,11 +334,6 @@ namespace CalamityMod.CalPlayer public int arpeggioCooldown = 0; /// Cooldown variable which prevents using Burning Sea during its "burn-out" mechanic. public int burningSeaBurnOut = 0; - /// - /// How many stacks of Evil Smasher's boost the player has. This increases the weapon's damage, use speed, and knockback.
- /// Getting hit decreases this by 1. Switching to a different item resets this to 0. - ///
- 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. @@ -454,6 +440,9 @@ namespace CalamityMod.CalPlayer public int consecutiveCaughtFish = 0; public float WeakTimeFreezeUseTimer = 0; public bool WeakTimeFreezeInUse = false; + + public int DemonAltarDialogueCounter = 0; + public int DemonAltarDialogueCooldown = 0; #endregion #region Sound @@ -722,8 +711,8 @@ namespace CalamityMod.CalPlayer public bool drawnAnyShieldThisFrame = false; // TODO -- Some way to show the player their total shield points. - public int TotalEnergyShielding => RoverDriveShieldDurability + LunicCorpsShieldDurability + pSoulShieldDurability + SpongeShieldDurability; - public int TotalMaxShieldDurability => (roverDrive ? RoverDrive.ShieldDurabilityMax : 0) + (lunicCorpsSet ? LunicCorpsHelmet.ShieldDurabilityMax : 0) + (profanedCrystalBuffs ? ProfanedSoulCrystal.ShieldDurabilityMax : ((pSoulArtifact && !profanedCrystal) ? ProfanedSoulArtifact.ShieldDurabilityMax : 0)) + (sponge ? TheSponge.ShieldDurabilityMax : 0); + public int TotalEnergyShielding => RoverDriveShieldDurability + LunicCorpsShieldDurability + pSoulShieldDurability + SpongeShieldDurability + (Starshield > 0 ? StratusStarburst : 0); + public int TotalMaxShieldDurability => (roverDrive ? RoverDrive.ShieldDurabilityMax : 0) + (lunicCorpsSet ? LunicCorpsHelmet.ShieldDurabilityMax : 0) + (profanedCrystalBuffs ? ProfanedSoulCrystal.ShieldDurabilityMax : ((pSoulArtifact && !profanedCrystal) ? ProfanedSoulArtifact.ShieldDurabilityMax : 0)) + (sponge ? TheSponge.ShieldDurabilityMax : 0) + (Starshield > 0 ? 100 : 0); public int RoverDriveShieldDurability = 0; public int LunicCorpsShieldDurability = 0; @@ -810,6 +799,7 @@ namespace CalamityMod.CalPlayer #region Accessory public bool shieldOfTheHighRulerDashVelocityBoosted = false; + public bool yharimsGift = false; public bool luxorsGift = false; public bool luxorHit = false; public bool luxorsGiftVanity = false; @@ -960,6 +950,9 @@ namespace CalamityMod.CalPlayer public bool toxicHeart = false; public bool toxicHeartVisuals = false; public bool abaddon = false; + public int abaddonCooldown = 0; + public bool abaddonEffectVisual = false; + public float playerBaneDebuffDamage = 0; public bool aeroStone = false; public bool lifejelly = false; @@ -1032,7 +1025,7 @@ namespace CalamityMod.CalPlayer public bool IsFirstDashFrame = true; public int fallingBootVelCheckTimer = 0; public bool voidOfCalamity = false; - public bool voidOfExtinction = false; + public bool apollyon = false; public bool eArtifact = false; public bool dArtifact = false; public bool auricSArtifact = false; @@ -1269,7 +1262,6 @@ namespace CalamityMod.CalPlayer public int tailFrame = 0; public bool astralStarRain = false; public int astralStarRainCooldown = 0; - public int AbaddonCooldown = 0; public int VoidCooldown = 0; public int ursaSergeantCooldown = 0; public int AlchFlaskCooldown = 0; @@ -1308,8 +1300,6 @@ namespace CalamityMod.CalPlayer public bool daedalusCrystal = false; /// Hydrothermic armor's summoner set bonus minion. public bool chaosSpirit = false; - /// Demonshade armor's set bonus minion. - public bool redDevil = false; public bool GemTechSet = false; /// Calamity's Cobalt armor set bonus; increases damage and crit chance based on how fast the player is moving. public bool CobaltSet = false; @@ -1363,6 +1353,7 @@ namespace CalamityMod.CalPlayer public bool armorCrunch = false; public bool crumble = false; public bool irradiated = false; + public bool bane = false; public bool brimstoneFlames = false; public bool weakBrimstoneFlames = false; public bool demonicFlames = false; @@ -1564,8 +1555,6 @@ namespace CalamityMod.CalPlayer /// Pearl of Enthrallment. public bool waterEleBuff = false; public bool fClump = false; - /// Demonshade armor's Red Devil. - public bool rDevil = false; /// Aerospec armor's Valkyrie. public bool aValkyrie = false; public bool apexShark = false; @@ -2350,6 +2339,7 @@ namespace CalamityMod.CalPlayer blazingCursorDamage = false; blazingCursorVisuals = false; + yharimsGift = false; luxorsGift = false; luxorsGiftVanity = false; fungalSymbiote = false; @@ -2459,7 +2449,7 @@ namespace CalamityMod.CalPlayer crawCarapace = false; baroclaw = false; voidOfCalamity = false; - voidOfExtinction = false; + apollyon = false; eArtifact = false; dArtifact = false; auricSArtifact = false; @@ -2548,6 +2538,8 @@ namespace CalamityMod.CalPlayer spiritOrigin = false; spiritOriginVanity = false; critDamage = 0; + if (abaddonCooldown > 0) + abaddonCooldown--; astralStarRain = false; @@ -2640,6 +2632,9 @@ namespace CalamityMod.CalPlayer blunderBoosterVisibility = true; veneratedLocket = false; + if (DemonAltarDialogueCooldown > 0) + DemonAltarDialogueCooldown--; + alcoholPoisoning = false; shadowflame = false; daybroken = false; @@ -2652,6 +2647,7 @@ namespace CalamityMod.CalPlayer armorCrunch = false; crumble = false; irradiated = false; + bane = false; brimstoneFlames = false; witheredDebuff = false; absorberAffliction = false; @@ -2814,7 +2810,6 @@ namespace CalamityMod.CalPlayer brimEleBuff = false; waterEleBuff = false; fClump = false; - rDevil = false; aValkyrie = false; sCrystal = false; sGod = false; @@ -2841,7 +2836,6 @@ namespace CalamityMod.CalPlayer fungalClumpVanity = false; howlsHeart = false; howlsHeartVanity = false; - redDevil = false; valkyrie = false; slimeGod = false; chaosSpirit = false; @@ -3090,7 +3084,6 @@ namespace CalamityMod.CalPlayer gSabatonTempJumpSpeed = 0; rOfDelivarenceRam = false; astralStarRainCooldown = 0; - AbaddonCooldown = 0; VoidCooldown = 0; AlchFlaskCooldown = 0; ascendantInsigniaCooldown = 0; @@ -3139,6 +3132,7 @@ namespace CalamityMod.CalPlayer armorCrunch = false; crumble = false; irradiated = false; + bane = false; brimstoneFlames = false; witheredDebuff = false; absorberAffliction = false; @@ -3435,12 +3429,9 @@ namespace CalamityMod.CalPlayer CurrentlyViewedHologramText = string.Empty; #endregion - evilSmasherBoost = 0; burningSeaBurnOut = 0; flareGunOverheat = 0; hellbornShots = 0; - darklightEnergy = 0; - elementalMastery = 0; garandShots = 0; persecutedEnchantSummonTimer = 0; momentumCapacitorTime = 0; @@ -4479,6 +4470,10 @@ namespace CalamityMod.CalPlayer if (HasCustomDash && UsedDash.IsOmnidirectional) Player.maxFallSpeed = 50f; + // If the player isn't moving yet is still dashing, disable the dash (prevents weird hook jank) + if (Player.velocity == Vector2.Zero && Player.dashDelay == -1) + Player.dashDelay = 0; + tailFrameUp++; if (tailFrameUp == 8) { @@ -4998,6 +4993,13 @@ namespace CalamityMod.CalPlayer else scionsCurioDebuffDamage = 0; + if (Player.Calamity().abaddon || Player.Calamity().apollyon) + { + Player.Calamity().playerBaneDebuffDamage = (1 + Player.GetTotalCritChance(Player.GetBestClass()) * 0.01f * (Player.Calamity().apollyon ? Apollyon.critScaling : Abaddon.critScaling)); + } + else + Player.Calamity().playerBaneDebuffDamage = 0; + // True melee damage from various vanilla equipment placed here. // Titan Glove and ALL upgrades. diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index e2e3352c4e..c00ca129b2 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -497,8 +497,7 @@ namespace CalamityMod.CalPlayer if (calamityPlayer.brimstoneFlames && drawInfo.shadow == 0f) { - bool resistsBrimstoneFlames = abaddon; // Looks weaker if you have Abaddon equipped - BrimstoneFlames.DrawEffects(drawInfo, resistsBrimstoneFlames); + BrimstoneFlames.DrawEffects(drawInfo); } if (calamityPlayer.brainRot && drawInfo.shadow == 0f) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 5fc1264631..c97adf9412 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -8,6 +8,7 @@ using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer.Dashes; using CalamityMod.Cooldowns; +using CalamityMod.DataStructures; using CalamityMod.Dusts; using CalamityMod.Enums; using CalamityMod.Events; @@ -27,7 +28,7 @@ using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Armor.Victide; using CalamityMod.Items.Armor.Wulfrum; using CalamityMod.Items.Potions; -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.Items.Tools; using CalamityMod.Items.VanillaArmorChanges; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Rogue; @@ -40,6 +41,7 @@ using CalamityMod.NPCs.Providence; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses; using CalamityMod.Particles; +using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Typeless; @@ -52,13 +54,11 @@ using Terraria; using Terraria.Audio; using Terraria.Chat; using Terraria.DataStructures; -using Terraria.Graphics.Shaders; using Terraria.GameContent.Creative; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; -using CalamityMod.Projectiles.Melee; -using CalamityMod.Items.Tools; namespace CalamityMod.CalPlayer { @@ -460,7 +460,53 @@ namespace CalamityMod.CalPlayer } #endregion + #region OnHitNPC + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Player.Calamity().yharimsGift) + target.AddBuff(ModContent.BuffType(),120); + + int debuffSpreadProj = ModContent.ProjectileType(); + if ((Player.Calamity().abaddon || Player.Calamity().apollyon) && (target.Calamity().abaddonEffected || target.Calamity().apollyonEffected) && hit.Crit && abaddonCooldown == 0 && Player.ownedProjectileCounts[debuffSpreadProj] == 0) + { + int maxTargetNum = target.Calamity().apollyonEffected ? 10 : 6; + Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center, Vector2.Zero, debuffSpreadProj, 0, 0, Player.whoAmI, 0, target.whoAmI, maxTargetNum); + abaddonCooldown = -1; // Prevents multiple projectiles hitting on the same frame from spawning multiple of these + } + } + #endregion + #region Modify Hit NPC + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (target.HasBuff()) + { + //This is essentially 10 AP, but independent of armor amount + modifiers.FlatBonusDamage += 5; + } + + if (Player.Calamity().apollyon) + { + target.Calamity().apollyonEffected = true; + // Check here for the amount of debuffs on enemy + int numOfDebuffs = 0; + for (int index = 0; index < target.buffType.Length; index++) + { + int type = target.buffType[index]; + var debuffData = BuffDatasets.DebuffDataset[type]; + if (debuffData != null) + numOfDebuffs++; + } + modifiers.CritDamage += Apollyon.critDamageBoostPerDebuff * numOfDebuffs; + } + else if (Player.Calamity().abaddon) + target.Calamity().abaddonEffected = true; + else + { + target.Calamity().abaddonEffected = false; + target.Calamity().apollyonEffected = false; + } + } public override void ModifyHitNPCWithItem(Item item, NPC target, ref NPC.HitModifiers modifiers) { modifiers.CritDamage += critDamage; @@ -848,7 +894,7 @@ namespace CalamityMod.CalPlayer float cooldownDurationScalar = MathHelper.Clamp((actualProjDamage - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f); // The Evolution - if (evolution) + if (evolution && !Player.HasBuff()) { if (Player.whoAmI == Main.myPlayer) { @@ -1887,10 +1933,6 @@ namespace CalamityMod.CalPlayer Rectangle location = new Rectangle((int)Player.position.X, (int)Player.position.Y - 16, Player.width, Player.height); CombatText.NewText(location, Color.LightBlue, Language.GetTextValue(shieldDamageText)); - // Give the player iframes for taking a shield hit, regardless of whether or not the shields broke. - int shieldHitIFrames = Player.ComputeHitIFrames(info); - Player.GiveIFrames(info.CooldownCounter, shieldHitIFrames, true); - // Spawn particles when hit with the shields up, regardless of whether or not the shields broke. // More particles spawn if a shield broke. if (pSoulArtifact) @@ -1961,6 +2003,10 @@ namespace CalamityMod.CalPlayer // If the shields completely absorbed the hit, then delete the hit using reflection. if (shieldsFullyAbsorbedHit) { + // Give the player iframes for taking a shield hit + int shieldHitIFrames = Player.ComputeHitIFrames(info); + Player.GiveIFrames(info.CooldownCounter, shieldHitIFrames, true); + freeDodgeFromShieldAbsorption = true; // Cancel defense damage, if it was going to occur this frame. @@ -2174,9 +2220,6 @@ namespace CalamityMod.CalPlayer LoseAdrenalineOnHurt(hurtInfo, false); } - if (evilSmasherBoost > 0) - evilSmasherBoost -= 1; - if (trinketOfChi) chiBuffTimer = 0; @@ -2366,7 +2409,7 @@ namespace CalamityMod.CalPlayer Player.AddBuff(BuffID.Honey, 300, false); // Handle hit effects from the gem tech armor set. - Player.Calamity().GemTechState.PlayerOnHitEffects((int)hurtInfo.Damage); + Player.Calamity().GemTechState.PlayerOnHitEffects(hurtInfo); if (Player.whoAmI == Main.myPlayer) { @@ -2408,10 +2451,10 @@ namespace CalamityMod.CalPlayer if (dAmulet) { var source = Player.GetSource_Accessory_OnHurt(FindAccessory(), hurtInfo.DamageSource); - int projAmount = (rampartOfDeities ? 12 : 6); + var projAmount = (rampartOfDeities ? 12 : 6) * (Player.strongBees ? 1.5f : 1f); for (int n = 0; n < projAmount; n++) { - int deificProjDamage = (int)(Player.GetBestClassDamage().ApplyTo(DeificAmulet.StarDamage) * (Player.strongBees ? 0.85f : 1f)); + int deificProjDamage = (int)(Player.GetBestClassDamage().ApplyTo(DeificAmulet.StarDamage)); Projectile onHitProj = Main.projectile[Projectile.NewProjectile(source, Player.Center, new Vector2(0,-15 * (rampartOfDeities && n % 2 == 0 ? 0.75f: 1.25f)).RotatedBy(MathHelper.TwoPi/projAmount*n), ModContent.ProjectileType(), deificProjDamage, 4f, Player.whoAmI)]; if (onHitProj.whoAmI.WithinBounds(Main.maxProjectiles)) @@ -2422,8 +2465,6 @@ namespace CalamityMod.CalPlayer onHitProj.tileCollide = false; onHitProj.extraUpdates = 1; onHitProj.Calamity().conditionalHomingRange = 600f; - if (Player.strongBees) - onHitProj.penetrate += 1; } } } diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 11c1641360..b181b14c72 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -115,13 +115,14 @@ namespace CalamityMod.CalPlayer ApplyDoTDebuff(crushDepth, 18, purity); ApplyDoTDebuff(astralInfection, 24, infectedJewel || hideOfDeus || purity); ApplyDoTDebuff(shadowflame, 30, purity); - ApplyDoTDebuff(brimstoneFlames, (int)MathF.Round(30 * (abaddon ? (1f - Abaddon.BrimstoneFlamesReduction) : 1f)), purity); - ApplyDoTDebuff(plague, (int)MathF.Round(30 * (abaddon ? (1f - AlchemicalDecanter.PlagueReduction) : 1f)), purity); + ApplyDoTDebuff(brimstoneFlames, 30, purity); + ApplyDoTDebuff(plague, (int)MathF.Round(30 * (alchFlask ? (1f - AlchemicalDecanter.PlagueReduction) : 1f)), purity); ApplyDoTDebuff(vHex, 30); // Has other effects ApplyDoTDebuff(searingLava, 30); ApplyDoTDebuff(demonicFlames, 33, purity); // Never inflicted on the player ApplyDoTDebuff(laceration, 36, purity); ApplyDoTDebuff(daybroken, 40, purity); + ApplyDoTDebuff(bane, 40, purity); ApplyDoTDebuff(nightwither, 40, purity); ApplyDoTDebuff(holyFlames, 40, purity); ApplyDoTDebuff(voidfrost, 40, purity); diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 14b873d37b..085ae24558 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -69,6 +69,8 @@ using CalamityMod.Tiles.Abyss.AbyssAmbient; using CalamityMod.Tiles.FurnitureAuric; using CalamityMod.Tiles.Ores; using CalamityMod.UI; +using CalamityMod.UI.DialogueDisplay; +using CalamityMod.UI.DialogueDisplay.DisplayEffects; using CalamityMod.Utilities; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -152,9 +154,6 @@ namespace CalamityMod.CalPlayer // Drawing parameters UpdateDrawingParameters(); - // Handle Lucrecia's passive energy effects - HandleLucreciaLineEffects(); - // Update all particle sets for items. // This must be done here instead of in the item logic because these sets are not properly instanced // in the global classes. Attempting to update them there will cause multiple updates to one set for multiple items. @@ -406,120 +405,6 @@ namespace CalamityMod.CalPlayer Player.wingTime++; } - if (Player.HeldItem.type == ModContent.ItemType() && darklightEnergy > 0) - { - if (darklightEnergy == Lucrecia.MaxEnergy && !darklightEnergyPaused) - { - darklightEnergyPaused = true; - darklightEnergyTimer = 0; - } - - darklightEnergyTimer++; - - // If the energy is at max, pause for 180 ticks - if (darklightEnergyPaused) - { - if (darklightEnergyTimer >= 1 && !darklightEnergyMaxFXPlayed) - { - SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged"); - SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, Player.Center); - - for (int i = 0; i < 10; i++) // Circular ring of particles burst from player - { - float angle = MathHelper.TwoPi * (i / 10f); - Vector2 spawnDirection = angle.ToRotationVector2(); - Vector2 velocity = spawnDirection * 14f; - - CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); - GeneralParticleHandler.SpawnParticle(spark); - } - darklightEnergyMaxFXPlayed = true; - } - - // If the pause is Done, resume decrementing. - if (darklightEnergyTimer >= 180) - { - darklightEnergyPaused = false; - darklightEnergyTimer = 0; - darklightEnergy--; - } - } - else // Decrementing - { - darklightEnergyMaxFXPlayed = false; - // Once every 20 ticks - if (darklightEnergyTimer >= 20) - { - darklightEnergy--; - darklightEnergyTimer = 0; - } - } - } - else - { - // Reset all energy variables when not holding the weapon - darklightEnergyTimer = 0; - darklightEnergyPaused = false; - darklightEnergy = 0; - } - - if (Player.HeldItem.type == ModContent.ItemType() && elementalMastery > 0) - { - if (elementalMastery == Lightspeed.MaxEnergy && !elementalMasteryPaused) - { - elementalMasteryPaused = true; - elementalMasteryTimer = 0; - } - - elementalMasteryTimer++; - - // If the mastery is at max, pause for 180 ticks - if (elementalMasteryPaused) - { - if (elementalMasteryTimer >= 1 && !elementalMasterySFXPlayed) - { - SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged"); - SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, Player.Center); - - for (int i = 0; i < 10; i++) // Circular ring of particles burst from player - { - float angle = MathHelper.TwoPi * (i / 10f); - Vector2 spawnDirection = angle.ToRotationVector2(); - Vector2 velocity = spawnDirection * 14f; - - CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); - GeneralParticleHandler.SpawnParticle(spark); - } - elementalMasterySFXPlayed = true; - } - // If the pause is Done, resume decrementing. - if (elementalMasteryTimer >= 180) - { - elementalMasteryPaused = false; - elementalMasteryTimer = 0; - elementalMastery--; - } - } - else // Decrementing - { - elementalMasterySFXPlayed = false; - // Once every 30 ticks - if (elementalMasteryTimer >= 30) - { - elementalMastery--; - elementalMasteryTimer = 0; - } - } - } - else - { - // Reset all EM variables when not holding the weapon - elementalMasteryTimer = 0; - elementalMasteryPaused = false; - elementalMastery = 0; - } - - if (Player.HeldItem.type == ModContent.ItemType() && unstableCastersGauntletVis < 100) { @@ -1139,8 +1024,39 @@ namespace CalamityMod.CalPlayer } } + private void DemonAltarTalking() + { + + for (var h = -15; h < 15; h++) + { + for (var j = -15; j < 15; j++) + { + var tilePos = Player.Center.ToTileCoordinates() + new Point(h, j); + if (Main.tile[tilePos.X, tilePos.Y].TileType == TileID.DemonAltar) + { + string type = WorldGen.crimson ? "Mods.CalamityMod.EvilSmasher.CrimsonAltar" : "Mods.CalamityMod.EvilSmasher.DemonAltar"; + if (DialogueDisplaySystem.ContainsDialogueKey(type)) + DialogueDisplaySystem.RemoveDialogue(DialogueDisplaySystem.GetSlot(type)); + DialogueDisplaySystem.StartDialogueOnClient(type, new Vector2(tilePos.X * 16 + 16, tilePos.Y * 16), DemonAltarDialogueCounter, 180, false, new AltarText()); + DemonAltarDialogueCounter++; + DemonAltarDialogueCooldown = 300; + if (DemonAltarDialogueCounter >= 4) + { + DemonAltarDialogueCooldown = 3600; + DemonAltarDialogueCounter = 0; + } + return; + } + } + } + } private void MiscEffects() { + if (Player.inventory.Any(x => x.type == ItemID.Pwnhammer) && !Player.inventory.Any(x => x.type == ModContent.ItemType()) && Player.adjTile[TileID.DemonAltar] && DemonAltarDialogueCooldown <= 0 && Player.miscCounter % 30 == 0) + { + DemonAltarTalking(); + } + //Mana Burn update if (ManaBurnFireDrawer != null) { @@ -2250,8 +2166,6 @@ namespace CalamityMod.CalPlayer raiderSoundCooldown--; if (astralStarRainCooldown > 0) astralStarRainCooldown--; - if (AbaddonCooldown > 0) - AbaddonCooldown--; if (VoidCooldown > 0) VoidCooldown--; if (ursaSergeantCooldown > 0) @@ -3629,11 +3543,6 @@ namespace CalamityMod.CalPlayer if (Player.HeldItem.type != ModContent.ItemType()) planarSpeedBoost = 0; } - if (evilSmasherBoost > 0) - { - if (Player.HeldItem.type != ModContent.ItemType()) - evilSmasherBoost = 0; - } // Flight time boosts double flightTimeMult = 1D + @@ -4435,82 +4344,6 @@ namespace CalamityMod.CalPlayer } #endregion - #region Lucrecia Line Effects - - public void HandleLucreciaLineEffects() - { - int lucreciaItemID = ModContent.ItemType(); - int lightspeedItemID = ModContent.ItemType(); - - if (Player.HeldItem.type == lucreciaItemID && darklightEnergy > 0) - { - lucreciaParticleTimer--; - - // If the timer is at or below zero, spawn a particle. - if (lucreciaParticleTimer <= 0) - { - // Reset the timer (spawn rate depends on energy) - lucreciaParticleTimer = (int)(20 - 15 * (darklightEnergy / 60)); - - float radius = Main.rand.NextFloat(160f, 190f); // Distance from center - float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius - - Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius; - - // Scale opacity with energy - float opacity = darklightEnergy / (float)Lucrecia.MaxEnergy; - Color color = Main.rand.NextBool() ? Color.MediumPurple : Color.CornflowerBlue; - color *= opacity * 0.5f; - - if (darklightEnergy >= 100) - { - color *= 2.4f; // Way brighter - } - - Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path - float rotationSpeed = 0.04f; - - var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI); - GeneralParticleHandler.SpawnParticle(particle); - } - } - - if (Player.HeldItem.type == lightspeedItemID && elementalMastery > 0) - { - lucreciaParticleTimer--; - - // If the timer is at or below zero, spawn a particle. - if (lucreciaParticleTimer <= 0) - { - // Reset the timer (spawn rate depends on energy) - lucreciaParticleTimer = (int)(20 - 15 * (elementalMastery / 60)); - - float radius = Main.rand.NextFloat(160f, 190f); // Distance from center - float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius - - Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius; - - // Scale opacity with energy - float opacity = elementalMastery / (float)Lightspeed.MaxEnergy; - Color color = Main.rand.NextBool() ? Color.Aqua : Color.OrangeRed; - color *= opacity * 0.5f; - - if (elementalMastery >= 100) - { - color *= 2.4f; // Way brighter - } - - Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path - float rotationSpeed = 0.04f; - - var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI); - GeneralParticleHandler.SpawnParticle(particle); - } - } - } - #endregion - - #region Energy Shields private void EnergyShields() { diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 38abfc2178..478ec02a8b 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -695,14 +695,14 @@ namespace CalamityMod.CalPlayer if (alchFlask && AlchFlaskCooldown == 0 && proj.type != ProjectileType()) { - int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(10); + int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(Player.strongBees ? 15 : 10); Vector2 seekerVelocity = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.2f); Projectile bee = Projectile.NewProjectileDirect(source, position, seekerVelocity, ProjectileType(), seekerDamage, 0f, Player.whoAmI, -20, 30, 2); bee.ArmorPenetration = 20; bee.penetrate = 2; bee.extraUpdates = 1; - AlchFlaskCooldown = Player.strongBees ? 6 : 7; + AlchFlaskCooldown = 7; } bool lifeAndShieldCondition = Player.statLife >= Player.statLifeMax2 && (!HasAnyEnergyShield || TotalEnergyShielding >= TotalMaxShieldDurability); @@ -733,20 +733,6 @@ namespace CalamityMod.CalPlayer } } - if (abaddon && crit && AbaddonCooldown <= 0 && !voidOfExtinction) - { - AbaddonCooldown = 15; - int AbaddonExploDamage = (int)Player.GetBestClassDamage().ApplyTo(Abaddon.AbaddonExploDamage); - Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType(), AbaddonExploDamage, 0f, Player.whoAmI); - } - - if (voidOfExtinction && crit && VoidCooldown <= 0) - { - VoidCooldown = 15; - int VoidExploDamage = (int)Player.GetBestClassDamage().ApplyTo(VoidofExtinction.VoidExploDamage); - Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType(), VoidExploDamage, 0f, Player.whoAmI); - } - if (ursaSergeant && ursaSergeantCooldown <= 0) { ursaSergeantCooldown = UrsaSergeant.MaxCooldown; @@ -1266,10 +1252,10 @@ namespace CalamityMod.CalPlayer } if (amalgam) { - target.AddBuff(BuffID.Daybreak, 120); - target.AddBuff(BuffType(), 120); + target.AddBuff(BuffType(), 120); + target.AddBuff(BuffID.Frostburn2, 120); target.AddBuff(BuffType(), 120); - target.AddBuff(BuffType(), 120); + target.AddBuff(BuffID.Electrified, 120); target.AddBuff(BuffType(), 120); } if (frostFlare) diff --git a/ChatTags/CalamityBuffTagHandler.cs b/ChatTags/BuffTagEnemyEffectHandler.cs similarity index 97% rename from ChatTags/CalamityBuffTagHandler.cs rename to ChatTags/BuffTagEnemyEffectHandler.cs index d8f36a5862..c7f9735176 100644 --- a/ChatTags/CalamityBuffTagHandler.cs +++ b/ChatTags/BuffTagEnemyEffectHandler.cs @@ -11,7 +11,7 @@ using Terraria.UI.Chat; namespace CalamityMod.ChatTags { - public sealed class CalamityBuffTagHandler : AbstractTagHandler + public sealed class BuffTagEnemyEffectHandler : AbstractTagHandler { public sealed class Snippet(int buffId) : TextSnippet { diff --git a/ChatTags/BuffTagPlayerEffectHandler.cs b/ChatTags/BuffTagPlayerEffectHandler.cs new file mode 100644 index 0000000000..7a2c145c4f --- /dev/null +++ b/ChatTags/BuffTagPlayerEffectHandler.cs @@ -0,0 +1,79 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using Terraria; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.UI.Chat; + +namespace CalamityMod.ChatTags +{ + public sealed class BuffTagPlayerEffectHandler : AbstractTagHandler + { + public sealed class Snippet(int buffId) : TextSnippet + { + private const float IconSize = 26f; + + public int BuffId => buffId; + + public bool DrawIcon => true; + + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = default, Color color = default, float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), IconSize); + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + // Avoid re-drawing the icon when drawing borders. + if (DrawIcon) + { + // Tomat: I would love to support + // BuffLoader.[Pre/Post]Draw here, but it's not vaible + // because: + // 1. Main.DrawBuffIcon relies on LocalPlayer's buffs, + // 2. we can't control the source or destination + // rectangles. + + if (Main.netMode != NetmodeID.Server && !Main.dedServ) + { + var texture = TextureAssets.Buff[BuffId]; + spriteBatch.Draw(texture.Value, new Rectangle((int)position.X, (int)position.Y - 2, (int)IconSize, (int)IconSize), null, Color.White); + } + + position.X += IconSize; + } + + var buffColor = CalamityUtils.GetDebuffTooltipNameColor(buffId); + var name = $"{(DrawIcon ? " " : "")}{Lang.GetBuffName(buffId)}"; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.MouseText.Value, name, position, buffColor, 0f, Vector2.Zero, new Vector2(scale)); + } + return true; + } + + public override float GetStringLength(DynamicSpriteFont font) + { + float iconSize = !DrawIcon ? 0f : IconSize + font.MeasureString(" ").X; + float size = iconSize + font.MeasureString(Lang.GetBuffName(buffId)).X; + return size * Scale; + } + } + + protected override string[] TagNames { get; } = ["cbuffplr"]; + + public override TextSnippet Parse(string text, Color baseColor = new(), string options = null) + { + if (int.TryParse(text, out int buffId) && buffId >= 0 && buffId < BuffLoader.BuffCount) + { + return new Snippet(buffId); + } + + if (BuffID.Search.TryGetId(text, out buffId)) + { + return new Snippet(buffId); + } + + return new TextSnippet(text); + } + } +} diff --git a/Cooldowns/CooldownRegistry.cs b/Cooldowns/CooldownRegistry.cs index b697488611..e22fb8fb3a 100644 --- a/Cooldowns/CooldownRegistry.cs +++ b/Cooldowns/CooldownRegistry.cs @@ -6,7 +6,6 @@ using Terraria.ModLoader; namespace CalamityMod.Cooldowns { - // TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks. public sealed class CooldownRegistry : ModSystem { // Indexed by ushort netID. Contains every registered cooldown. diff --git a/DataStructures/DebuffData.cs b/DataStructures/DebuffData.cs index 743b703740..ae5320365e 100644 --- a/DataStructures/DebuffData.cs +++ b/DataStructures/DebuffData.cs @@ -1,9 +1,9 @@ using System; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Terraria.WorldBuilding; namespace CalamityMod.DataStructures { @@ -224,7 +224,8 @@ namespace CalamityMod.DataStructures .CombineWith(ApplyScalingToStatModifer(cnpc.ActiveElectricDebuffMultiplier, ElectricDebuffScaling) )))) : - cnpc.ActiveTypelessDebuffMultiplier; + // Bane doesn't scale with debuff multipliers. This should be implemented as a default feature you can apply to debuffs at some point. + buffType == ModContent.BuffType() ? cnpc.ActiveTypelessDebuffMultiplier : StatModifier.Default; //Ensure at least 25% effectiveness if (totalScaling.Multiplicative <= 0.25f) @@ -257,7 +258,8 @@ namespace CalamityMod.DataStructures .CombineWith(ApplyScalingToStatModifer(cnpc.ActiveElectricDebuffMultiplier, ElectricDebuffScaling) )))) : - cnpc.ActiveTypelessDebuffMultiplier; + // Bane doesn't scale with debuff multipliers. This should be implemented as a default feature you can apply to debuffs at some point. + buffType == ModContent.BuffType() ? cnpc.ActiveTypelessDebuffMultiplier : StatModifier.Default; //Ensure at least 25% effectiveness if (totalScaling.Multiplicative <= 0.25f) @@ -419,7 +421,7 @@ namespace CalamityMod.DataStructures }; public static DebuffData Electrified = new DebuffData(DebuffBehavior.Electric) { - EnemyLostRegen = 21, + EnemyLostRegen = 30, // 15 dps stationary, 60 dps moving EnemyVanillaRegenToCancelOut = 8, ElectricDebuffScaling = 1 }; diff --git a/DataStructures/GemTechArmorState.cs b/DataStructures/GemTechArmorState.cs index 19274a48c6..e117db21b2 100644 --- a/DataStructures/GemTechArmorState.cs +++ b/DataStructures/GemTechArmorState.cs @@ -202,7 +202,7 @@ namespace CalamityMod.DataStructures PreviouslyUsedGem = usedGemType; } - public void PlayerOnHitEffects(int hitDamage) + public void PlayerOnHitEffects(Player.HurtInfo hurtInfo) { // Don't do anything if the player is not wearing the Gem Tech set. var cgp = Owner.Calamity(); @@ -211,6 +211,7 @@ namespace CalamityMod.DataStructures bool gemWasLost = false; int gemDamage = 0; + int hitDamage = (int)hurtInfo.Damage; bool largeEnoughRegularHit = hitDamage >= GemTechHeadgear.GemBreakDamageLowerBound; // 09FEB2024: Ozzatron: chalice of the blood god no longer protects you when using gem tech armor. // It is now slightly anti-synergetic, in that taking tiny hits when you're already bleeding will make you keep losing gems. @@ -275,7 +276,7 @@ namespace CalamityMod.DataStructures gemDamage = CalamityUtils.DamageSoftCap(gemDamage, GemTechHeadgear.GemDamageSoftcapThreshold); if (Main.myPlayer == OwnerIndex) - Projectile.NewProjectile(Owner.GetSource_ItemUse(Owner.HeldItem), gemPosition, Vector2.Zero, ModContent.ProjectileType(), gemDamage, 0f, OwnerIndex, 0f, (int)GemThatShouldBeLost); + Projectile.NewProjectile(Owner.GetSource_OnHurt(hurtInfo.DamageSource), gemPosition, Vector2.Zero, ModContent.ProjectileType(), gemDamage, 0f, OwnerIndex, 0f, (int)GemThatShouldBeLost); } } diff --git a/Dialogues/en-US/Dialogue.Mods.CalamityMod.EvilSmasher.CrimsonAltar.json b/Dialogues/en-US/Dialogue.Mods.CalamityMod.EvilSmasher.CrimsonAltar.json new file mode 100644 index 0000000000..2b0ab25d50 --- /dev/null +++ b/Dialogues/en-US/Dialogue.Mods.CalamityMod.EvilSmasher.CrimsonAltar.json @@ -0,0 +1,47 @@ +{ + "Revision": 1, + "DefaultColor": "FF0000", + "DefaultSpeaker": "DemonAltar", + "AlignType": 1, + "TextDelay": 2, + "BasePunctuationDelay": { + "Delay": 10, + "ForceSet": false, + "Locks": false + }, + "PunctuationDelayCap": 30, + "PunctuationDelays": { + "!": { + "Delay": 20, + "ForceSet": true, + "Locks": true + }, + "?": { + "Delay": 20, + "ForceSet": true, + "Locks": true + } + }, + "Pages": [ + { + "Lines": [ + "You, slayer of the flesh tower...[Pause(0.25)] we have an offer fitting of your deeds." + ] + }, + { + "Lines": [ + "We can bestow you might untold...[Pause(0.25)] [Shaking:to grind your enemies to dust!]" + ] + }, + { + "Lines": [ + "Simply yield the holy hammer unto the altar." + ] + }, + { + "Lines": [ + "Kneel, and we shall render you the strength." + ] + } + ] +} diff --git a/Dialogues/en-US/Dialogue.Mods.CalamityMod.EvilSmasher.DemonAltar.json b/Dialogues/en-US/Dialogue.Mods.CalamityMod.EvilSmasher.DemonAltar.json new file mode 100644 index 0000000000..bfdd7ae10c --- /dev/null +++ b/Dialogues/en-US/Dialogue.Mods.CalamityMod.EvilSmasher.DemonAltar.json @@ -0,0 +1,47 @@ +{ + "Revision": 1, + "DefaultColor": "FF00FF", + "DefaultSpeaker": "DemonAltar", + "AlignType": 1, + "TextDelay": 2, + "BasePunctuationDelay": { + "Delay": 10, + "ForceSet": false, + "Locks": false + }, + "PunctuationDelayCap": 30, + "PunctuationDelays": { + "!": { + "Delay": 20, + "ForceSet": true, + "Locks": true + }, + "?": { + "Delay": 20, + "ForceSet": true, + "Locks": true + } + }, + "Pages": [ + { + "Lines": [ + "Bearer of the Holy Hammer...[Pause(0.25)] [Wavy:desirest thou to taste true power?]" + ] + }, + { + "Lines": [ + "Thine eyes shall be opened...[Pause(0.25)] [Shaking:thou shalt be even as the gods!]" + ] + }, + { + "Lines": [ + "Yield the hammer unto us upon the altar." + ] + }, + { + "Lines": [ + "Surrender, and thou shalt surely receive our might." + ] + } + ] +} diff --git a/Dusts/SquashDust.cs b/Dusts/SquashDust.cs index 8adfb2beaa..a0d5160f88 100644 --- a/Dusts/SquashDust.cs +++ b/Dusts/SquashDust.cs @@ -56,7 +56,11 @@ namespace CalamityMod.Dusts public override bool PreDraw(Dust dust) { - Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f)); + Vector2 baseSize = Vector2.One; + if (dust.customData != null) + baseSize = (Vector2)dust.customData; + + Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.Y, 2.5f * baseSize.Y)); // Glow Orb Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0); @@ -82,7 +86,11 @@ namespace CalamityMod.Dusts private static void DrawPixelated(Dust dust) { - Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f)); + Vector2 baseSize = Vector2.One; + if (dust.customData != null) + baseSize = (Vector2)dust.customData; + + Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.Y, 2.5f * baseSize.Y)); // Glow Orb Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0); diff --git a/Gores/AquaticScourgeGores/AquaticUrchin.png b/Gores/AquaticScourgeGores/AquaticUrchin.png index 356efb49f0..ce015fb455 100644 Binary files a/Gores/AquaticScourgeGores/AquaticUrchin.png and b/Gores/AquaticScourgeGores/AquaticUrchin.png differ diff --git a/Gores/AquaticScourgeGores/AquaticUrchin2.png b/Gores/AquaticScourgeGores/AquaticUrchin2.png index 44a021dbe4..93e0dba709 100644 Binary files a/Gores/AquaticScourgeGores/AquaticUrchin2.png and b/Gores/AquaticScourgeGores/AquaticUrchin2.png differ diff --git a/Gores/AquaticScourgeGores/AquaticUrchin3.png b/Gores/AquaticScourgeGores/AquaticUrchin3.png index 8d8532f288..4bf306fc2b 100644 Binary files a/Gores/AquaticScourgeGores/AquaticUrchin3.png and b/Gores/AquaticScourgeGores/AquaticUrchin3.png differ diff --git a/Gores/DespairStoneGores/DespairStone.png b/Gores/DespairStoneGores/DespairStone.png index 2a59f561f1..044cd25bb1 100644 Binary files a/Gores/DespairStoneGores/DespairStone.png and b/Gores/DespairStoneGores/DespairStone.png differ diff --git a/Gores/DespairStoneGores/DespairStone2.png b/Gores/DespairStoneGores/DespairStone2.png index 1745408b2a..aa2b5b0df7 100644 Binary files a/Gores/DespairStoneGores/DespairStone2.png and b/Gores/DespairStoneGores/DespairStone2.png differ diff --git a/Items/Accessories/Abaddon.cs b/Items/Accessories/Abaddon.cs index 6f3dfd0ba5..cb9c3ab317 100644 --- a/Items/Accessories/Abaddon.cs +++ b/Items/Accessories/Abaddon.cs @@ -1,4 +1,6 @@ -using Terraria; +using System.Collections.Generic; +using CalamityMod.Buffs.DamageOverTime; +using Terraria; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -10,11 +12,8 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int CritBoost = 8; public static float BrimstoneFlamesReduction = 0.5f; - public static int AbaddonExploDamage = 25; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritBoost, BrimstoneFlamesReduction.ToPercent()); - + public static float critScaling = 3f; // How effective crit chance is at increasing debuff damage public override void SetDefaults() { Item.width = 26; @@ -27,7 +26,13 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.Calamity().abaddon = true; - player.GetCritChance() += CritBoost; + player.Calamity().abaddonEffectVisual = !hideVisual; + } + public override void ModifyTooltips(List list) + { + if (Main.LocalPlayer != null) + list.FindAndReplace("[DAMAGELINE]", Main.LocalPlayer.Calamity().abaddon ? this.GetLocalization("Equipped").Format(((int)(Bane.debuffData.EnemyLostRegen / 2 * Main.LocalPlayer.Calamity().playerBaneDebuffDamage)).ToString()) + : this.GetLocalizedValue("Unequipped")); } } } diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/Apollyon.cs similarity index 50% rename from Items/Accessories/VoidofExtinction.cs rename to Items/Accessories/Apollyon.cs index 7be242b9da..6a886f3eff 100644 --- a/Items/Accessories/VoidofExtinction.cs +++ b/Items/Accessories/Apollyon.cs @@ -1,20 +1,20 @@ -using CalamityMod.CalPlayer; +using System.Collections.Generic; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - public class VoidofExtinction : ModItem, ILocalizedModType + [LegacyName("VoidofExtinction")] + public class Apollyon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public static int CritBoost = 13; - public static int VoidExploDamage = 40; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritBoost, Abaddon.BrimstoneFlamesReduction.ToPercent()); - + public static float critScaling = 8f; // How effective crit chance is at increasing debuff damage + public static float critDamageBoostPerDebuff = 0.03f; // 3% increased crit damage per debuff public override void SetDefaults() { Item.width = 26; @@ -37,10 +37,14 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.voidOfExtinction = true; - modPlayer.abaddon = true; - player.GetCritChance() += CritBoost; - + modPlayer.apollyon = true; + modPlayer.abaddonEffectVisual = !hideVisual; + } + public override void ModifyTooltips(List list) + { + if (Main.LocalPlayer != null) + list.FindAndReplace("[DAMAGELINE]", Main.LocalPlayer.Calamity().apollyon ? this.GetLocalization("Equipped").Format(((int)(Bane.debuffData.EnemyLostRegen / 2 * Main.LocalPlayer.Calamity().playerBaneDebuffDamage)).ToString()) + : this.GetLocalizedValue("Unequipped")); } } } diff --git a/Items/Accessories/VoidofExtinction.png b/Items/Accessories/Apollyon.png similarity index 100% rename from Items/Accessories/VoidofExtinction.png rename to Items/Accessories/Apollyon.png diff --git a/Items/Accessories/ChaosStone.cs b/Items/Accessories/ChaosStone.cs index 8b743a1c10..ed7d14d158 100644 --- a/Items/Accessories/ChaosStone.cs +++ b/Items/Accessories/ChaosStone.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public class ChaosStone : ModItem, ILocalizedModType { public static float LostRegenPer100Mana => 8; - public static float DamageMultPer100Mana => 0.04f; + public static float DamageMultPer100Mana => 0.05f; public new string LocalizationCategory => "Items.Accessories"; public override void ModifyTooltips(List tooltips) { diff --git a/Items/Accessories/SlagsplitterPauldron.cs b/Items/Accessories/SlagsplitterPauldron.cs index 0bce37c59f..62ca8e1c6d 100644 --- a/Items/Accessories/SlagsplitterPauldron.cs +++ b/Items/Accessories/SlagsplitterPauldron.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.Accessories public static int PauldronSlamDamage = 330; public override void SetDefaults() { - Item.width = 54; - Item.height = 56; + Item.width = 42; + Item.height = 34; Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.accessory = true; diff --git a/Items/Accessories/SlagsplitterPauldron.png b/Items/Accessories/SlagsplitterPauldron.png index f80c4876b9..ced8412b7b 100644 Binary files a/Items/Accessories/SlagsplitterPauldron.png and b/Items/Accessories/SlagsplitterPauldron.png differ diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index d54b5c5e34..fdea11a01a 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -39,11 +39,11 @@ namespace CalamityMod.Items.Accessories modPlayer.rBrain = true; // Handles shaderain cloud spawning on hit modPlayer.amalgam = true; player.brainOfConfusionItem = Item; - modPlayer.HeatDebuffMultiplier += 2f; - modPlayer.ColdDebuffMultiplier += 2f; - modPlayer.SicknessDebuffMultiplier += 2f; - modPlayer.WaterDebuffMultiplier += 2f; - modPlayer.ElectricDebuffMultiplier += 2f; + modPlayer.HeatDebuffMultiplier += 3f; + modPlayer.ColdDebuffMultiplier += 3f; + modPlayer.SicknessDebuffMultiplier += 3f; + modPlayer.WaterDebuffMultiplier += 3f; + modPlayer.ElectricDebuffMultiplier += 3f; } public override void AddRecipes() diff --git a/Items/Accessories/YharimsGift.cs b/Items/Accessories/YharimsGift.cs index c505001aa1..224b1ed1c1 100644 --- a/Items/Accessories/YharimsGift.cs +++ b/Items/Accessories/YharimsGift.cs @@ -9,13 +9,14 @@ namespace CalamityMod.Items.Accessories public class YharimsGift : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public int dragonTimer = 60; + + public static int MeteorDamage => CalamityUtils.ScaleWithDifficulty(250); public override void SetDefaults() { Item.width = 20; Item.height = 22; - Item.defense = 12; + Item.defense = 10; Item.accessory = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.rare = ModContent.RarityType(); @@ -24,38 +25,20 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { + player.Calamity().yharimsGift = true; var source = player.GetSource_Accessory(Item); - player.moveSpeed += 0.15f; - player.GetDamage() += 0.15f; + player.moveSpeed += 0.2f; + player.GetDamage() += 0.1f; player.noKnockback = true; - if (!player.StandingStill()) - { - dragonTimer--; - if (dragonTimer <= 0) - { - if (player.whoAmI == Main.myPlayer) - { - int damage = (int)player.GetBestClassDamage().ApplyTo(175); - - int projectile1 = Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 5f, player.whoAmI, 0f, 0f); - Main.projectile[projectile1].timeLeft = 60; - } - dragonTimer = 60; - } - } - else - { - dragonTimer = 60; - } - if (player.immune) + if (player.HasIFrames()) { if (player.miscCounter % 8 == 0) { if (player.whoAmI == Main.myPlayer) { - int damage = (int)player.GetBestClassDamage().ApplyTo(375); + int damage = (int)player.GetBestClassDamage().ApplyTo(MeteorDamage); - CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType(), damage, 9f, player.whoAmI); + CalamityUtils.ProjectileRain(source, player.Center, 400f, 400f, 500f, 800f, 22f, ModContent.ProjectileType(), damage, 9f, player.whoAmI).Calamity().conditionalHomingRange = 160; } } } diff --git a/Items/Armor/Demonshade/DemonshadeHelm.cs b/Items/Armor/Demonshade/DemonshadeHelm.cs index ed2f083749..997c216a6f 100644 --- a/Items/Armor/Demonshade/DemonshadeHelm.cs +++ b/Items/Armor/Demonshade/DemonshadeHelm.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Items.Armor.Demonshade // Set Bonus public static int SetBonusMinionSlotBoost = 8; public static float SetBonusSummonDamageBoost = 1f; - public static int DevilDamage = 1000; public static int BeamDamage => CalamityUtils.ScaleWithDifficulty(300); public static int ScytheDamage => CalamityUtils.ScaleWithDifficulty(500); public static int EnrageDuration = CalamityUtils.SecondsToFrames(10); @@ -59,22 +58,6 @@ namespace CalamityMod.Items.Armor.Demonshade modPlayer.dsSetBonus = true; modPlayer.wearingRogueArmor = true; modPlayer.WearingPostMLSummonerSet = true; - if (player.whoAmI == Main.myPlayer && !modPlayer.chibii) - { - modPlayer.redDevil = true; - var source = player.GetSource_ItemUse(Item); - if (player.FindBuffIndex(ModContent.BuffType()) == -1) - { - player.AddBuff(ModContent.BuffType(), 3600, true); - } - if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) - { - int damage = (int)player.GetTotalDamage().ApplyTo(DevilDamage); - - var devil = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 2f, 0f); - devil.originalDamage = DevilDamage; - } - } player.maxMinions += SetBonusMinionSlotBoost; player.GetDamage() += SetBonusSummonDamageBoost; } diff --git a/Items/Armor/Empyrean/EmpyreanMask.cs b/Items/Armor/Empyrean/EmpyreanMask.cs index 18a2b1abd4..08759c2a23 100644 --- a/Items/Armor/Empyrean/EmpyreanMask.cs +++ b/Items/Armor/Empyrean/EmpyreanMask.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatBuffs; +using CalamityMod.Buffs.StatBuffs; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -76,7 +76,7 @@ namespace CalamityMod.Items.Armor.Empyrean var modPlayer = player.Calamity(); modPlayer.xerocSet = true; modPlayer.rogueStealthMax += SetBonusRogueStealth; - player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth()); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), PermanentWrathHealthRatio.ToPercent()); if (player.statLife <= (int)(player.statLifeMax2 * PermanentWrathHealthRatio)) player.AddBuff(ModContent.BuffType(), 2); modPlayer.wearingRogueArmor = true; diff --git a/Items/Armor/Plaguebringer/PlaguebringerCarapace.cs b/Items/Armor/Plaguebringer/PlaguebringerCarapace.cs index 43566922ae..50c282e3db 100644 --- a/Items/Armor/Plaguebringer/PlaguebringerCarapace.cs +++ b/Items/Armor/Plaguebringer/PlaguebringerCarapace.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Armor.Plaguebringer public new string LocalizationCategory => "Items.Armor.Hardmode"; public static int MinionSlotBoost = 1; - public static float SummonDamageBoost = 0.15f; + public static float SummonDamageBoost = 0.20f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, SummonDamageBoost.ToPercent()); public override void SetStaticDefaults() diff --git a/Items/Armor/Plaguebringer/PlaguebringerPistons.cs b/Items/Armor/Plaguebringer/PlaguebringerPistons.cs index 1ae9a366f0..2bd239bc58 100644 --- a/Items/Armor/Plaguebringer/PlaguebringerPistons.cs +++ b/Items/Armor/Plaguebringer/PlaguebringerPistons.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Armor.Plaguebringer public new string LocalizationCategory => "Items.Armor.Hardmode"; public static int MinionSlotBoost = 1; - public static float SummonDamageBoost = 0.15f; + public static float SummonDamageBoost = 0.20f; public static float MoveSpeedBoost = 0.15f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, SummonDamageBoost.ToPercent(), MoveSpeedBoost.ToPercent()); diff --git a/Items/Armor/Plaguebringer/PlaguebringerVisor.cs b/Items/Armor/Plaguebringer/PlaguebringerVisor.cs index df326df8c0..3bf9a5e25f 100644 --- a/Items/Armor/Plaguebringer/PlaguebringerVisor.cs +++ b/Items/Armor/Plaguebringer/PlaguebringerVisor.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor.Plaguebringer public new string LocalizationCategory => "Items.Armor.Hardmode"; public static int MinionSlotBoost = 1; - public static float SummonDamageBoost = 0.15f; + public static float SummonDamageBoost = 0.20f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, SummonDamageBoost.ToPercent()); // Set Bonus diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 62313a8039..2131540ce1 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -562,13 +562,6 @@ namespace CalamityMod.Items #region Use Item Changes public override void HoldItem(Item item, Player player) { - // Clear Evil Smasher buffs if not holding Evil Smasher - if (player.Calamity().evilSmasherBoost > 0) - { - if (item.type != ItemType()) - player.Calamity().evilSmasherBoost = 0; - } - if (player.Calamity().ChaosStone && item.mana == 0 && !player.ItemTimeIsZero) { player.manaRegenDelay = player.maxRegenDelay; diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index e783511cf0..9a29265148 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -278,8 +278,9 @@ namespace CalamityMod.Items tooltips.Insert(++difficultyTooltipIndex, donorLine); } - var buffIdsInTooltip = new HashSet(); - + // The int is the buff ID + // The byte determines what information to show; 0 = enemy, 1 = player, 2 = both + var buffIdsInTooltip = new Dictionary(); foreach (var tooltip in tooltips) { // Parse the tags of each line of text to find our buff tags' @@ -287,9 +288,18 @@ namespace CalamityMod.Items var snippets = ChatManager.ParseMessage(tooltip.Text, Color.White); foreach (var snippet in snippets) { - if (snippet is CalamityBuffTagHandler.Snippet buffSnippet) + if (snippet is BuffTagEnemyEffectHandler.Snippet enemy) { - buffIdsInTooltip.Add(buffSnippet.BuffId); + if (!buffIdsInTooltip.ContainsKey(enemy.BuffId)) + buffIdsInTooltip.Add(enemy.BuffId, 0); + } + else if (snippet is BuffTagPlayerEffectHandler.Snippet player) + { + if (!buffIdsInTooltip.TryAdd(player.BuffId, 1)) + { + buffIdsInTooltip.Remove(player.BuffId); + buffIdsInTooltip.Add(player.BuffId, 2); + } } } } @@ -298,26 +308,36 @@ namespace CalamityMod.Items { bool showTheTip = false; bool foundDebuff = false; - foreach (int buffId in buffIdsInTooltip) + foreach (var buffInfo in buffIdsInTooltip) { string tooltipKey = ""; - if (buffId < BuffID.Count) + string secondTooltipKey = ""; + // Change the localization based on whether it should display player or enemy info, or both + string locKey = buffInfo.Value == 1 ? "ItemTooltipPlayer" : "ItemTooltipEnemy"; + string secondLocKey = buffInfo.Value == 2 ? "ItemTooltipPlayer" : ""; + + if (buffInfo.Key < BuffID.Count) { - tooltipKey = $"Mods.Terraria.Buffs.{BuffID.Search.GetName(buffId)}.ItemTooltip"; + tooltipKey = $"Mods.Terraria.Buffs.{BuffID.Search.GetName(buffInfo.Key)}.{locKey}"; + if (buffInfo.Value == 2) + secondTooltipKey = $"Mods.Terraria.Buffs.{BuffID.Search.GetName(buffInfo.Key)}.{secondLocKey}"; } else { - var modBuff = BuffLoader.GetBuff(buffId); - tooltipKey = $"Mods.{modBuff.Mod.Name}.Buffs.{modBuff.Name}.ItemTooltip"; + var modBuff = BuffLoader.GetBuff(buffInfo.Key); + tooltipKey = $"Mods.{modBuff.Mod.Name}.Buffs.{modBuff.Name}.{locKey}"; + if (buffInfo.Value == 2) + secondTooltipKey = $"Mods.{modBuff.Mod.Name}.Buffs.{modBuff.Name}.{secondLocKey}"; } - if (!Language.Exists(tooltipKey)) - { - continue; - } + var text = ""; + var secondText = ""; + if (Language.Exists(tooltipKey)) + text = Language.GetTextValue(tooltipKey); + if (Language.Exists(secondTooltipKey)) + secondText = Language.GetTextValue(secondTooltipKey); - var text = Language.GetTextValue(tooltipKey); - if (string.IsNullOrWhiteSpace(text)) + if (string.IsNullOrWhiteSpace(text) && string.IsNullOrWhiteSpace(secondText)) { continue; } @@ -329,7 +349,11 @@ namespace CalamityMod.Items break; } - tooltips.Insert(++lastTooltipIndex, new TooltipLine(Mod, "CalamityMod:AltExpandTooltip" + buffId, $"[cbuff:{buffId}]\n{text}")); + string extraLoc = GetTextValue(buffInfo.Value == 1 ? "Buffs.OnPlayer" : "Buffs.OnEnemy"); + if (!string.IsNullOrWhiteSpace(text)) + tooltips.Insert(++lastTooltipIndex, new TooltipLine(Mod, "CalamityMod:AltExpandTooltip" + buffInfo.Key, $"[cbuff:{buffInfo.Key}] {extraLoc}\n{text}")); + if (buffInfo.Value == 2 && !string.IsNullOrWhiteSpace(secondText)) + tooltips.Insert(++lastTooltipIndex, new TooltipLine(Mod, "CalamityMod:AltExpandTooltip" + buffInfo.Key, $"[cbuff:{buffInfo.Key}] {GetTextValue("Buffs.OnPlayer")}\n{secondText}")); } if (showTheTip) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 6c604ce7de..94410c1bc9 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -211,7 +211,7 @@ namespace CalamityMod.Items { ItemID.RedRyder, Do(DamageExact(24)) }, { ItemID.RedsYoyo, Do(DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats { ItemID.RocketLauncher, Do(DamageExact(60), ShootSpeedExact(9)) }, - { ItemID.Sandgun, Do(DamageExact(22), UseExact(20)) }, + { ItemID.Sandgun, Do(UseExact(20)) }, { ItemID.SapphireStaff, Do(DamageExact(25)) }, { ItemID.ScourgeoftheCorruptor, Do(DamageExact(63)) }, { ItemID.Seedler, Do(UseMeleeSpeed, DamageExact(45), ShootSpeedExact(16)) }, diff --git a/Items/Fishing/FishingRods/WulfrumRod.png b/Items/Fishing/FishingRods/WulfrumRod.png index 593ae2bc0c..ef0b27fb58 100644 Binary files a/Items/Fishing/FishingRods/WulfrumRod.png and b/Items/Fishing/FishingRods/WulfrumRod.png differ diff --git a/Items/LabFinders/WhiteSeekingMechanism.cs b/Items/LabFinders/WhiteSeekingMechanism.cs index e415208707..a621e1835f 100644 --- a/Items/LabFinders/WhiteSeekingMechanism.cs +++ b/Items/LabFinders/WhiteSeekingMechanism.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.LabFinders { CreateRecipe(). AddIngredient(). - AddIngredient(ItemID.IceBlock, 50). + AddRecipeGroup("AnyIceBlock", 50). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Placeables/Astral/AstralSand.cs b/Items/Placeables/Astral/AstralSand.cs index a7e732363b..a317457627 100644 --- a/Items/Placeables/Astral/AstralSand.cs +++ b/Items/Placeables/Astral/AstralSand.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Astral Item.ResearchUnlockCount = 100; ItemTrader.ChlorophyteExtractinator.AddOption_OneWay(Type, 1, ItemID.SandBlock, 1); - ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType(), 0); + ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType(), 5); } public override void SetDefaults() diff --git a/Items/Potions/Alcohol/GrapeBeer.cs b/Items/Potions/Alcohol/GrapeBeer.cs index af8baea14b..1fcd4d64cf 100644 --- a/Items/Potions/Alcohol/GrapeBeer.cs +++ b/Items/Potions/Alcohol/GrapeBeer.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Potions.Alcohol { public new string LocalizationCategory => "Items.Potions"; - public static float CritLoss = 75; + public static float CritLoss = 50; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritLoss); public override void SetStaticDefaults() diff --git a/Items/SummonItems/DesertMedallion.cs b/Items/SummonItems/DesertMedallion.cs index 5be0d32527..09a96a112c 100644 --- a/Items/SummonItems/DesertMedallion.cs +++ b/Items/SummonItems/DesertMedallion.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.SandBlock, 40). + AddRecipeGroup("Sand", 40). AddIngredient(ItemID.AntlionMandible, 4). AddIngredient(2). AddTile(TileID.DemonAltar). diff --git a/Items/Tools/AstralHamaxe.cs b/Items/Tools/AstralHamaxe.cs index 2b7ba2735c..0caf445b78 100644 --- a/Items/Tools/AstralHamaxe.cs +++ b/Items/Tools/AstralHamaxe.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Tools Item.width = 60; Item.height = 70; Item.damage = 80; + Item.crit = 25; Item.knockBack = 5f; Item.useTime = 5; Item.useAnimation = 20; @@ -32,9 +33,6 @@ namespace CalamityMod.Items.Tools Item.autoReuse = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; - public override void MeleeEffects(Player player, Rectangle hitbox) { Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool() ? ModContent.DustType() : ModContent.DustType(), 0.48f, 50, 78, -0.1f, 0.1f); diff --git a/Items/Tools/AstralPickaxe.cs b/Items/Tools/AstralPickaxe.cs index 5330fa612f..a0fc904380 100644 --- a/Items/Tools/AstralPickaxe.cs +++ b/Items/Tools/AstralPickaxe.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Tools Item.width = 50; Item.height = 60; Item.damage = 65; + Item.crit = 25; Item.knockBack = 5f; Item.useTime = 6; Item.useAnimation = 10; @@ -31,9 +32,6 @@ namespace CalamityMod.Items.Tools Item.autoReuse = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; - public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Tools/ClimateChange/AridArtifact.cs b/Items/Tools/ClimateChange/AridArtifact.cs index 9949af0295..2e685defcd 100644 --- a/Items/Tools/ClimateChange/AridArtifact.cs +++ b/Items/Tools/ClimateChange/AridArtifact.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Tools.ClimateChange public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.SandBlock, 50). + AddRecipeGroup("Sand", 50). AddRecipeGroup("AnyAdamantiteBar", 10). AddIngredient(ItemID.AncientCloth, 5). AddTile(TileID.MythrilAnvil). diff --git a/Items/Tools/CrystylCrusher.cs b/Items/Tools/CrystylCrusher.cs index a4ad4abbf5..79a4fa8f1c 100644 --- a/Items/Tools/CrystylCrusher.cs +++ b/Items/Tools/CrystylCrusher.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Items.Tools Item.width = 70; Item.height = 70; Item.damage = 400; + Item.crit = 25; Item.knockBack = 9f; Item.useTime = 1; Item.useAnimation = 10; @@ -56,9 +57,6 @@ namespace CalamityMod.Items.Tools return new Vector2(10, 10); } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; - public override bool AltFunctionUse(Player player) => true; public override void HoldItem(Player player) diff --git a/Items/Tools/InfernaCutter.cs b/Items/Tools/InfernaCutter.cs index e4b232899e..44429ca5dd 100644 --- a/Items/Tools/InfernaCutter.cs +++ b/Items/Tools/InfernaCutter.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Tools Item.width = 80; Item.height = 66; Item.damage = 110; + Item.crit = 10; Item.knockBack = 7f; Item.useTime = 8; Item.useAnimation = 12; @@ -30,9 +31,6 @@ namespace CalamityMod.Items.Tools Item.autoReuse = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; - public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) { hitbox = CalamityUtils.FixSwingHitbox(54, 54); diff --git a/Items/Weapons/Magic/Apathanull.cs b/Items/Weapons/Magic/Apathanull.cs index 862e88b275..799f6e63bc 100644 --- a/Items/Weapons/Magic/Apathanull.cs +++ b/Items/Weapons/Magic/Apathanull.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 30; Item.damage = 63; Item.DamageType = DamageClass.Magic; + Item.crit = 12; Item.mana = 20; Item.useTime = 8; Item.useAnimation = 20; @@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Magic public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true; - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 12; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Projectile.NewProjectileDirect(source, position, velocity.RotatedByRandom(0.7f), ModContent.ProjectileType(), damage, knockback, player.whoAmI); diff --git a/Items/Weapons/Magic/AstralStaff.cs b/Items/Weapons/Magic/AstralStaff.cs index 03a48809e3..c7cc0e9a90 100644 --- a/Items/Weapons/Magic/AstralStaff.cs +++ b/Items/Weapons/Magic/AstralStaff.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 72; Item.damage = 245; Item.DamageType = DamageClass.Magic; + Item.crit = 15; Item.mana = 26; Item.useTime = 18; Item.useAnimation = 18; @@ -36,9 +37,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 15f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 spawnPos = new Vector2(player.MountedCenter.X + Main.rand.Next(-200, 201), player.MountedCenter.Y - 600f); diff --git a/Items/Weapons/Magic/EldritchTome.cs b/Items/Weapons/Magic/EldritchTome.cs index e231ed2ab4..db855f0b79 100644 --- a/Items/Weapons/Magic/EldritchTome.cs +++ b/Items/Weapons/Magic/EldritchTome.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 30; Item.damage = 32; Item.DamageType = DamageClass.Magic; + Item.crit = 5; Item.mana = 7; Item.useTime = 7; Item.useAnimation = 21; @@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 12f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 5; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 spreadVelocity = velocity.RotatedByRandom(MathHelper.ToRadians(18f)) * Main.rand.NextFloat(0.8f, 1.2f); diff --git a/Items/Weapons/Magic/HyperdeathRiftScepter.cs b/Items/Weapons/Magic/HyperdeathRiftScepter.cs index 384dabfa6c..f8978a184f 100644 --- a/Items/Weapons/Magic/HyperdeathRiftScepter.cs +++ b/Items/Weapons/Magic/HyperdeathRiftScepter.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 80; Item.height = 84; - Item.damage = 4300; + Item.damage = 4100; Item.DamageType = DamageClass.Magic; Item.mana = 50; Item.useTime = Item.useAnimation = 50; diff --git a/Items/Weapons/Magic/InfernalRift.cs b/Items/Weapons/Magic/InfernalRift.cs index a162271cf9..5b4f710290 100644 --- a/Items/Weapons/Magic/InfernalRift.cs +++ b/Items/Weapons/Magic/InfernalRift.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 16; Item.damage = 50; Item.DamageType = DamageClass.Magic; + Item.crit = 25; Item.mana = 15; Item.useTime = 2; Item.useAnimation = 30; @@ -38,10 +39,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 28f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); diff --git a/Items/Weapons/Magic/RecitationoftheBeast.cs b/Items/Weapons/Magic/RecitationoftheBeast.cs index 252fca4e1a..96af4794a6 100644 --- a/Items/Weapons/Magic/RecitationoftheBeast.cs +++ b/Items/Weapons/Magic/RecitationoftheBeast.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = 38; Item.height = 54; Item.damage = 60; + Item.crit = 20; Item.mana = 17; Item.noMelee = true; Item.useAnimation = 22; @@ -32,9 +33,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.DamageType = DamageClass.Magic; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { for (int i = 0; i < 6; i++) diff --git a/Items/Weapons/Magic/SHPC.cs b/Items/Weapons/Magic/SHPC.cs index f84d56f9d3..f7fa8e662f 100644 --- a/Items/Weapons/Magic/SHPC.cs +++ b/Items/Weapons/Magic/SHPC.cs @@ -1,10 +1,10 @@ -using CalamityMod.Items.Materials; +using System; +using System.Collections.Generic; +using System.IO; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.IO; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -92,6 +92,23 @@ namespace CalamityMod.Items.Weapons.Magic return soul; } + public override bool CanRightClick() + { + if (!Main.keyState.PressingShift()) + return false; + return true; + } + + public override void RightClick(Player player) + { + if (storedSoulpower > 0) + { + storedSoulpower = 0; + } + } + + public override bool ConsumeItem(Player player) => false; + public Color FindColorForSoul() { Color returnColor = new(0, 0, 0); diff --git a/Items/Weapons/Magic/StarShower.cs b/Items/Weapons/Magic/StarShower.cs index ae8c5a91a7..7711b1af37 100644 --- a/Items/Weapons/Magic/StarShower.cs +++ b/Items/Weapons/Magic/StarShower.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 40; Item.damage = 60; Item.DamageType = DamageClass.Magic; + Item.crit = 25; Item.mana = 15; Item.rare = ItemRarityID.Cyan; Item.useTime = 14; @@ -34,9 +35,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = ShootSpeed; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 mouse = player.ClampedMouseWorld(); diff --git a/Items/Weapons/Magic/TheDanceofLight.cs b/Items/Weapons/Magic/TheDanceofLight.cs index 32f4211022..9f50835ece 100644 --- a/Items/Weapons/Magic/TheDanceofLight.cs +++ b/Items/Weapons/Magic/TheDanceofLight.cs @@ -33,9 +33,10 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = 40; Item.height = 42; Item.damage = 515; - Item.knockBack = 4f; Item.DamageType = DamageClass.Magic; + Item.crit = 20; Item.mana = 6; + Item.knockBack = 4f; Item.useStyle = ItemUseStyleID.Shoot; Item.useTime = 2; @@ -54,9 +55,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.Calamity().devItem = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override Vector2? HoldoutOffset() => Vector2.Zero; 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/Magic/UltraLiquidator.cs b/Items/Weapons/Magic/UltraLiquidator.cs index 6dc127929d..79819761d0 100644 --- a/Items/Weapons/Magic/UltraLiquidator.cs +++ b/Items/Weapons/Magic/UltraLiquidator.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = Item.height = 70; Item.damage = 120; + Item.crit = 30; Item.knockBack = 5f; Item.useTime = 3; Item.reuseDelay = Item.useAnimation = 15; @@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.rare = ItemRarityID.Purple; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 30; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo projSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 playerPos = player.RotatedRelativePoint(player.MountedCenter, true); diff --git a/Items/Weapons/Magic/ValkyrieRay.cs b/Items/Weapons/Magic/ValkyrieRay.cs index 5174f80dbc..10aff81ac9 100644 --- a/Items/Weapons/Magic/ValkyrieRay.cs +++ b/Items/Weapons/Magic/ValkyrieRay.cs @@ -10,11 +10,11 @@ namespace CalamityMod.Items.Weapons.Magic public class ValkyrieRay : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; - // The base use time of the weapon is 28: 18 charge frames + 10 cooldown frames. + // The base use time of the weapon is 36: 24 charge frames + 12 cooldown frames. // The rate at which it progresses through its charge and discharge cycle is dynamically sped up by reforges. // This math is handled in its holdout projectile, ValkyrieRayStaff. - public const int ChargeFrames = 18; - public const int CooldownFrames = 10; + public const int ChargeFrames = 24; + public const int CooldownFrames = 12; public const float GemDistance = 18f; public static readonly Color LightColor = new Color(235, 40, 121); @@ -27,9 +27,10 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 54; Item.height = 52; - Item.damage = 115; + Item.damage = 90; Item.knockBack = 8.5f; Item.DamageType = DamageClass.Magic; + Item.crit = 11; Item.mana = 17; Item.useTime = ChargeFrames + CooldownFrames; Item.useAnimation = ChargeFrames + CooldownFrames; @@ -45,8 +46,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.autoReuse = true; } - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 11; - public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Magic/VeeringWind.cs b/Items/Weapons/Magic/VeeringWind.cs index b3e9f78474..63c8f0dcad 100644 --- a/Items/Weapons/Magic/VeeringWind.cs +++ b/Items/Weapons/Magic/VeeringWind.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.IceBlock, 30). + AddRecipeGroup("AnyIceBlock", 30). AddIngredient(ItemID.Feather, 3). AddIngredient(ItemID.FallenStar, 5). AddIngredient(ItemID.Cloud, 10). diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index 14a4346bf8..c119913376 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -78,6 +78,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = Item.height = 136; Item.damage = 1800; Item.DamageType = DamageClass.MeleeNoSpeed; + Item.crit = 15; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 15; @@ -93,9 +94,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.rare = RarityType(); } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15; - public override bool AltFunctionUse(Player player) => true; public override void HoldItem(Player player) diff --git a/Items/Weapons/Melee/ArkoftheElements.cs b/Items/Weapons/Melee/ArkoftheElements.cs index 8a65882035..4dc95aa92f 100644 --- a/Items/Weapons/Melee/ArkoftheElements.cs +++ b/Items/Weapons/Melee/ArkoftheElements.cs @@ -56,6 +56,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 172; Item.damage = 507; Item.DamageType = DamageClass.MeleeNoSpeed; + Item.crit = 10; Item.noUseGraphic = true; Item.noMelee = true; Item.useAnimation = 20; @@ -71,9 +72,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 16f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; - public override bool AltFunctionUse(Player player) => true; public override void HoldItem(Player player) diff --git a/Items/Weapons/Melee/AstralPike.cs b/Items/Weapons/Melee/AstralPike.cs index 688ef97985..68a9bd3f48 100644 --- a/Items/Weapons/Melee/AstralPike.cs +++ b/Items/Weapons/Melee/AstralPike.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 50; Item.damage = 90; Item.DamageType = TrueMeleeDamageClass.Instance; + Item.crit = 25; Item.noMelee = true; Item.useTurn = true; Item.noUseGraphic = true; @@ -35,9 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 13f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override void AddRecipes() diff --git a/Items/Weapons/Melee/BrokenBiomeBlade.cs b/Items/Weapons/Melee/BrokenBiomeBlade.cs index 02a837769c..c4503e4546 100644 --- a/Items/Weapons/Melee/BrokenBiomeBlade.cs +++ b/Items/Weapons/Melee/BrokenBiomeBlade.cs @@ -327,7 +327,7 @@ namespace CalamityMod.Items.Weapons.Melee AddIngredient(ItemType(), 10). AddIngredient(ItemID.HellstoneBar, 10). AddIngredient(ItemID.DirtBlock, 50). - AddIngredient(ItemID.StoneBlock, 50). + AddRecipeGroup("AnyStoneBlock", 50). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Melee/DevilsSunrise.cs b/Items/Weapons/Melee/DevilsSunrise.cs index 99c244a22e..e9c89a9a0c 100644 --- a/Items/Weapons/Melee/DevilsSunrise.cs +++ b/Items/Weapons/Melee/DevilsSunrise.cs @@ -18,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 66; Item.damage = 420; Item.DamageType = DamageClass.MeleeNoSpeed; + Item.crit = 10; Item.useAnimation = 25; Item.useTime = 5; Item.noMelee = true; @@ -35,8 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 24f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; // You can't use the sword if you've thrown it, silly public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; public override void HoldItem(Player player) diff --git a/Items/Weapons/Melee/EvilSmasher.cs b/Items/Weapons/Melee/EvilSmasher.cs index 27abbe6fa8..596829a8c7 100644 --- a/Items/Weapons/Melee/EvilSmasher.cs +++ b/Items/Weapons/Melee/EvilSmasher.cs @@ -1,38 +1,203 @@ -using Terraria; +using System; +using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Utilities.Daybreak; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { - public class EvilSmasher : ModItem, ILocalizedModType + public class EvilSmasher : BaseSwordHoldoutItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; + public override int ProjectileType => ModContent.ProjectileType(); + + public bool IsAnimating = false; + public int AnimationTime = 0; public override void SetDefaults() { + base.SetDefaults(); Item.width = 64; Item.height = 66; - Item.damage = 120; - Item.DamageType = DamageClass.Melee; - Item.useAnimation = Item.useTime = 38; - Item.useStyle = ItemUseStyleID.Swing; - Item.useTurn = true; + Item.damage = 200; + Item.DamageType = AverageDamageClass.Instance; + Item.useAnimation = Item.useTime = 120; + Item.channel = true; Item.knockBack = 6f; - Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; } - - public override float UseSpeedMultiplier(Player player) => 1f + (player.Calamity().evilSmasherBoost * 0.1f); - - public override void ModifyWeaponDamage(Player player, ref StatModifier damage) => damage *= 1f + player.Calamity().evilSmasherBoost * 0.1f; - - public override void ModifyWeaponKnockback(Player player, ref StatModifier knockback) => knockback *= 1f + (player.Calamity().evilSmasherBoost * 0.1f); - - public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) + public override void UpdateInventory(Player player) { - if (target.life <= 0 && player.Calamity().evilSmasherBoost < 10) - player.Calamity().evilSmasherBoost += 1; + AnimationTime = 300; + base.UpdateInventory(player); + } + + public override void Update(ref float gravity, ref float maxFallSpeed) + { + if (!IsAnimating) + { + if (AnimationTime < 300) + AnimationTime++; + return; + } + float completion = AnimationTime / 240f; + Item.noGrabDelay = 120; + Item.velocity = new Vector2(0, -1f); + int dotAmount = 0; + for (var i = 0; i < dotAmount; i++) + { + var ringDir = getRingOffset(i / (float)dotAmount * -MathHelper.TwoPi + MathHelper.TwoPi * completion * 3, ySquish: 3f); + Dust.NewDustPerfect(Item.Center + (ringDir * (completion - MathF.Pow(completion, 2)) * 256), i % 2 == 0 ? DustID.Crimson : DustID.Corruption, ringDir); + } + if (Main.rand.NextFloat() < completion) + Dust.NewDustPerfect(Item.Center, Main.rand.NextBool() ? DustID.CursedTorch : DustID.IchorTorch,Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * 5); + if (completion >= 1) + { + for (var i = 0; i < 50; i++) + { + Dust.NewDustPerfect(Item.Center, Main.rand.NextBool() ? DustID.CursedTorch : DustID.IchorTorch, Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * 5); + Dust.NewDustPerfect(Item.Center, Main.rand.NextBool() ? DustID.Crimson : DustID.Corruption, Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * 5); + } + IsAnimating = false; + Item.velocity = new Vector2(0, -5); + } + AnimationTime++; + } + + #region Textures + private static Asset GlowTex = null; + private static Texture2D GetGlowTex() + { + if (GlowTex == null) + { + GlowTex = ModContent.Request("CalamityMod/Particles/BloomCircle"); + } + return GlowTex.Value; + } + + private static Asset GlowBeamTex = null; + private static Texture2D GetGlowBeamTex() + { + if (GlowBeamTex == null) + { + GlowBeamTex = ModContent.Request("CalamityMod/Particles/BloomLineFade"); + } + return GlowBeamTex.Value; + } + private static Asset GlowBeamCapTex = null; + private static Texture2D GetGlowBeamCapTex() + { + if (GlowBeamCapTex == null) + { + GlowBeamCapTex = ModContent.Request("CalamityMod/Particles/BloomLineCap"); + } + return GlowBeamCapTex.Value; + } + #endregion + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + if (IsAnimating) + { + var color = Color.Lerp(Color.Purple, Color.Red, MathF.Sin(Main.GlobalTimeWrappedHourly * 6) * 0.5f + 0.5f); + + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(SpriteSortMode.Immediate, + BlendState.Additive, + SamplerState.PointClamp, + DepthStencilState.None, + Main.Rasterizer, + null, + Main.GameViewMatrix.TransformationMatrix + ); + + Main.spriteBatch.Draw(GetGlowTex(), Item.Center - Main.screenPosition, null, color, 0, GetGlowTex().Size() * 0.5f, 0.1f + 0.7f * (AnimationTime / 240f), SpriteEffects.None, 0); + int rep = 0; + for (float i = 0; i <= MathHelper.TwoPi; i += MathHelper.TwoPi * 0.166f) + { + Main.spriteBatch.Draw(GetGlowBeamTex(), Item.Center - Main.screenPosition, null, color, MathHelper.WrapAngle(Main.GlobalTimeWrappedHourly) + i, new(GetGlowBeamTex().Size().X * 0.5f, 0), 0f + 0.06f * (AnimationTime / 240f) * (rep == 0 ? 1 : 0.75f), SpriteEffects.None, 0); + rep = (rep + 1) % 2; + } + + Main.spriteBatch.End(); + } + + var tex = TextureAssets.Item[ItemID.Pwnhammer].Value; + Main.spriteBatch.Draw(tex, Item.Center - Main.screenPosition, null, Color.Lerp(lightColor, Color.Black, AnimationTime / 240f), 0, tex.Size() * 0.5f, MathHelper.Lerp(1, 1.75f, AnimationTime / 240f), SpriteEffects.None, 0); + return false; + + } + else if (AnimationTime < 300) + { + float completion = 1 - (AnimationTime - 240) / 60f; + var color = Color.Lerp(Color.Purple, Color.Red, MathF.Sin(Main.GlobalTimeWrappedHourly * 6) * 0.5f + 0.5f); + + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(SpriteSortMode.Immediate, + BlendState.Additive, + SamplerState.PointClamp, + DepthStencilState.None, + Main.Rasterizer, + null, + Main.GameViewMatrix.TransformationMatrix + ); + + Main.spriteBatch.Draw(GetGlowTex(), Item.Center - Main.screenPosition, null, color, 0, GetGlowTex().Size() * 0.5f, 0.1f + 0.7f * completion, SpriteEffects.None, 0); + int rep = 0; + for (float i = 0; i <= MathHelper.TwoPi; i += MathHelper.TwoPi * 0.166f) + { + Main.spriteBatch.Draw(GetGlowBeamTex(), Item.Center - Main.screenPosition, null, color, MathHelper.WrapAngle(Main.GlobalTimeWrappedHourly) + i, new(GetGlowBeamTex().Size().X * 0.5f, 0), 0f + 0.06f * completion * (rep == 0 ? 1 : 0.75f), SpriteEffects.None, 0); + rep = (rep + 1) % 2; + } + + Main.spriteBatch.End(); + } + } + return base.PreDrawInWorld(spriteBatch, lightColor, alphaColor, ref rotation, ref scale, whoAmI); + } + + private Vector2 getRingOffset(float rad, float xSquish = 1, float ySquish = 1) + { + return new Vector2((1 / xSquish) * MathF.Cos(rad), (1 / ySquish) * MathF.Sin(rad)); + } + } + + public class EvilSmasherSacrifice : GlobalItem + { + public override bool AppliesToEntity(Item entity, bool lateInstantiation) + { + return entity.type == ItemID.Pwnhammer; + } + + public override void Update(Item item, ref float gravity, ref float maxFallSpeed) + { + if (item.noGrabDelay > 0) return; //Only run once the item is fully settled + for (var i = 0; i < 5; i++) //Loop a couple times to check different vertical positions for the altar, improving accuracy. + { + var tileCheckPos = item.Center.ToTileCoordinates() + new Point(0, i); + if (Main.tile[tileCheckPos.X, tileCheckPos.Y].TileType == TileID.DemonAltar) + { + if (!(Main.netMode == NetmodeID.MultiplayerClient)) + { + var newItem = Main.item[Item.NewItem(item.GetSource_FromThis(), item.Hitbox, ModContent.ItemType())]; + newItem.noGrabDelay = 120; + newItem.prefix = item.prefix; + (newItem.ModItem as EvilSmasher).IsAnimating = true; + } + item.stack -= 1; + if (item.stack <= 0) + item.active = false; + return; + } + } } } } diff --git a/Items/Weapons/Melee/EvilSmasherGlow.png b/Items/Weapons/Melee/EvilSmasherGlow.png new file mode 100644 index 0000000000..a42c9964b6 Binary files /dev/null and b/Items/Weapons/Melee/EvilSmasherGlow.png differ diff --git a/Items/Weapons/Melee/ExaltedOathblade.cs b/Items/Weapons/Melee/ExaltedOathblade.cs index bfd403ae03..7b24615dc9 100644 --- a/Items/Weapons/Melee/ExaltedOathblade.cs +++ b/Items/Weapons/Melee/ExaltedOathblade.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 88; Item.height = 88; Item.damage = 90; + Item.crit = 31; Item.useAnimation = Item.useTime = 45; Item.useStyle = ItemUseStyleID.Shoot; @@ -39,7 +40,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.rare = ItemRarityID.Yellow; } public override bool MeleePrefix() => true; - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 31; public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 && !player.Calamity().mouseRight; public override void HoldItem(Player player) { diff --git a/Items/Weapons/Melee/ForbiddenOathblade.cs b/Items/Weapons/Melee/ForbiddenOathblade.cs index b8339e9b17..1f474602f8 100644 --- a/Items/Weapons/Melee/ForbiddenOathblade.cs +++ b/Items/Weapons/Melee/ForbiddenOathblade.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 74; Item.height = 74; Item.damage = 58; + Item.crit = 21; Item.useAnimation = Item.useTime = 50; Item.useStyle = ItemUseStyleID.Shoot; @@ -38,7 +39,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.rare = ItemRarityID.Pink; } public override bool MeleePrefix() => true; - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 21; public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 && !player.Calamity().mouseRight; public override void HoldItem(Player player) { diff --git a/Items/Weapons/Melee/Lightspeed.cs b/Items/Weapons/Melee/Lightspeed.cs index 4c0551e7cb..28e525dd29 100644 --- a/Items/Weapons/Melee/Lightspeed.cs +++ b/Items/Weapons/Melee/Lightspeed.cs @@ -1,7 +1,10 @@ using CalamityMod.Cooldowns; using CalamityMod.Items.Materials; +using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -19,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 74; Item.height = 94; Item.useStyle = ItemUseStyleID.Shoot; - Item.damage = 220; + Item.damage = 200; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = Item.useTime = 20; Item.shootSpeed = 10f; @@ -37,13 +40,13 @@ namespace CalamityMod.Items.Weapons.Melee } // You can only use the right-click if you have sufficient Elemental Mastery - public override bool AltFunctionUse(Player player) => player.Calamity().elementalMastery >= 100; + public override bool AltFunctionUse(Player player) => player.GetModPlayer().elementalMastery >= MaxEnergy; public override void HoldItem(Player player) { if (player.Calamity().cooldowns.TryGetValue(ElementalMastery.ID, out var cooldown)) { - cooldown.timeLeft = player.Calamity().elementalMastery; + cooldown.timeLeft = player.GetModPlayer().elementalMastery; } else { @@ -62,4 +65,125 @@ namespace CalamityMod.Items.Weapons.Melee Register(); } } + + public class LightspeedPlayer : ModPlayer + { + public int elementalMastery = 0; + public int elementalMasteryPrevious = 0; + public int elementalMasteryTimer = 0; + public bool elementalMasteryPaused = false; + public bool elementalMasteryMaxFXPlayed = false; + private int lucreciaParticleTimer = 0; + + public override void PostUpdateMiscEffects() + { + if (Player.HeldItem.type == ModContent.ItemType() && elementalMastery > 0) + { + lucreciaParticleTimer--; + + // If the timer is at or below zero, spawn a particle. + if (lucreciaParticleTimer <= 0) + { + // Reset the timer (spawn rate depends on energy) + lucreciaParticleTimer = (int)(20 - 15 * (elementalMastery / 60)); + + float radius = Main.rand.NextFloat(160f, 190f); // Distance from center + float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius + + Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius; + + // Scale opacity with energy + float opacity = elementalMastery / (float)Lightspeed.MaxEnergy; + Color color = Main.rand.NextBool() ? Color.Aqua : Color.OrangeRed; + color *= opacity * 0.5f; + + if (elementalMastery >= 100) + { + color *= 2.4f; // Way brighter + } + + Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path + float rotationSpeed = 0.04f; + + var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI); + GeneralParticleHandler.SpawnParticle(particle); + } + } + + + if (Player.HeldItem.type == ModContent.ItemType()) + { + if (elementalMastery == 0) + elementalMasteryPrevious = 0; + + if (elementalMastery > 0) + { + if (elementalMastery > elementalMasteryPrevious) + { + elementalMasteryPaused = true; + elementalMasteryTimer = 0; + } + + elementalMasteryTimer++; + + // Pause for 180 ticks + if (elementalMasteryPaused) + { + if (elementalMasteryTimer >= 1 && elementalMastery == Lightspeed.MaxEnergy && !elementalMasteryMaxFXPlayed) + { + SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged"); + SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, Player.Center); + + for (int i = 0; i < 10; i++) // Circular ring of particles burst from player + { + float angle = MathHelper.TwoPi * (i / 10f); + Vector2 spawnDirection = angle.ToRotationVector2(); + Vector2 velocity = spawnDirection * 14f; + + CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); + GeneralParticleHandler.SpawnParticle(spark); + } + elementalMasteryMaxFXPlayed = true; + } + + // If the pause is Done, resume decrementing. + if (elementalMasteryTimer >= 180) + { + elementalMasteryTimer = 0; + elementalMastery--; + } + } + else // Decrementing + { + // Once every 30 ticks + if (elementalMasteryTimer >= 30) + { + elementalMastery--; + elementalMasteryTimer = 0; + } + } + + if (elementalMastery != Lightspeed.MaxEnergy) + elementalMasteryMaxFXPlayed = false; + } + + // Update for next loop. + elementalMasteryPrevious = elementalMastery; + + } + else + { + // Reset all EM variables when not holding the weapon + elementalMasteryTimer = 0; + elementalMasteryPaused = false; + elementalMastery = 0; + } + } + + public override void UpdateDead() + { + elementalMastery = 0; + elementalMasteryPrevious = 0; + } + } } diff --git a/Items/Weapons/Melee/Lucrecia.cs b/Items/Weapons/Melee/Lucrecia.cs index 6fd7a2d0d9..e2160af239 100644 --- a/Items/Weapons/Melee/Lucrecia.cs +++ b/Items/Weapons/Melee/Lucrecia.cs @@ -1,8 +1,11 @@ using CalamityMod.Cooldowns; using CalamityMod.Items.Materials; +using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using CalamityMod.Projectiles.Melee; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -21,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 54; Item.height = 54; Item.useStyle = ItemUseStyleID.Shoot; - Item.damage = 150; + Item.damage = 132; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 34; Item.shootSpeed = 10f; @@ -37,13 +40,13 @@ namespace CalamityMod.Items.Weapons.Melee } - public override bool AltFunctionUse(Player player) => player.Calamity().darklightEnergy >= MaxEnergy; + public override bool AltFunctionUse(Player player) => player.GetModPlayer().darklightEnergy >= MaxEnergy; public override void HoldItem(Player player) { if (player.Calamity().cooldowns.TryGetValue(DarklightEnergy.ID, out var cooldown)) { - cooldown.timeLeft = player.Calamity().darklightEnergy; + cooldown.timeLeft = player.GetModPlayer().darklightEnergy; } else { @@ -64,4 +67,129 @@ namespace CalamityMod.Items.Weapons.Melee Register(); } } + + public class LucreciaPlayer : ModPlayer + { + private int lucreciaParticleTimer = 0; + public int darklightEnergy = 0; + public int darklightEnergyPrevious = 0; + public int darklightEnergyTimer = 0; + public bool darklightEnergyPaused = false; + public bool darklightEnergyMaxFXPlayed = false; + + + public override void PostUpdateMiscEffects() + { + if (Player.HeldItem.type == ModContent.ItemType()) + { + if (darklightEnergy == 0) + darklightEnergyPrevious = 0; + + if (darklightEnergy > 0) + { + // If the player's energy has increased since last tick + if (darklightEnergy > darklightEnergyPrevious) + { + darklightEnergyPaused = true; + darklightEnergyTimer = 0; + } + + darklightEnergyTimer++; + + // Pause for 180 ticks + if (darklightEnergyPaused) + { + if (darklightEnergyTimer >= 1 && darklightEnergy == Lucrecia.MaxEnergy && !darklightEnergyMaxFXPlayed) + { + SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged"); + SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, Player.Center); + + for (int i = 0; i < 10; i++) // Circular ring of particles burst from player + { + float angle = MathHelper.TwoPi * (i / 10f); + Vector2 spawnDirection = angle.ToRotationVector2(); + Vector2 velocity = spawnDirection * 14f; + + CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); + GeneralParticleHandler.SpawnParticle(spark); + } + darklightEnergyMaxFXPlayed = true; + } + + // If the pause is Done, resume decrementing. + if (darklightEnergyTimer >= 180) + { + darklightEnergyPaused = false; + darklightEnergyTimer = 0; + darklightEnergy--; + } + } + else // Decrementing + { + darklightEnergyMaxFXPlayed = false; + // Once every 20 ticks + if (darklightEnergyTimer >= 20) + { + darklightEnergy--; + darklightEnergyTimer = 0; + } + } + } + + if (darklightEnergy != Lucrecia.MaxEnergy) + darklightEnergyMaxFXPlayed = false; + + // Update for next loop. + darklightEnergyPrevious = darklightEnergy; + + } + else + { + // Reset all energy variables when not holding the weapon + darklightEnergyTimer = 0; + darklightEnergyPaused = false; + darklightEnergy = 0; + } + + + if (Player.HeldItem.type == ModContent.ItemType() && darklightEnergy > 0) + { + lucreciaParticleTimer--; + + // If the timer is at or below zero, spawn a particle. + if (lucreciaParticleTimer <= 0) + { + // Reset the timer (spawn rate depends on energy) + lucreciaParticleTimer = (int)(20 - 15 * (darklightEnergy / 60)); + + float radius = Main.rand.NextFloat(160f, 190f); // Distance from center + float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius + + Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius; + + // Scale opacity with energy + float opacity = darklightEnergy / (float)Lucrecia.MaxEnergy; + Color color = Main.rand.NextBool() ? Color.MediumPurple : Color.CornflowerBlue; + color *= opacity * 0.5f; + + if (darklightEnergy >= 100) + { + color *= 2.4f; // Way brighter + } + + Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path + float rotationSpeed = 0.04f; + + var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI); + GeneralParticleHandler.SpawnParticle(particle); + } + } + } + + public override void UpdateDead() + { + darklightEnergy = 0; + darklightEnergyPrevious = 0; + } + } } diff --git a/Items/Weapons/Melee/Murasama.cs b/Items/Weapons/Melee/Murasama.cs index 5b5a7708c9..3f14bfa7fd 100644 --- a/Items/Weapons/Melee/Murasama.cs +++ b/Items/Weapons/Melee/Murasama.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 134; Item.damage = 2200; Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Item.crit = 61; Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; @@ -47,9 +48,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.rare = ModContent.RarityType(); } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 61; - public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { Texture2D texture; diff --git a/Items/Weapons/Melee/OldLordClaymore.cs b/Items/Weapons/Melee/OldLordClaymore.cs index 82d8b08a91..d3673b326a 100644 --- a/Items/Weapons/Melee/OldLordClaymore.cs +++ b/Items/Weapons/Melee/OldLordClaymore.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 76; Item.damage = 144; Item.DamageType = TrueMeleeDamageClass.Instance; + Item.crit = 11; Item.useAnimation = Item.useTime = 90; // Yes it's actually supposed to be this slow Item.useStyle = ItemUseStyleID.Shoot; @@ -38,6 +39,5 @@ namespace CalamityMod.Items.Weapons.Melee Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Melee/OldLordClaymoreGlow").Value); } public override bool MeleePrefix() => true; - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 11; } } diff --git a/Items/Weapons/Melee/Omniblade.cs b/Items/Weapons/Melee/Omniblade.cs index 1fc173a4e3..ac56bb47f4 100644 --- a/Items/Weapons/Melee/Omniblade.cs +++ b/Items/Weapons/Melee/Omniblade.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 146; Item.damage = 100; Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Item.crit = 45; Item.useAnimation = 12; Item.useStyle = ItemUseStyleID.Swing; Item.useTime = 12; @@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.rare = ItemRarityID.Yellow; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 45; - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override void AddRecipes() diff --git a/Items/Weapons/Melee/PhosphorescentGauntlet.cs b/Items/Weapons/Melee/PhosphorescentGauntlet.cs index 367fe584f3..85cfbce481 100644 --- a/Items/Weapons/Melee/PhosphorescentGauntlet.cs +++ b/Items/Weapons/Melee/PhosphorescentGauntlet.cs @@ -18,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = Item.height = 40; Item.damage = 2705; Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Item.crit = 10; Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; @@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.rare = ModContent.RarityType(); } - // Terraria seems to really dislike high crit values in SetDefaults. - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Melee/PhotonRipper.cs b/Items/Weapons/Melee/PhotonRipper.cs index 8faaf618d0..ca5701977f 100644 --- a/Items/Weapons/Melee/PhotonRipper.cs +++ b/Items/Weapons/Melee/PhotonRipper.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 134; Item.height = 54; Item.damage = 3725; + Item.crit = 18; Item.knockBack = 12f; Item.useTime = 5; Item.useAnimation = 25; @@ -43,8 +44,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 18; - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override bool AltFunctionUse(Player player) => true; public override void HoldItem(Player player) diff --git a/Items/Weapons/Melee/Roxcalibur.cs b/Items/Weapons/Melee/Roxcalibur.cs index debc3d50b2..c0d4f25266 100644 --- a/Items/Weapons/Melee/Roxcalibur.cs +++ b/Items/Weapons/Melee/Roxcalibur.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 100; Item.height = 100; Item.damage = 180; + Item.crit = 8; Item.knockBack = 13f; Item.DamageType = DamageClass.Melee; Item.useStyle = ItemUseStyleID.Shoot; @@ -39,10 +40,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.channel = true; } - public override void ModifyWeaponCrit(Player player, ref float crit) - { - crit += 8f; - } public override bool CanUseItem(Player player) => Main.hardMode && player.ownedProjectileCounts[Item.shoot] < 1; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { @@ -61,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Melee .AddIngredient(ItemID.SoulofNight, 10) .AddIngredient(5) .AddIngredient(ItemID.Obsidian, 10) - .AddIngredient(ItemID.StoneBlock, 100) + .AddRecipeGroup("AnyStoneBlock", 100) .AddIngredient(ItemID.Amethyst, 2) .AddTile(TileID.Anvils) .Register(); diff --git a/Items/Weapons/Melee/TitanArm.cs b/Items/Weapons/Melee/TitanArm.cs index 03b4a71cb1..425acf6f3a 100644 --- a/Items/Weapons/Melee/TitanArm.cs +++ b/Items/Weapons/Melee/TitanArm.cs @@ -13,6 +13,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 46; Item.height = 58; Item.damage = 69; + Item.crit = 100; Item.knockBack = 80f; //This number doesn't mean anything, but it's not 9001f because that caused bugs. Item.useAnimation = Item.useTime = 12; Item.DamageType = DamageClass.Melee; @@ -24,9 +25,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.value = CalamityGlobalItem.RarityLimeBuyPrice; } - // Boosting crit in SetDefaults along with knockback seemed to severely inflate the reforging price. Guaranteed crits for more knockback. - public override void ModifyWeaponCrit(Player player, ref float crit) => crit = 100; - public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 300); diff --git a/Items/Weapons/Ranged/AntiMaterielRifle.cs b/Items/Weapons/Ranged/AntiMaterielRifle.cs index 8ed530291d..a0a470a866 100644 --- a/Items/Weapons/Ranged/AntiMaterielRifle.cs +++ b/Items/Weapons/Ranged/AntiMaterielRifle.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 40; Item.damage = 1818; Item.DamageType = DamageClass.Ranged; + Item.crit = 20; Item.useTime = Item.useAnimation = 60; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; @@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override void HoldItem(Player player) => player.scope = true; - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Ranged/AstralBlaster.cs b/Items/Weapons/Ranged/AstralBlaster.cs index e6c0803a7a..eed33698bf 100644 --- a/Items/Weapons/Ranged/AstralBlaster.cs +++ b/Items/Weapons/Ranged/AstralBlaster.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 24; Item.damage = 120; Item.DamageType = DamageClass.Ranged; + Item.crit = 25; Item.useTime = 15; Item.useAnimation = 15; Item.useStyle = ItemUseStyleID.Shoot; @@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; - public override Vector2? HoldoutOffset() => new Vector2(-5, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/Buzzkill.cs b/Items/Weapons/Ranged/Buzzkill.cs index cfeef85b6b..6c34e7b8ae 100644 --- a/Items/Weapons/Ranged/Buzzkill.cs +++ b/Items/Weapons/Ranged/Buzzkill.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 76; Item.height = 42; Item.damage = 56; + Item.crit = 21; Item.useTime = 30; Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; @@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 20f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 21; - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/CorrodedCaustibow.cs b/Items/Weapons/Ranged/CorrodedCaustibow.cs index 2c4d7fcd6e..8bc2e73088 100644 --- a/Items/Weapons/Ranged/CorrodedCaustibow.cs +++ b/Items/Weapons/Ranged/CorrodedCaustibow.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 38; Item.damage = 75; Item.DamageType = DamageClass.Ranged; + Item.crit = 20; Item.useTime = 45; Item.useAnimation = 45; Item.useStyle = ItemUseStyleID.Shoot; @@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Arrow; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (CalamityUtils.CheckWoodenAmmo(type, player)) diff --git a/Items/Weapons/Ranged/Eviscerator.cs b/Items/Weapons/Ranged/Eviscerator.cs index a6dca96d15..d0b79472dc 100644 --- a/Items/Weapons/Ranged/Eviscerator.cs +++ b/Items/Weapons/Ranged/Eviscerator.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 22; Item.damage = 60; Item.DamageType = DamageClass.Ranged; + Item.crit = 25; Item.useTime = 60; Item.useAnimation = 60; Item.useStyle = ItemUseStyleID.Shoot; @@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; - public override Vector2? HoldoutOffset() => new Vector2(-7, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index 69890dfbb8..791aaa307d 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.damage = 444; Item.knockBack = 5.5f; Item.DamageType = DamageClass.Ranged; + Item.crit = 20; // Burst of 5, one every 5 frames for 25 total. Cooldown of 39 frames. Item.useTime = 5; @@ -58,8 +59,6 @@ namespace CalamityMod.Items.Weapons.Ranged ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; public override void HoldItem(Player player) { if (player.mount.Type == MountID.Drill) diff --git a/Items/Weapons/Ranged/HandheldTank.cs b/Items/Weapons/Ranged/HandheldTank.cs index 9e0189cacd..18c4fd76dd 100644 --- a/Items/Weapons/Ranged/HandheldTank.cs +++ b/Items/Weapons/Ranged/HandheldTank.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 46; Item.DamageType = DamageClass.Ranged; Item.damage = 740; + Item.crit = 15; Item.knockBack = 16f; Item.useTime = Item.useAnimation = 74; Item.autoReuse = true; @@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Rocket; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15; - public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) { position += velocity.SafeNormalize(Vector2.UnitX) * 48f; diff --git a/Items/Weapons/Ranged/M1Garand.cs b/Items/Weapons/Ranged/M1Garand.cs index 27254cb375..e1428c34bf 100644 --- a/Items/Weapons/Ranged/M1Garand.cs +++ b/Items/Weapons/Ranged/M1Garand.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 22; Item.damage = 75; Item.DamageType = DamageClass.Ranged; - + Item.crit = 10; Item.useTime = 40; Item.useAnimation = 40; Item.useStyle = ItemUseStyleID.Shoot; @@ -35,7 +35,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.rare = ItemRarityID.Orange; } - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override void HoldItem(Player player) { diff --git a/Items/Weapons/Ranged/MarksmanBow.cs b/Items/Weapons/Ranged/MarksmanBow.cs index 04583dd290..0dd35e7cab 100644 --- a/Items/Weapons/Ranged/MarksmanBow.cs +++ b/Items/Weapons/Ranged/MarksmanBow.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 110; Item.damage = 39; Item.DamageType = DamageClass.Ranged; + Item.crit = 10; Item.useTime = 5; Item.useAnimation = 15; Item.useLimitPerAnimation = 3; @@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.Calamity().donorItem = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; - public override Vector2? HoldoutOffset() => new Vector2(-4, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/NitroExpressRifle.cs b/Items/Weapons/Ranged/NitroExpressRifle.cs index ee5b504667..04e64586c4 100644 --- a/Items/Weapons/Ranged/NitroExpressRifle.cs +++ b/Items/Weapons/Ranged/NitroExpressRifle.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 22; Item.damage = 210; Item.DamageType = DamageClass.Ranged; + Item.crit = 10; Item.useTime = 70; Item.useAnimation = 70; Item.useStyle = ItemUseStyleID.Shoot; @@ -35,9 +36,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-10, 8); - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; - public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Ranged/OntologicalDespoiler.cs b/Items/Weapons/Ranged/OntologicalDespoiler.cs index 577180c67e..2a68495738 100644 --- a/Items/Weapons/Ranged/OntologicalDespoiler.cs +++ b/Items/Weapons/Ranged/OntologicalDespoiler.cs @@ -39,6 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 34; Item.damage = 445; Item.DamageType = DamageClass.Ranged; + Item.crit = 25; Item.useAnimation = Item.useTime = 8; Item.noMelee = true; Item.noUseGraphic = true; @@ -52,7 +53,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; } - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25; public override bool AltFunctionUse(Player player) => true; public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override void HoldItem(Player player) diff --git a/Items/Weapons/Ranged/RubicoPrime.cs b/Items/Weapons/Ranged/RubicoPrime.cs index 46a5289e33..f9c5673f80 100644 --- a/Items/Weapons/Ranged/RubicoPrime.cs +++ b/Items/Weapons/Ranged/RubicoPrime.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 28; Item.damage = 450; Item.DamageType = DamageClass.Ranged; + Item.crit = 38; Item.knockBack = 10f; Item.useTime = 50; Item.useAnimation = 50; @@ -39,9 +40,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.Calamity().donorItem = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 38; - public override Vector2? HoldoutOffset() => new Vector2(-6, 10); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/SDFMG.cs b/Items/Weapons/Ranged/SDFMG.cs index 68ac499b6d..25bb058a33 100644 --- a/Items/Weapons/Ranged/SDFMG.cs +++ b/Items/Weapons/Ranged/SDFMG.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 34; Item.damage = 118; Item.DamageType = DamageClass.Ranged; + Item.crit = 15; Item.useTime = Item.useAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; @@ -38,8 +39,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.rare = ModContent.RarityType(); } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15; public override Vector2? HoldoutOffset() => new Vector2(-10, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/Shardshocker.cs b/Items/Weapons/Ranged/Shardshocker.cs index 27d64ec957..c16a177347 100644 --- a/Items/Weapons/Ranged/Shardshocker.cs +++ b/Items/Weapons/Ranged/Shardshocker.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 44; Item.damage = 115; Item.DamageType = DamageClass.Ranged; + Item.crit = 6; Item.useTime = 60; Item.useAnimation = 60; Item.useStyle = ItemUseStyleID.Shoot; @@ -35,9 +36,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 50f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 6; - public override Vector2? HoldoutOffset() => new Vector2(-10, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/Shellshooter.cs b/Items/Weapons/Ranged/Shellshooter.cs index e39b9b4e76..bd08738f73 100644 --- a/Items/Weapons/Ranged/Shellshooter.cs +++ b/Items/Weapons/Ranged/Shellshooter.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 38; Item.damage = 40; Item.DamageType = DamageClass.Ranged; + Item.crit = 15; Item.useTime = 70; Item.useAnimation = 70; Item.useStyle = ItemUseStyleID.Shoot; @@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Arrow; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (CalamityUtils.CheckWoodenAmmo(type, player)) diff --git a/Items/Weapons/Ranged/Shroomer.cs b/Items/Weapons/Ranged/Shroomer.cs index 2b619ab787..122cdf881c 100644 --- a/Items/Weapons/Ranged/Shroomer.cs +++ b/Items/Weapons/Ranged/Shroomer.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 28; Item.damage = 150; Item.DamageType = DamageClass.Ranged; + Item.crit = 35; Item.useTime = 35; Item.useAnimation = 35; Item.useStyle = ItemUseStyleID.Shoot; @@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 35; - public override Vector2? HoldoutOffset() => new Vector2(-25, 0); public override void HoldItem(Player player) => player.scope = true; diff --git a/Items/Weapons/Ranged/SomaPrime.cs b/Items/Weapons/Ranged/SomaPrime.cs index 016c4f32fa..8e85adde27 100644 --- a/Items/Weapons/Ranged/SomaPrime.cs +++ b/Items/Weapons/Ranged/SomaPrime.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 34; Item.damage = 705; Item.DamageType = DamageClass.Ranged; + Item.crit = 26; Item.useAnimation = Item.useTime = 5; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; @@ -40,9 +41,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.Calamity().devItem = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 26; - public override Vector2? HoldoutOffset() => new Vector2(-25, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/StellarCannon.cs b/Items/Weapons/Ranged/StellarCannon.cs index 7445e3628f..bee2941fdb 100644 --- a/Items/Weapons/Ranged/StellarCannon.cs +++ b/Items/Weapons/Ranged/StellarCannon.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 30; Item.damage = 180; Item.DamageType = DamageClass.Ranged; + Item.crit = 16; Item.useTime = 40; Item.useAnimation = 40; Item.useStyle = ItemUseStyleID.Shoot; @@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 3f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16; - public override Vector2? HoldoutOffset() { return new Vector2(-5, 0); diff --git a/Items/Weapons/Ranged/SuperradiantSlaughterer.cs b/Items/Weapons/Ranged/SuperradiantSlaughterer.cs index 9685412233..69a4afb43a 100644 --- a/Items/Weapons/Ranged/SuperradiantSlaughterer.cs +++ b/Items/Weapons/Ranged/SuperradiantSlaughterer.cs @@ -57,6 +57,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 46; Item.damage = 100; Item.DamageType = DamageClass.Ranged; + Item.crit = 21; Item.useTime = 10; Item.useAnimation = 10; Item.useStyle = ItemUseStyleID.Shoot; @@ -71,8 +72,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = ShootSpeed; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 21; public override bool AltFunctionUse(Player player) => true; public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; diff --git a/Items/Weapons/Ranged/TheBlunderbass.cs b/Items/Weapons/Ranged/TheBlunderbass.cs index d29689df96..dd5a0564ae 100644 --- a/Items/Weapons/Ranged/TheBlunderbass.cs +++ b/Items/Weapons/Ranged/TheBlunderbass.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 26; Item.damage = 35; Item.DamageType = DamageClass.Ranged; + Item.crit = 6; Item.useTime = 55; Item.useAnimation = 55; Item.useStyle = ItemUseStyleID.Shoot; @@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 25f; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 6; - public override Vector2? HoldoutOffset() => new Vector2(-10, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/TheHive.cs b/Items/Weapons/Ranged/TheHive.cs index f43d7cfdde..e6f4359eeb 100644 --- a/Items/Weapons/Ranged/TheHive.cs +++ b/Items/Weapons/Ranged/TheHive.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.damage = 92; Item.DamageType = DamageClass.Ranged; + Item.crit = 16; Item.useAnimation = Item.useTime = OriginalUseTime; Item.shoot = ProjectileType(); Item.shootSpeed = 13f; @@ -38,9 +39,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.UseSound = new SoundStyle("CalamityMod/Sounds/Item/DudFire") with { Volume = .4f, Pitch = -.9f, PitchVariance = 0.1f }; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16; - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] == 0; // Spawning the holdout won't consume ammo. diff --git a/Items/Weapons/Ranged/ThePack.cs b/Items/Weapons/Ranged/ThePack.cs index 9bafa9238f..56f34bfff0 100644 --- a/Items/Weapons/Ranged/ThePack.cs +++ b/Items/Weapons/Ranged/ThePack.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 46; Item.damage = 1000; Item.DamageType = DamageClass.Ranged; + Item.crit = 8; Item.useTime = Item.useAnimation = 53; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; @@ -34,9 +35,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.Calamity().donorItem = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 8; - public override Vector2? HoldoutOffset() => new Vector2(-40, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Ranged/TyrannysEnd.cs b/Items/Weapons/Ranged/TyrannysEnd.cs index 86672a1208..641402f62c 100644 --- a/Items/Weapons/Ranged/TyrannysEnd.cs +++ b/Items/Weapons/Ranged/TyrannysEnd.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.damage = 2150; Item.knockBack = 9.5f; Item.DamageType = DamageClass.Ranged; + Item.crit = 35; Item.useTime = 60; Item.useAnimation = 60; Item.shoot = ProjectileID.BulletHighVelocity; @@ -35,9 +36,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.Calamity().donorItem = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 35; - public override Vector2? HoldoutOffset() => new Vector2(-28, 0); public override void HoldItem(Player player) => player.scope = true; diff --git a/Items/Weapons/Rogue/Apoctolith.cs b/Items/Weapons/Rogue/Apoctolith.cs index ea514d1562..1fd2a9cfc4 100644 --- a/Items/Weapons/Rogue/Apoctolith.cs +++ b/Items/Weapons/Rogue/Apoctolith.cs @@ -18,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 66; Item.height = 64; Item.damage = 185; + Item.crit = 20; Item.shootSpeed = 18f; Item.shoot = ModContent.ProjectileType(); Item.useAnimation = Item.useTime = 26; @@ -32,9 +33,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override void UseStyle(Player player, Rectangle heldItemFrame) { ExtraArmAnimations.ThrowArmAnimationFast(player, Item); diff --git a/Items/Weapons/Rogue/BlazingStar.cs b/Items/Weapons/Rogue/BlazingStar.cs index 5dd14afede..10e95bab7c 100644 --- a/Items/Weapons/Rogue/BlazingStar.cs +++ b/Items/Weapons/Rogue/BlazingStar.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.height = 32; Item.damage = 75; Item.DamageType = RogueDamageClass.Instance; + Item.crit = 4; Item.autoReuse = true; Item.noMelee = true; Item.noUseGraphic = true; @@ -33,7 +34,6 @@ namespace CalamityMod.Items.Weapons.Rogue public override float StealthVelocityMultiplier => 1.3f; public override float StealthDamageMultiplier => 0.5f; - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { var p = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, -1f); diff --git a/Items/Weapons/Rogue/Cinquedea.cs b/Items/Weapons/Rogue/Cinquedea.cs index 9ef1e82297..e3f8c318ce 100644 --- a/Items/Weapons/Rogue/Cinquedea.cs +++ b/Items/Weapons/Rogue/Cinquedea.cs @@ -14,6 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 32; Item.height = 32; Item.damage = 35; + Item.crit = 8; Item.rare = ItemRarityID.Orange; Item.knockBack = 5; Item.autoReuse = true; @@ -29,9 +30,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 8; - public override float StealthDamageMultiplier => 1.5f; public override float StealthVelocityMultiplier => 1.25f; diff --git a/Items/Weapons/Rogue/Crystalline.cs b/Items/Weapons/Rogue/Crystalline.cs index 83add7844f..a835714b1c 100644 --- a/Items/Weapons/Rogue/Crystalline.cs +++ b/Items/Weapons/Rogue/Crystalline.cs @@ -14,6 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 50; Item.height = 50; Item.damage = 16; + Item.crit = 4; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 18; @@ -29,9 +30,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4; - public override float StealthDamageMultiplier => 1.7f; 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/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index 39545494e2..a43492d9e0 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.height = 58; Item.damage = 81; Item.DamageType = RogueDamageClass.Instance; + Item.crit = 16; Item.useTime = Item.useAnimation = 19; Item.knockBack = 12; @@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noUseGraphic = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/Glaive.cs b/Items/Weapons/Rogue/Glaive.cs index 9cbb1edc4a..2f6b9a5492 100644 --- a/Items/Weapons/Rogue/Glaive.cs +++ b/Items/Weapons/Rogue/Glaive.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.height = 32; Item.damage = 22; Item.DamageType = RogueDamageClass.Instance; + Item.crit = 6; Item.autoReuse = true; Item.noMelee = true; Item.noUseGraphic = true; @@ -32,7 +33,6 @@ namespace CalamityMod.Items.Weapons.Rogue public override float StealthVelocityMultiplier => 1.3f; public override float StealthDamageMultiplier => 0.6f; - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 6; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { var p = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, -1f); diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index 31043a2f4e..10a951f840 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.height = 32; Item.damage = 148; Item.DamageType = RogueDamageClass.Instance; + Item.crit = 16; Item.useTime = 4; Item.useAnimation = 12; Item.reuseDelay = 1; @@ -39,9 +40,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/IceStar.cs b/Items/Weapons/Rogue/IceStar.cs index 9d025acef4..0beafe26c6 100644 --- a/Items/Weapons/Rogue/IceStar.cs +++ b/Items/Weapons/Rogue/IceStar.cs @@ -13,6 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = Item.height = 66; Item.damage = 45; + Item.crit = 7; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 12; @@ -28,9 +29,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 7; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/Kylie.cs b/Items/Weapons/Rogue/Kylie.cs index 6ed83a923b..fdbb110ebd 100644 --- a/Items/Weapons/Rogue/Kylie.cs +++ b/Items/Weapons/Rogue/Kylie.cs @@ -15,8 +15,10 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 34; Item.height = 50; Item.damage = 12; - Item.knockBack = 12; Item.DamageType = RogueDamageClass.Instance; + Item.crit = 16; + Item.knockBack = 12; + Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.rare = ItemRarityID.Blue; Item.useTime = 25; @@ -29,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noUseGraphic = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/Prismalline.cs b/Items/Weapons/Rogue/Prismalline.cs index 8977ed8739..5ed879a35f 100644 --- a/Items/Weapons/Rogue/Prismalline.cs +++ b/Items/Weapons/Rogue/Prismalline.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 54; Item.height = 54; Item.damage = 36; + Item.crit = 4; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = Item.useTime = 20; @@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 9c04347e38..5814d9db9d 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 68; Item.height = 68; Item.damage = 222; + Item.crit = 15; Item.knockBack = 8f; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; @@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shoot = ModContent.ProjectileType(); } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike diff --git a/Items/Weapons/Rogue/ProfanedPartisan.png b/Items/Weapons/Rogue/ProfanedPartisan.png index 24b45d1ccc..3b46003a0d 100644 Binary files a/Items/Weapons/Rogue/ProfanedPartisan.png and b/Items/Weapons/Rogue/ProfanedPartisan.png differ diff --git a/Items/Weapons/Rogue/RadiantStar.cs b/Items/Weapons/Rogue/RadiantStar.cs index 16e52c9fc5..3b22c78a60 100644 --- a/Items/Weapons/Rogue/RadiantStar.cs +++ b/Items/Weapons/Rogue/RadiantStar.cs @@ -14,7 +14,8 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 54; Item.height = 54; - Item.damage = 55; //33 + Item.damage = 55; + Item.crit = 8; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = Item.useTime = 12; @@ -29,9 +30,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 8; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/RotBall.cs b/Items/Weapons/Rogue/RotBall.cs index a915b82bc8..9ca38e95d4 100644 --- a/Items/Weapons/Rogue/RotBall.cs +++ b/Items/Weapons/Rogue/RotBall.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 30; Item.height = 30; Item.damage = 16; + Item.crit = 8; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 16; @@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 8; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike diff --git a/Items/Weapons/Rogue/ScarletDevil.cs b/Items/Weapons/Rogue/ScarletDevil.cs index 52d204654e..0489ff32d1 100644 --- a/Items/Weapons/Rogue/ScarletDevil.cs +++ b/Items/Weapons/Rogue/ScarletDevil.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 108; Item.height = 108; Item.damage = 10000; + Item.crit = 20; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = Item.useTime = 60; @@ -41,9 +42,6 @@ namespace CalamityMod.Items.Weapons.Rogue return false; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Rogue/ShatteredDawn.cs b/Items/Weapons/Rogue/ShatteredDawn.cs index 0602d4e927..7331b6f831 100644 --- a/Items/Weapons/Rogue/ShatteredDawn.cs +++ b/Items/Weapons/Rogue/ShatteredDawn.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 66; Item.height = 66; Item.damage = 80; + Item.crit = 10; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 12; @@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; - public override float StealthDamageMultiplier => 1.2f; 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/SlickCane.cs b/Items/Weapons/Rogue/SlickCane.cs index 60f192551e..0331d03098 100644 --- a/Items/Weapons/Rogue/SlickCane.cs +++ b/Items/Weapons/Rogue/SlickCane.cs @@ -17,8 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; - Item.useAnimation = 26; - Item.useTime = 26; + Item.useTime = Item.useAnimation = 16; Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 6f; Item.UseSound = SoundID.DD2_GhastlyGlaivePierce; diff --git a/Items/Weapons/Rogue/SpearofDestiny.cs b/Items/Weapons/Rogue/SpearofDestiny.cs index 17823595ac..5bd53ebda4 100644 --- a/Items/Weapons/Rogue/SpearofDestiny.cs +++ b/Items/Weapons/Rogue/SpearofDestiny.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Weapons.Rogue private bool BigSpear = false; public override void SetDefaults() { - Item.width = 52; - Item.height = 52; + Item.width = 100; + Item.height = 100; Item.damage = 70; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/SpearofDestiny.png b/Items/Weapons/Rogue/SpearofDestiny.png index 4e198d9042..0fb7e725de 100644 Binary files a/Items/Weapons/Rogue/SpearofDestiny.png and b/Items/Weapons/Rogue/SpearofDestiny.png differ diff --git a/Items/Weapons/Rogue/StellarKnife.cs b/Items/Weapons/Rogue/StellarKnife.cs index abe77f582a..5b7d1b4f7c 100644 --- a/Items/Weapons/Rogue/StellarKnife.cs +++ b/Items/Weapons/Rogue/StellarKnife.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 32; Item.height = 34; Item.damage = 69; + Item.crit = 4; Item.noMelee = true; Item.noUseGraphic = true; Item.useTime = Item.useAnimation = 9; @@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable() && player.ownedProjectileCounts[Item.shoot] < knifeLimit) diff --git a/Items/Weapons/Rogue/StormfrontRazor.cs b/Items/Weapons/Rogue/StormfrontRazor.cs index 3d98b335f5..1d4d1e40e5 100644 --- a/Items/Weapons/Rogue/StormfrontRazor.cs +++ b/Items/Weapons/Rogue/StormfrontRazor.cs @@ -35,15 +35,13 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useAnimation = 20; Item.useTime = 20; Item.damage = 38; + Item.crit = 8; Item.knockBack = 7f; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8.2f; Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 8; - public override float StealthDamageMultiplier => 1.2f; public override float StealthVelocityMultiplier => 1.5f; diff --git a/Items/Weapons/Rogue/ThrowingBrick.cs b/Items/Weapons/Rogue/ThrowingBrick.cs index d290fbacab..d976788301 100644 --- a/Items/Weapons/Rogue/ThrowingBrick.cs +++ b/Items/Weapons/Rogue/ThrowingBrick.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 28; Item.height = 20; Item.damage = 14; + Item.crit = 20; Item.shootSpeed = 15f; Item.shoot = ModContent.ProjectileType(); Item.useAnimation = Item.useTime = 25; @@ -34,9 +35,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override void UseStyle(Player player, Rectangle heldItemFrame) { ExtraArmAnimations.ThrowArmAnimationFast(player, Item); diff --git a/Items/Weapons/Rogue/TitaniumShuriken.cs b/Items/Weapons/Rogue/TitaniumShuriken.cs index baee97518b..0824bd3e35 100644 --- a/Items/Weapons/Rogue/TitaniumShuriken.cs +++ b/Items/Weapons/Rogue/TitaniumShuriken.cs @@ -13,6 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 34; Item.height = 34; Item.damage = 38; + Item.crit = 10; Item.useAnimation = Item.useTime = 9; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; @@ -28,10 +29,6 @@ namespace CalamityMod.Items.Weapons.Rogue } public override float StealthVelocityMultiplier => 1.25f; - - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike diff --git a/Items/Weapons/Rogue/ToothBall.cs b/Items/Weapons/Rogue/ToothBall.cs index eada2f3536..633fb1f6cd 100644 --- a/Items/Weapons/Rogue/ToothBall.cs +++ b/Items/Weapons/Rogue/ToothBall.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 30; Item.height = 30; Item.damage = 16; + Item.crit = 8; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 16; @@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 8; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike diff --git a/Items/Weapons/Rogue/TwistingThunder.cs b/Items/Weapons/Rogue/TwistingThunder.cs index 1ff0517975..66aadf552c 100644 --- a/Items/Weapons/Rogue/TwistingThunder.cs +++ b/Items/Weapons/Rogue/TwistingThunder.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 56; Item.height = 56; Item.damage = 466; + Item.crit = 12; Item.knockBack = 10f; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; @@ -33,8 +34,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shoot = ModContent.ProjectileType(); } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 12; public override float StealthVelocityMultiplier => 1.5f; public override void ModifyStatsExtra(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) diff --git a/Items/Weapons/Rogue/UrchinStinger.cs b/Items/Weapons/Rogue/UrchinStinger.cs index 606271f7d4..01fe4cb223 100644 --- a/Items/Weapons/Rogue/UrchinStinger.cs +++ b/Items/Weapons/Rogue/UrchinStinger.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 10; - Item.height = 26; + Item.height = 32; Item.damage = 13; Item.DamageType = RogueDamageClass.Instance; Item.useAnimation = Item.useTime = 17; diff --git a/Items/Weapons/Rogue/UrchinStinger.png b/Items/Weapons/Rogue/UrchinStinger.png index a5c38c11b9..9b6087ce19 100644 Binary files a/Items/Weapons/Rogue/UrchinStinger.png and b/Items/Weapons/Rogue/UrchinStinger.png differ diff --git a/Items/Weapons/Summon/FuelCellBundle.cs b/Items/Weapons/Summon/FuelCellBundle.cs index 5a39da29cf..5c3e05a492 100644 --- a/Items/Weapons/Summon/FuelCellBundle.cs +++ b/Items/Weapons/Summon/FuelCellBundle.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.width = 32; Item.height = 32; Item.mana = 10; - Item.damage = 25; + Item.damage = 22; Item.useStyle = ItemUseStyleID.Swing; Item.useAnimation = Item.useTime = 36; Item.noMelee = true; diff --git a/Items/Weapons/Typeless/RelicOfDeliverance.cs b/Items/Weapons/Typeless/RelicOfDeliverance.cs index 8dd3c542b9..d6d2974145 100644 --- a/Items/Weapons/Typeless/RelicOfDeliverance.cs +++ b/Items/Weapons/Typeless/RelicOfDeliverance.cs @@ -14,6 +14,7 @@ namespace CalamityMod.Items.Weapons.Typeless Item.width = 32; Item.height = 46; Item.damage = 1700; + Item.crit = 55; Item.useAnimation = Item.useTime = 35; Item.reuseDelay = 15; Item.useStyle = ItemUseStyleID.Shoot; @@ -38,9 +39,6 @@ namespace CalamityMod.Items.Weapons.Typeless itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.ToolsOther; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 55; - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && player.Calamity().DashID != GodslayerArmorDash.ID; } } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 75dab61d8c..7c6c20ee1b 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1,3 +1,7 @@ +// General (Player) and (Enemy) indicators for buff tags +OnPlayer: (Player) +OnEnemy: (Enemy) + // Alcohols (including Odd Mushroom) AlcoholPoisoning: { DisplayName: Alcohol Poisoning @@ -129,85 +133,104 @@ Withered: { AstralInfectionDebuff: { DisplayName: Astral Infection Description: Your flesh is melting off - ItemTooltip: Sickness - 37.5 DPS + ItemTooltipPlayer: Sickness - 12 DPS + ItemTooltipEnemy: Sickness - 37.5 DPS } AuricRebuke: { DisplayName: Auric Rebuke Description: Your cells are violently bouncing off each other - ItemTooltip: Electric - 100 DPS. Deals 4x damage against moving targets + ItemTooltipPlayer: Electric - 8 DPS. Deals 5x damage against moving players + ItemTooltipEnemy: Electric - 100 DPS. Deals 4x damage against moving targets } BanishingFire: { DisplayName: Banishing Fire Description: You shall not be forgiven for your sins - ItemTooltip: Heat - Deals DPS equal to 0.1% of max HP or 2000, whichever is greater + ItemTooltipEnemy: Heat - Deals DPS equal to 0.1% of max HP or 2000, whichever is greater } BrimstoneFlames: { DisplayName: Brimstone Flames Description: Incinerating both body and mind - ItemTooltip: Heat - 30 DPS + ItemTooltipPlayer: Heat - 15 DPS + ItemTooltipEnemy: Heat - 30 DPS } BurningBlood: { DisplayName: Burning Blood Description: Your blood is on fire - ItemTooltip: Sickness - 20 DPS + ItemTooltipPlayer: Sickness - 4 DPS + ItemTooltipEnemy: Sickness - 20 DPS } BrainRot: { DisplayName: Brain Rot Description: Your neurons are popping like corn kernels - ItemTooltip: Sickness - 20 DPS + ItemTooltipPlayer: Sickness - 4 DPS + ItemTooltipEnemy: Sickness - 20 DPS } DemonicFlames: { DisplayName: Demonic Flames Description: Immolating flames sear your soul - ItemTooltip: Heat - DPS depends on inflicting item + ItemTooltipEnemy: Heat - DPS depends on inflicting item } ElementalMix: { DisplayName: Elemental Mix Description: A beautiful elemental symphony is flaying you alive - ItemTooltip: Typeless - 200 DPS + ItemTooltipEnemy: Typeless - 200 DPS } CrushDepth: { DisplayName: Crush Depth Description: Crushed by aquatic pressure - ItemTooltip: Water - 50 DPS -} - -RiptideDebuff: { - DisplayName: Riptide - Description: Lashed at by powerful waters - ItemTooltip: Water - 15 DPS + ItemTooltipPlayer: + ''' + Water - 9 DPS + Increases breath loss rate in the Abyss + ''' + ItemTooltipEnemy: Water - 50 DPS } Dragonfire: { DisplayName: Dragonfire Description: Engulfed by roaring flames - ItemTooltip: Heat - 480 DPS + ItemTooltipPlayer: Heat - 25 DPS + ItemTooltipEnemy: Heat - 480 DPS } GodSlayerInferno: { DisplayName: God Slayer Inferno Description: Your flesh is burning off - ItemTooltip: Heat - 250 DPS + ItemTooltipPlayer: Heat - 20 DPS + ItemTooltipEnemy: Heat - 250 DPS +} + +HadopelagicPressure: { + DisplayName: Hadopelagic Pressure + Description: Rapidly sinking to a watery grave + ItemTooltipPlayer: + ''' + Water - 20 DPS + Increases breath loss rate in the Abyss + ''' + ItemTooltipEnemy: Water - 175 DPS } HeavyBleeding: { DisplayName: Heavy Bleeding Description: That's gonna need stitches - ItemTooltip: Typeless - 40 DPS + ItemTooltipPlayer: Typeless - 8 DPS + ItemTooltipEnemy: Typeless - 40 DPS } HolyFlames: { DisplayName: Holy Flames Description: Dissolving from holy light - ItemTooltip: Heat - 150 DPS + ItemTooltipPlayer: Heat - 20 DPS + ItemTooltipEnemy: Heat - 150 DPS } HolyInferno: { @@ -218,41 +241,52 @@ HolyInferno: { Laceration: { DisplayName: Laceration Description: You're a bloody mess - ItemTooltip: Typeless - 200 DPS + ItemTooltipPlayer: Typeless - 18 DPS + ItemTooltipEnemy: Typeless - 200 DPS } ManaBurn: { DisplayName: Mana Burn Description: The excess of mana sears your body and mind - ItemTooltip: + ItemTooltipEnemy: ''' Typeless - Every 100 negative mana reduces your life regen by 4 HP/s, but burns enemies for 3% of dealt damage + Every 100 negative mana reduces your life regen by 4 HP/s, but burns enemies for 5% of dealt damage ''' } MiracleBlight: { DisplayName: Miracle Blight Description: Exotic resonance shreds your corporeal form - ItemTooltip: Typeless - 1500 DPS + ItemTooltipPlayer: Typeless - 30 DPS + ItemTooltipEnemy: Typeless - 1500 DPS } Nightwither: { DisplayName: Nightwither Description: Incinerated by lunar rays - ItemTooltip: Cold - 100 DPS + ItemTooltipPlayer: Cold - 20 DPS + ItemTooltipEnemy: Cold - 100 DPS } Plague: { DisplayName: Plague Description: Rotting from the inside - ItemTooltip: Sickness - 50 DPS + ItemTooltipPlayer: Sickness - 15 DPS + ItemTooltipEnemy: Sickness - 50 DPS +} + +RiptideDebuff: { + DisplayName: Riptide + Description: Lashed at by powerful waters + ItemTooltipPlayer: Water - 3 DPS + ItemTooltipEnemy: Water - 15 DPS } SagePoison: { DisplayName: Sage Poison Description: Poisoned - ItemTooltip: + ItemTooltipEnemy: ''' Sickness - 25 DPS per Viral Sprout / 50 DPS per Virid Vanguard Ignores 75% of enemy sickness weaknesses and resistances @@ -262,7 +296,8 @@ SagePoison: { SearingLava: { DisplayName: Searing Lava Description: The brimstone lava sears your flesh - ItemTooltip: + ItemTooltipPlayer: Heat - 15 DPS + ItemTooltipEnemy: ''' Heat - 20 DPS Ignores enemy heat weaknesses and resistances @@ -273,35 +308,44 @@ SearingLava: { ShellfishClaps: { DisplayName: Shellfish Claps Description: Clamfest + ItemTooltipEnemy: Typeless - 75 DPS for each Shellfish minion } Shred: { DisplayName: Shred Description: Someone built ten Tri-Tip Daggers... - ItemTooltip: "" + ItemTooltipEnemy: "" } SnapClamDebuff: { DisplayName: Clammed Description: Clapped by Snap Clams + ItemTooltipEnemy: Typeless - 7.5 DPS for each latched clam } StaticDischarge: { DisplayName: Static Discharge Description: Shocked by static electricity - ItemTooltip: Electric - 2.5 DPS. 4x damage to moving targets + ItemTooltipPlayer: Electric - 1.5 DPS. 4x damage to moving players + ItemTooltipEnemy: Electric - 2.5 DPS. 4x damage to moving targets } SulphuricPoisoning: { DisplayName: Sulphuric Poisoning Description: The acidic water burns away your flesh - ItemTooltip: Sickness - 120 DPS + ItemTooltipPlayer: Sickness - 3 DPS + ItemTooltipEnemy: Sickness - 175 DPS } TrueVulnerabilityHex: { DisplayName: True Vulnerability Hex Description: The end has come - ItemTooltip: + ItemTooltipPlayer: + ''' + Heat - 25 DPS + Increases damage taken from all sources + ''' + ItemTooltipEnemy: ''' Heat - 1998 DPS Increases damage taken from all sources @@ -312,7 +356,7 @@ TrueVulnerabilityHex: { Vaporfied: { DisplayName: Vaporfied Description: Vape - ItemTooltip: + ItemTooltipEnemy: ''' Typeless - 15 DPS Slows enemies @@ -322,19 +366,26 @@ Vaporfied: { VermillionFlux: { DisplayName: Vermillion Flux Description: Sharp arcs of scarlet course through you - ItemTooltip: Electric - 50 DPS. Deals 4x damage against moving targets + ItemTooltipPlayer: Electric - 5 DPS. 5x damage to moving players + ItemTooltipEnemy: Electric - 37.5 DPS. 4x damage to moving targets } Voidfrost: { DisplayName: Voidfrost Description: The emptiness of space devours all warmth and life - ItemTooltip: Cold - 200 DPS + ItemTooltipPlayer: Cold - 20 DPS + ItemTooltipEnemy: Cold - 250 DPS } VulnerabilityHex: { DisplayName: Vulnerability Hex Description: Your mental fortitude is fading - ItemTooltip: + ItemTooltipPlayer: + ''' + Heat - 15 DPS + Reduces defense and damage reduction + ''' + ItemTooltipEnemy: ''' Heat - 1332 DPS Slows enemies @@ -713,7 +764,7 @@ AbsorberRegen: { You are blessed by the culmimation of nature's powers Life regen increased by {0} HP/s, damage increased by {1}%, damage reduction increased by {2}% ''' - ItemTooltip: Increases life regeneration, damage, and damage reduction + ItemTooltipPlayer: Increases life regeneration, damage, and damage reduction } AbyssalDivingSuitBuff: { @@ -738,6 +789,7 @@ AeolianEarthBuff: { You are strengthened by primordial powers Damage reduction increased by {0}%, damage increased by {1}%, and massively buffed mana regen ''' + ItemTooltipPlayer: Increases damage, damage reduction, and mana regeneration } Afflicted: { @@ -804,12 +856,13 @@ ChiRegenBuff: { CoralSymbiosis: { DisplayName: Coral Symbiosis Description: Coral Spout charges up faster and deals {0} extra damage + ItemTooltipPlayer: Increases Coral Spout's charge rate and damage } CosmicFreeze: { DisplayName: Cosmic Freeze Description: You feel as cold as the empty expanse of outer space - ItemTooltip: Increases regeneration, especially when standing still, and freezes nearby enemies + ItemTooltipPlayer: Increases regeneration, especially when standing still, and freezes nearby enemies } DivineBless: { @@ -820,6 +873,7 @@ DivineBless: { EmpyreanWrath: { DisplayName: Empyrean Wrath Description: Wrath of the cosmos + ItemTooltipPlayer: Increases damage and critical strike chance } Encased: { @@ -870,7 +924,7 @@ IceShieldBuff: { Mushy: { DisplayName: Mushy Description: Increased defense by {0} and life regen by {1} HP/s - ItemTooltip: Increases defense and life regeneration + ItemTooltipPlayer: Increases defense and life regeneration } PhantomicEmpowerment: { @@ -941,7 +995,7 @@ ReaverRage: { Rage of the earth Defense increased by {0} and damage increased by {1}% ''' - ItemTooltip: Increased defense and damage + ItemTooltipPlayer: Increased defense and damage } SandsWindBuff: { @@ -951,6 +1005,7 @@ SandsWindBuff: { You are strengthened by the powers of sand Defense increased by {0}, damage increased by {1}%, and greatly buffed mana regen ''' + ItemTooltipPlayer: Increases damage, defense, and mana regeneration } SilvaRevival: { @@ -986,14 +1041,14 @@ TarragonImmunity: { TarraLifeRegen: { DisplayName: Tarra Life Description: Rapid healing - ItemTooltip: "" + ItemTooltipPlayer: "" } // Stat debuffs AbsorberAffliction: { DisplayName: Absorber Affliction Description: Damn nature, you scary! - ItemTooltip: Sickness - 200 DPS + ItemTooltipEnemy: Sickness - 200 DPS } AndromedaCripple: { @@ -1004,13 +1059,25 @@ AndromedaCripple: { ArmorCrunch: { DisplayName: Armor Crunch Description: Your armor is shredded - ItemTooltip: Damage Reduction is 15% less effective + ItemTooltipPlayer: Reduces defense and damage reduction + ItemTooltipEnemy: Damage Reduction is 15% less effective +} + +Bane: { + DisplayName: Bane + Description: An ancient curse envelops you + ItemTooltipEnemy: + ''' + Typeless - 45 DPS + Does not scale with debuff multipliers + Scales based on your critical strike chance + ''' } Crumbling: { DisplayName: Crumbling Description: Your armor is damaged - ItemTooltip: Damage Reduction is 8% less effective + ItemTooltipEnemy: Damage Reduction is 8% less effective } Clamity: { @@ -1035,7 +1102,7 @@ Enraged: { Eutrophication: { DisplayName: Eutrophication Description: Excessive nutrients restrict your movement - ItemTooltip: Slows enemies + ItemTooltipEnemy: Slows enemies } ExoFreeze: { @@ -1056,19 +1123,13 @@ FrozenLungs: { GalvanicCorrosion: { DisplayName: Galvanic Corrosion Description: Your limbs have begun to corrode - ItemTooltip: Slows enemies + ItemTooltipEnemy: Slows enemies } GlacialState: { DisplayName: Glacial State Description: Cannot move - ItemTooltip: Freezes enemies -} - -HadopelagicPressure: { - DisplayName: Hadopelagic Pressure - Description: Rapidly sinking to a watery grave - ItemTooltip: Water - 200 DPS + ItemTooltipEnemy: Freezes enemies } IcarusFolly: { @@ -1083,7 +1144,12 @@ IcarusFolly: { Irradiated: { DisplayName: Irradiated Description: Your skin is burning off - ItemTooltip: + ItemTooltipPlayer: + ''' + Typeless - 2 DPS + Reduces defense and damage reduction + ''' + ItemTooltipEnemy: ''' Typeless - 10 DPS Increases damage taken from Sickness debuffs @@ -1093,12 +1159,13 @@ Irradiated: { MarkedforDeath: { DisplayName: Marked for Death Description: Damage reduction reduced - ItemTooltip: Damage reduction is 50% less effective + ItemTooltipEnemy: Damage reduction is 50% less effective } PearlAura: { DisplayName: Pearl Aura Description: Slowed down + ItemTooltipEnemy: Slows enemies } ProfanedWeakness: { @@ -1109,13 +1176,13 @@ ProfanedWeakness: { TemporalSadness: { DisplayName: Temporal Sadness Description: You are crying - ItemTooltip: Freezes enemies + ItemTooltipEnemy: Slows enemies } TimeDistortion: { DisplayName: Time Distortion Description: Time is slowed - ItemTooltip: Slows enemies + ItemTooltipEnemy: Slows enemies } Warped: { @@ -1131,7 +1198,8 @@ WeakPetrification: { WhisperingDeath: { DisplayName: Whispering Death Description: Death approaches; attack power and life regen reduced - ItemTooltip: Reduced contact damage + ItemTooltipPlayer: Negates life regen, reduces damage + ItemTooltipEnemy: Reduced contact damage } WitherDebuff: { @@ -1141,6 +1209,7 @@ WitherDebuff: { Withered... Defense decreased by {0} ''' + ItemTooltipPlayer: Decreases defense } // Summons @@ -1289,11 +1358,6 @@ DazzlingStabberBuff: { Description: En garde! } -DemonshadeSetDevilBuff: { - DisplayName: Red Devil - Description: The red devil will protect you -} - EnchantedKnifeStaffBuff: { DisplayName: Enchanted Knife Description: Junk knives not included @@ -1679,12 +1743,14 @@ PopoNoselessBuff: { Daybroken: { DisplayName: Daybroken - ItemTooltip: Heat - 100 DPS + ItemTooltipPlayer: Heat - 20 DPS + ItemTooltipEnemy: Heat - 100 DPS } Shadowflame: { DisplayName: Shadowflame - ItemTooltip: Heat - 30 DPS + ItemTooltipPlayer: Heat - 15 DPS + ItemTooltipEnemy: Heat - 30 DPS } ForbiddenStealthSummonTagBuff: { @@ -1701,3 +1767,19 @@ CnidarianSummonTagBuff: { DisplayName: Cnidarian Summon Tag Buff Description: you are not seeing this } + +SmashedEvil: { + DisplayName: Smashed Evil + Description: Increased damage, movement speed, and regeneration + ItemTooltipEnemy: + ''' + All types - 20 DPS + +5 damage taken + ''' + ItemTooltipPlayer: + ''' + Regen returns to full strength 200% faster + 10% increased damage + 20% increased movement speed + ''' +} diff --git a/Localization/en-US/Mods.CalamityMod.Condition.hjson b/Localization/en-US/Mods.CalamityMod.Condition.hjson index d99892c2dd..b757a152d4 100644 --- a/Localization/en-US/Mods.CalamityMod.Condition.hjson +++ b/Localization/en-US/Mods.CalamityMod.Condition.hjson @@ -52,6 +52,8 @@ Drops: { // Other conditions HasFlareGun: While holding a Flare Gun upgrade LacewingBestiary: When at least 40% of the Bestiary has been completed +CrescentMoons: During a crescent moon +GibbousMoons: During a gibbous moon HasRogueArmor: While wearing rogue armor HasWings: While wearing wings InAstral: In the Astral Infection diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson index 100e290574..367ad5e519 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson @@ -22,7 +22,7 @@ ExodusWings: { Tooltip: ''' {$CommonItemTooltip.FlightAndSlowfall} - Grants permanent Empyrean Wrath while wearing the Empyrean armor + Grants permanent [cbuffplr:CalamityMod/EmpyreanWrath] while wearing the Empyrean armor Pulsing with an alien heartbeat ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 131259954e..6aa3b7186e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2,10 +2,12 @@ Abaddon: { DisplayName: Abaddon Tooltip: ''' - {$CommonItemTooltip.PercentIncreasedCritChance} - Critical strikes explode, igniting nearby foes with [cbuff:CalamityMod/BrimstoneFlames] - Reduces damage taken from [cbuff:CalamityMod/BrimstoneFlames] by {1}% + Critical strikes curse enemies with [cbuff:CalamityMod/Bane] that scales off of your critical strike chance + When critically hit, enemies spread all debuffs they are afflicted with that are weaker than your [cbuff:CalamityMod/Bane] to nearby enemies + [DAMAGELINE] ''' + Equipped: Current [cbuff:CalamityMod/Bane] damage: {0} DPS + Unequipped: Equip this accessory to view your current [cbuff:CalamityMod/Bane] damage } AbyssalDivingGear: { @@ -28,8 +30,8 @@ AbyssalDivingSuit: { Grants the ability to swim, extends underwater breathing, emits light underwater, and improves mobility on ice 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 [cbuff:CalamityMod/CrushDepth]'s increased breath loss - Grants resistance to the increased breath loss caused by [cbuff:CalamityMod/HadopelagicPressure] + Grants immunity to the sulphurous waters and [cbuffplr:CalamityMod/CrushDepth]'s increased breath loss + Grants resistance to the increased breath loss caused by [cbuffplr:CalamityMod/HadopelagicPressure] ''' } @@ -65,9 +67,9 @@ AlchemicalDecanter: { DisplayName: Alchemical Decanter Tooltip: ''' - All attacks inflict the [cbuff:CalamityMod/Plague] and reduces damage taken from the [cbuff:CalamityMod/Plague] by {0}% + All attacks inflict the [cbuff:CalamityMod/Plague] and reduces damage taken from the [cbuffplr:CalamityMod/Plague] by {0}% Projectiles spawn plague seekers on enemy hits - Releases plague bees and douses you in [cbuff:Honey] when damaged + Releases plague bees and douses you in [cbuffplr:Honey] when damaged ''' } @@ -98,7 +100,7 @@ AmbrosialAmpoule: { ''' +{0} max life Grants +{1} to +{2} HP/s life regen based on missing health - Grants the [cbuff:Honey] buff + Grants the [cbuffplr:Honey] buff Current boost: +[REGEN] HP/s Fire and sickness debuff durations are halved You emit yellow light if visibility is enabled @@ -152,6 +154,19 @@ AngelTreads: { ''' } +Apollyon: { + DisplayName: Apollyon + Tooltip: + ''' + Critical strikes curse enemies with [cbuff:CalamityMod/Bane] that greatly scales off of your critical strike chance + When critically hit, enemies spread all debuffs they are afflicted with that are weaker than your [cbuff:CalamityMod/Bane] to nearby enemies + Critical strikes deal an additional 3% damage per debuff on the enemy + [DAMAGELINE] + ''' + Equipped: Current [cbuff:CalamityMod/Bane] damage: {0} DPS + Unequipped: Equip this accessory to view your current [cbuff:CalamityMod/Bane] damage +} + AquaticEmblem: { DisplayName: Aquatic Emblem Tooltip: @@ -220,8 +235,8 @@ AsgardianAegis: { Tooltip: ''' {$Common.KnockbackImmunity} - Allows the ability to dash, empowered by a cosmic inferno - This dash can ram through enemies without taking damage + Allows the ability to ram dash, empowered by a cosmic inferno + This dash can ram through enemies without taking damage, inflicting [cbuff:CalamityMod/GodSlayerInferno] ''' } @@ -258,7 +273,7 @@ Baroclaw: { Tooltip: ''' 10% increased damage and 5% increased damage reduction - Attackers take high damage and are inflicted with Armor Crunch and Crush Depth + Attackers take high damage and are inflicted with [cbuff:CalamityMod/ArmorCrunch] and [cbuff:CalamityMod/CrushDepth] ''' } @@ -351,7 +366,7 @@ BlunderBooster: { ''' 12% increased rogue damage and 15% increased rogue projectile velocity Stealth generates 10% faster - Summons a red lightning aura around the player that electrifies nearby enemies + Summons a red lightning aura around the player that electrifies nearby enemies with [cbuff:CalamityMod/VermillionFlux] The aura has reduced opacity if visibility is disabled Press [KEY] to consume 25% of your maximum stealth to perform a swift upwards diagonal dash This dash leaves a trail of red lightning bolts @@ -364,9 +379,9 @@ Calamity: { Tooltip: ''' Lights your cursor ablaze with the Witch's flames, engulfing it in a blazing aura - Enemies touching the blaze take immense damage and are inflicted with Vulnerability Hex + Enemies touching the blaze take immense damage and are inflicted with [cbuff:CalamityMod/VulnerabilityHex] Focusing an enemy for 2.5 seconds curses them, ascending Vulnerability Hex to its True form - Foes afflicted with True Vulnerability Hex take 1.15x damage from all sources + Foes afflicted with [cbuff:CalamityMod/TrueVulnerabilityHex] take 1.15x damage from all sources This effect is increased to 2.5x for the blazing cursor itself Equip in a vanity slot to change the cursor without dealing damage These changes work in conjunction with the Rainbow Cursor @@ -425,7 +440,7 @@ CorrosiveSpine: { ''' 5% increased movement speed 25% increased Sickness and Water debuff damage - All attacks irradiate enemies and reduces the severity of the sulphuric waters + All attacks inflict [cbuff:CalamityMod/Irradiated] and reduces the severity of the sulphuric waters You burst into radioactive clouds when struck ''' } @@ -444,7 +459,7 @@ CrawCarapace: { Tooltip: ''' 7% increased damage - Attackers take damage and are inflicted with Crumbling + Attackers take damage and are inflicted with [cbuff:CalamityMod/Crumbling] ''' } @@ -544,7 +559,7 @@ DeificAmulet: { DisplayName: Deific Amulet Tooltip: ''' - Releases a burst of homing star-bees[TOGGLE] and drenches you in [cbuff:Honey] after taking damage + Releases a burst of homing star-bees[TOGGLE] and drenches you in [cbuffplr:Honey] after taking damage Increases the length of invincibility, with it increasing even more when at low health [c/aaaaaa:Shift- this item in your inventory to toggle] [i:PanicNecklace] [c/aaaaaa:Panic Necklace's effect] ''' @@ -556,7 +571,7 @@ DepthCharm: { Tooltip: ''' Reduces the damage caused by drowning in the abyss - Removes the increased breath loss of Crush Depth + Removes the increased breath loss of [cbuffplr:CalamityMod/CrushDepth] ''' } @@ -569,9 +584,9 @@ DiamondOfTheDeep: { Dash to disperse the spirits and have them attack enemies When dispersed [c/CB7AD7:below 50% life], the spirits support you instead The spirits appear in order and have different effects based on color: - [c/3CB371: Explodes on impact and inflicts Crush Depth] / [c/CB7AD7:Heals for 8 HP] - [c/FF4500: Pierces enemies and inflicts Hellfire] / [c/CB7AD7:Increases defense by 10 temporarily] - [c/1E90FF: Hits multiple times and inflicts Hadopelagic Pressure] / [c/CB7AD7:Heals 5% of max HP] + [c/3CB371: Explodes on impact and inflicts] [cbuff:CalamityMod/CrushDepth] / [c/CB7AD7:Heals for 8 HP] + [c/FF4500: Pierces enemies and inflicts] [cbuff:OnFire3] / [c/CB7AD7:Increases defense by 10 temporarily] + [c/1E90FF: Hits multiple times and inflicts] [cbuff:CalamityMod/HadopelagicPressure] / [c/CB7AD7:Heals 5% of max HP] Spirits are transparent and silent when visibility is toggled off ''' } @@ -615,7 +630,7 @@ DragonScales: { Rogue projectiles spawn slow fireballs as they travel Stealth strikes create infernados where they hit +10% max run speed and acceleration - Grants immunity to Dragonfire + Grants immunity to [cbuffplr:CalamityMod/Dragonfire] 'Only a living dragon holds true treasure' ''' } @@ -626,7 +641,7 @@ DynamoStemCells: { ''' 10% increased ranged damage and movement speed Ranged weapons fire a powerful mini swarmer every 3 seconds - Reduces damage taken from Dragonfire + Reduces damage taken from [cbuffplr:CalamityMod/Dragonfire] ''' } @@ -651,7 +666,7 @@ EldritchSoulArtifact: { Tooltip: ''' Boosts melee speed by 10%, ranged velocity by 25%, rogue stealth regen by 15%, max minions by 1 and reduces mana cost by 25% - Grants immunity to Whispering Death + Grants immunity to [cbuffplr:CalamityMod/WhisperingDeath] Knowledge ''' } @@ -669,7 +684,7 @@ ElementalGauntlet: { DisplayName: Elemental Gauntlet Tooltip: ''' - Melee attacks and projectiles inflict Elemental Mix + Melee attacks and projectiles inflict [cbuff:CalamityMod/ElementalMix] 15% increased melee damage and melee speed 5% increased melee critical strike chance 20% increased true melee damage and increased melee knockback @@ -689,7 +704,7 @@ ElysianAegis: { ''' {$Common.KnockbackImmunity} Allows the ability to dash, empowered by holy fire - This dash can ram through enemies without taking damage + This dash can ram through enemies without taking damage, inflicting [cbuff:CalamityMod/HolyFlames] 'Blessed by the Profaned Flame' ''' } @@ -789,7 +804,7 @@ FrostFlare: { DisplayName: Frost Flare Tooltip: ''' - All attacks and projectiles inflict Frostbite + All attacks and projectiles inflict [cbuff:Frostburn2] Grants immunity to Frostburn, Chilled and Frozen Being above 50% life grants 10% increased damage Being below 50% life grants 15 defense and 15% increased max movement speed and acceleration @@ -811,8 +826,8 @@ FungalSymbiote: { Tooltip: ''' You grow mushrooms on the grass beneath you - Consuming mushrooms provides the Mushy buff, granting 5 defense and +1 HP/s life regen - 10% increased damage while you have the Mushy buff + Consuming mushrooms provides [cbuffplr:CalamityMod/Mushy], granting 5 defense and +1 HP/s life regen + 10% increased damage while you have [cbuffplr:CalamityMod/Mushy] ''' } @@ -821,7 +836,7 @@ GiantPearl: { Tooltip: ''' You have a light aura around you - Enemies within the aura are slowed down + Enemies within the aura are afflicted with [cbuff:CalamityMod/PearlAura] and slowed down Enemies that remain within the aura are bombarded by homing prism shards {$Common.AbyssGlow} ''' @@ -925,7 +940,7 @@ HideofAstrumDeus: { True melee strikes drops astral stars from the sky Releases an explosion and temporarily increases true melee damage by 30% when damaged Boost duration scales with the amount of damage you took, up to 10 seconds - Nullifies the Astral Infection debuff + Nullifies the [cbuffplr:CalamityMod/AstralInfectionDebuff] ''' } @@ -934,7 +949,7 @@ HoneyDew: { Tooltip: ''' +10 max life - Grants the Honey buff + Grants the [cbuffplr:Honey] buff Sickness debuff durations are halved ''' } @@ -952,7 +967,7 @@ IlmerisSpark: { DisplayName: Ilmeris' Spark Tooltip: ''' - Attacks inflict Static Discharge while underwater + Attacks inflict [cbuff:CalamityMod/StaticDischarge] while underwater Taking damage causes the enemy to be shocked Shocked enemies constantly release sparks ''' @@ -966,7 +981,7 @@ InfectedJewel: { Grants 12 defense and +2 HP/s life regen while afflicted with any debuff Granted defense fades away quickly when not afflicted with any debuffs Each debuff beyond the first grants 4 additional defense - Nullifies the Astral Infection debuff + Nullifies the [cbuffplr:CalamityMod/AstralInfectionDebuff] 'A beautiful gemstone tarnished by spaceborne rot' ''' } @@ -1024,7 +1039,7 @@ JellyChargedBattery: { Tooltip: ''' Increases your max number of minions by 1, and summon damage by 7% - Minion attacks create orbs of static discharge + Minion attacks create orbs of [cbuff:CalamityMod/StaticDischarge] ''' } @@ -1047,7 +1062,7 @@ LeviathanAmbergris: { Tooltip: ''' 120% increased initial dash velocity, 33% faster dash cooldown, and greatly increased dash deceleration - Your dashes are empowered by water, knocking back and damaging nearby enemies with viscous currents + Your dashes are empowered by water, knocking back and damaging enemies with vicious currents that inflict [cbuff:CalamityMod/RiptideDebuff] Visual effects are reduced if visibility is disabled ''' } @@ -1066,7 +1081,7 @@ LivingDew: { Tooltip: ''' +25 max life - Grants the Honey buff + Grants the [cbuffplr:Honey] buff Fire and sickness debuff durations are halved ''' } @@ -1163,8 +1178,8 @@ NuclearFuelRod: { Tooltip: ''' Increases your max number of minions by 1 - Minions release an irradiated aura on enemy hits - Grants immunity to Irradiated + Minions release an [cbuff:CalamityMod/Irradiated] aura on enemy hits + Grants immunity to [cbuffplr:CalamityMod/Irradiated] ''' } @@ -1173,7 +1188,7 @@ Nucleogenesis: { Tooltip: ''' Increases your max number of minions by 4 - Grants immunity to Shadowflame and Irradiated + Grants immunity to [cbuffplr:CalamityMod/Shadowflame] and [cbuffplr:CalamityMod/Irradiated] 15% increased summon damage, and increased minion knockback Minions inflict a variety of debuffs Minions spawn damaging sparks on enemy hits @@ -1243,7 +1258,7 @@ OrnateShield: { Tooltip: ''' Allows the ability to dash - This dash can ram through enemies without taking damage + This dash can ram through enemies without taking damage, inflicting [cbuff:Frostburn2] ''' } @@ -1338,7 +1353,7 @@ ProfanedSoulCrystal: { ''' Provides passive buffs depending on the time of day Greatly boosts the power of the Guardian's relics - Grants additional effects if you have {0} minion slots + Grants additional effects if you have {0} unused minion slots Summons your own personal Guardians to fight alongside you All non-summon attacks are transformed, and are empowered if no minions are active [c/ffa680:Melee] [c/ffd2bf:attacks become a barrage of spears] @@ -1416,7 +1431,7 @@ RampartofDeities: { Tooltip: ''' {$Common.KnockbackImmunity} - Releases a blast of homing star-bees[TOGGLE] and drenches you in [cbuff:Honey] after taking damage + Releases a blast of homing star-bees[TOGGLE] and drenches you in [cbuffplr:Honey] after taking damage Increases the length of invincibility, with it increasing even more when at low health or taking high damage attacks Reduces damage taken by 25% when below 50% life Absorbs 25% of damage done to players on your team when you are above 25% life @@ -1477,7 +1492,7 @@ RottenBrain: { RottenDogtooth: { DisplayName: Rotten Dogtooth - Tooltip: Stealth strikes inflict Crumbling for 2.5 seconds and deal 8% more damage + Tooltip: Stealth strikes inflict [cbuff:CalamityMod/Crumbling] and deal 8% more damage } RoverDrive: { @@ -1632,9 +1647,9 @@ SlagsplitterPauldron: { DisplayName: Slagsplitter Pauldron Tooltip: ''' - Your dashes become empowered by flame, erupting on contact with enemies + Your dashes become empowered by [cbuff:OnFire3], erupting on contact with enemies Grants immunity to knockback and 10% damage reduction while dashing - Enemies hit by your dashes have their armor crushed + Enemies hit by your dashes are afflicted with [cbuff:CalamityMod/ArmorCrunch] Visual effects are reduced if visibility is disabled ''' } @@ -1672,7 +1687,7 @@ StarbusterCore: { Tooltip: ''' Increases your max number of minions by 1 - Summons release an astral explosion on enemy hits + Summons release an [cbuff:CalamityMod/AstralInfectionDebuff] explosion on enemy hits ''' } @@ -1682,7 +1697,7 @@ StarTaintedGenerator: { ''' Increases your max number of minions by 2, and summon damage by 7% Minion attacks spawn astral explosions and inflict several debuffs - Grants immunity to Irradiated + Grants immunity to [cbuffplr:CalamityMod/Irradiated] Does not stack with downgrades ''' } @@ -1702,7 +1717,7 @@ StatisCurse: { ''' Increases your max number of minions by 3, and summon damage by 12% Increased minion knockback - Minion attacks inflict Shadowflame, and grants immunity to Shadowflame + Minion attacks inflict [cbuff:CalamityMod/Shadowflame], and grants immunity to [cbuffplr:CalamityMod/Shadowflame] Does not stack with downgrades ''' } @@ -1833,9 +1848,10 @@ TeslasAmulet: { DisplayName: Tesla's Amulet Tooltip: ''' - Generates an electrifying field that slows enemies + Generates an electrifying field around you + The field inflicts [cbuff:CalamityMod/StaticDischarge] and [cbuff:CalamityMod/GalvanicCorrosion] The field has reduced opacity if visibility is disabled - Reduces the duration of the Static Discharge debuff + Reduces the duration of [cbuffplr:CalamityMod/StaticDischarge] ''' } @@ -1845,7 +1861,7 @@ TheAbsorber: { ''' {$Common.KnockbackImmunity} {0}% increased movement and jump speed - Attackers take immense damage and are afflicted with a crippling sickness debuff + Attackers take immense damage and are afflicted with [cbuff:CalamityMod/AbsorberAffliction] Using a healing potion will spawn a green aura that lasts for {1} seconds Walking into the aura removes all debuffs once and grants {2} HP/s regen, {3}% damage, and {4}% damage reduction {5}% of the damage from enemy attacks is converted into healing @@ -1856,7 +1872,7 @@ TheAmalgam: { DisplayName: The Amalgam Tooltip: ''' - All attacks inflict a variety of debuffs, 200% increased elemental debuff damage + All attacks inflict a variety of debuffs, 300% increased elemental debuff damage Most buffs last twice as long, and persist after dying Taking damage confuses nearby enemies and spawns a dank creeper The dank creeper flies above you, exploding into several shaderain clouds @@ -1923,7 +1939,7 @@ TheFirstShadowflame: { Tooltip: ''' Increases your max number of minions by 1 - Minion attacks inflict Shadowflame, and grants immunity to Shadowflame + Minion attacks inflict [cbuff:CalamityMod/Shadowflame], and grants immunity to [cbuffplr:CalamityMod/Shadowflame] ''' } @@ -1977,7 +1993,7 @@ ToxicHeart: { DisplayName: Toxic Heart Tooltip: ''' - Your heart beats with the plague, pulsing outside of your body + Your heart beats with the [cbuff:CalamityMod/Plague], pulsing outside of your body Pulse frequency scale with regen, and pulses that kill enemies pulse again to heal you 50% increased Sickness debuff damage Effects are transparent and silent if visibility is disabled @@ -1999,7 +2015,7 @@ UnholyTonic: { Tooltip: ''' Increases damage reduction by 4% and defense by 6 while in the corruption - Grants immunity to Brain Rot + Grants immunity to [cbuffplr:CalamityMod/BrainRot] ''' } @@ -2018,7 +2034,7 @@ VampiricTalisman: { ''' Rogue critical strikes steal enemy life Stealth strikes grant 15% critical strike chance and increased lifesteal to non-stealth strikes for 10 seconds - Stealth strikes inflict Heavy Bleeding and Armor Crunch, and deal 8% more damage + Stealth strikes inflict [cbuff:CalamityMod/HeavyBleeding] and [cbuff:CalamityMod/ArmorCrunch], and deal 8% more damage 'Possessing the talisman makes you yearn for blood' ''' YearningForBlood: THIS ENDLESS HUNGER WON'T END @@ -2040,7 +2056,7 @@ ViciousTonic: { Tooltip: ''' Increases damage reduction by 4% and defense by 6 while in the crimson - Grants immunity to Burning Blood + Grants immunity to [cbuffplr:CalamityMod/BurningBlood] ''' } @@ -2058,22 +2074,12 @@ VoidofCalamity: { ''' } -VoidofExtinction: { - DisplayName: Void of Extinction - Tooltip: - ''' - {$CommonItemTooltip.PercentIncreasedCritChance} - Critical strikes explode, igniting nearby foes with [cbuff:CalamityMod/BrimstoneFlames] - Reduces damage taken from [cbuff:CalamityMod/BrimstoneFlames] by {1}% - ''' -} - VoltaicJelly: { DisplayName: Voltaic Jelly Tooltip: ''' Increases your max number of minions by 1 - Minion attacks inflict Static Discharge + Minion attacks inflict [cbuff:CalamityMod/StaticDischarge] ''' } @@ -2083,7 +2089,7 @@ WarbanneroftheRighteous: { ''' Multiplies all damage based on how close you are to enemies Maximum damage boost is 15%, minimum damage boost is -15% - Emit a blazing aura that burns and repels nearby enemies + Emit a blazing aura that burns and repels nearby enemies with [cbuff:CalamityMod/HolyFlames] Enemies take increasing damage the closer they are to you and the longer they are near you Effects are transparent and silent if visibility is disabled ''' @@ -2120,9 +2126,9 @@ YharimsGift: { Tooltip: ''' {$Common.KnockbackImmunity} - Flaming meteors rain down after getting hit - Volatile dragon dust trails behind you - Increases damage and movement speed by 15% + Increases damage by 10% and movement speed by 20% + All attacks inflict [cbuff:CalamityMod/AuricRebuke] + Flaming meteors rain down while invincible [c/FCA92B:'The power to kill a god pulses from within this artifact'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson index 3ba3ea1a9b..8046622dfb 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson @@ -38,7 +38,7 @@ BloodRune: { BubonicRound: { DisplayName: Bubonic Round - Tooltip: Spreads the plague on hit and ignores 10% of enemy defense + Tooltip: Spreads the [cbuff:CalamityMod/Plague] on hit and ignores 10% of enemy defense } CinderArrow: { @@ -96,7 +96,7 @@ HolyFireBullet: { DisplayName: Holy Fire Bullet Tooltip: ''' - Profaned bullets that deal 1.15x damage and explode on impact + Profaned bullets that deal 1.15x damage and explode on impact, inflicting [cbuff:CalamityMod/HolyFlames] The explosion is larger and the bullet deals increased damage if impact occurs immediately after firing The extra damage bonus caps at 1.15x ''' @@ -165,7 +165,7 @@ VanquisherArrow: { DisplayName: Vanquisher Arrow Tooltip: ''' - Pierces through tiles and homes in on enemies + Pierces through tiles and homes in on enemies, inflicting [cbuff:CalamityMod/GodSlayerInferno] Tears a rift in space on enemy hits ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index 35c60fa863..53dfc279cd 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -45,7 +45,7 @@ BrimflameCowl: { ''' {$CommonItemTooltip.IncreasesMaxManaBy} and {$CommonItemTooltip.PercentReducedManaCost@1} {$CommonItemTooltip.PercentIncreasedMagicDamageCritChance@2} - Immunity to [cbuff:OnFire], [cbuff:CalamityMod/BrimstoneFlames] and [cbuff:Frostburn] + Immunity to [cbuffplr:OnFire], [cbuffplr:CalamityMod/BrimstoneFlames] and [cbuffplr:Frostburn] ''' SetBonus: ''' @@ -197,7 +197,7 @@ HydrothermicArmor: { Tooltip: ''' {$CommonItemTooltip.PercentIncreasedDamage} - Grants immunity to lava and [cbuff:OnFire] + Grants immunity to lava and [cbuffplr:OnFire] ''' CommonSetBonus: ''' @@ -346,7 +346,7 @@ MolluskShellmet: { SetBonus: ''' {0}% increased damage reduction - Two shellfishes aid you in combat + Two shellfishes aid you in combat, inflicting [cbuff:CalamityMod/ShellfishClaps] ''' } @@ -365,7 +365,7 @@ PlaguebringerCarapace: { ''' {$CommonItemTooltip.IncreasesMaxMinionsBy} {$CommonItemTooltip.PercentIncreasedSummonDamage@1} - Grants immunity to [cbuff:CalamityMod/Plague] + Grants immunity to [cbuffplr:CalamityMod/Plague] ''' } @@ -425,7 +425,7 @@ PlagueReaperVest: { Tooltip: ''' {$CommonItemTooltip.PercentIncreasedRangedDamage} - Grants immunity to the Plague + Grants immunity to [cbuffplr:CalamityMod/Plague] ''' } @@ -472,7 +472,7 @@ ReaverHeadTank: { {$Common.AggroBoost} Reduces the life regen lost from damage over time debuffs by {0}% {1}% decreased movement speed and flight time - Grants [cbuff:CalamityMod/ReaverRage] for {2} {^2:second;seconds} after taking damage + Grants [cbuffplr:CalamityMod/ReaverRage] for {2} {^2:second;seconds} after taking damage ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 10cdedab20..af6b6d7cde 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -307,7 +307,6 @@ DemonshadeHelm: { {$CommonItemTooltip.IncreasesMaxMinionsBy} {$CommonItemTooltip.PercentIncreasedSummonDamage@1} Shadowbeams and demon scythes will fire down when you are hit - A friendly red devil follows you around {2} to enrage nearby enemies with a dark magic spell for {3} seconds This makes them take {4}x total damage, but they will deal {5}x damage to you ''' @@ -338,7 +337,7 @@ EmpyreanMask: { ''' {$Common.RogueStealth} Rogue projectiles have special effects on enemy hits - Imbued with cosmic wrath when you are damaged + Imbued with [cbuffplr:CalamityMod/EmpyreanWrath] when you are damaged or while below {1}% life ''' } @@ -500,7 +499,7 @@ OmegaBlueChestplate: { ''' {$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1} {$CommonItemTooltip.PercentChanceToSaveAmmo@2} - Your attacks inflict Hadopelagic Pressure + Your attacks inflict [cbuff:CalamityMod/HadopelagicPressure] No positive life regen ''' } @@ -669,7 +668,7 @@ TarragonHeadMelee: { ''' SetBonusEffect: ''' - Taking damage gives [cbuff:CalamityMod/TarraLifeRegen], which grants +{0} HP/s life regen + Taking damage gives [cbuffplr:CalamityMod/TarraLifeRegen], which grants +{0} HP/s life regen {1} to cloak yourself in life energy that heavily reduces enemy contact damage for {2} seconds This has a {3} second cooldown {$TarragonBreastplate.CommonSetBonus} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson index 040f049fb8..a3bcceedcc 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson @@ -91,7 +91,7 @@ DesertProwlerPants: { Tooltip: ''' {$Common.RogueCrit} - Grants immunity to {$BuffName.WindPushed} + Grants immunity to [cbuffplr:WindPushed] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index baf14ea785..7df1c209f9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -46,8 +46,8 @@ UrsaSergeant: { DisplayName: Ursa Sergeant Tooltip: ''' - Attacks maul enemies with astral claw swipes - Taking damage reduces the cooldown, but inflicts you with {$Buffs.AstralInfectionDebuff.DisplayName} + Attacks maul enemies with astral claw swipes that inflict [cbuff:CalamityMod/AstralInfectionDebuff] + Taking damage reduces the cooldown, but inflicts you with [cbuffplr:CalamityMod/AstralInfectionDebuff] Enemy kills also reduce the cooldown Swipes will be translucent and silent if visibility is disabled ''' @@ -336,7 +336,7 @@ NavyFishingRod: { DisplayName: Navy Fishing Rod Tooltip: ''' - Fires bobbers that inflict Static Discharge on nearby enemies + Fires bobbers that inflict [cbuff:CalamityMod/StaticDischarge] on nearby enemies 'The sea is a city. Just below are highways, boulevards, streets, and roundabouts bustling with submarine traffic.' ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson b/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson index d8d310e8b3..50f567d1bb 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson @@ -54,7 +54,6 @@ CosmicPlushie: { Tooltip: ''' Summons the devourer of the cosmos...? - Suppresses friendly red devils 'Sharp objects possibly included' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index ee8d2c7dd1..2081186560 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -22,7 +22,7 @@ AethersWhisper: { DisplayName: Aether's Whisper Tooltip: ''' - Inflicts long-lasting shadowflame and splits on tile hits + Inflicts long-lasting [cbuff:CalamityMod/Shadowflame] and splits on tile hits Projectiles gain damage as they travel ''' } @@ -161,21 +161,21 @@ BlackAnurian: { BloodBath: { DisplayName: Blood Bath - Tooltip: Drenches your foes in blood + Tooltip: Drenches your foes in blood that inflicts [cbuff:CalamityMod/BurningBlood] } BrimroseStaff: { DisplayName: Brimrose Staff - Tooltip: Fires a spread of brimstone beams + Tooltip: Fires a spread of splitting beams of [cbuff:CalamityMod/BrimstoneFlames] } BurningSea: { DisplayName: Burning Sea Tooltip: ''' - Conjures a massive brimstone fireball that hovers near you and incinerates foes + Conjures a massive fireball that hovers near you and incinerates foes with [cbuff:CalamityMod/BrimstoneFlames] Holding the fireball for too long causes it to burn out - This burns you with Brimstone Flames and gives a long delay before another can be cast + This burns you with [cbuffplr:CalamityMod/BrimstoneFlames] and gives a long delay before another can be cast ''' } @@ -204,7 +204,7 @@ CoralSpout: { Keep the attack button held down to narrow the spread Fully charging the attack releases a single, bigger chunk of coral that sticks to enemies Grabbing the chunk of coral after it falls from the enemy replenishes 150 mana - The mana-charged coral also provides a buff that increases the coral's damage and the convergence speed + The mana-charged coral also provides the [cbuffplr:CalamityMod/CoralSymbiosis] buff [c/5C95A1:'Knowledge is important, and the Old Sea Kingdom's many scribes knew it had to be preserved at any cost.] [c/5C95A1:Their libraries were much larger than most, because of the water-proof stone tablets occupying them.'] ''' @@ -238,8 +238,8 @@ DeathValleyDuster: { Tooltip: ''' Casts an enchanted blast of sand that passes through enemies and tiles - Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the Sand's Wind Buff - The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0}, damage by {1}%, and greatly buffs mana regen + Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the [cbuffplr:CalamityMod/SandsWindBuff] buff + [cbuffplr:CalamityMod/SandsWindBuff] increases your defense by {0}, damage by {1}%, and greatly buffs mana regen ''' } @@ -298,7 +298,7 @@ EventHorizon: { EvergladeSpray: { DisplayName: Everglade Spray - Tooltip: Fires a stream of burning green ichor + Tooltip: Fires a stream of [cbuff:CursedInferno] and [cbuff:Ichor] } FaceMelter: { @@ -511,7 +511,7 @@ MadAlchemistsCocktailGlove: { Tooltip: ''' Fires a variety of high-velocity flasks - Press to throw a prismatic flask that inflicts Elemental Mix + Press to throw a prismatic flask that inflicts [cbuff:CalamityMod/ElementalMix] Red flasks explode violently Blue flasks contain poison gas Green flasks summon lunar flares @@ -592,7 +592,11 @@ Omicron: { ParasiticSceptor: { DisplayName: Parasitic Scepter - Tooltip: Fires a spread of radioactive water leeches that latch onto enemies, increasing damage over time per leech + Tooltip: + ''' + Fires a spread of radioactive water leeches that latch onto enemies + Deals stacking [cbuff:CalamityMod/Irradiated] damage over time per leech + ''' } PhantasmalFury: { @@ -604,7 +608,7 @@ PhoenixFlameBarrage: { DisplayName: Phoenix Flame Barrage Tooltip: ''' - Casts a barrage of fire from the sky + Casts a barrage of [cbuff:CalamityMod/Dragonfire] from the sky 'Baptism by draconic fire' ''' } @@ -616,7 +620,7 @@ Photosynthesis: { PlagueStaff: { DisplayName: Plague Staff - Tooltip: Fires a tight spread of 4 plague fangs + Tooltip: Fires a tight spread of 4 plague fangs that inflict [cbuff:CalamityMod/Plague] } PlasmaRifle: { @@ -634,7 +638,7 @@ PlasmaRod: { ''' Casts a low-damage plasma bolt Shooting a tile will cause several bolts with increased damage to fire - Shooting an enemy will inflict shadowflame + Shooting an enemy will inflict [cbuff:CalamityMod/Shadowflame] ''' } @@ -648,8 +652,8 @@ PrimordialAncient: { Tooltip: ''' Casts five primordial sand blasts that converge at your cursor after a moment and create a giant explosion - Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the {$Buffs.AeolianEarthBuff.DisplayName} buff - The {$Buffs.AeolianEarthBuff.DisplayName} buff increases your damage reduction by {0}%, damage by {1}%, and massively buffs mana regen + Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the [cbuffplr:CalamityMod/AeolianEarthBuff] buff + [cbuffplr:CalamityMod/AeolianEarthBuff] increases your damage reduction by {0}%, damage by {1}%, and massively buffs mana regen ''' } @@ -657,9 +661,9 @@ PrimordialEarth: { DisplayName: Primordial Earth Tooltip: ''' - Casts two enchanted blasts of sand that coverge with each other and explode - Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the {$Buffs.SandsWindBuff.DisplayName} buff - The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0}, damage by {1}%, and greatly buffs mana regen + Casts two enchanted blasts of sand that converge with each other and explode + Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the [cbuffplr:CalamityMod/SandsWindBuff] buff + [cbuffplr:CalamityMod/SandsWindBuff] increases your defense by {0}, damage by {1}%, and greatly buffs mana regen ''' } @@ -709,7 +713,7 @@ RelicofRuin: { RougeSlash: { DisplayName: Rouge Slash - Tooltip: Fires a wave of 3 rouge air slashes + Tooltip: Fires a wave of 3 rouge air slashes that inflict [cbuff:CalamityMod/VermillionFlux] } SandstreamScepter: { @@ -727,7 +731,7 @@ SanguineFlare: { ''' Charges up a sanguine flare that gains power over time When striking an enemy, this flare causes a bloodsplosion and splits into blood orbs - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] ''' } @@ -781,6 +785,7 @@ SHPC: { {0} Press to use the machine as a vacuum, pulling in lingering souls Once released, a torrent of soul lasers is discharged scaling with the number of souls pulled in + Shift- this item in your inventory to eject the currently loaded Soul ''' // These are the soul effect descriptions, the number is the item ID of the soul NoSoul: "[c/808080:There is currently no soul type injected into the weapon]" @@ -821,7 +826,11 @@ SnowstormStaff: { SoulPiercer: { DisplayName: Soul Piercer - Tooltip: Casts a powerful ray that summons extra rays on its first hit + Tooltip: + ''' + Casts a powerful ray that summons extra rays on its first hit + Inflicts [cbuff:CalamityMod/GodSlayerInferno] + ''' } StaffofBlushie: { @@ -831,7 +840,7 @@ StaffofBlushie: { StarShower: { DisplayName: Star Shower - Tooltip: Casts a spread of astral stars from the sky that converge at the cursor + Tooltip: Casts a spread of astral stars from the sky that converge at the cursor and inflict [cbuff:CalamityMod/AstralInfectionDebuff] } SubsumingVortex: { @@ -843,6 +852,7 @@ SubsumingVortex: { When enemies are near the vortex, it sends multiple fast-moving smaller vortices towards them Releasing fires the vortex towards the mouse if enough time has passed Damage scales based on how long the vortex was held out + Inflicts [cbuff:CalamityMod/MiracleBlight] ''' } @@ -859,7 +869,7 @@ TacticiansTrumpCard: { DisplayName: Tactician's Trump Card Tooltip: ''' - Fires a sword beam that electrifies enemies on hit + Fires a sword beam that inflicts [cbuff:Electrified] on hit 'Faint memories of a Princess from the future cross your mind...' ''' } @@ -961,8 +971,8 @@ UnstableCastersGauntlet: { ''' [c/DBD7CA:Ordo] sigils always land critical strikes [c/ABB6D4:Perdito] sigils ignore 25 points of enemy defense - [c/E89B8E:Ignis] sigils inflict Daybroken - [c/8ECBE8:Aqua] sigils inflict Crush Depth + [c/E89B8E:Ignis] sigils inflict [cbuff:CalamityMod/Daybroken] + [c/8ECBE8:Aqua] sigils inflict [cbuff:CalamityMod/CrushDepth] [c/E1E88E:Aer] sigils boast substantial knockback [c/ACCF9F:Terra] sigils split into sharp rocks ''' @@ -1007,7 +1017,7 @@ Viscera: { ''' Fires a rapid barrage of piercing blood beams The first enemy struck by each beam will burst into blood orbs - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] Each successive beam in the barrage deals more damage The last beam of the barrage instead explodes upon hitting an enemy ''' @@ -1017,8 +1027,8 @@ VitriolicViper: { DisplayName: Vitriolic Viper Tooltip: ''' - Charges up and fires a slithering beam of radiation - If fully charged, instead fires a huge spread of short range fangs which quickly vanish + Charges up and fires a slithering [cbuff:CalamityMod/Irradiated] beam + If fully charged, instead fires a huge spread of short range fangs which inflict [cbuff:CalamityMod/SulphuricPoisoning] ''' } @@ -1027,8 +1037,8 @@ VividClarity: { Tooltip: ''' Fires five randomized rays of exo-energy towards the cursor - On enemy and tile hits, beams either explode into a big flash, - summon an additonal laser from the sky, or split into energy orbs + Enemy and tile hits either cause a big flash explosion, an additional laser from the sky, or split into energy orbs + Inflicts [cbuff:CalamityMod/MiracleBlight] 'Its majesty inspires a stroke of unparalleled genius' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index ee39a9879c..c5383d7d53 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -166,7 +166,7 @@ BansheeHook: { Basher: { DisplayName: Basher - Tooltip: Swings a rotten club that irradiates enemies on hit while knocking you back in the process + Tooltip: Swings a rotten club that inflicts [cbuff:CalamityMod/Irradiated] while knocking you back in the process } BladecrestOathsword: { @@ -191,7 +191,11 @@ BlightedCleaver: { Bonebreaker: { DisplayName: Bonebreaker - Tooltip: Fires javelins that stick to enemies before bursting into shrapnel + Tooltip: + ''' + Fires javelins that stick to enemies before bursting into shrapnel + Javelins cause [cbuff:CalamityMod/HeavyBleeding], [cbuff:Venom], and [cbuff:CalamityMod/ArmorCrunch] + ''' } BotanicPiercer: { @@ -266,7 +270,7 @@ Carnage: { CelestialClaymore: { DisplayName: Celestial Claymore - Tooltip: Spawns cosmic energy stars near the cursor that inflict several debuffs + Tooltip: Spawns cosmic energy stars near the cursor that inflict [cbuff:Frostburn2], [cbuff:OnFire3], or [cbuff:Ichor] } ClamCrusher: { @@ -287,8 +291,8 @@ CosmicDischarge: { DisplayName: Cosmic Discharge Tooltip: ''' - Striking an enemy with the whip causes glacial explosions and grants the player the cosmic freeze buff - This buff gives the player +2 HP/s life regen while standing still and freezes enemies near the player + Striking an enemy with the whip causes glacial explosions and grants the player the [cbuffplr:CalamityMod/CosmicFreeze] buff + [cbuffplr:CalamityMod/CosmicFreeze] gives the player +2 HP/s life regen while standing still and freezes enemies near the player ''' } @@ -400,7 +404,7 @@ DragonRage: { DisplayName: Dragon Rage Tooltip: ''' - Twirls a baton that causes explosions on enemy hits + Twirls a baton that causes explosions of [cbuff:CalamityMod/Dragonfire] on enemy hits Every ten hits will summon a ring of fireballs ''' } @@ -416,7 +420,7 @@ Earth: { ''' A beautiful prismatic blade with unrivaled close combat proficiency Heals you greatly on hit - Every other swing will summon three Gaia meteors to fall upon nearby enemies + Every other swing will summon three Gaia meteors to annihilate nearby enemies with [cbuff:CalamityMod/MiracleBlight] 'All Its spawn shall know the beauty and wrath of their creator' ''' } @@ -426,7 +430,7 @@ EarthenPike: { Tooltip: ''' Sprays fossil shards on swing - Crushes enemy defenses + Inflicts [cbuff:CalamityMod/ArmorCrunch] ''' } @@ -454,12 +458,19 @@ EvilSmasher: { DisplayName: Evil Smasher Tooltip: ''' - For every enemy you kill this hammer gains stat bonuses - These bonuses stack until a cap is reached - The bonus stacks will reset if you select a different item - The bonus stacks will be reduced by 1 every time you get hit + Channels a powerful hammer strike with the capability to crush all evil + Striking a tile with the hammer strike will cause an explosion and push you back + Striking enemies inflicts [cbuff:CalamityMod/SmashedEvil] on both the user and target + Charging strikes increases damage, explosion radius, and [cbuffplr:CalamityMod/SmashedEvil] duration 'EViL! sMaSH eVIl! SmAsh... ER!' ''' + //All damage and kill dialogue has the capitalization randomized when said + DamageDialogue0: smash! + DamageDialogue1: evil! + DamageDialogue2: crush! + DamageDialogue3: des.. troy! + KillDialogue0: smash evil! + KillDialogue1: smash.. er! } ExaltedOathblade: { @@ -491,6 +502,7 @@ Exoblade: { Enemy hits from the blade during the dash result in massive damage and a rebound Press immediately after a rebound to perform a powerful slash Powerful slashes are larger, heal you, and create a large explosion + Inflicts [cbuff:CalamityMod/MiracleBlight] ''' } @@ -755,7 +767,7 @@ InsidiousImpaler: { DisplayName: Insidious Impaler Tooltip: ''' - Throws self-propelling radioactive harpoons which chase foes + Throws self-propelling radioactive harpoons which chase foes and cause [cbuff:CalamityMod/SulphuricPoisoning] Harpoons ricochet at close range for additional hits ''' } @@ -768,7 +780,7 @@ Lacerator: { Striking enemies conjures a bloody saw to shred them The saw does more damage the more often the yoyo hits, and fades away when not striking enemies Enemies touching the edge of the sawblade get blood orbs torn out of them - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] The direction of the saw's spin depends on which direction you originally threw the yoyo [GFB] ''' @@ -889,14 +901,14 @@ Murasama: { MycelialClaws: { DisplayName: Mycelial Claws - Tooltip: Grants the Mushy buff for 6 seconds on enemy hits + Tooltip: Grants the [cbuffplr:CalamityMod/Mushy] buff for 6 seconds on enemy hits } Nadir: { DisplayName: Nadir Tooltip: ''' - Fires void essences which flay nearby enemies with tentacles + Fires void essences which flay nearby enemies with [cbuff:CalamityMod/Nightwither] tentacles 'The abyss has stared back at you long enough. It now speaks, and it does not speak softly' ''' } @@ -926,7 +938,7 @@ Oblivion: { OldLordClaymore: { DisplayName: Old Lord Claymore - Tooltip: A slow but powerful blade that sets enemies ablaze and has substantial knockback + Tooltip: A slow but powerful blade that lights enemies with [cbuff:OnFire3] and has substantial knockback HoldShiftTooltip: ''' [c/df4420:A gift to outstanding Demons, a replica of the sword used by the greatest of all Demon Lords.] @@ -1007,7 +1019,7 @@ PhotonRipper: { DisplayName: Photon Ripper Tooltip: ''' - Projects a directed stream of hardlight teeth at ultra high velocity + Projects a directed stream of hardlight teeth at ultra high velocity which cause [cbuff:CalamityMod/MiracleBlight] This weapon and its projectiles function as a chainsaw Press to use without chopping down trees ''' @@ -1055,7 +1067,8 @@ RemsRevenge: { DisplayName: Rem's Revenge Tooltip: ''' - Summons blood explosions and lowers enemy defense by {0} on hit + Summons blood explosions and inflicts [cbuff:CalamityMod/WitherDebuff] on hit + [cbuff:CalamityMod/WitherDebuff] lowers enemy defense by {0} 'A deadly morning star befitting its demonic owner' ''' } @@ -1105,7 +1118,7 @@ SaharaSlicers: { SausageMaker: { DisplayName: Sausage Maker - Tooltip: Sprays homing blood on hit + Tooltip: Sprays homing blood and causes [cbuff:CalamityMod/BurningBlood] on hit } ScourgeoftheCosmos: { @@ -1158,7 +1171,7 @@ SolsticeClaymore: { Tooltip: ''' Changes projectile color based on the time of year - Inflicts daybroken during the day and nightwither during the night + Inflicts [cbuff:CalamityMod/Daybroken] during the day and [cbuff:CalamityMod/Nightwither] during the night ''' } @@ -1167,7 +1180,7 @@ SoulHarvester: { Tooltip: ''' Shoots a soul scythe - Enemies explode when on low health, spreading the plague + Enemies explode when on low health, spreading the [cbuff:CalamityMod/Plague] ''' } @@ -1267,12 +1280,12 @@ Swordsplosion: { TaintedBlade: { DisplayName: Tainted Blade - Tooltip: Inflicts poison on enemy hits + Tooltip: Inflicts [cbuff:Poisoned] on enemy hits } TeardropCleaver: { DisplayName: Teardrop Cleaver - Tooltip: Makes your enemies cry + Tooltip: Gives your enemies [cbuff:CalamityMod/TemporalSadness] } TenebreusTides: { @@ -1309,7 +1322,7 @@ TheBurningSky: { DisplayName: The Burning Sky Tooltip: ''' - Rains down a stream of draconic fire at the cursor + Rains down a stream of [cbuff:CalamityMod/Dragonfire] at the cursor 'Hold the blade to the sky, and witness Armageddon' ''' } @@ -1358,7 +1371,7 @@ TheMutilator: { ''' Striking enemies empowers The Mutilator, increasing its damage At full charge, striking enemies causes a blood orb explosion - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] ''' } @@ -1378,7 +1391,7 @@ TheOracle: { Tooltip: ''' {$Common.YoyoStatsInfinite} - Emits an aura of lightning which charges up when hitting enemies + Emits an aura of [cbuff:CalamityMod/AuricRebuke] lightning which charges up when hitting enemies Fires auric orbs when supercharged 'Gaze into the past, the present, the future... and the circumstances of your inevitable demise' ''' @@ -1443,7 +1456,7 @@ TrueCausticEdge: { Tooltip: ''' Fires a bouncing caustic beam - Inflicts acid venom and slows down on enemy hits + Inflicts [cbuff:Venom] and slows down on enemy hits ''' } @@ -1507,13 +1520,13 @@ Violence: { ''' A demonic pitchfork, cursed to cause endless bloodshed commands the trident to follow your cursor and shred enemies with devastating speed - throws the trident, violently tearing through enemies with immense power and inflicting Vulnerability Hex + throws the trident, violently tearing through enemies with immense power and inflicting [cbuff:CalamityMod/VulnerabilityHex] ''' } Virulence: { DisplayName: Virulence - Tooltip: Fires a plague cloud + Tooltip: Fires a [cbuff:CalamityMod/Plague] cloud } VoidEdge: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 5a5f9f648a..f272922918 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -33,7 +33,7 @@ AngelicShotgun: { DisplayName: Angelic Shotgun Tooltip: ''' - Each shot casts a radiant beam of holy light from the sky + Each shot casts a radiant beam of [cbuff:CalamityMod/HolyFlames] from the sky Musket balls convert into hallow-point rounds which also empower the beam 'Fighting 'til the war's won' ''' @@ -45,8 +45,8 @@ Animosity: { Tooltip: "[GFB]" TooltipNormal: ''' - Fires a shotgun blast with a tight spread which is imbued with Brimstone Flames - Press to fire a powerful brimstone round that inflicts Whispering Death + Fires a shotgun blast with a tight spread which is imbued with [cbuff:CalamityMod/BrimstoneFlames] + Press to fire a powerful brimstone round that inflicts [cbuff:CalamityMod/WhisperingDeath] ''' TooltipGFB: ''' @@ -109,7 +109,7 @@ ArterialAssault: { ''' Fires a group of 5 homing blood arrows These blood arrows burst into blood orbs upon striking an enemy - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] ''' } @@ -127,7 +127,7 @@ Auralis: { DisplayName: Auralis Tooltip: ''' - Fires a high speed glowing bullet that reduces enemy protection + Fires a high speed glowing bullet that inflicts [cbuff:CalamityMod/MarkedforDeath] Press to zoom out Standing still provides increasing damage bonuses up to 25% Standing still for 5 or more seconds while using the scope ability will summon an aurora @@ -171,7 +171,7 @@ BlightSpewer: { DisplayName: Blight Spewer Tooltip: ''' - Fires clouds of plague nanomachines that stick to tiles + Fires clouds of [cbuff:CalamityMod/Plague] nanomachines that stick to tiles Nanomachines aggressively lock onto nearby enemies {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -182,7 +182,7 @@ BlissfulBombardier: { Tooltip: ''' Launches a crystalline missile high into the sky, raining holy fire on the cursor - The missile relentlessly seeks out a target before bursting into a massive explosion + The missile relentlessly seeks out a target before bursting into a massive [cbuff:CalamityMod/HolyFlames] explosion ''' } @@ -191,7 +191,7 @@ BloodBoiler: { Tooltip: ''' Fires twin streams of bloodfire that returns to you - Returning bloodfire reduces [cbuff:PotionSickness] if it struck an enemy + Returning bloodfire reduces [cbuffplr:PotionSickness] if it struck an enemy Uses your health as ammo 20% chance to save health ''' @@ -236,7 +236,7 @@ Buzzkill: { Tooltip: ''' Hold to rev up a buzzsaw that deals close-range damage - Release to fire the buzzsaw, which bounces off tiles and lacerates foes + Release to fire the buzzsaw, which bounces off tiles and causes [cbuff:CalamityMod/HeavyBleeding] in foes Revving up the saws increases their damage and allows them to pierce more enemies 'Not to be confused with the Sawed-On Shotgun' ''' @@ -244,7 +244,7 @@ Buzzkill: { ChickenCannon: { DisplayName: Chicken Cannon - Tooltip: Fires chicken flares which create enormous incendiary explosions + Tooltip: Fires chicken flares which create enormous incendiary explosions of [cbuff:CalamityMod/Dragonfire] } ChromaticEruption: { @@ -266,7 +266,7 @@ CleansingBlaze: { DisplayName: Cleansing Blaze Tooltip: ''' - Unleashes a torrent of flames which can pass through tiles + Unleashes a torrent of [cbuff:CalamityMod/GodSlayerInferno] flames which can pass through tiles Uses gel for ammo ''' } @@ -328,7 +328,7 @@ CorinthPrime: { CorrodedCaustibow: { DisplayName: Corroded Caustibow - Tooltip: Converts wooden arrows into slow, powerful shells that trail an irradiated aura + Tooltip: Converts wooden arrows into slow, powerful shells that trail an [cbuff:CalamityMod/Irradiated] aura } CrackshotColt: { @@ -384,9 +384,9 @@ DragonsBreath: { DisplayName: Dragon's Breath Tooltip: ''' - Fires dragon fireballs at an accelerating pace + Fires [cbuff:CalamityMod/Dragonfire] fireballs at an accelerating pace Upon firing for long enough, you will begin using a cartridge of energy - While using a cartridge you will shoot a draconic beam of fire that doesn't consume ammo + While using a cartridge you will shoot a draconic beam of [cbuff:CalamityMod/Dragonfire] that doesn't consume ammo Once a cartridge has been ejected you will return to the original fire rate {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -416,7 +416,7 @@ EternalBlizzard: { Eviscerator: { DisplayName: Eviscerator - Tooltip: Converts musket balls into fast-moving blood clots + Tooltip: Converts musket balls into fast-moving blood clots that cause [cbuff:CalamityMod/BurningBlood] } FetidEmesis: { @@ -554,7 +554,7 @@ HavocsBreath: { DisplayName: Havoc's Breath Tooltip: ''' - Projects cone-shaped blasts of scorching brimstone fire + Projects cone-shaped blasts of scorching [cbuff:CalamityMod/BrimstoneFlames] Uses gel for ammo ''' } @@ -563,7 +563,7 @@ HeavenlyGale: { DisplayName: Heavenly Gale Tooltip: ''' - Fires a rapid stream of supercharged exo-crystals + Fires a rapid stream of supercharged exo-crystals that inflict [cbuff:CalamityMod/MiracleBlight] Holding the bow and waiting for some time before firing causes the crystals to become more powerful If the crystals are sufficiently powerful enough they will summon torrents of exo-lightning above whatever target they hit ''' @@ -603,7 +603,7 @@ Hydra: { DisplayName: Hydra Tooltip: ''' - Fires a spread of 4 toxic bullets + Fires a spread of 4 [cbuff:Venom] bullets Grows a gun-head every 3 seconds, up to a maximum of 3 heads Press to command any existing heads to fire Press to launch the heads for powerful explosive damage @@ -633,7 +633,7 @@ Kingsbane: { ''' After revving up, rapidly fire bullets When you stop firing you will release a barrage of auric bullets - Auric bullets aggressively home in on enemies and ignore 50 points of defense + Auric bullets aggressively home in on enemies, ignore 50 points of defense, and inflict [cbuff:CalamityMod/AuricRebuke] Constantly consumes ammo while in use {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -644,7 +644,7 @@ Leviatitan: { Tooltip: ''' Fires high velocity aqua blasts - Releases homing aberrations that shred enemy defense every six shots + Releases homing aberrations that cause [cbuff:CalamityMod/ArmorCrunch] every six shots to vomit a meteor that explodes on hit 'The L in LMG stands for Leviathan' ''' @@ -684,7 +684,7 @@ MagnomalyCannon: { DisplayName: Magnomaly Cannon Tooltip: ''' - Launches a powerful exo rocket to nuke anything and everything + Launches a powerful exo rocket to nuke anything and everything with [cbuff:CalamityMod/MiracleBlight] Rockets are surrounded by an invisible damaging aura and split into damaging beams on hit {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -695,7 +695,7 @@ Malevolence: { Tooltip: ''' Fires two arrows at once - Converts wooden arrows into plague arrows that explode into bees + Converts wooden arrows into [cbuff:CalamityMod/Plague] arrows that explode into bees ''' } @@ -885,14 +885,14 @@ PearlGod: { PestilentDefiler: { DisplayName: Pestilent Defiler - Tooltip: Converts musket balls into plague rounds that explode and split apart on hit + Tooltip: Converts musket balls into [cbuff:CalamityMod/Plague] rounds that explode and split apart on hit } Photoviscerator: { DisplayName: Photoviscerator Tooltip: ''' - Emits a continuous beam of exo radiation that disintegrates everything + Emits a continuous beam of [cbuff:CalamityMod/MiracleBlight] radiation that disintegrates everything Press to fire homing exo flares which stick to and incinerate enemies Uses gel for ammo The beam has a {0}% chance to save ammo @@ -903,7 +903,7 @@ PlagueTaintedSMG: { DisplayName: Plague Tainted SMG Tooltip: ''' - Shoots plague bullets that spawn drones on critical hits + Shoots [cbuff:CalamityMod/Plague] bullets that spawn drones on critical hits Bullets deal more damage and knockback the closer the enemy is Drones have a much higher crit chance upon hitting a plagued enemy Press to fire a drone swarm @@ -942,7 +942,7 @@ PridefulHuntersPlanarRipper: { Tooltip: ''' Every fourth shot deals 135% damage - Converts musket balls into lightning bolts + Converts musket balls into [cbuff:Electrified] lightning bolts Lightning bolts travel extremely fast and explode on enemy kills Lightning bolt crits grant a stacking speed boost to the player This stacks up to 20 percent bonus movement speed and acceleration @@ -955,7 +955,7 @@ PristineFury: { DisplayName: Pristine Fury Tooltip: ''' - Fires an intense helix of flames that burst into a column of smoke + Fires an intense helix of [cbuff:CalamityMod/HolyFlames] that burst into a column of smoke to disperse a limited supply of flammable crystalline powder that restores over time Powder can be ignited, causing it to explode for extra damage Both helix flames and other nearby explosions can ignite the powder @@ -1078,7 +1078,7 @@ SepticSkewer: { Tooltip: ''' Launches a vile chained harpoon infested with toxins - Harpoons stick into enemies and inflict Sulphuric Poisoning for a long time + Harpoons stick into enemies and inflict [cbuff:CalamityMod/SulphuricPoisoning] for a long time After being impaled for one second, harpoons rip themselves back out and spray damaging gores Press to manually rip out all harpoons, dealing bonus damage Enemies close to death are dragged back with returning harpoons and executed when they reach you @@ -1090,7 +1090,7 @@ Shadethrower: { DisplayName: Shadethrower Tooltip: ''' - Spits clouds of shade which afflict enemies with brain rot + Spits clouds of shade which afflict enemies with [cbuff:CalamityMod/BrainRot] Uses gel for ammo ''' } @@ -1151,10 +1151,10 @@ SomaPrime: { Tooltip: ''' This weapon can supercrit if its crit chance is over 100% - All bullets fired have a 5% chance to inflict Shred, a stacking bleed debuff - Critical strikes deal 3x damage instead of 2x by default and have a 30% chance to inflict Shred - Shred deals 600 DPS per stack and scales with your ranged stats - Damage ticks of Shred can critically strike for 3x damage and can supercrit + All bullets fired have a 5% chance to inflict [cbuff:CalamityMod/Shred], a stacking bleed debuff + Critical strikes deal 3x damage instead of 2x by default and have a 30% chance to inflict [cbuff:CalamityMod/Shred] + [cbuff:CalamityMod/Shred] deals 600 DPS per stack and scales with your ranged stats + Damage ticks of [cbuff:CalamityMod/Shred] can critically strike for 3x damage and can supercrit Replaces musket balls with enhanced High Velocity Bullets {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -1264,7 +1264,7 @@ SulphuricAcidCannon: { Tooltip: ''' Fires homing Acid Rockets - Acid Rockets stick to enemies and explode into toxic mist after a short delay + Acid Rockets stick to enemies and explode into [cbuff:CalamityMod/SulphuricPoisoning] mist after a short delay ''' } @@ -1280,6 +1280,7 @@ SuperradiantSlaughterer: { ''' Hold to rev up an elemental buzzsaw that deals close-range damage Release to fire the buzzsaw which bounces off tiles, releasing homing bolts when returning depending on hits + Buzzsaws inflict [cbuff:CalamityMod/ElementalMix] and [cbuff:CalamityMod/Laceration] Revving up the saw increases its damage and allows it to pierce more enemies ''' AltInfo: @@ -1335,7 +1336,7 @@ TelluricGlare: { TheBallista: { DisplayName: The Ballista - Tooltip: Converts wooden arrows into greatarrows that crush enemy armor and break into shards + Tooltip: Converts wooden arrows into greatarrows that cause [cbuff:CalamityMod/ArmorCrunch] and break into shards } TheBlunderbass: { @@ -1351,9 +1352,9 @@ TheHive: { DisplayName: The Hive Tooltip: ''' - Launches a wide spread of 4 missiles that explode on contact with enemies and tiles + Launches a wide spread of 4 [cbuff:CalamityMod/Plague] missiles that explode on contact with enemies and tiles Charging the launcher decreases the spread and increases the velocity of the missile barrage - Fully charging the launcher will cause it to fire a nuke to decimate a massive area on impact + Fully charging the launcher will cause it to fire a [cbuff:CalamityMod/Plague] nuke to decimate a massive area on impact ''' } @@ -1364,7 +1365,7 @@ TheJailor: { TheMaelstrom: { DisplayName: The Maelstrom - Tooltip: Fires charged Reaper Sharks that explode into water + Tooltip: Fires charged Reaper Sharks that cause [cbuff:CalamityMod/HadopelagicPressure] water explosions } ThePack: { @@ -1376,7 +1377,7 @@ ThermoclineBlaster: { DisplayName: Thermocline Blaster Tooltip: ''' - Alternates between firing bullets imbued with fire and ice + Alternates between firing bullets imbued with [cbuff:OnFire3] and [cbuff:Frostburn2] Any bullet type can be imbued when fired from this gun ''' } @@ -1426,7 +1427,7 @@ TitaniumRailgun: { Toxibow: { DisplayName: Toxibow - Tooltip: Converts wooden arrows into slow arrows that inflict irradiated + Tooltip: Converts wooden arrows into slow arrows that inflict [cbuff:CalamityMod/Irradiated] } TyrannysEnd: { @@ -1434,7 +1435,7 @@ TyrannysEnd: { Tooltip: ''' Converts musket balls into .70 caliber sniper rounds that deal devastating damage - Inflicts Marked for Death on enemy hits and bypasses defense + Inflicts [cbuff:CalamityMod/MarkedforDeath] on enemy hits and bypasses defense Critical hits summon a swarm of 6 additional bullets 'Pierce the heart of even the most heavily-armored foe' ''' @@ -1445,8 +1446,7 @@ Ultima: { Tooltip: ''' Casts a continuous stream of plasma bolts - Over time the bolts are replaced with powerful lasers - Bolts power up into solid beams as you continue shooting + Over time bolts power up into solid beams that inflict [cbuff:CalamityMod/ElementalMix] as you continue shooting {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' } @@ -1474,7 +1474,7 @@ Voidragon: { DisplayName: Voidragon Tooltip: ''' - Fires void blasts that explode every other shot + Fires [cbuff:CalamityMod/Voidfrost] blasts that explode every other shot Shoots demon flame tentacles alongside every shot Void blasts consume no ammo and bullets have a {0}% chance to save ammo ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index a3aaa437db..79545b4952 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -47,8 +47,8 @@ BallisticPoisonBomb: { DisplayName: Ballistic Poison Bomb Tooltip: ''' - Throws a sticky bomb that explodes into spikes and venomous clouds - Stealth strikes erupt into more clouds with a longer lasting venom + Throws a sticky bomb that explodes into spikes and [cbuff:Venom] clouds + Stealth strikes erupt into more clouds with a longer lasting [cbuff:Venom] ''' } @@ -79,7 +79,7 @@ BloodsoakedCrasher: { Throws a bloody axe that is affected by gravity and can bounce twice The axe speeds up over time, but will slow down upon hitting an enemy Spews blood orbs upon enemy hits - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] Stealth strikes spawn homing blood bolts on hit ''' } @@ -107,7 +107,7 @@ BurningStrife: { DisplayName: Burning Strife Tooltip: ''' - Throws a shadowflame spiky ball that explodes into flames + Throws a [cbuff:CalamityMod/Shadowflame] spiky ball that explodes into flames Stealth strikes make the ball erupt into tentacles on hit 'Definitely not pocket safe' ''' @@ -157,7 +157,7 @@ ContaminatedBile: { DisplayName: Contaminated Bile Tooltip: ''' - Throws a flask of irradiated bile which shatters and lingers in a cloud + Throws a flask of [cbuff:CalamityMod/Irradiated] bile which shatters and lingers in a cloud Stealth strikes cause sulphuric bubbles to quickly rise from the cloud ''' } @@ -259,8 +259,8 @@ CursedDagger: { DisplayName: Cursed Dagger Tooltip: ''' - Throws a fast cursed dagger and two inaccurate weaker daggers - Stealth strikes throw a single dagger that bursts into a vortex of cursed flames + Throws a fast cursed dagger and two inaccurate weaker daggers that inflict [cbuff:CursedInferno] + Stealth strikes throw a single dagger that bursts into a [cbuff:CursedInferno] vortex ''' } @@ -278,7 +278,7 @@ DeepWounder: { DisplayName: Deep Wounder Tooltip: ''' - Throws an abyssal hatchet that inflicts Heavy Bleeding and Crush Depth to the enemies it hits + Throws an abyssal hatchet that inflicts [cbuff:CalamityMod/HeavyBleeding] and [cbuff:CalamityMod/CrushDepth] to the enemies it hits Stealth strikes cause the hatchet to stick to struck enemies, releasing a barrage of water projectiles Water projectiles launch at the closest enemy after a brief delay ''' @@ -299,7 +299,7 @@ DesecratedWater: { Tooltip: ''' Throws an unholy flask of water that explodes into an explosion of evil bubbles - Stealth strikes spawn additional bubbles that inflict Ichor and Cursed Inferno + Stealth strikes spawn additional bubbles that inflict [cbuff:Ichor] and [cbuff:CursedInferno] ''' } @@ -378,7 +378,7 @@ EpidemicShredder: { DisplayName: Epidemic Shredder Tooltip: ''' - Throws a plagued boomerang that releases plague seekers when it hits tiles or enemies + Throws a [cbuff:CalamityMod/Plague] boomerang that releases plague seekers when it hits tiles or enemies Stealth strikes cause the boomerang to release plague seekers constantly as it travels Contrary to its name, it will probably cause an epidemic if used incorrectly ''' @@ -388,7 +388,7 @@ Equanimity: { DisplayName: Equanimity Tooltip: ''' - Throws a confusing boomerang that ricochets between enemies + Throws a boomerang that ricochets between enemies and makes them [cbuff:Confused] Enemy hits alternate summoning homing light shards or piercing dark shards Stealth strikes cause an alternating explosion of light or dark on every ricochet, empowering the opposite color of shard ''' @@ -398,7 +398,7 @@ ExecutionersBlade: { DisplayName: Executioner's Blade Tooltip: ''' - Throws a stream of homing blades + Throws a stream of homing blades that inflict [cbuff:CalamityMod/GodSlayerInferno] Stealth strikes summon a guillotine of blades on hit ''' } @@ -477,7 +477,7 @@ GelDart: { DisplayName: Gel Dart Tooltip: ''' - Throws bouncing gel darts that cover struck enemies in slime + Throws bouncing gel darts that cover enemies in [cbuff:Slimed] Stealth strikes ignore gravity, bounce more vigorously, and constantly leak slime ''' } @@ -537,7 +537,7 @@ GraveGrimreaver: { Hurls a cursed scythe which homes in The scythe summons skulls as it flies and explodes into bats on hit Stealth strikes spawn a flood of bats and falling skulls when destroyed - Inflicts cursed flames and confusion + Inflicts [cbuff:CursedInferno] and [cbuff:Confused] 'A dapper skeleton's weapon of choice' ''' } @@ -593,7 +593,7 @@ IchorSpear: { DisplayName: Ichor Spear Tooltip: ''' - Throws a high-velocity ichor tipped javelin that pierces through enemies + Throws a high-velocity [cbuff:Ichor] tipped javelin that pierces through enemies Stealth strikes impale enemies and deal repeated damage ''' } @@ -612,7 +612,7 @@ InfestedClawmerang: { Tooltip: ''' Fires a slow, long-ranged boomerang - Stealth strikes grant the Mushy buff to the user on enemy hits and summon homing spores + Stealth strikes grant the [cbuffplr:CalamityMod/Mushy] buff to the user on enemy hits and summon homing spores ''' } @@ -629,9 +629,9 @@ JawsOfOblivion: { DisplayName: Jaws of Oblivion Tooltip: ''' - Throws a tight spread of six venomous reaper teeth that stick in enemies - This venom can stack when more teeth are stuck in an enemy - Stealth strikes cause the teeth to emit a crushing shockwave on impact + Throws a tight spread of six reaper teeth with [cbuff:Venom] that stick in enemies + The [cbuff:Venom] can stack when more teeth are stuck in an enemy + Stealth strikes cause the teeth to emit a crushing [cbuff:CalamityMod/HadopelagicPressure] shockwave on impact 'You're gonna need a bigger boat' ''' } @@ -688,8 +688,8 @@ Lionfish: { DisplayName: Lionfish Tooltip: ''' - Sticks to enemies and injects a potent venom - This venom can stack when more lionfish are stuck in an enemy + Sticks to enemies and injects a potent [cbuff:Venom] + The [cbuff:Venom] can stack when more lionfish are stuck in an enemy Stealth strikes spawn homing urchin spikes as they travel ''' } @@ -698,7 +698,7 @@ LunarKunai: { DisplayName: Lunar Kunai Tooltip: ''' - Throws out a set of three kunai that ignore gravity and slightly home in on enemies + Throws out a set of three kunai that ignore gravity and slightly home in on enemies, inflicting [cbuff:CalamityMod/Nightwither] After traveling enough distance, the kunai supercharge with lunar energy, homing in far more aggressively and exploding on impact Stealth strikes instantly throw ten supercharged Kunai ''' @@ -708,7 +708,7 @@ Malachite: { DisplayName: Malachite Tooltip: ''' - Throws a stream of kunai that stick to enemies and explode + Throws a stream of kunai that stick to enemies and explode into [cbuff:CalamityMod/Plague] Press to throw a single kunai that pierces, after piercing an enemy it emits a massive explosion on the next enemy hit Stealth strikes fire three kunai that home in, stick to enemies, and explode ''' @@ -773,13 +773,13 @@ Mycoroot: { ''' Fires a stream of short-range fungal roots Stealth strikes spawn an explosion of fungi spores - This grants you and nearby players on your team the Mushy buff for 15 seconds + This grants you and nearby players on your team the [cbuffplr:CalamityMod/Mushy] buff for 15 seconds ''' } MythrilKnife: { DisplayName: Mythril Knife - Tooltip: Stealth strikes are coated in deadly toxins, inflicting irradiated, poison, and acid venom + Tooltip: Stealth strikes are coated in deadly toxins, inflicting [cbuff:CalamityMod/Irradiated], [cbuff:Poisoned], and [cbuff:Venom] } NanoblackReaper: { @@ -847,7 +847,7 @@ Plaguenade: { DisplayName: Plaguenade Tooltip: ''' - Releases a swarm of angry plague bees + Releases a swarm of angry [cbuff:CalamityMod/Plague] bees Stealth strikes spawn more bees and generate a larger explosion ''' } @@ -975,8 +975,8 @@ ScourgeoftheSeas: { DisplayName: Scourge of the Seas Tooltip: ''' - Snaps apart into irradiated clouds upon striking an enemy - Stealth strikes irradiate for longer and are additionally coated with venomous toxins + Snaps apart into [cbuff:CalamityMod/Irradiated] clouds upon striking an enemy + Stealth strikes cause a longer [cbuff:CalamityMod/Irradiated] and are additionally coated with [cbuff:Venom] ''' } @@ -1068,8 +1068,8 @@ SnapClam: { DisplayName: Snap Clam Tooltip: ''' - Can latch on enemies and deal damage over time - Stealth strikes throw five clams at once that cause increased damage over time + Can latch on enemies and inflict [cbuff:CalamityMod/SnapClamDebuff] + Stealth strikes throw five clams at once ''' } @@ -1098,7 +1098,7 @@ SpentFuelContainer: { ''' Throws a fuel container with trace amounts of plutonium that causes a nuclear explosion The explosion does not occur if there are no tiles below it - Stealth strikes leave a lingering irradiated zone after the explosion dissipates + Stealth strikes leave a lingering [cbuff:CalamityMod/Irradiated] zone after the explosion dissipates 'War Never Changes' ''' } @@ -1107,7 +1107,7 @@ SporeKnife: { DisplayName: Spore Knife Tooltip: ''' - Throws an overgrown dagger that bursts into a cloud of poisonous spores + Throws an overgrown dagger that bursts into a cloud of [cbuff:Poisoned] spores Stealth strikes erupt into hungry homing buds that stick to enemies and gnaw them ''' } @@ -1137,7 +1137,7 @@ StormfrontRazor: { DisplayName: Stormfront Razor Tooltip: ''' - Throws a knife that summons lightning on hit + Throws a knife that summons [cbuff:CalamityMod/StaticDischarge] lightning on hit Stealth strikes cause the knife to be faster and summon multiple lightning bolts on hit [c/24C7F0:'Strike and stem the flow'] ''' @@ -1158,7 +1158,7 @@ Supernova: { ''' Tosses a smart bomb that locks onto and tracks targets If no target is found it will return to you - Each bomb creates a miniature supernova that drags in weak enemies and chases strong enemies + Each bomb creates a miniature [cbuff:CalamityMod/MiracleBlight] supernova that drags in weak enemies and chases strong enemies Stealth strikes create a blast that shakes the foundations of reality itself ''' } @@ -1206,10 +1206,10 @@ TheOldReaper: { DisplayName: The Old Reaper Tooltip: ''' - Throws an irradiated scythe that cuts through enemies + Throws a [cbuff:CalamityMod/SulphuricPoisoning] scythe that cuts through enemies Deposits unstable isotopes on hit, which create delayed nuclear explosions when they decay Stealth strikes are thrown into the sky and fall upon enemies a few seconds later - On hit, stealth strikes create a focused deluge of acid rain + On hit, stealth strikes create a focused deluge of [cbuff:CalamityMod/SulphuricPoisoning] acid rain ''' } @@ -1218,8 +1218,8 @@ TheSyringe: { Tooltip: ''' Throws a high velocity syringe that increases damage as it travels - Shatters into glass and plague cinders on impact - Stealth strikes also shatter into plague bees + Shatters into glass and [cbuff:CalamityMod/Plague] cinders on impact + Stealth strikes also shatter into [cbuff:CalamityMod/Plague] bees 'I'm pretty sure this isn't healthy' ''' } @@ -1237,7 +1237,7 @@ TimeBolt: { DisplayName: Time Bolt Tooltip: ''' - Throws a temporal knife that distorts time around enemies + Throws a temporal knife that causes [cbuff:CalamityMod/TimeDistortion] around enemies Stealth strikes can hit more enemies and create a larger time field 'There should be no boundary to human endeavor' ''' @@ -1258,7 +1258,7 @@ TotalityBreakers: { Tooltip: ''' Explodes into highly flammable black tar - Black tar oils enemies and sets them alight + Black tar makes enemies [cbuff:Oiled] and lights them with [cbuff:OnFire3] Stealth strikes leak black tar as they fly 'I need a bigger breaker' ''' @@ -1268,8 +1268,8 @@ ToxicantTwister: { DisplayName: Toxicant Twister Tooltip: ''' - Throws a fan of four spinning disks that swirl around your cursor - Stealth strikes swirl in a wider range and create a vortex of toxic raindrops that home in on enemies + Throws a fan of four spinning disks that swirl around your cursor and inflict [cbuff:CalamityMod/SulphuricPoisoning] + Stealth strikes swirl in a wider range and create a vortex of [cbuff:CalamityMod/SulphuricPoisoning] raindrops that home in on enemies ''' } @@ -1287,7 +1287,7 @@ TwistingThunder: { DisplayName: Twisting Thunder Tooltip: ''' - Fires a lightning bolt to electrocute enemies + Fires an [cbuff:Electrified] lightning bolt to electrocute enemies The lightning bolt travels faster while it is raining Summons lightning from the sky on impact Stealth strikes summon more lightning and travel faster @@ -1298,9 +1298,9 @@ UrchinStinger: { DisplayName: Urchin Stinger Tooltip: ''' - Sticks into enemies and injects an extremely potent poison - Stealth strikes stick into and poison enemies for longer - Sticking seven stingers in an enemy with a stealth strike stuck in it spawns an irradiated blast + Sticks into enemies and injects an extremely potent [cbuff:Poisoned] effect + Stealth strikes stick into and make enemies [cbuff:Poisoned] for longer + Sticking seven stingers in an enemy with a stealth strike stuck in it spawns an [cbuff:CalamityMod/Irradiated] blast ''' } @@ -1308,8 +1308,8 @@ UtensilPoker: { DisplayName: Utensil Poker Tooltip: ''' - Fires utensils in bursts of three - Stealth strikes replace any utensil with a powerful butcher knife + Fires utensils in bursts of three that cause [cbuff:CalamityMod/HeavyBleeding] + Stealth strikes replace any utensil with a powerful butcher knife that causes [cbuff:CalamityMod/Laceration] 'Space chickens, that is all' ''' } @@ -1349,7 +1349,7 @@ WebBall: { DisplayName: Web Ball Tooltip: ''' - Throws a web-covered ball that covers enemies in cobwebs to slow them down + Throws a web-covered ball that gets enemies [cbuff:Webbed] and slows them down Stealth strikes slow enemies down longer ''' } @@ -1370,7 +1370,7 @@ Wrathwing: { DisplayName: Wrathwing Tooltip: ''' - Throws an agile, homing winged spear that constantly spits fire + Throws an agile, homing winged spear of [cbuff:CalamityMod/Dragonfire] that constantly spits fire Stealth strikes create an eruption of cinders on hit ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 21a0c5eb27..2216c079c2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -73,7 +73,7 @@ AtlasMunitionsBeacon: { BelladonnaSpiritStaff: { DisplayName: Belladonna Spirit Staff - Tooltip: Summons a cute forest spirit that flings magical toxic petals + Tooltip: Summons a cute forest spirit that flings magical [cbuff:Poisoned] petals } BlackHawkRemote: { @@ -91,7 +91,7 @@ BorealisBomber: { Tooltip: ''' Summons aureus bombers to chase down your enemies - Aureus bombers explode violently on enemy impact + Aureus bombers explode violently on enemy impact, inflicting [cbuff:CalamityMod/AstralInfectionDebuff] Does not consume minion slots ''' } @@ -205,7 +205,7 @@ CosmicImmaterializer: { Tooltip: ''' Summons a cosmic energy spiral to fight for you - The orb will fire swarms of homing energy bolts when enemies are detected by it + The orb will fire swarms of homing energy bolts that cause [cbuff:CalamityMod/MiracleBlight] Requires 10 minion slots to use and there can only be one energy spiral ''' } @@ -292,7 +292,7 @@ DormantBrimseeker: { ''' Summons a brimseeker to keep you company Firing another brimseeker when all minion slots are filled summons a brimstone aura - The aura empowers your brimseeker summons and produces damaging fireballs + The aura empowers your brimseeker summons and produces damaging [cbuff:CalamityMod/BrimstoneFlames] fireballs Only one aura can persist at a time You could've sworn that they turned even scarier when you looked at their reflections in a mirror ''' @@ -304,7 +304,7 @@ DragonbloodDisgorger: { ''' Summons a skeletal dragon and her two children Baby spits burst into blood orbs upon hitting an enemy - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] Requires 6 minion slots to be summoned There can only be one family at a time ''' @@ -401,7 +401,7 @@ FlowersOfMortality: { DisplayName: Flowers of Mortality Tooltip: ''' - Summons five rainbow flowers over your head + Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] The combined flowers consume three minion slots ''' } @@ -514,7 +514,7 @@ InfectedRemote: { Summons a humanoid-hybrid Plaguebringer, codenamed 'Virili', to aid you in battle Virili requires 3 minion slots to summon, and can only be summoned once Virili uses a variety of attacks which she cycles through on a timer - All attacks spread the plague, as was her original design intention + All attacks spread the [cbuff:CalamityMod/Plague], as was her original design intention 'There's a single label on the back: [c/1FFBFF:WARNING: Subject is extremely corrosive and contagious. Avoid direct contact.'] ''' @@ -599,7 +599,7 @@ OrthoceraShell: { Tooltip: ''' {$CommonItemTooltip.Sentry} - Summons a flying orthocera to spit acid streams at your enemies + Summons a flying orthocera to spit [cbuff:CalamityMod/Irradiated] and [cbuff:Venom] streams at your enemies ''' } @@ -652,7 +652,7 @@ RustyBeaconPrototype: { Tooltip: ''' {$CommonItemTooltip.Sentry} - Summons a long-abandoned drone that passively emits irradiated waves + Summons a long-abandoned drone that passively emits [cbuff:CalamityMod/Irradiated] waves ''' } @@ -662,7 +662,7 @@ SanctifiedSpark: { ''' {$CommonItemTooltip.Sentry} Summons a friendly immolator that will float towards you - Immolators rapidly fire homing flares at nearby enemies, before continuing to float near you again + Immolators rapidly fire homing flares of [cbuff:CalamityMod/HolyFlames] at nearby enemies, before continuing to float near you again After firing, Immolators will fire one healing bolt at you for every 4 summon slots you have 'They might be a bit clingy, but at least they're warm' ''' @@ -704,7 +704,7 @@ ShellfishStaff: { DisplayName: Shellfish Staff Tooltip: ''' - Summons a shellfish to fight for you + Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] Each shellfish takes 2 minion slots ''' } @@ -876,7 +876,7 @@ ViridVanguard: { Alternates between summoning axes and swords, both laced with a powerful poison Axes orbit the player, dealing high damage at a close range Swords chase down enemies with extreme precision, tearing them to shreds - All weapons inflict [cbuff:CalamityMod/Sage Poison], which becomes more powerful the more weapons are summoned + All weapons inflict [cbuff:CalamityMod/SagePoison], which becomes more powerful the more weapons are summoned When all minion slots are full, again to spin up a flurry of slashes aimed at your cursor This ability has a five-second cooldown that requires holding this item Shift- this item in your inventory to change the rotation direction @@ -920,7 +920,7 @@ WitherBlossomsStaff: { DisplayName: Wither Blossoms Staff Tooltip: ''' - Summons four decaying flowers over your head + Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head The combined flowers consume two minion slots ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson index 9a4e9142f1..a93cf238be 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson @@ -2,7 +2,7 @@ Aestheticus: { DisplayName: Aestheticus Tooltip: ''' - Fires crystals that explode and slow enemies down + Fires crystals that explode and inflict [cbuff:CalamityMod/Vaporfied] This weapon scales with all your damage stats at once ''' } @@ -14,8 +14,8 @@ ClaretCannon: { Fires a hypercondensed claret round The round explodes upon striking an enemy and releases blood orbs The explosion shreds enemies, inflicting [cbuff:CalamityMod/Laceration] and dramatically reducing their defense - Picking up the blood orbs will reduce [cbuff:PotionSickness] when possible - If you do not have [cbuff:PotionSickness], your natural regeneration will be enhanced + Picking up the blood orbs will reduce [cbuffplr:PotionSickness] when possible + If you do not have [cbuffplr:PotionSickness], your natural regeneration will be enhanced Can only fire once every 10 seconds ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index bb4a5def16..7586da81d3 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -311,3 +311,4 @@ WulfrumScrew.DisplayName: Wulfrum Screw WulfrumScrewdriverProj.DisplayName: Wulfrum Screwdriver YinYoDark.DisplayName: Dark Shard YinYoLight.DisplayName: Light Shard +EvilSmasherProjectile.DisplayName: Evil Smasher diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 84c12af143..8931b6fa75 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -1,4 +1,3 @@ -AbaddonCrit.DisplayName: Brimstone Blast AeroExplosive.DisplayName: Aeroboom AllianceTriangle.DisplayName: Alliance Triangle AmuletEnergy.DisplayName: Sea Spirit @@ -43,7 +42,6 @@ CursorProjSplit.DisplayName: Aestheticus Crystal CyanLabSeeker.DisplayName: Seeking Mechanism DarkIce.DisplayName: Dark Ice DeepseaBlaze.DisplayName: Deepsea Blaze -DemonshadeRedDevil.DisplayName: Red Devil DevourerofCodsBobber.DisplayName: Devourer of Cods Bobber DiamondOfTheDeepProjectile.DisplayName: Abyss Spirit DirectStrike.DisplayName: Nondescript Damaging Entity @@ -170,7 +168,7 @@ WulfrumDiggingTurtleProjectile.DisplayName: Digging Turtle WulfrumHook.DisplayName: Wulfrum Slingshot WulfrumLureSignal.DisplayName: Signal YellowLabSeeker.DisplayName: Seeking Mechanism -VoidofExtinctionCrit.DisplayName: Void of Extinction Crit XykDeathAnim.DisplayName: Xyk Death Animation XykWings.DisplayName: Xyk Wings StratusBlackHole.DisplayName: Stratus Singularity +DebuffSpreadEffect.DisplayName: Debuff Spread Effect diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index c912701a81..dd4585b266 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -154,6 +154,7 @@ Cooldowns: { SuperradiantSawBoost: Superradiant Saw Boost TarragonCloak: Tarragon Cloak Cooldown TarragonImmunity: Tarragon Immunity Cooldown + TransformerCooldown: The Transformer Cooldown UniverseSplitter: Universe Splitter Cooldown WarbanneroftheRighteousBuff: Warbanner Strength WardingWave: Warding Wave Cooldown diff --git a/Localization/en-US/Mods.Terraria.Buffs.hjson b/Localization/en-US/Mods.Terraria.Buffs.hjson index ea70752e4b..d3195fabe8 100644 --- a/Localization/en-US/Mods.Terraria.Buffs.hjson +++ b/Localization/en-US/Mods.Terraria.Buffs.hjson @@ -1,22 +1,53 @@ -Venom.ItemTooltip: Sickness - 30 DPS +Venom: { + ItemTooltipPlayer: Sickness - 15 DPS + ItemTooltipEnemy: Sickness - 30 DPS +} + BetsysCurse.ItemTooltip: -40 defense -CursedInferno.ItemTooltip: Heat - 24 DPS -Frostburn2.ItemTooltip: Cold - 50 DPS -Frostburn.ItemTooltip: Cold - 8 DPS -OnFire3.ItemTooltip: Heat - 15 DPS -OnFire.ItemTooltip: Heat - 6 DPS -Ichor.ItemTooltip: -10 defense -Oiled.ItemTooltip: + +CursedInferno: { + ItemTooltipPlayer: Heat - 12 DPS + ItemTooltipEnemy: Heat - 24 DPS +} + +Frostburn2: { + ItemTooltipPlayer: Cold - 8 DPS + ItemTooltipEnemy: Cold - 25 DPS +} + +// Frostburn deals the same damage to players and enemies +Frostburn: { + ItemTooltipPlayer: Cold - 8 DPS + ItemTooltipEnemy: Cold - 8 DPS +} + +OnFire3.ItemTooltipEnemy: Heat - 15 DPS + +// On Fire deals the same damage to players and enemies +OnFire: { + ItemTooltipPlayer: Heat - 6 DPS + ItemTooltipEnemy: Heat - 6 DPS +} + +Ichor.ItemTooltipEnemy: -10 defense +Oiled.ItemTooltipEnemy: ''' Heat - 25 DPS. Recieves 2x the effect from Heat multipliers Only does damage when paired with another Heat debuff ''' -Poisoned.ItemTooltip: Sickness - 6 DPS -PotionSickness.ItemTooltip: "" -Slimed.ItemTooltip: Enhances Heat debuff damage -Wet.ItemTooltip: Enhances Electric debuff damage -Electrified.ItemTooltip: Electric - 10.5 DPS. Deals 4x damage to moving targets -Honey.ItemTooltip: +Poisoned.ItemTooltipEnemy: Sickness - 6 DPS +PotionSickness.ItemTooltipPlayer: "" +Slimed.ItemTooltipEnemy: Enhances Heat debuff damage +Wet.ItemTooltipEnemy: Enhances Electric debuff damage +Confused.ItemTooltipEnemy: Reverses movement +Webbed.ItemTooltipEnemy: Slows enemies + +Electrified: { + ItemTooltipPlayer: Electric - 4 DPS. Deals 5x damage to moving players + ItemTooltipEnemy: Electric - 15 DPS. Deals 4x damage to moving targets +} + +Honey.ItemTooltipPlayer: ''' Increases health regeneration by 1 HP/s Increases natural regeneration acceleration by 300% diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 5bfdd188ab..79fe9f3b05 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -293,9 +293,12 @@ namespace CalamityMod.NPCs public bool absorberAffliction = false; public bool irradiated = false; public double irradiatedContactBoost = 1.5; + public bool bane = false; + public float baneVisual = 0; public bool brimstoneFlames = false; public bool demonicFlames = false; public int demonicFlamesBonusDamage = 0; + public int demonicFlamesClearTimer = 0; public bool holyFlames = false; public bool plague = false; public bool armorCrunch = false; @@ -303,6 +306,8 @@ namespace CalamityMod.NPCs public int antlionCloudDebuffTimer = 0; public bool scionsCurioEffected = false; + public bool abaddonEffected = false; + public bool apollyonEffected = false; public int warbannerBurnTime = 0; // Determines the rate that the enemy is damaged public int warbannerBurnTimer = 0; // The duration of the debuff public int warbannerBurnStacks = 0; // The stacks increase how fast the debuff hits @@ -571,9 +576,12 @@ namespace CalamityMod.NPCs myClone.absorberAffliction = absorberAffliction; myClone.irradiated = irradiated; myClone.irradiatedContactBoost = irradiatedContactBoost; + myClone.bane = bane; + myClone.baneVisual = baneVisual; myClone.brimstoneFlames = brimstoneFlames; myClone.demonicFlames = demonicFlames; myClone.demonicFlamesBonusDamage = demonicFlamesBonusDamage; + myClone.demonicFlamesClearTimer = demonicFlamesClearTimer; myClone.holyFlames = holyFlames; myClone.plague = plague; myClone.armorCrunch = armorCrunch; @@ -581,6 +589,8 @@ namespace CalamityMod.NPCs myClone.antlionCloudDebuffTimer = antlionCloudDebuffTimer; myClone.scionsCurioEffected = scionsCurioEffected; + myClone.abaddonEffected = abaddonEffected; + myClone.apollyonEffected = apollyonEffected; myClone.warbannerBurnTime = warbannerBurnTime; myClone.warbannerBurnTimer = warbannerBurnTimer; myClone.warbannerBurnStacks = warbannerBurnStacks; @@ -774,9 +784,8 @@ namespace CalamityMod.NPCs irradiated = false; if (scionsCurioEffected) irradiatedContactBoost = 2f; + bane = false; brimstoneFlames = false; - if (!demonicFlames) - demonicFlamesBonusDamage = 0; demonicFlames = false; holyFlames = false; plague = false; @@ -1013,6 +1022,7 @@ namespace CalamityMod.NPCs dmg += 480; // 240 DPS blazingStarShredTimer--; } + dmg = (int)ActiveTypelessDebuffMultiplier.ApplyTo(dmg); npc.lifeRegenCount -= dmg; if (damage < dmg / 12) // 1/6th of the DPS dealt by Glaive Shred shows up as the indicator, unless another debuff does more per tick damage = dmg / 12; @@ -3132,6 +3142,12 @@ namespace CalamityMod.NPCs if (!Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].head)) npc.ai[3] = 0f; } + if (demonicFlames) + demonicFlamesClearTimer = 0; + else + demonicFlamesClearTimer++; + if (demonicFlamesClearTimer >= 2) + demonicFlamesBonusDamage = 0; if (warbannerBurnTimer > 0) warbannerBurnTimer--; @@ -3207,6 +3223,11 @@ namespace CalamityMod.NPCs } warbannerBurnTime--; } + float fadeSpeed = 0.15f; + if (bane) + baneVisual = MathHelper.Lerp(baneVisual, 1, fadeSpeed); + else if (baneVisual > 0) + baneVisual = MathHelper.Lerp(baneVisual, 0, fadeSpeed); if (veriumDoomTimer > 0) veriumDoomTimer--; @@ -4662,6 +4683,9 @@ namespace CalamityMod.NPCs if (astralInfection) AstralInfectionDebuff.DrawEffects(npc, ref drawColor); + if (bane || baneVisual > 0.05f) + Bane.DrawEffects(npc, ref drawColor); + // Brimstone Flames and Demonshade Enrage set bonus share the same visual effects // TODO -- change this when Demonshade is reworked if (brimstoneFlames || npc.HasBuff()) @@ -4929,6 +4953,7 @@ namespace CalamityMod.NPCs // All Calamity DoTs in alphabetical order ("CalamityMod/Buffs/DamageOverTime/AstralInfectionDebuff", NPC => NPC.Calamity().astralInfection), ("CalamityMod/Buffs/DamageOverTime/AuricRebuke", NPC => NPC.Calamity().auricRebuke), + ("CalamityMod/Buffs/DamageOverTime/Bane", NPC => NPC.Calamity().bane), ("CalamityMod/Buffs/DamageOverTime/BanishingFire", NPC => NPC.Calamity().banishingFire), ("CalamityMod/Buffs/DamageOverTime/BrainRot", NPC => NPC.Calamity().brainRot), ("CalamityMod/Buffs/DamageOverTime/BrimstoneFlames", NPC => NPC.Calamity().brimstoneFlames), @@ -4971,6 +4996,7 @@ namespace CalamityMod.NPCs ("CalamityMod/Buffs/StatDebuffs/MarkedforDeath", NPC => NPC.Calamity().markedForDeath), ("CalamityMod/Buffs/StatDebuffs/PearlAura", NPC => NPC.Calamity().pearlAura), ("CalamityMod/Buffs/StatDebuffs/ProfanedWeakness", NPC => NPC.Calamity().relicOfResilienceWeakness), + ("CalamityMod/Buffs/StatBuffs/SmashedEvil", NPC => NPC.HasBuff()), ("CalamityMod/Buffs/StatDebuffs/TemporalSadness", NPC => NPC.Calamity().temporalSadness), ("CalamityMod/Buffs/StatDebuffs/TimeDistortion", NPC => NPC.Calamity().timeDistortion), ("CalamityMod/Buffs/StatDebuffs/WhisperingDeath", NPC => NPC.Calamity().whisperingDeath), diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index c279887db3..0fb3532bb7 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -498,36 +498,6 @@ namespace CalamityMod.NPCs npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 7, 4)); npcLoot.Add(ItemID.HallowedKey, 10); break; - - // World Feeder - // 6-15 Cursed Flame INSTEAD OF 2-5 in Death Mode - // 4-8 Souls of Night in Death Mode - // Also let World Feeders drop their other loot in Death Mode, as only the Head contains loot normally but it may not be killed last - // Monster Meat is already dropped by all 3 segments - case NPCID.SeekerHead: - npcLoot.RemoveWhere( - // The following expression returns true if the following conditions are met: - rule => rule is CommonDrop drop // If the rule is an CommonDrop instance - && drop.itemId == ItemID.CursedFlame // And that instance drops a Cursed Flame - ); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => !CalamityWorld.death, () => !CalamityWorld.death)).Add(ItemID.CursedFlame, 1, 2, 5); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, () => CalamityWorld.death)).Add(ItemID.CursedFlame, 1, 6, 15); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, () => CalamityWorld.death, CalamityUtils.GetTextValue("Condition.Drops.IsDeath"))).Add(ItemID.SoulofNight, 1, 4, 8); - break; - case NPCID.SeekerBody: - case NPCID.SeekerTail: - npcLoot.RemoveWhere( - // The following expression returns true if the following conditions are met: - rule => rule is CommonDrop drop // If the rule is an CommonDrop instance - && drop.itemId == ItemID.CursedFlame // And that instance drops a Cursed Flame - ); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => !CalamityWorld.death, () => !CalamityWorld.death)).Add(ItemID.CursedFlame, 1, 2, 5); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, () => CalamityWorld.death)).Add(ItemID.CursedFlame, 1, 6, 15); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, () => CalamityWorld.death, CalamityUtils.GetTextValue("Condition.Drops.IsDeath"))).Add(ItemID.SoulofNight, 1, 4, 8); - - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, false)).Add(ItemID.MeatGrinder, 200); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death && Main.WindyEnoughForKiteDrops, false)).Add(ItemID.KiteWorldFeeder, 25); - break; #endregion #region Jungle diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 30f02069d7..0d477e9611 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1231,6 +1231,8 @@ namespace CalamityMod.NPCs Condition spelunkerGlowCondition = new(Language.GetText("Conditions.NightDayFullMoon"), () => !Main.dayTime || Main.GetMoonPhase() == MoonPhase.Full); // Identical to the one in NPCShopDatabase Condition hasFlareGunUpgrade = new(CalamityUtils.GetText("Condition.HasFlareGun"), () => (Main.LocalPlayer.HasItem(ItemType()) || Main.LocalPlayer.HasItem(ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); Condition bestiaryProgressLacewing = new(CalamityUtils.GetText("Condition.LacewingBestiary"), () => Main.GetBestiaryProgressReport().CompletionPercent >= 0.4f); + Condition crescentMoons = new(CalamityUtils.GetText("Condition.CrescentMoons"), () => Main.GetMoonPhase() == MoonPhase.QuarterAtLeft || Main.GetMoonPhase() == MoonPhase.QuarterAtRight); // for Craw Carapace + Condition gibbousMoons = new(CalamityUtils.GetText("Condition.GibbousMoons"), () => Main.GetMoonPhase() == MoonPhase.ThreeQuartersAtLeft || Main.GetMoonPhase() == MoonPhase.ThreeQuartersAtRight); // for Giant Shell if (type == NPCID.Merchant) { @@ -1375,12 +1377,12 @@ namespace CalamityMod.NPCs if (type == NPCID.SkeletonMerchant) { - shop.InsertAfter(ItemID.HealingPotion, ItemType()) - .InsertAfter(ItemID.HealingPotion, ItemID.MilkCarton) + shop.InsertAfter(ItemID.HealingPotion, ItemType(), Condition.MoonPhasesHalf0) + .InsertAfter(ItemID.HealingPotion, ItemID.MilkCarton, Condition.MoonPhasesHalf1) .InsertAfter(ItemID.SpelunkerFlare, ItemID.SpelunkerFlare, spelunkerGlowCondition, hasFlareGunUpgrade) - .AddWithCustomValue(ItemID.Marrow, Item.buyPrice(gold: 25), Condition.Hardmode) - .AddWithCustomValue(Item.buyPrice(gold: 15)) - .AddWithCustomValue(Item.buyPrice(gold: 15)); + .AddWithCustomValue(ItemID.Marrow, Item.buyPrice(gold: 25), Condition.Hardmode, Condition.MoonPhases26) // 26 = half moons + .AddWithCustomValue(Item.buyPrice(gold: 15), gibbousMoons) + .AddWithCustomValue(Item.buyPrice(gold: 15), crescentMoons); } if (type == NPCID.BestiaryGirl) diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 96898e2192..052bd98c2d 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -83,6 +83,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.boss = true; NPC.BossBar = Main.BigBossProgressBar.NeverValid; NPC.dontCountMe = true; + NPC.Calamity().canBreakPlayerDefense = true; if (Main.zenithWorld) NPC.scale *= 1.5f; diff --git a/Particles/BaneParticle.cs b/Particles/BaneParticle.cs new file mode 100644 index 0000000000..f688eef51e --- /dev/null +++ b/Particles/BaneParticle.cs @@ -0,0 +1,132 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class BaneParticle : Particle + { + public override string Texture => "CalamityMod/Particles/BaneParticle"; + public Color InitialColor; + public Color EndColor; + public Color glowColor = Color.White; + public bool AffectedByGravity; + public bool FadeIn = false; + public float FadeInScale = 0f; + public float SineRate = 0; + public float SineIntensity = 0; + public float Sine = 0; + public int sineTime = 0; + + public string NewTexture; + public float ActiveRotation; + public float AddedRotation = 0; + public float SpeedReduction = 0.95f; + public float ExtraRotation = 0; + + public Vector2 Stretch = Vector2.One; + public float ShrinkSpeed = 0; + public bool AltVisual = false; + public override bool UseAdditiveBlend => AltVisual; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + + public override int FrameVariants => 5; + + public BaneParticle(Vector2 relativePosition, Vector2 velocity, bool affectedByGravity, int lifetime, float scale, Color color, Color colorEnd, Vector2 stretch, bool useAddativeBlend = false, float activeRotation = 0, float speedReduction = 0.95f, float extraRotation = 0, float sineRate = 1, float sineIntensity = 0, bool fadeIn = false, bool affectedByLight = false, float shrinkSpeed = 0) + { + Position = relativePosition; + Velocity = velocity; + ActiveRotation = activeRotation; + AffectedByGravity = affectedByGravity; + AffectedByLight = affectedByLight; + Scale = scale; + Stretch = stretch; + FadeInScale = scale; + Lifetime = lifetime; + Color = InitialColor = color; + EndColor = colorEnd; + ShrinkSpeed = shrinkSpeed; + SpeedReduction = speedReduction; + ExtraRotation = extraRotation; + SineRate = sineRate; + SineIntensity = sineIntensity; + sineTime = Main.rand.Next(0, 400 + 1); + + + AltVisual = useAddativeBlend; + + FadeIn = fadeIn; + + if (FadeIn) + Scale = 0f; + + Variant = Main.rand.Next(FrameVariants); + } + + public override void Update() + { + if (!FadeIn) + { + Scale *= 0.95f; + Color = Color.Lerp(InitialColor, EndColor, LifetimeCompletion); + } + else + { + if ((float)Time / (float)Lifetime < 0.5f) + { + Scale = MathHelper.Lerp(Scale, FadeInScale, 0.2f); + } + else + { + Scale = MathHelper.Lerp(Scale, FadeInScale, -0.21f); + } + } + Velocity *= SpeedReduction; + if (Velocity.Length() < 12f && AffectedByGravity) + { + Velocity.X *= 0.94f; + Velocity.Y += 0.25f; + } + + float velRot = ActiveRotation == 0 ? (Velocity.ToRotation() + MathHelper.PiOver2) : ActiveRotation; + Rotation = velRot + AddedRotation; + AddedRotation += ActiveRotation; + ActiveRotation *= 0.975f; + + Stretch.X *= (1 - 0.2f * ShrinkSpeed); + Stretch.Y *= (1 + 0.2f * ShrinkSpeed); + + Sine = (float)Math.Sin((sineTime * SineRate) / MathHelper.Pi) * SineIntensity; + sineTime++; + } + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D texture = ModContent.Request("CalamityMod/Particles/BaneParticleGlow").Value; + int frameWidth = 18; + int frameHeight = 18; + int frameSpacing = frameHeight + 2; + Rectangle frame = new Rectangle(0, frameSpacing * Variant, frameWidth, frameHeight); + + Texture2D texture2 = ModContent.Request("CalamityMod/Particles/BaneParticle").Value; + int frameWidth2 = 14; + int frameHeight2 = 10; + int frameSpacing2 = frameHeight2 + 2; + Rectangle frame2 = new Rectangle(0, frameSpacing2 * Variant, frameWidth2, frameHeight2); + + Vector2 scale = Stretch * Scale; + + Color col = Color; + + if (AffectedByLight) + { + col = Lighting.GetColor((Position / 16).ToPoint()).MultiplyRGB(Color); + } + float fadeOut = (1 - (float)Math.Pow(LifetimeCompletion, 3D)); + spriteBatch.Draw(texture, Position - Main.screenPosition + Vector2.UnitX * Sine, frame, col * fadeOut, Rotation + ExtraRotation, frame.Size() * 0.5f, scale, 0, 0f); + spriteBatch.Draw(texture2, Position - Main.screenPosition + Vector2.UnitX * Sine, frame2, Color.Lerp(glowColor, col, 0.2f) * 0.75f * fadeOut, Rotation + ExtraRotation, frame2.Size() * 0.5f, scale * 0.95f, 0, 0f); + } + } +} diff --git a/Particles/BaneParticle.png b/Particles/BaneParticle.png new file mode 100644 index 0000000000..89703f1e16 Binary files /dev/null and b/Particles/BaneParticle.png differ diff --git a/Particles/BaneParticleGlow.png b/Particles/BaneParticleGlow.png new file mode 100644 index 0000000000..afbabdf11c Binary files /dev/null and b/Particles/BaneParticleGlow.png differ diff --git a/Particles/BloomRingAngled.png b/Particles/BloomRingAngled.png new file mode 100644 index 0000000000..fa6506a992 Binary files /dev/null and b/Particles/BloomRingAngled.png differ diff --git a/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs index 886d0f4802..068a7bed17 100644 --- a/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseGunHoldoutProjectile.cs @@ -154,8 +154,10 @@ namespace CalamityMod.Projectiles.BaseProjectiles Projectile.width = Projectile.height = ItemTexture is null ? 1 : ItemTexture.Width(); Projectile.tileCollide = false; Projectile.netImportant = true; - // While having this enabled would be good, it seems to mess with crits on all holdout when applied, so it will stay disabled - //Projectile.ContinuouslyUpdateDamageStats = true; + // Base class assumes that the weapon is a ranged weapon. If it's not a ranged weapon, be sure to override this in its own SetDefaults + // This is necessary in order for dynamic stat updating to function properly! + Projectile.DamageType = DamageClass.Ranged; + Projectile.ContinuouslyUpdateDamageStats = true; } public override void OnSpawn(IEntitySource source) => OffsetLengthFromArm = MaxOffsetLengthFromArm; diff --git a/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs index 13125da4a5..8c9a1641a9 100644 --- a/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs @@ -297,6 +297,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles Projectile.extraUpdates = 0; Projectile.aiStyle = -2; Projectile.DamageType = ModLoader.GetMod("CalamityMod").Find("TrueMeleeDamageClass"); + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.tileCollide = false; ProjectileID.Sets.TrailingMode[Projectile.type] = 2; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 100; diff --git a/Projectiles/Boss/AresPlasmaFireball.cs b/Projectiles/Boss/AresPlasmaFireball.cs index 52afa6e287..730f564336 100644 --- a/Projectiles/Boss/AresPlasmaFireball.cs +++ b/Projectiles/Boss/AresPlasmaFireball.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.Opacity = 0f; CooldownSlot = ImmunityCooldownID.Bosses; Projectile.timeLeft = timeLeft; + Projectile.Calamity().DealsDefenseDamage = true; } public override void SendExtraAI(BinaryWriter writer) diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs b/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs index 686fb8adac..9caa3a9e92 100644 --- a/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs +++ b/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs @@ -29,6 +29,7 @@ public class BloodBomb : ModNPC, ILocalizedModType { NPCID.Sets.ProjectileNPC[Type] = true; BloodBombYellow = ModContent.Request("CalamityMod/Projectiles/Boss/BrainOfCthulhu/BloodBomb2"); + this.HideFromBestiary(); } internal static Texture2D GetBombGlow() diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs b/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs index c956e3bf77..93eef1ad99 100644 --- a/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs +++ b/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs @@ -44,6 +44,7 @@ public class BloodScythe : ModProjectile, ILocalizedModType Projectile.damage = 10; Projectile.scale = 0.1f; Projectile.hostile = true; + Projectile.Calamity().DealsDefenseDamage = true; } public override void OnSpawn(IEntitySource source) diff --git a/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs b/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs index 8e6996e16b..961f091fb3 100644 --- a/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs +++ b/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs @@ -46,6 +46,7 @@ public class TelekineticEnemyGrab : ModProjectile, ILocalizedModType Projectile.hostile = true; if(NPC.crimsonBoss != -1) MyTarget = Main.npc[NPC.crimsonBoss].target; + Projectile.Calamity().DealsDefenseDamage = true; } public override void OnSpawn(IEntitySource source) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 100df322a8..4e24e380a3 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -195,6 +195,8 @@ namespace CalamityMod.Projectiles /// Used by Arterial Assault, Deific Amulet's stars, and certain sand projectiles from the Sand Gun. /// public float conditionalHomingRange = 0f; + public float conditionalHomingVelocity = 12f; + public float conditionalHomingInertia = 20f; /// /// Whether or not this proj was spawned with grape beer on @@ -434,7 +436,7 @@ namespace CalamityMod.Projectiles if (ProjectileID.Sets.LightPet[projectile.type] && Main.LocalPlayer.Calamity().ZoneAbyss) EnhancedDarknessSystem.lights.Add(new() { center = projectile.Center, scale = 1 }); - if (projectile.bobber && projectile.type != ProjectileType() && RunFishingMinigames(projectile)) + if (projectile.bobber && projectile.type != ProjectileType() && RunFishingMinigames(projectile) && !Main.LocalPlayer.dead) return false; //Reset the Homing Target immediately before AI can re-set it on applicable projectiles HomingTarget = -1; @@ -3323,6 +3325,12 @@ namespace CalamityMod.Projectiles { projectile.Center = Main.npc[(int)PersistentFishingData].Center + PersistentFishingDataVector2; projectile.velocity = Vector2.Zero; + + if (owner.Distance(Main.npc[(int)PersistentFishingData].Center) > 1450) // Slightly before when fishing lines stop rendering due to distance from target + { + projectile.ai[0] = 1; + } + if (cplayer.mouseRight && projectile.ai[1] == 0 && owner.miscCounter % 10 == 0) { owner.lifeRegenCount -= 600; // -5 health per 10 ticks @@ -4345,10 +4353,27 @@ namespace CalamityMod.Projectiles arcFlashCooldown--; if (arcFlashCooldown == 0) showArcFlash = true; - if (conditionalHomingRange > 0f && Main.player[projectile.owner].heldProj != projectile.whoAmI && projectile.aiStyle != ProjAIStyleID.HeldProjectile) + if (conditionalHomingRange > 0f && Main.player[projectile.owner].heldProj != projectile.whoAmI && projectile.aiStyle != ProjAIStyleID.HeldProjectile && !grapeBeer) { - CalamityUtils.HomeInOnNPC(projectile, !projectile.tileCollide, conditionalHomingRange, 12f, 20f,true); + CalamityUtils.HomeInOnNPC(projectile, !projectile.tileCollide, conditionalHomingRange, conditionalHomingVelocity, conditionalHomingInertia, true); } + + // Grape beer-specific homing. If the projectile is aligned a certain amount to the direction to the target, it will home in. + else if (conditionalHomingRange > 0f && Main.player[projectile.owner].heldProj != projectile.whoAmI && projectile.aiStyle != ProjAIStyleID.HeldProjectile && grapeBeer) + { + NPC target = projectile.Center.ClosestNPCAt(conditionalHomingRange); + if (target is not null) + { + Vector2 targetDirection = projectile.SafeDirectionTo(target.Center); + + float trackingSpeed = Vector2.Dot(targetDirection, projectile.velocity.SafeNormalize(Vector2.UnitX)) > 0.835f ? 0.01325f : 0f; // Delicate values, please test changes you make to them + + Vector2 currVelocity = projectile.velocity; + + projectile.velocity = projectile.velocity.ToRotation().AngleTowards(targetDirection.ToRotation(), trackingSpeed).ToRotationVector2() * currVelocity.Length(); + } + } + if (brimstoneBullets) { PointParticle spark = new PointParticle(projectile.Center + projectile.velocity * 3, projectile.velocity, false, 2, 0.9f, Color.Crimson * 0.7f); diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index e906bedf4b..6f3860270f 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -249,18 +249,30 @@ namespace CalamityMod.Projectiles #endregion #region CATEGORY 4: Defense Damage support - { ProjectileID.Cthulunado, defenseDamage }, // Duke Fishron's larger Sharknados + { ProjectileID.BombSkeletronPrime, defenseDamage }, + { ProjectileID.CannonballHostile, defenseDamage }, + { ProjectileID.Cthulunado, defenseDamage }, + { ProjectileID.CultistBossFireBall, defenseDamage }, + { ProjectileID.CultistBossLightningOrbArc, defenseDamage }, // Also used by Storm Weaver { ProjectileID.DD2BetsyFlameBreath, defenseDamage }, { ProjectileID.DeerclopsIceSpike, defenseDamage }, - { ProjectileID.FairyQueenSunDance, defenseDamage }, // Empress of Light's Sun Dance - { ProjectileID.FlamingScythe, defenseDamage }, // Pumpking orange spinning scythes - { ProjectileID.InfernoHostileBlast, defenseDamage }, // Diabolist inferno fork explosions - { ProjectileID.PaladinsHammerHostile, defenseDamage }, + { ProjectileID.DeerclopsRangedProjectile, defenseDamage }, + { ProjectileID.FairyQueenLance, defenseDamage }, // EoL lance + { ProjectileID.FairyQueenSunDance, defenseDamage }, // EoL sun dance + { ProjectileID.FlamingScythe, defenseDamage }, // Pumpking scythes + { ProjectileID.FrostWave, defenseDamage }, // Ice Queen frost waves, reused by Storm Weaver + { ProjectileID.HallowBossRainbowStreak, defenseDamage }, // EoL rainbow bolt + { ProjectileID.HallowBossLastingRainbow, defenseDamage }, // EoL everlasting rainbow { ProjectileID.PhantasmalDeathray, defenseDamage }, { ProjectileID.PhantasmalSphere, defenseDamage }, + { ProjectileID.Present, defenseDamage }, // Santa-NK1 presents + { ProjectileID.QueenSlimeSmash, defenseDamage }, + { ProjectileID.RocketSkeleton, defenseDamage }, // Skeleton Commando rockets, reused by Rev+ Skeletron Prime { ProjectileID.SaucerDeathray, defenseDamage }, + { ProjectileID.SaucerMissile, defenseDamage }, { ProjectileID.Sharknado, defenseDamage }, - { ProjectileID.ThornBall, Do(Main.zenithWorld ? IgnoreWater : DontIgnoreWater, DefenseDamage) }, // Plantera bouncing thorn balls + { ProjectileID.Spike, defenseDamage }, // Santa-NK1 spike balls + { ProjectileID.ThornBall, Do(Main.zenithWorld ? IgnoreWater : DontIgnoreWater, DefenseDamage) }, #endregion #region CATEGORY 5: ID-Static Immunity Frame changes diff --git a/Projectiles/DraedonsArsenal/AnomalysNanogunHoldout.cs b/Projectiles/DraedonsArsenal/AnomalysNanogunHoldout.cs index 65c00ee576..fb204c9e16 100644 --- a/Projectiles/DraedonsArsenal/AnomalysNanogunHoldout.cs +++ b/Projectiles/DraedonsArsenal/AnomalysNanogunHoldout.cs @@ -51,6 +51,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.width = Projectile.height = 1; Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; } diff --git a/Projectiles/DraedonsArsenal/AugerHoldout.cs b/Projectiles/DraedonsArsenal/AugerHoldout.cs index 55dc54e885..0322389e2f 100644 --- a/Projectiles/DraedonsArsenal/AugerHoldout.cs +++ b/Projectiles/DraedonsArsenal/AugerHoldout.cs @@ -38,6 +38,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.width = Projectile.height = 100; Projectile.friendly = true; Projectile.DamageType = TrueMeleeDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.timeLeft = 5; Projectile.penetrate = -1; Projectile.tileCollide = false; diff --git a/Projectiles/DraedonsArsenal/VulcanHoldout.cs b/Projectiles/DraedonsArsenal/VulcanHoldout.cs index d86259fbd3..fe420edf1f 100644 --- a/Projectiles/DraedonsArsenal/VulcanHoldout.cs +++ b/Projectiles/DraedonsArsenal/VulcanHoldout.cs @@ -40,6 +40,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public int spearFakeCooldown = 0; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { diff --git a/Projectiles/Magic/AetherfluxCannonHoldout.cs b/Projectiles/Magic/AetherfluxCannonHoldout.cs index 22726a859c..289e1475bf 100644 --- a/Projectiles/Magic/AetherfluxCannonHoldout.cs +++ b/Projectiles/Magic/AetherfluxCannonHoldout.cs @@ -30,6 +30,11 @@ namespace CalamityMod.Projectiles.Magic public float postShotFade = 0; public override void SetStaticDefaults() => Main.projFrames[Type] = 8; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } public override void KillHoldoutLogic() { diff --git a/Projectiles/Magic/ApoctosisArrayHoldout.cs b/Projectiles/Magic/ApoctosisArrayHoldout.cs index 61c854a9f0..1cbfe4d6e6 100644 --- a/Projectiles/Magic/ApoctosisArrayHoldout.cs +++ b/Projectiles/Magic/ApoctosisArrayHoldout.cs @@ -35,6 +35,12 @@ namespace CalamityMod.Projectiles.Magic public int shotNum = 0; public SlotId ionHum { get; set; } + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { if (Owner.dead) diff --git a/Projectiles/Magic/ArtAttackHoldout.cs b/Projectiles/Magic/ArtAttackHoldout.cs index 3593087353..88b9ed5af2 100644 --- a/Projectiles/Magic/ArtAttackHoldout.cs +++ b/Projectiles/Magic/ArtAttackHoldout.cs @@ -20,6 +20,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.width = 70; Projectile.height = 70; Projectile.friendly = false; + Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.timeLeft = 90000; diff --git a/Projectiles/Magic/CauldronHoldout.cs b/Projectiles/Magic/CauldronHoldout.cs index 3039f77888..a7dc3080e6 100644 --- a/Projectiles/Magic/CauldronHoldout.cs +++ b/Projectiles/Magic/CauldronHoldout.cs @@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; } public override void AI() diff --git a/Projectiles/Magic/ChronomancersScytheHoldout.cs b/Projectiles/Magic/ChronomancersScytheHoldout.cs index f594450c37..37ce392c9d 100644 --- a/Projectiles/Magic/ChronomancersScytheHoldout.cs +++ b/Projectiles/Magic/ChronomancersScytheHoldout.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.height = 60; Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.penetrate = -1; diff --git a/Projectiles/Magic/ChronomancersScytheSwing.cs b/Projectiles/Magic/ChronomancersScytheSwing.cs index 07c79e9f38..6ad0a08f6a 100644 --- a/Projectiles/Magic/ChronomancersScytheSwing.cs +++ b/Projectiles/Magic/ChronomancersScytheSwing.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ownerHitCheck = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 5; diff --git a/Projectiles/Magic/CoralSpoutHoldout.cs b/Projectiles/Magic/CoralSpoutHoldout.cs index 3312bcb246..821503dd27 100644 --- a/Projectiles/Magic/CoralSpoutHoldout.cs +++ b/Projectiles/Magic/CoralSpoutHoldout.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.height = 30; Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; } diff --git a/Projectiles/Magic/DarkSparkPrism.cs b/Projectiles/Magic/DarkSparkPrism.cs index 310cec8de3..136a815361 100644 --- a/Projectiles/Magic/DarkSparkPrism.cs +++ b/Projectiles/Magic/DarkSparkPrism.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; diff --git a/Projectiles/Magic/EternityBook.cs b/Projectiles/Magic/EternityBook.cs index 07ddff29fc..bb8e559c85 100644 --- a/Projectiles/Magic/EternityBook.cs +++ b/Projectiles/Magic/EternityBook.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; } diff --git a/Projectiles/Magic/GenesisHoldout.cs b/Projectiles/Magic/GenesisHoldout.cs index 1cae76f266..2137c1e5a2 100644 --- a/Projectiles/Magic/GenesisHoldout.cs +++ b/Projectiles/Magic/GenesisHoldout.cs @@ -31,6 +31,12 @@ namespace CalamityMod.Projectiles.Magic public float Windup { get; set; } = StarterWindup; public Color EffectsColor { get; set; } = Color.MediumSlateBlue; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { if (HeldItem.type != Owner.HeldItem.type || Owner.CantUseHoldout()) diff --git a/Projectiles/Magic/HadalUrnHoldout.cs b/Projectiles/Magic/HadalUrnHoldout.cs index c5d7c6e301..1387155526 100644 --- a/Projectiles/Magic/HadalUrnHoldout.cs +++ b/Projectiles/Magic/HadalUrnHoldout.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; } diff --git a/Projectiles/Magic/HeliumFlashHoldout.cs b/Projectiles/Magic/HeliumFlashHoldout.cs index bf3d5019cd..1c88496522 100644 --- a/Projectiles/Magic/HeliumFlashHoldout.cs +++ b/Projectiles/Magic/HeliumFlashHoldout.cs @@ -29,6 +29,12 @@ namespace CalamityMod.Projectiles.Magic public int starcoreFrameCounter = 0; public int starcoreFrame = 0; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { if (Owner.CantUseHoldout(false) || HeldItem.type != Owner.HeldItem.type) diff --git a/Projectiles/Magic/HeresyProj.cs b/Projectiles/Magic/HeresyProj.cs index e14d893f13..487a67cc6c 100644 --- a/Projectiles/Magic/HeresyProj.cs +++ b/Projectiles/Magic/HeresyProj.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; } diff --git a/Projectiles/Magic/IncineratingFireball.cs b/Projectiles/Magic/IncineratingFireball.cs index 77ef628275..eee796c453 100644 --- a/Projectiles/Magic/IncineratingFireball.cs +++ b/Projectiles/Magic/IncineratingFireball.cs @@ -36,6 +36,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.alpha = 255; Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.penetrate = -1; Projectile.timeLeft = 60000; Projectile.tileCollide = false; diff --git a/Projectiles/Magic/IonBlasterHoldout.cs b/Projectiles/Magic/IonBlasterHoldout.cs index 53fa872562..967b4dc028 100644 --- a/Projectiles/Magic/IonBlasterHoldout.cs +++ b/Projectiles/Magic/IonBlasterHoldout.cs @@ -35,6 +35,12 @@ namespace CalamityMod.Projectiles.Magic public int shotNum = 0; public SlotId ionHum { get; set; } + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { if (Owner.dead) diff --git a/Projectiles/Magic/NanoPurgeHoldout.cs b/Projectiles/Magic/NanoPurgeHoldout.cs index 54bed4ff59..4ab9fe2854 100644 --- a/Projectiles/Magic/NanoPurgeHoldout.cs +++ b/Projectiles/Magic/NanoPurgeHoldout.cs @@ -30,6 +30,11 @@ namespace CalamityMod.Projectiles.Magic private ref float ChargeTowardsNextShot => ref Projectile.ai[1]; public override void SetStaticDefaults() => Main.projFrames[Type] = 4; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } public float postShotFade = 0; diff --git a/Projectiles/Magic/NebulousCataclysm_Held.cs b/Projectiles/Magic/NebulousCataclysm_Held.cs index 016f2c14e1..0a1276b3f3 100644 --- a/Projectiles/Magic/NebulousCataclysm_Held.cs +++ b/Projectiles/Magic/NebulousCataclysm_Held.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; } diff --git a/Projectiles/Magic/OmicronHoldout.cs b/Projectiles/Magic/OmicronHoldout.cs index 4d83523c81..71f91a0114 100644 --- a/Projectiles/Magic/OmicronHoldout.cs +++ b/Projectiles/Magic/OmicronHoldout.cs @@ -27,6 +27,12 @@ namespace CalamityMod.Projectiles.Magic public float Windup { get; set; } = StarterWinup; public Color EffectsColor { get; set; } = Color.MediumVioletRed; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { if (Owner.CantUseHoldout() && PostFireCooldown <= 0) diff --git a/Projectiles/Magic/PurgeGuzzlerHoldout.cs b/Projectiles/Magic/PurgeGuzzlerHoldout.cs index 5041446fb2..a465def812 100644 --- a/Projectiles/Magic/PurgeGuzzlerHoldout.cs +++ b/Projectiles/Magic/PurgeGuzzlerHoldout.cs @@ -35,6 +35,13 @@ namespace CalamityMod.Projectiles.Magic public Color color1 = Color.Goldenrod; public Color color2 = Color.Orange; + + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { if (!isOnCooldown && (Owner.CantUseHoldout(false) || HeldItem.type != Owner.HeldItem.type)) diff --git a/Projectiles/Magic/RainbowPartyCannonProjectile.cs b/Projectiles/Magic/RainbowPartyCannonProjectile.cs index e891606c3b..7e4a2d6d76 100644 --- a/Projectiles/Magic/RainbowPartyCannonProjectile.cs +++ b/Projectiles/Magic/RainbowPartyCannonProjectile.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.height = 66; Projectile.penetrate = -1; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.tileCollide = false; Projectile.ignoreWater = true; } diff --git a/Projectiles/Magic/RancorHoldout.cs b/Projectiles/Magic/RancorHoldout.cs index 0a72c89b15..8091e26805 100644 --- a/Projectiles/Magic/RancorHoldout.cs +++ b/Projectiles/Magic/RancorHoldout.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; Projectile.hide = true; Projectile.timeLeft = 90000; diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index 05e4966f84..c79eea665f 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -42,6 +42,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.width = Projectile.height = 32; Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 5; diff --git a/Projectiles/Magic/RancorMagicCircle.cs b/Projectiles/Magic/RancorMagicCircle.cs index 02d318930e..908e460f4d 100644 --- a/Projectiles/Magic/RancorMagicCircle.cs +++ b/Projectiles/Magic/RancorMagicCircle.cs @@ -37,6 +37,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; Projectile.timeLeft = 90000; } diff --git a/Projectiles/Magic/SHPV.cs b/Projectiles/Magic/SHPV.cs index e89fb91356..92937065c8 100644 --- a/Projectiles/Magic/SHPV.cs +++ b/Projectiles/Magic/SHPV.cs @@ -49,6 +49,8 @@ namespace CalamityMod.Projectiles.Magic { Projectile.width = Projectile.height = 70; Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.tileCollide = false; Projectile.ignoreWater = true; } diff --git a/Projectiles/Magic/Snowflake.cs b/Projectiles/Magic/Snowflake.cs index edcd3fe031..c6d7098a65 100644 --- a/Projectiles/Magic/Snowflake.cs +++ b/Projectiles/Magic/Snowflake.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.timeLeft = 280; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.coldDamage = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 40; diff --git a/Projectiles/Magic/SparklingEmpressHoldout.cs b/Projectiles/Magic/SparklingEmpressHoldout.cs index 92726655cf..c9725236cd 100644 --- a/Projectiles/Magic/SparklingEmpressHoldout.cs +++ b/Projectiles/Magic/SparklingEmpressHoldout.cs @@ -35,6 +35,12 @@ namespace CalamityMod.Projectiles.Magic public int CooldownTime => 20 * (deservesMana ? 2 : 1); private const int FishShineTime = 150; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { if (HeldItem.type != Owner.HeldItem.type || Owner.dead) diff --git a/Projectiles/Magic/SylvestaffHoldout.cs b/Projectiles/Magic/SylvestaffHoldout.cs index eb344012ef..61b6a1ee5a 100644 --- a/Projectiles/Magic/SylvestaffHoldout.cs +++ b/Projectiles/Magic/SylvestaffHoldout.cs @@ -57,6 +57,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.friendly = true; Projectile.penetrate = -1; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; diff --git a/Projectiles/Magic/ValkyrieRayBeam.cs b/Projectiles/Magic/ValkyrieRayBeam.cs index 61bf80969b..8c6f71bd4a 100644 --- a/Projectiles/Magic/ValkyrieRayBeam.cs +++ b/Projectiles/Magic/ValkyrieRayBeam.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic // The beam itself still stops on tiles, but its invisible "source" projectile ignores them. Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; + Projectile.localNPCHitCooldown = Lifetime / 2; // The beam lasts for only some frames and fades out over that time. Projectile.timeLeft = Lifetime; diff --git a/Projectiles/Magic/ValkyrieRayStaff.cs b/Projectiles/Magic/ValkyrieRayStaff.cs index 64143f3e25..05285981d6 100644 --- a/Projectiles/Magic/ValkyrieRayStaff.cs +++ b/Projectiles/Magic/ValkyrieRayStaff.cs @@ -13,6 +13,9 @@ namespace CalamityMod.Projectiles.Magic public override string Texture => "CalamityMod/Items/Weapons/Magic/ValkyrieRay"; private const float AimResponsiveness = 0.66f; + public ref float Timer => ref Projectile.ai[0]; + public ref float Fired => ref Projectile.ai[1]; + public ref float TimeRate => ref Projectile.ai[2]; public override void SetDefaults() { @@ -25,8 +28,6 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 900; } - // ai[0] is a time-dilated frame counter. ai[1] is whether the beam has already fired. - // localAI[0] is the rate at which the "frame" counter increases. public override void AI() { Player player = Main.player[Projectile.owner]; @@ -34,20 +35,20 @@ namespace CalamityMod.Projectiles.Magic // Calculate how quickly the staff should charge. Charge increases by some number close to 1 every frame. // Speed increasing reforges make this number greater than 1. Slowing reforges make it smaller than 1. - if (Projectile.localAI[0] == 0f) - Projectile.localAI[0] = (ValkyrieRay.ChargeFrames + ValkyrieRay.CooldownFrames) / player.HeldItem.useTime; + if (TimeRate == 0f) + TimeRate = (ValkyrieRay.ChargeFrames + ValkyrieRay.CooldownFrames) / player.HeldItem.useTime; // Increment the timer for the staff. If the timer has passed the total time, destroy it. - Projectile.ai[0] += Projectile.localAI[0]; + Timer += TimeRate; int maxTime = ValkyrieRay.ChargeFrames + ValkyrieRay.CooldownFrames; - if (Projectile.ai[0] > maxTime) + if (Timer > maxTime) { Projectile.Kill(); return; } // Compute the weapon's charge. - float chargeLevel = MathHelper.Clamp(Projectile.ai[0] / ValkyrieRay.ChargeFrames, 0f, 1f); + float chargeLevel = MathHelper.Clamp(Timer / ValkyrieRay.ChargeFrames, 0f, 1f); // Common code among holdouts to keep the holdout projectile directly in the player's hand UpdatePlayerVisuals(player, rrp); @@ -58,9 +59,9 @@ namespace CalamityMod.Projectiles.Magic Vector2 gemPos = Projectile.Center + gemOffset.RotatedBy(angle); // Firing or charging? - if (chargeLevel >= 1f && Projectile.ai[1] == 0f) + if (chargeLevel >= 1f && Fired == 0f) { - Projectile.ai[1] = 1f; // so it never fires again + Fired = 1f; // so it never fires again FiringEffects(gemPos); if (Projectile.owner == Main.myPlayer) { @@ -68,7 +69,7 @@ namespace CalamityMod.Projectiles.Magic laser.Center = gemPos; } } - else if (Projectile.ai[1] == 0f) + else if (Fired == 0f) { // The player can constantly re-aim the staff while it's charging, but once it fires it is locked in place. UpdateAim(rrp, Projectile.velocity.Length()); diff --git a/Projectiles/Magic/VitriolicViperHoldout.cs b/Projectiles/Magic/VitriolicViperHoldout.cs index ae04de7f52..86f1f61480 100644 --- a/Projectiles/Magic/VitriolicViperHoldout.cs +++ b/Projectiles/Magic/VitriolicViperHoldout.cs @@ -38,6 +38,12 @@ namespace CalamityMod.Projectiles.Magic public float vortexRotation = 0; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Magic; + } + public override void KillHoldoutLogic() { if (Owner.CantUseHoldout(false) || HeldItem.type != Owner.HeldItem.type) diff --git a/Projectiles/Magic/YharimsCrystalBeam.cs b/Projectiles/Magic/YharimsCrystalBeam.cs index ea5730ca5b..2ca085d156 100644 --- a/Projectiles/Magic/YharimsCrystalBeam.cs +++ b/Projectiles/Magic/YharimsCrystalBeam.cs @@ -47,6 +47,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.width = 18; Projectile.height = 18; Projectile.DamageType = DamageClass.Magic; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.penetrate = -1; Projectile.alpha = 255; // The beam itself still stops on tiles, but its invisible "source" projectile ignores them. diff --git a/Projectiles/Melee/BasherHoldout.cs b/Projectiles/Melee/BasherHoldout.cs index 1658497495..0050590376 100644 --- a/Projectiles/Melee/BasherHoldout.cs +++ b/Projectiles/Melee/BasherHoldout.cs @@ -63,6 +63,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.knockBack = 0; attackTimer = cooldown; + swingCount = 1; } } public void ResetVariables() // After a swing, reset/adjust many stats @@ -82,7 +83,7 @@ namespace CalamityMod.Projectiles.Melee float angleVariation = (float)Math.Sin(time * 0.06f / Projectile.MaxUpdates) * 0.1f; - float outwardDistance = 5 * Projectile.scale; + float outwardDistance = 5; Owner.ChangeDir(Math.Sign(toMouse.X)); Owner.SetCompositeArmFront(true, CompositeArmStretchAmount.Full, (toMouse.ToRotation() + (bladeRot + angleVariation) * Owner.direction + MathHelper.PiOver2 * -Owner.direction) + (Owner.direction == -1 ? MathHelper.Pi : 0)); Vector2 handPos = Owner.GetFrontHandPosition(CompositeArmStretchAmount.None, Owner.compositeFrontArm.rotation) + (Owner.compositeFrontArm.rotation + MathHelper.PiOver2).ToRotationVector2() * outwardDistance; @@ -267,8 +268,8 @@ namespace CalamityMod.Projectiles.Melee float drawRotation = Projectile.rotation + ((Owner.direction == -1) ? MathHelper.Pi - MathHelper.PiOver4 : MathHelper.PiOver4); Vector2 rotationPoint = (Owner.direction == -1) ? new Vector2(texture.Width, texture.Height) : new Vector2(0, texture.Height); SpriteEffects flipSprite = (Owner.direction == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Vector2 placeAdjust = (drawRotation + MathHelper.PiOver2).ToRotationVector2() * 2.5f + ((swingCount % 2 == 0 ? new Vector2(-6, 0) : new Vector2(-2, 0)).RotatedBy(drawRotation) * Owner.direction); - Vector2 placeAdjust = (drawRotation + MathHelper.PiOver2).ToRotationVector2() * 2.5f; Color clr = Color.Tan; int swingCountFlip = (swingCount % 2 == 0 ? 1 : 3) + Owner.direction == 0 ? 2 : 0; Vector2 vel2 = Projectile.velocity.RotatedBy(MathHelper.PiOver2); diff --git a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs index 4164215be3..8205cb5f9a 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 70; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/DeathsAscensionSwing.cs b/Projectiles/Melee/DeathsAscensionSwing.cs index 36f9c36aee..f52f7a653f 100644 --- a/Projectiles/Melee/DeathsAscensionSwing.cs +++ b/Projectiles/Melee/DeathsAscensionSwing.cs @@ -46,6 +46,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ownerHitCheck = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 8; diff --git a/Projectiles/Melee/DevilsSunriseProj.cs b/Projectiles/Melee/DevilsSunriseProj.cs index 56e91d066e..9fdf15536d 100644 --- a/Projectiles/Melee/DevilsSunriseProj.cs +++ b/Projectiles/Melee/DevilsSunriseProj.cs @@ -36,6 +36,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.MeleeNoSpeed; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ownerHitCheck = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; diff --git a/Projectiles/Melee/EvilSmasherProjectile.cs b/Projectiles/Melee/EvilSmasherProjectile.cs new file mode 100644 index 0000000000..f7182884f2 --- /dev/null +++ b/Projectiles/Melee/EvilSmasherProjectile.cs @@ -0,0 +1,221 @@ +using System; +using System.Collections.Generic; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatBuffs; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Sounds; +using Humanizer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + + public class EvilSmasherProjectile : BaseSwordHoldoutProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public Player Owner => Main.player[Projectile.owner]; + public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; + + public override string Texture => BaseItem.ModItem.Texture; + public override int AfterImageLength => 10; + public override int OffsetDistance => 50; + public override int CooldownTime { get; set; } + public override bool AlternateSwings => false; + public override bool useMeleeSpeed => false; + public override SoundStyle? UseSound => SoundID.DD2_MonkStaffSwing with {Volume = 1f}; + + bool hasSmashedTile = false; + bool playedChargeSound = false; + bool firstEnemyHit = true; + + public override void Defaults() + { + Projectile.extraUpdates = 3; + swingWidth = 200; + RotateInCooldown = 0; + RotateInStartup = 0; + Projectile.width = 64; + Projectile.height = 66; + } + + public override void Spawn() + { + angle = new Vector2(angle.X.DirectionalSign(), 0); + var player = Main.player[Projectile.owner]; + var modplayer = player.GetModPlayer(); + StartupTime = 80; + CooldownTime = 30; + swingTime = 10; + modplayer.swingNum = 0; + Projectile.timeLeft = 600; + Projectile.scale *= 1.25f; + Projectile.originalDamage = Projectile.damage; + } + + public override void AdditionalAI() + { + if (inStartup) + { + Projectile.damage = (int)(Projectile.originalDamage * (timer / (float)(StartupTime-1))); + Owner.velocity.X *= 0.97f; + } + if (inStartup && !Owner.channel && timer > 30) + { + timer = StartupTime - 1; + } + if (Owner.channel && timer == StartupTime - 1) + { + Projectile.timeLeft++; + timer--; + if (!playedChargeSound) { + SoundEngine.PlaySound(SoundID.Item178,Projectile.Center); + playedChargeSound = true; + for (int i = 0; i < 5; i++) + { + int sparkLifetime = Main.rand.Next(8, 12); + float sparkScale = Main.rand.NextFloat(0.5f, 1f); + var sparkColor = Main.rand.NextBool() ? Color.Purple : Color.Red; + + if (Main.rand.NextBool(5)) + sparkScale *= 1.4f; + + Vector2 sparkVelocity = Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * MathHelper.Lerp(10, 30, Main.rand.NextFloat()); + SparkParticle spark = new SparkParticle(Projectile.Center + angle * 30, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } + } + } + if (!hasSmashedTile && inSwing && SwingCompletion > 0.275f) + { + var adjustedAngle = angle.RotatedBy(Projectile.spriteDirection * SwingFunction()); + Vector2 HammerFrontPos = Projectile.Center + adjustedAngle * -16 * Projectile.scale + (adjustedAngle.RotatedBy(MathHelper.PiOver2) * 20 * Projectile.scale * angle.X); + if (Collision.SolidCollision(HammerFrontPos, 1, 1)) + { + + Owner.velocity *= 0.15f; + Owner.velocity -= adjustedAngle.RotatedBy(MathHelper.PiOver2) * angle.X * MathHelper.Lerp(7.5f,16f,Projectile.damage / (float)Projectile.originalDamage); + float ringRot = SwingCompletion < 0.5f ? 0 : MathHelper.PiOver2; + GeneralParticleHandler.SpawnParticle(new CustomPulse(HammerFrontPos, Vector2.Zero, Color.Red, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloatDirection(), 0.03f, 0.04f * (2 + Projectile.damage / (float)Projectile.originalDamage), 15)); + GeneralParticleHandler.SpawnParticle(new DirectionalPulseRing(HammerFrontPos, Vector2.Zero, Color.Purple, new Vector2(0.2f, 1f), ringRot, 0.2f, 0.75f * (2 + Projectile.damage / (float)Projectile.originalDamage), 30)); + GeneralParticleHandler.SpawnParticle(new DirectionalPulseRing(HammerFrontPos, Vector2.Zero, Color.Purple, new Vector2(0.2f, 1f), ringRot, 0.1f, 0.5f * (2 + Projectile.damage / (float)Projectile.originalDamage), 30)); + int radius = (int)(4 * Projectile.damage / (float)Projectile.originalDamage); + Point scanAreaStart = HammerFrontPos.ToTileCoordinates() + new Point(-radius, -radius); + Point scanAreaEnd = HammerFrontPos.ToTileCoordinates() + new Point(radius, radius); + Projectile.CreateImpactExplosion((int)(10 * Projectile.damage / (float)Projectile.originalDamage), Projectile.Center, ref scanAreaStart, ref scanAreaEnd, Projectile.width, out bool causedShockwaves); + + hasSmashedTile = true; + timer = StartupTime + swingTime; + angle = adjustedAngle; + var pos = Projectile.Center; + Projectile.Size *= 2 + Projectile.damage / (float)Projectile.originalDamage; + Projectile.Center = HammerFrontPos; + Projectile.Damage(); + Projectile.Size /= 2 + Projectile.damage / (float)Projectile.originalDamage; + Projectile.Center = pos; + + if ((Projectile.damage / (float)Projectile.originalDamage) >= 1) + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact with {VariantsWeights = new ReadOnlySpan(new float[] { 1, 0, 0 })}); + SoundEngine.PlaySound(SoundID.DD2_MonkStaffGroundImpact); + } + } + Owner.heldProj = Projectile.whoAmI; + } + + public override float SwingFunction() + { + if (hasSmashedTile) + return MathHelper.ToRadians(MathHelper.Lerp(0, -swingWidth * 0.4f, MathF.Pow(CooldownCompletion, 0.5f))); + if (inStartup) + return MathHelper.ToRadians(MathHelper.SmoothStep(-swingWidth * 0.8f, -swingWidth * 0.66f, 1 - MathF.Pow(StartupCompletion, 0.5f))); + if (inCooldown) + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * 0.33f, swingWidth * 0.45f, MathF.Pow(CooldownCompletion, 0.5f))); + return MathHelper.ToRadians(MathHelper.SmoothStep(-swingWidth * .66f, (swingWidth * 0.33f), SwingCompletion)); + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (firstEnemyHit && Main.rand.NextFloat() < (Projectile.damage / (float)Projectile.originalDamage)) + { + string text = ""; + if (target.life > 0) + text = CalamityUtils.GetTextValue("Items.Weapons.Melee.EvilSmasher.DamageDialogue" + Main.rand.Next(4)); + else + text = CalamityUtils.GetTextValue("Items.Weapons.Melee.EvilSmasher.KillDialogue" + Main.rand.Next(2)); + char[] textToFormat = text.ToCharArray(); + for (var i = 0; i < textToFormat.Length; i++) + { + if (Main.rand.NextBool()) + textToFormat[i] = char.ToUpper(textToFormat[i]); + } + text = new string(textToFormat); + bool intense = target.life <= 0; + CombatText.NewText(Projectile.Hitbox, Color.Lerp(Color.DarkGray,Color.Gold, intense ? 0.25f: 0.1f), text, intense); + firstEnemyHit = false; + } + if (!hasSmashedTile && (Projectile.damage / (float)Projectile.originalDamage) >= 1) + { + for (int i = 0; i < 16; i++) + { + int sparkLifetime = Main.rand.Next(10, 15); + float sparkScale = Main.rand.NextFloat(1f, 2f); + var sparkColor = Main.rand.NextBool() ? Color.Purple : Color.Red; + + if (Main.rand.NextBool(5)) + sparkScale *= 1.4f; + + Vector2 sparkVelocity = Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * MathHelper.Lerp(10, 30, Main.rand.NextFloat()); + SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + + } + SoundEngine.PlaySound(SoundID.DeerclopsRubbleAttack with { Volume = 0.5f, LimitsArePerVariant = false, MaxInstances = 1 }); + } + else if (!hasSmashedTile) + { + + SoundEngine.PlaySound(SoundID.Item69 with { Volume = 1f, LimitsArePerVariant = false, MaxInstances = 1 }); + } + target.AddBuff(ModContent.BuffType(), (int)MathHelper.Lerp(60, 900, Projectile.damage / (float)Projectile.originalDamage)); + Owner.AddBuff(ModContent.BuffType(), (int)MathHelper.Lerp(60, 900, Projectile.damage / (float)Projectile.originalDamage)); + } + + public override bool PreDraw(ref Color lightColor) + { + if (!inCooldown) + { + var tex = ModContent.Request(Texture + "Glow").Value; + float outlineWidth = (int)(4 * (Projectile.damage / (float)Projectile.originalDamage)) * 0.5f; + if (inSwing) + { + outlineWidth *= 1 - SwingCompletion; + } + for (float i = 0; i <= MathHelper.TwoPi; i += MathHelper.TwoPi * 0.25f) + { + Main.spriteBatch.Draw( + tex, + Projectile.Center + new Vector2(0, Projectile.gfxOffY) + Vector2.UnitX.RotatedBy(i + Projectile.rotation) * outlineWidth * Projectile.scale - Main.screenPosition, + null, + Color.Lerp(Color.Purple,Color.Red,MathF.Sin(Main.GlobalTimeWrappedHourly * 6)* 0.5f + 0.5f), + Projectile.rotation, + tex.Size() * 0.5f, + Projectile.scale, + Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, + 0 + ); + } + } + if (inSwing) + return base.PreDraw(ref lightColor); + return true; + } + } +} diff --git a/Projectiles/Melee/Galaxia_AndromedasStride.cs b/Projectiles/Melee/Galaxia_AndromedasStride.cs index feb707f2c8..fb799c055b 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStride.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStride.cs @@ -35,6 +35,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 70; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/Galaxia_AriesWrath.cs b/Projectiles/Melee/Galaxia_AriesWrath.cs index a1b0c8100a..bf80280e05 100644 --- a/Projectiles/Melee/Galaxia_AriesWrath.cs +++ b/Projectiles/Melee/Galaxia_AriesWrath.cs @@ -37,6 +37,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 80; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/Galaxia_PhoenixsPride.cs b/Projectiles/Melee/Galaxia_PhoenixsPride.cs index 1d5953a2f1..feb887a46b 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPride.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPride.cs @@ -50,6 +50,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 74; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/Galaxia_PolarisGaze.cs b/Projectiles/Melee/Galaxia_PolarisGaze.cs index e7e4fa40cc..4ccc7f91a2 100644 --- a/Projectiles/Melee/Galaxia_PolarisGaze.cs +++ b/Projectiles/Melee/Galaxia_PolarisGaze.cs @@ -37,6 +37,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 70; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/LightspeedDashHitbox.cs b/Projectiles/Melee/LightspeedDashHitbox.cs index 198524c45c..546b3f3247 100644 --- a/Projectiles/Melee/LightspeedDashHitbox.cs +++ b/Projectiles/Melee/LightspeedDashHitbox.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - Projectile.width = 84; - Projectile.height = 64; + Projectile.width = 150; + Projectile.height = 75; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(CommonCalamitySounds.SwiftSliceSound with { Volume = CommonCalamitySounds.SwiftSliceSound.Volume * 0.33f }, Projectile.Center); var player = Main.player[Projectile.owner]; - var modPlayer = player.Calamity(); + var modPlayer = player.GetModPlayer(); // Refund 30 energy if dash hits. Can get energy from multiple enemies. modPlayer.elementalMastery += 30; diff --git a/Projectiles/Melee/LightspeedHoldout.cs b/Projectiles/Melee/LightspeedHoldout.cs index e517fe64b4..074be3fa64 100644 --- a/Projectiles/Melee/LightspeedHoldout.cs +++ b/Projectiles/Melee/LightspeedHoldout.cs @@ -74,6 +74,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.height = 94; Projectile.friendly = true; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.penetrate = -1; @@ -170,6 +171,9 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { + var player = Main.player[Projectile.owner]; + var modPlayer = player.GetModPlayer(); + Projectile.scale = 0.6f; if (!Owner.channel && DashState == 0) @@ -186,7 +190,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.altFunctionUse == 2 && Owner.Calamity().mouseRight) { // Check if the player has enough EM - if (Owner.Calamity().elementalMastery < 100) + if (modPlayer.elementalMastery < 100) { Projectile.Kill(); return; @@ -195,7 +199,7 @@ namespace CalamityMod.Projectiles.Melee DashState = 1; DashTimer = DashPrepTime; Projectile.localAI[0] = Owner.direction; - Owner.Calamity().elementalMastery = 0; // Reset EM to zero + modPlayer.elementalMastery = 0; // Reset EM to zero } } diff --git a/Projectiles/Melee/LightspeedM1Hitbox.cs b/Projectiles/Melee/LightspeedM1Hitbox.cs index cf1c27cfa3..3e27b0a648 100644 --- a/Projectiles/Melee/LightspeedM1Hitbox.cs +++ b/Projectiles/Melee/LightspeedM1Hitbox.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee { gotEnergyThisSwing = true; var player = Main.player[Projectile.owner]; - var modPlayer = player.Calamity(); + var modPlayer = player.GetModPlayer(); // +4 energy on hit modPlayer.elementalMastery += 4; diff --git a/Projectiles/Melee/LucreciaHoldout.cs b/Projectiles/Melee/LucreciaHoldout.cs index 7268276580..222b21699d 100644 --- a/Projectiles/Melee/LucreciaHoldout.cs +++ b/Projectiles/Melee/LucreciaHoldout.cs @@ -56,8 +56,7 @@ namespace CalamityMod.Projectiles.Melee public override void Spawn() { var player = Main.player[Projectile.owner]; - var modplayer = player.GetModPlayer(); - var calamityPlayer = player.Calamity(); + var lucreciaPlayer = player.GetModPlayer(); // Store the base use time from the item int baseUseTime = BaseItem.useTime; @@ -65,7 +64,7 @@ namespace CalamityMod.Projectiles.Melee if (player.altFunctionUse == 2) { // Check for energy before the projectile exists - if (calamityPlayer.darklightEnergy < 100) + if (lucreciaPlayer.darklightEnergy < 100) { Projectile.Kill(); return; @@ -87,7 +86,7 @@ namespace CalamityMod.Projectiles.Melee RotateInCooldown = 1f; Projectile.knockBack = 15f; - calamityPlayer.darklightEnergy = 0; // Remove energy for startup + lucreciaPlayer.darklightEnergy = 0; // Remove energy for startup } else { @@ -323,10 +322,10 @@ namespace CalamityMod.Projectiles.Melee gotEnergyThisSwing = true; var player = Main.player[Projectile.owner]; - var modPlayer = player.Calamity(); + var modPlayer = player.GetModPlayer(); - // +25 energy on hit - modPlayer.darklightEnergy += 25; + // +20 energy on hit + modPlayer.darklightEnergy += 20; modPlayer.darklightEnergy = Math.Min(modPlayer.darklightEnergy, Lucrecia.MaxEnergy); // On-hit cut FX diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs index 68bc6ca463..77f8da080b 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs @@ -49,6 +49,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 74; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs b/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs index 75f363454a..d2b0c7cb51 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs @@ -35,6 +35,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 70; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/MurasamaSlash.cs b/Projectiles/Melee/MurasamaSlash.cs index fea77fab78..62c19d5938 100644 --- a/Projectiles/Melee/MurasamaSlash.cs +++ b/Projectiles/Melee/MurasamaSlash.cs @@ -36,6 +36,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 6; Projectile.frameCounter = 0; diff --git a/Projectiles/Melee/OmnibladeSwing.cs b/Projectiles/Melee/OmnibladeSwing.cs index 8e9ef1d4ae..f40e864581 100644 --- a/Projectiles/Melee/OmnibladeSwing.cs +++ b/Projectiles/Melee/OmnibladeSwing.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ownerHitCheck = true; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 3; diff --git a/Projectiles/Melee/PhotonRipperProjectile.cs b/Projectiles/Melee/PhotonRipperProjectile.cs index 7df5d407e1..2208750278 100644 --- a/Projectiles/Melee/PhotonRipperProjectile.cs +++ b/Projectiles/Melee/PhotonRipperProjectile.cs @@ -36,6 +36,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ownerHitCheck = true; // No reason to ID-static the chainsaw -- multiple players can true melee simultaneously! Projectile.usesLocalNPCImmunity = true; diff --git a/Projectiles/Melee/PrismaticBreakerHoldout.cs b/Projectiles/Melee/PrismaticBreakerHoldout.cs index f9b63480d5..8fb31ba0a0 100644 --- a/Projectiles/Melee/PrismaticBreakerHoldout.cs +++ b/Projectiles/Melee/PrismaticBreakerHoldout.cs @@ -25,6 +25,12 @@ namespace CalamityMod.Projectiles.Melee public float StarTimer = 0f; public float StarFrequency = 47f; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = MeleeRangedHybridDamageClass.Instance; + } + public override void HoldoutAI() { if (Owner.CantUseHoldout()) diff --git a/Projectiles/Melee/PrismaticMagicCircle.cs b/Projectiles/Melee/PrismaticMagicCircle.cs index 108b2e440d..66d896bd66 100644 --- a/Projectiles/Melee/PrismaticMagicCircle.cs +++ b/Projectiles/Melee/PrismaticMagicCircle.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.width = Projectile.height = 512; Projectile.friendly = true; Projectile.DamageType = MeleeRangedHybridDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.tileCollide = false; Projectile.timeLeft = Lifetime; } diff --git a/Projectiles/Melee/PrismaticRay.cs b/Projectiles/Melee/PrismaticRay.cs index 9a7efa8c1a..df64d66a86 100644 --- a/Projectiles/Melee/PrismaticRay.cs +++ b/Projectiles/Melee/PrismaticRay.cs @@ -42,6 +42,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.width = Projectile.height = 36; Projectile.friendly = true; Projectile.DamageType = MeleeRangedHybridDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.timeLeft = 360; diff --git a/Projectiles/Melee/RespiteblockHoldout.cs b/Projectiles/Melee/RespiteblockHoldout.cs index 47bff0a112..14a4f95538 100644 --- a/Projectiles/Melee/RespiteblockHoldout.cs +++ b/Projectiles/Melee/RespiteblockHoldout.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ownerHitCheck = true; // No reason to ID-static the chainsaw -- multiple players can true melee simultaneously! Projectile.usesLocalNPCImmunity = true; diff --git a/Projectiles/Melee/Spears/StreamGougeProj.cs b/Projectiles/Melee/Spears/StreamGougeProj.cs index ddefad369a..86ec5b4408 100644 --- a/Projectiles/Melee/Spears/StreamGougeProj.cs +++ b/Projectiles/Melee/Spears/StreamGougeProj.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Spears Projectile.height = 40; Projectile.penetrate = -1; Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.ignoreWater = true; diff --git a/Projectiles/Melee/TerratomereHoldoutProj.cs b/Projectiles/Melee/TerratomereHoldoutProj.cs index b5ecb88747..7a8fd9c7e1 100644 --- a/Projectiles/Melee/TerratomereHoldoutProj.cs +++ b/Projectiles/Melee/TerratomereHoldoutProj.cs @@ -89,6 +89,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.timeLeft = Terratomere.SwingTime; Projectile.usesLocalNPCImmunity = true; Projectile.MaxUpdates = 2; diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs index da7aad8975..48137f78b4 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs @@ -37,6 +37,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 70; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs index 1db4fff2ff..6da96fc3f6 100644 --- a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs +++ b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs @@ -38,6 +38,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 80; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs index efdf0451fa..c73df900ed 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs @@ -38,6 +38,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 70; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs index 95223e7aa4..a0445fe39e 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs @@ -51,6 +51,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 74; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Ranged/ChickenCannonHeld.cs b/Projectiles/Ranged/ChickenCannonHeld.cs index a34cdee075..bcb02eccf2 100644 --- a/Projectiles/Ranged/ChickenCannonHeld.cs +++ b/Projectiles/Ranged/ChickenCannonHeld.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; } diff --git a/Projectiles/Ranged/ContagionBow.cs b/Projectiles/Ranged/ContagionBow.cs index e6261e8090..6717782c43 100644 --- a/Projectiles/Ranged/ContagionBow.cs +++ b/Projectiles/Ranged/ContagionBow.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; + Projectile.ContinuouslyUpdateDamageStats = true; } public override void AI() diff --git a/Projectiles/Ranged/HiveMissile.cs b/Projectiles/Ranged/HiveMissile.cs index a95485dbed..0a84bc428e 100644 --- a/Projectiles/Ranged/HiveMissile.cs +++ b/Projectiles/Ranged/HiveMissile.cs @@ -156,7 +156,7 @@ namespace CalamityMod.Projectiles.Ranged dust2.color = Main.rand.NextBool(3) ? EffectsColor : StaticEffectsColor; } var projAmount = isClusterRocket ? 3f : 2f; - if (Main.player[Projectile.owner].strongBees && Main.rand.NextBool()) + if (Main.player[Projectile.owner].strongBees) projAmount++; for (int k = 0; k < projAmount; k++) { diff --git a/Projectiles/Ranged/HiveNuke.cs b/Projectiles/Ranged/HiveNuke.cs index 42d6a91781..af0b2be614 100644 --- a/Projectiles/Ranged/HiveNuke.cs +++ b/Projectiles/Ranged/HiveNuke.cs @@ -241,7 +241,7 @@ namespace CalamityMod.Projectiles.Ranged var projAmount = isClusterRocket ? 30f : 20f; if (Main.player[Projectile.owner].strongBees) - projAmount *= 1.15f; + projAmount *= 1.25f; for (int k = 0; k < projAmount; k++) { int BEES = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 0.8f), ModContent.ProjectileType(), (int)(Projectile.damage * (isClusterRocket ? 0.03f : 0.04f)), 0f, Projectile.owner, 0f, 0f, isClusterRocket ? 2f : 1f); diff --git a/Projectiles/Ranged/KingsbaneHoldout.cs b/Projectiles/Ranged/KingsbaneHoldout.cs index 23ea0c60bb..167c78065f 100644 --- a/Projectiles/Ranged/KingsbaneHoldout.cs +++ b/Projectiles/Ranged/KingsbaneHoldout.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ignoreWater = true; Projectile.alpha = 255; } diff --git a/Projectiles/Ranged/NorfleetCannon.cs b/Projectiles/Ranged/NorfleetCannon.cs index 331e716686..d24165ad8d 100644 --- a/Projectiles/Ranged/NorfleetCannon.cs +++ b/Projectiles/Ranged/NorfleetCannon.cs @@ -45,6 +45,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.netImportant = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ContinuouslyUpdateDamageStats = true; } public override void AI() diff --git a/Projectiles/Ranged/TauCannonBeam.cs b/Projectiles/Ranged/TauCannonBeam.cs index 72ea9e7190..e4e98e00e8 100644 --- a/Projectiles/Ranged/TauCannonBeam.cs +++ b/Projectiles/Ranged/TauCannonBeam.cs @@ -46,6 +46,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.tileCollide = false; Projectile.friendly = true; Projectile.usesLocalNPCImmunity = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ContinuouslyUpdateDamageStats = true; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index 3ce8253f53..20e1a7a0df 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -73,13 +73,13 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 300); + target.AddBuff(ModContent.BuffType(), 300); target.AddBuff(ModContent.BuffType(), 150); } public override void OnHitPlayer(Player target, Player.HurtInfo info) { - target.AddBuff(ModContent.BuffType(), 300); + target.AddBuff(ModContent.BuffType(), 300); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/HypothermiaShard.cs b/Projectiles/Rogue/HypothermiaShard.cs index b62faae264..987c2786bd 100644 --- a/Projectiles/Rogue/HypothermiaShard.cs +++ b/Projectiles/Rogue/HypothermiaShard.cs @@ -59,8 +59,8 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); public override void OnKill(int timeLeft) { for (int k = 0; k < 3; k++) diff --git a/Projectiles/Rogue/LanceofDestiny.cs b/Projectiles/Rogue/LanceofDestiny.cs index 12007830d2..34bfaacbfc 100644 --- a/Projectiles/Rogue/LanceofDestiny.cs +++ b/Projectiles/Rogue/LanceofDestiny.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue { public static readonly SoundStyle Hitsound = new("CalamityMod/Sounds/NPCKilled/DevourerSegmentBreak2") { Volume = 0.6f, PitchVariance = 0.3f }; public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Projectiles/Rogue/LanceofDestiny"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofDestiny"; public bool posthit = false; public int Time = 0; public int hitsDust = 7; diff --git a/Projectiles/Rogue/PlaguenadeProj.cs b/Projectiles/Rogue/PlaguenadeProj.cs index 8dd4b9c786..6f39328766 100644 --- a/Projectiles/Rogue/PlaguenadeProj.cs +++ b/Projectiles/Rogue/PlaguenadeProj.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue Player player = Main.player[Projectile.owner]; int projAmt = Projectile.Calamity().stealthStrike ? 28 : 20; if (player.strongBees) - projAmt += Projectile.Calamity().stealthStrike ? 7 : 5; + projAmt = (int)(projAmt * 1.5f); for (int projIndex = 0; projIndex < projAmt; projIndex++) { float speedX = (float)Main.rand.Next(-35, 36) * 0.02f; diff --git a/Projectiles/Rogue/SlickCaneProjectile.cs b/Projectiles/Rogue/SlickCaneProjectile.cs index 54599b649a..a9584f036a 100644 --- a/Projectiles/Rogue/SlickCaneProjectile.cs +++ b/Projectiles/Rogue/SlickCaneProjectile.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ownerHitCheck = true; Projectile.hide = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 5; + Projectile.localNPCHitCooldown = -1; Projectile.alpha = 180; Projectile.scale = 1.25f; } @@ -64,12 +64,10 @@ namespace CalamityMod.Projectiles.Rogue public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - float f2 = Projectile.rotation - MathHelper.PiOver4 * - Math.Sign(Projectile.velocity.X) + (Projectile.spriteDirection == -1).ToInt() * MathHelper.Pi; + float spearLengthMult = 2.5f; float velocityMagnitude = 0f; - float scaleFactor = 18f; if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), - Main.player[Projectile.owner].Center, Projectile.Center + f2.ToRotationVector2() * scaleFactor, + Main.player[Projectile.owner].Center, Main.player[Projectile.owner].Center + Projectile.velocity * spearLengthMult, (TravelSpeed + 1f) * Projectile.scale, ref velocityMagnitude)) { return true; diff --git a/Projectiles/Rogue/SpearofDestinyProjectile.cs b/Projectiles/Rogue/SpearofDestinyProjectile.cs index 3a8948bad7..ceee3c72a8 100644 --- a/Projectiles/Rogue/SpearofDestinyProjectile.cs +++ b/Projectiles/Rogue/SpearofDestinyProjectile.cs @@ -11,7 +11,6 @@ namespace CalamityMod.Projectiles.Rogue public class SpearofDestinyProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofDestiny"; public static readonly SoundStyle Hitsound = new("CalamityMod/Sounds/Item/WulfrumKnifeTileHit2") { PitchVariance = 0.3f, Volume = 0.5f }; public int framesInAir = 0; diff --git a/Projectiles/Rogue/SpearofDestinyProjectile.png b/Projectiles/Rogue/SpearofDestinyProjectile.png new file mode 100644 index 0000000000..8efaf3998f Binary files /dev/null and b/Projectiles/Rogue/SpearofDestinyProjectile.png differ diff --git a/Projectiles/Rogue/SpearofDestinyStealth.cs b/Projectiles/Rogue/SpearofDestinyStealth.cs index 15bca9c5e9..25d93e1e7e 100644 --- a/Projectiles/Rogue/SpearofDestinyStealth.cs +++ b/Projectiles/Rogue/SpearofDestinyStealth.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue { public static readonly SoundStyle Hitsound = new("CalamityMod/Sounds/Item/BlazingCoreParry") { Volume = 0.7f, PitchVariance = 0.3f }; public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Projectiles/Rogue/LanceofDestiny"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofDestiny"; public bool posthit = false; public int Time = 0; public ref float Timer => ref Projectile.ai[0]; diff --git a/Projectiles/Rogue/Valaricicle.png b/Projectiles/Rogue/Valaricicle.png index d2db05e4da..3e948e73dd 100644 Binary files a/Projectiles/Rogue/Valaricicle.png and b/Projectiles/Rogue/Valaricicle.png differ diff --git a/Projectiles/Rogue/Valaricicle2.png b/Projectiles/Rogue/Valaricicle2.png index e88b3b8d3f..3cfc5330f5 100644 Binary files a/Projectiles/Rogue/Valaricicle2.png and b/Projectiles/Rogue/Valaricicle2.png differ diff --git a/Projectiles/Summon/AquasScepterRaindrop.cs b/Projectiles/Summon/AquasScepterRaindrop.cs index 4df8cfb6ad..7f91e149a1 100644 --- a/Projectiles/Summon/AquasScepterRaindrop.cs +++ b/Projectiles/Summon/AquasScepterRaindrop.cs @@ -1,4 +1,5 @@ using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon @@ -10,6 +11,7 @@ namespace CalamityMod.Projectiles.Summon { // Sets the amount of frames this minion has on its spritesheet Main.projFrames[Type] = 1; + ProjectileID.Sets.SentryShot[Type] = true; } public sealed override void SetDefaults() //If you want to change the damage of this projectile, just change the base damage of AquasScepter, the item. Note that this will affect the damage of AquasScepterTeslaAura as well, because the damage of said projectile is set as a multiple of the base damage at the bottom of AquasScepterCloud.cs diff --git a/Projectiles/Summon/AquasScepterTeslaAura.cs b/Projectiles/Summon/AquasScepterTeslaAura.cs index d82c9ac926..94ce5fc9a5 100644 --- a/Projectiles/Summon/AquasScepterTeslaAura.cs +++ b/Projectiles/Summon/AquasScepterTeslaAura.cs @@ -1,5 +1,6 @@ using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon @@ -13,6 +14,7 @@ namespace CalamityMod.Projectiles.Summon { // Sets the amount of frames this minion has on its spritesheet Main.projFrames[Type] = 5; + ProjectileID.Sets.SentryShot[Type] = true; } public sealed override void SetDefaults() //If you want to change the damage of this projectile, look near the bottom of AquasScepterCloud.cs because this projectile's damage is set in Projectile.NewProjectile as a multiple of the AquasScepterCloud damage value diff --git a/Projectiles/Summon/DazzlingStabber.cs b/Projectiles/Summon/DazzlingStabber.cs index ac5051de40..bfa59c1b17 100644 --- a/Projectiles/Summon/DazzlingStabber.cs +++ b/Projectiles/Summon/DazzlingStabber.cs @@ -130,6 +130,7 @@ namespace CalamityMod.Projectiles.Summon GeneralParticleHandler.SpawnParticle(spark); } } + justHit = false; } if (potentialTarget != null) diff --git a/Projectiles/Summon/PlaguebringerMK2.cs b/Projectiles/Summon/PlaguebringerMK2.cs index e1a38ea092..c7149d9a70 100644 --- a/Projectiles/Summon/PlaguebringerMK2.cs +++ b/Projectiles/Summon/PlaguebringerMK2.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Summon else Projectile.velocity = Projectile.SafeDirectionTo(destination) * Projectile.Distance(destination) / 36f; - int timeNeeded = (int)(MathHelper.Lerp(60f, 18f, MathHelper.Clamp(Projectile.localAI[1] / 320f, 0f, 1f)) * (player.strongBees ? 0.85f : 1f)); + int timeNeeded = (int)(MathHelper.Lerp(60f, 18f, MathHelper.Clamp(Projectile.localAI[1] / 320f, 0f, 1f)) * (player.strongBees ? 0.75f : 1f)); if (Projectile.ai[0] >= timeNeeded && Main.myPlayer == Projectile.owner) { Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, diff --git a/Projectiles/Summon/PlaguebringerSummon.cs b/Projectiles/Summon/PlaguebringerSummon.cs index ffa626a95c..66667c4cdf 100644 --- a/Projectiles/Summon/PlaguebringerSummon.cs +++ b/Projectiles/Summon/PlaguebringerSummon.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.ai[0] % 12 == 11) { int beeCount = Main.rand.Next(1, 3); - if (Owner.strongBees && Main.rand.NextBool(3)) + if (Owner.strongBees) ++beeCount; for (int i = 0; i < beeCount; i++) diff --git a/Projectiles/Summon/RustyBeaconPulse.cs b/Projectiles/Summon/RustyBeaconPulse.cs index daf22ad8c5..c8a403f834 100644 --- a/Projectiles/Summon/RustyBeaconPulse.cs +++ b/Projectiles/Summon/RustyBeaconPulse.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Weapons.Summon; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon @@ -13,6 +14,10 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public float LifetimeCompletion => 1f - Projectile.timeLeft / (float)RustyBeaconPrototype.PulseLifetime; + public override void SetStaticDefaults() + { + ProjectileID.Sets.SentryShot[Type] = true; + } public override void SetDefaults() { Projectile.width = 96; @@ -21,6 +26,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.penetrate = -1; + Projectile.DamageType = DamageClass.Summon; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 30; Projectile.timeLeft = RustyBeaconPrototype.PulseLifetime; diff --git a/Projectiles/Summon/VileFeederSummon.cs b/Projectiles/Summon/VileFeederSummon.cs index 13b0cb3416..3c7ed0682c 100644 --- a/Projectiles/Summon/VileFeederSummon.cs +++ b/Projectiles/Summon/VileFeederSummon.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Summon if (spawnDust) { - Projectile.ai[1] = -1; + Projectile.ai[2] = -1; int dustAmt = 36; for (int d = 0; d < dustAmt; d++) { @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Summon { spawnDust = true; } - int npcIndex = (int)Projectile.ai[1]; + int npcIndex = (int)Projectile.ai[2]; if (Projectile.localAI[0] >= 600000f) //tryna make it stay on there "forever" without glitching { breakAway = true; @@ -193,7 +193,7 @@ namespace CalamityMod.Projectiles.Summon //let the projectile know it is sticking and the npc it is sticking too Projectile.ai[0] = 3f; - Projectile.ai[1] = npcIndex; + Projectile.ai[2] = npcIndex; //follow the NPC Projectile.velocity = (npc.Center - Projectile.Center) * 0.75f; @@ -203,12 +203,11 @@ namespace CalamityMod.Projectiles.Summon //Count how many projectiles are attached, delete as necessary Point[] array2 = new Point[10]; int projCount = 0; - for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[projIndex]; - if (projIndex != Projectile.whoAmI && proj.active && proj.owner == Main.myPlayer && proj.type == Projectile.type && proj.ai[0] == 3f && proj.ai[1] == npcIndex) + if (p.whoAmI != Projectile.whoAmI && p.owner == Main.myPlayer && p.type == Projectile.type && p.ai[0] == 3f && p.ai[2] == npcIndex) { - array2[projCount++] = new Point(projIndex, proj.timeLeft); + array2[projCount++] = new Point(p.whoAmI, p.timeLeft); if (projCount >= array2.Length) { break; diff --git a/Projectiles/Typeless/AbaddonCrit.cs b/Projectiles/Typeless/AbaddonCrit.cs deleted file mode 100644 index d77d440a3c..0000000000 --- a/Projectiles/Typeless/AbaddonCrit.cs +++ /dev/null @@ -1,53 +0,0 @@ -using CalamityMod.Dusts; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class AbaddonCrit : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public Player Owner => Main.player[Projectile.owner]; - private static float ExplosionRadius = 300f; - - public override void SetDefaults() - { - //These shouldn't matter because its circular - Projectile.width = 300; - Projectile.height = 300; - Projectile.friendly = true; - Projectile.DamageType = AverageDamageClass.Instance; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.penetrate = -1; - Projectile.timeLeft = 2; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - } - public override void AI() - { - Player player = Main.player[Projectile.owner]; - for (int i = 0; i <= 30; i++) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 218 : ModContent.DustType(), new Vector2(5, 5).RotatedByRandom(MathHelper.ToRadians(360)) * Main.rand.NextFloat(1.1f, 2.2f), 0, default, Main.rand.NextFloat(2.8f, 3.4f)); - dust.shader = GameShaders.Armor.GetSecondaryShader(player.cFace, player); - dust.noGravity = true; - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 360); - SoundEngine.PlaySound(SoundID.Item89 with { Volume = 0.5f, PitchVariance = 0.4f }, Projectile.Center); - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox); - public override bool? CanDamage() => base.CanDamage(); - public override bool? CanCutTiles() => false; - } -} diff --git a/Projectiles/Typeless/DebuffSpreadEffect.cs b/Projectiles/Typeless/DebuffSpreadEffect.cs new file mode 100644 index 0000000000..8ab5c80f30 --- /dev/null +++ b/Projectiles/Typeless/DebuffSpreadEffect.cs @@ -0,0 +1,259 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.DataStructures; +using CalamityMod.Dusts; +using CalamityMod.Particles; +using CalamityMod.Systems.Collections; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class DebuffSpreadEffect : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Typeless"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public Player Owner => Main.player[Projectile.owner]; + public List listNPCs = new List(); + public NPC lastNPC; + public int minCooldown = 48; + public static Color startingColor = Bane.baneColor2; + public Color mainColor = Color.White; + public Color subColor = startingColor; + public Color extraColor = Color.White; + public ref float spreadCount => ref Projectile.ai[2]; + public ref float time => ref Projectile.ai[0]; + public override void SetDefaults() + { + Projectile.width = Projectile.height = 1; + Projectile.ignoreWater = true; + Projectile.timeLeft = 9000; + Projectile.tileCollide = false; + Projectile.friendly = true; + Projectile.penetrate = -1; + } + + public override void AI() + { + NPC npc = (lastNPC == null ? Main.npc[(int)Projectile.ai[1]] : lastNPC); + + if (npc != null && spreadCount != 0) + { + if (time % 9 == 0) + { + listNPCs.Add(npc.whoAmI); + Projectile.Center = npc.Center; + mainColor = Color.White; + + bool strong = npc.Calamity().apollyonEffected; + float areaOfEffect = (strong ? 1400 : 800); + int debuffTime = (strong ? 180 : 120); + int startDir = Main.rand.NextBool() ? 1 : -1; + + // Initial infliction lasts longer, hopefully reduces the power imbalance between this accessory with fast weapons vs slow weapons + npc.AddBuff(ModContent.BuffType(), debuffTime * 2); + + float distanceFromCenter = areaOfEffect; + NPC targeted = null; + // Get closest valid target + for (int index = 0; index < Main.npc.Length; index++) + { + NPC closestTarget = Main.npc[index]; + if (closestTarget.CanBeChasedBy(null, false) && closestTarget != npc && !listNPCs.Contains(closestTarget.whoAmI) && closestTarget.life > 0) + { + float extraDistance = (closestTarget.width / 2) + (closestTarget.height / 2); + if (Vector2.Distance(Projectile.Center, closestTarget.Center) < distanceFromCenter) + { + distanceFromCenter = Vector2.Distance(Projectile.Center, closestTarget.Center); + targeted = closestTarget; + } + } + } + + if (targeted != null) + { + targeted.Calamity().apollyonEffected = npc.Calamity().apollyonEffected; + targeted.Calamity().abaddonEffected = npc.Calamity().abaddonEffected; + + float bestDamage = Owner.Calamity().playerBaneDebuffDamage; + int heat = 0; + Color heatClr = Color.OrangeRed; + int sick = 0; + Color sickClr = Color.Lime; + int cold = 0; + Color coldClr = Color.RoyalBlue; + int shock = 0; + Color shockClr = Color.Gold; + int water = 0; + Color waterClr = Color.DarkTurquoise; + // Find all the debuffs on the enemy + int debuffNum = 0; + + for (int index = 0; index < npc.buffType.Length; index++) + { + int type = npc.buffType[index]; + var debuffData = BuffDatasets.DebuffDataset[type]; + + // Calculate the Bane damage to see if the debuffs can be transfered + int bDamage = Math.Max((int)(Bane.debuffData.EnemyLostRegen * bestDamage), (int)Bane.debuffData.EnemyLostRegen); + + if (CalamityBuffSets.IsDebuff[type]) + { + if (debuffData == null || debuffData.EnemyLostRegen <= bDamage) + { + debuffNum++; + float timeMult = (debuffData == null || (debuffData != null && debuffData == Bane.debuffData)) ? 1 : Utils.Remap(debuffData.EnemyLostRegen, 0, bDamage, 5, 1); + targeted.AddBuff(type, (int)(debuffTime * timeMult)); + } + if (debuffData != null) + { + if (debuffData.HeatDebuffScaling > 0) { mainColor = Color.Lerp(mainColor, heatClr, 0.65f); heat++; } + if (debuffData.SicknessDebuffScaling > 0) { mainColor = Color.Lerp(mainColor, sickClr, 0.65f); sick++; } + if (debuffData.ColdDebuffScaling > 0) { mainColor = Color.Lerp(mainColor, coldClr, 0.65f); cold++; } + if (debuffData.ElectricDebuffScaling > 0) { mainColor = Color.Lerp(mainColor, shockClr, 0.65f); shock++; } + if (debuffData.WaterDebuffScaling > 0) { mainColor = Color.Lerp(mainColor, waterClr, 0.65f); water++; } + if (new List { heat, sick, cold, shock, water }.Max() == 0) + { + mainColor = Bane.baneColor1; + } + } + } + // Edge case fixes for Shred and Demonic Flames + // Not ideal but not sure how else to do it + if (npc.Calamity().somaShredStacks > 0 && Shred.BaseDamage <= bDamage) + targeted.AddBuff(ModContent.BuffType(), debuffTime); + int demonicFlames = ModContent.GetModBuff(ModContent.BuffType()).Type; + if (npc.HasBuff(demonicFlames)) + targeted.Calamity().demonicFlamesBonusDamage = npc.Calamity().demonicFlamesBonusDamage; + } + if (debuffNum == 0) + { + KillSelf(); + return; + } + + List best = new List { heat, sick, cold, shock, water }; + int highest = best.Max(); + if (highest != 0) + { + // Ideally these lines would run in a random order, so that fire isn't prioritsed as an extra color, but I don't know how to do that! + if (heat == highest && extraColor == Color.White) { if (subColor != startingColor) { extraColor = heatClr; } else { subColor = heatClr; } } + if (sick == highest && extraColor == Color.White) { if (subColor != startingColor) { extraColor = sickClr; } else { subColor = sickClr; } } + if (cold == highest && extraColor == Color.White) { if (subColor != startingColor) { extraColor = coldClr; } else { subColor = coldClr; } } + if (shock == highest && extraColor == Color.White) { if (subColor != startingColor) { extraColor = shockClr; } else { subColor = shockClr; } } + if (water == highest && extraColor == Color.White) { if (subColor != startingColor) { extraColor = waterClr; } else { subColor = waterClr; } } + } + + VisualEffects(npc, targeted, startDir, 1 + (best.Sum() * 0.12f)); + + Projectile.ForceNetUpdate(); + targeted.ForceNetUpdate(); + lastNPC = targeted; + } + else + { + KillSelf(); + return; + } + + if (Owner.Calamity().abaddonCooldown <= 0) + Owner.Calamity().abaddonCooldown = minCooldown * 2; + spreadCount--; + } + } + else + { + KillSelf(); + return; + } + time++; + } + public void KillSelf() + { + if (Owner.Calamity().abaddonCooldown > minCooldown) + Owner.Calamity().abaddonCooldown = minCooldown; + if (Owner.Calamity().abaddonCooldown < 0) + Owner.Calamity().abaddonCooldown = 0; + Projectile.Kill(); + } + public void VisualEffects(NPC npc, NPC targeted, int startDirection, float effectPower) + { + Vector2 start = npc.Center; + Vector2 end = targeted.Center; + if (Owner.Calamity().abaddonEffectVisual) + { + // Spawn a single particle line between the first target and the new target + Vector2 lerpVel = Vector2.Lerp(start, end, 0.5f); + float scale = 0.015f; + Particle spark = new CustomSpark(lerpVel, npc.SafeDirectionTo(targeted.Center), "CalamityMod/Particles/BloomLineSoftEdge", false, 18, scale, mainColor, new Vector2(1.2f * effectPower, (Utils.Distance(start, end) * 0.038f)), true, true, shrinkSpeed: 0.25f, glowOpacity: 0.75f); + GeneralParticleHandler.SpawnParticle(spark); + + for (int g = 0; g < 7; g++) + { + int DustID = ModContent.DustType(); + Dust dust2 = Dust.NewDustDirect(targeted.Center, targeted.width, targeted.height, DustID); + dust2.scale = Main.rand.NextFloat(0.6f, 0.75f); + dust2.velocity = new Vector2(4, 4).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 0.8f); + dust2.noGravity = true; + dust2.color = Main.rand.NextBool() ? subColor : (extraColor != Color.White ? extraColor : mainColor); + } + + float distance = Vector2.Distance(targeted.Center, npc.Center); + + // This might look like a lot of dust for a thing that can happen to at few enemies in succession, but it + // does get reduced significantly based on distance and lasts only a few frames. + int averageDusts = (int)(65 * (float)Math.Pow(effectPower, 0.3f)); + int maxDusts = (int)((float)Math.Pow(Math.Max(distance, 1) / 1000, 0.65f) * averageDusts); + + Vector2 dustLineStart = start; + Vector2 dustLineEnd = end; + Vector2 currentDustPos = default; + Vector2 dustVel = start.DirectionTo(end); + int startingPoint = Main.rand.Next(0, 400 + 1); + Vector2 lastDustPos = default; + for (int i = 0; i < maxDusts; i++) + { + float sineSpeed = Utils.Remap(startingPoint, 0, 400, 1.6f, 0.7f); + float sine = (float)Math.Sin((i + startingPoint) * sineSpeed / MathHelper.Pi) * startDirection; + float endStartFade = Math.Min(Utils.GetLerpValue(maxDusts * 0.9f, maxDusts * 0.1f, i, true), Utils.GetLerpValue(maxDusts * 0.1f, maxDusts * 0.9f, i, true)); + currentDustPos = Vector2.Lerp(dustLineStart, dustLineEnd, i / (float)maxDusts) + dustVel.RotatedBy(MathHelper.PiOver2) * 6 * sine * endStartFade; + if (i == 0) + lastDustPos = currentDustPos; + + bool wildDust = Main.rand.NextBool(5); + currentDustPos = Vector2.Lerp(dustLineStart, dustLineEnd, i / (float)maxDusts) + dustVel.RotatedBy(MathHelper.PiOver2) * 55 * sine * endStartFade * effectPower; + Dust dustLinger = Dust.NewDustPerfect(currentDustPos, ModContent.DustType()); + dustLinger.position = currentDustPos; + dustLinger.velocity = currentDustPos.DirectionTo(lastDustPos) * (wildDust ? 6.5f : Main.rand.NextFloat(0.2f, 0.8f)); + dustLinger.noGravity = true; + dustLinger.scale = Main.rand.NextFloat(0.8f, 1f) * (wildDust ? 1.7f : 1.5f) * effectPower; + dustLinger.fadeIn = Main.rand.NextFloat(0.6f, 1f) * 4 * effectPower * (wildDust ? 0.35f : 1); + dustLinger.color = Color.Lerp((extraColor != Color.White ? extraColor : mainColor), subColor, Utils.GetLerpValue(0, maxDusts, i)); + if (wildDust) + dustLinger.color = !Main.rand.NextBool(4) ? subColor : (extraColor != Color.White ? extraColor : mainColor); + if (!wildDust) + { + dustLinger.noLightEmittence = true; + dustLinger.customData = new Vector2(0.8f, 3); + } + else + dustLinger.customData = new Vector2(0.6f, 1.5f); + + lastDustPos = currentDustPos; + } + } + for (int u = 0; u < 2; u++) + { + Vector2 pos = start; + if (u == 0) pos = end; + Particle spark3 = new CustomSpark(pos, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 18, u != 0 ? 0.7f : 0.55f, (u == 0 ? subColor : mainColor) * (Owner.Calamity().abaddonEffectVisual ? 1 : 0.3f), Vector2.One, true, true, glowOpacity: 0.85f); + GeneralParticleHandler.SpawnParticle(spark3); + } + } + public override bool? CanDamage() => false; + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => false; + } +} diff --git a/Projectiles/Typeless/DemonshadeRedDevil.cs b/Projectiles/Typeless/DemonshadeRedDevil.cs deleted file mode 100644 index 28a575a76d..0000000000 --- a/Projectiles/Typeless/DemonshadeRedDevil.cs +++ /dev/null @@ -1,224 +0,0 @@ -using System; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class DemonshadeRedDevil : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - public int dust = 3; - - public ref float State => ref Projectile.ai[0]; // 0 = attacking, 1 = returning, 2 = initial spawn - public ref float Timer => ref Projectile.ai[1]; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 5; - ProjectileID.Sets.MinionSacrificable[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 48; - Projectile.height = 48; - Projectile.netImportant = true; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.timeLeft = 18000; - Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.timeLeft *= 5; - } - - public override void AI() - { - bool isMinion = Projectile.type == ModContent.ProjectileType(); - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.redDevil) - { - Projectile.active = false; - return; - } - if (isMinion) - { - if (player.dead) - { - modPlayer.rDevil = false; - } - if (modPlayer.rDevil) - { - Projectile.timeLeft = 2; - } - } - - dust--; - if (dust >= 0) - { - for (int i = 0; i < 50; i++) - { - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y + 16f), Projectile.width, Projectile.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f); - Main.dust[brimDust].velocity *= 2f; - Main.dust[brimDust].scale *= 1.15f; - } - } - - Projectile.frameCounter++; - if (Projectile.frameCounter > 8) - { - Projectile.frameCounter = 0; - Projectile.frame++; - if (Projectile.frame > 4) - Projectile.frame = 0; - } - - float lights = (float)Main.rand.Next(90, 111) * 0.01f; - lights *= Main.essScale; - Lighting.AddLight(Projectile.Center, 1f * lights, 0f * lights, 0.15f * lights); - - Projectile.rotation = Projectile.velocity.X * 0.04f; - if ((double)Math.Abs(Projectile.velocity.X) > 0.2) - { - Projectile.spriteDirection = -Projectile.direction; - } - - if (State == 2f) - { - Timer++; - if (Timer > 60f) - { - Timer = 1f; - State = 0f; - Projectile.netUpdate = true; - } - return; - } - - Vector2 attackPos = Projectile.position; - float attackRange = 2000f; - bool canAttack = false; - if (player.HasMinionAttackTargetNPC) - { - NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(Projectile, false)) - { - float npcDist = Vector2.Distance(npc.Center, Projectile.Center); - if (!canAttack && npcDist < attackRange) - { - attackRange = npcDist; - attackPos = npc.Center; - canAttack = true; - } - } - } - else - { - foreach (NPC nPC2 in Main.ActiveNPCs) - { - if (nPC2.CanBeChasedBy(Projectile, false)) - { - float npcDist = Vector2.Distance(nPC2.Center, Projectile.Center); - if ((!canAttack && npcDist < attackRange) && Collision.CanHitLine(Projectile.position, Projectile.width, Projectile.height, nPC2.position, nPC2.width, nPC2.height)) - { - attackRange = npcDist; - attackPos = nPC2.Center; - canAttack = true; - } - } - } - } - - float separationAnxietyDist = canAttack ? 3000f: 2000f; - if (Vector2.Distance(player.Center, Projectile.Center) > separationAnxietyDist) - { - State = 1f; - Projectile.netUpdate = true; - } - if (canAttack && State == 0f) - { - Vector2 projDirection = attackPos - Projectile.Center; - float projDist = projDirection.Length(); - projDirection.Normalize(); - if (projDist > 200f) - { - projDirection *= 25f; - Projectile.velocity = (Projectile.velocity * 40f + projDirection) / 41f; - } - else - { - projDirection *= -9f; - Projectile.velocity = (Projectile.velocity * 40f + projDirection) / 41f; - } - } - else - { - bool isReturning = State == 1f; - float returnSpeed = isReturning ? 24f : 15f; - - Vector2 playerDirection = player.Center - Projectile.Center + new Vector2(0f, -30f); - float playerDist = playerDirection.Length(); - if (playerDist > 200f && returnSpeed < 10f) - { - returnSpeed = 18f; - } - if (playerDist < 150f && isReturning && !Collision.SolidCollision(Projectile.position, Projectile.width, Projectile.height)) - { - State = 0f; - Projectile.netUpdate = true; - } - if (playerDist > 2000f) - { - Projectile.Center = player.Center; - Projectile.netUpdate = true; - } - if (playerDist > 70f) - { - playerDirection.Normalize(); - playerDirection *= returnSpeed; - Projectile.velocity = (Projectile.velocity * 40f + playerDirection) / 41f; - } - else if (Projectile.velocity == Vector2.Zero) - { - Projectile.velocity = new Vector2(-0.2f, -0.1f); - } - } - if (Timer > 0f) - { - Timer += Main.rand.Next(1, 2 + 1); - } - if (Timer > 80f) - { - Timer = 0f; - Projectile.netUpdate = true; - } - if (State == 0f) - { - if (canAttack && Timer == 0f) - { - Timer += 1f; - if (Main.myPlayer == Projectile.owner && Collision.CanHitLine(Projectile.Center, Projectile.width, Projectile.height, attackPos, 0, 0)) - { - Vector2 velocity = Vector2.Normalize(attackPos - Projectile.Center) * 24f; - int trident = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ProjectileID.UnholyTridentFriendly, Projectile.damage, 0f, Main.myPlayer); - if (trident.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[trident].timeLeft = 300; - Main.projectile[trident].usesLocalNPCImmunity = true; - Main.projectile[trident].localNPCHitCooldown = 10; - Main.projectile[trident].DamageType = DamageClass.Generic; //typeless - } - Projectile.netUpdate = true; - } - } - } - } - - public override bool? CanDamage() => false; - } -} diff --git a/Projectiles/Typeless/DemonshadeRedDevil.png b/Projectiles/Typeless/DemonshadeRedDevil.png deleted file mode 100644 index ab63c1a2c0..0000000000 Binary files a/Projectiles/Typeless/DemonshadeRedDevil.png and /dev/null differ diff --git a/Projectiles/Typeless/SandBall.cs b/Projectiles/Typeless/SandBall.cs index 218b99706d..1e56f608aa 100644 --- a/Projectiles/Typeless/SandBall.cs +++ b/Projectiles/Typeless/SandBall.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Typeless if (Projectile.ai[2] != 1) { for (var i = 0; i < 4; i++) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedByRandom(0.75f) * Main.rand.NextFloat(0.5f,0.75f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, ai2: 1); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedByRandom(0.75f) * Main.rand.NextFloat(0.5f,0.75f), ModContent.ProjectileType(), (int)(Projectile.damage), Projectile.knockBack, Projectile.owner, ai2: 1); } } @@ -242,7 +242,7 @@ namespace CalamityMod.Projectiles.Typeless public class VolcanicSandBallGun : SandBall { public override string Texture => "CalamityMod/Projectiles/Typeless/SandBallVolcanic"; - public override int TileType => ModContent.TileType(); + public override int TileType => ModContent.TileType(); public override int ItemType => ModContent.ItemType(); public override int DustType => -1; diff --git a/Projectiles/Typeless/SkyFlareFriendly.cs b/Projectiles/Typeless/SkyFlareFriendly.cs index 58f6823a88..85f26a424f 100644 --- a/Projectiles/Typeless/SkyFlareFriendly.cs +++ b/Projectiles/Typeless/SkyFlareFriendly.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -50,6 +51,10 @@ namespace CalamityMod.Projectiles.Typeless return false; } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 300); + } public override void OnKill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item14, Projectile.position); diff --git a/Projectiles/Typeless/StratusBlackHole.cs b/Projectiles/Typeless/StratusBlackHole.cs index b803f42dfa..9e0df11dc6 100644 --- a/Projectiles/Typeless/StratusBlackHole.cs +++ b/Projectiles/Typeless/StratusBlackHole.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.Opacity = 0; + Projectile.ContinuouslyUpdateDamageStats = true; } public override void AI() diff --git a/Projectiles/Typeless/VoidofExtinctionCrit.cs b/Projectiles/Typeless/VoidofExtinctionCrit.cs deleted file mode 100644 index 9f56c8349e..0000000000 --- a/Projectiles/Typeless/VoidofExtinctionCrit.cs +++ /dev/null @@ -1,53 +0,0 @@ -using CalamityMod.Dusts; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class VoidofExtinctionCrit : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public Player Owner => Main.player[Projectile.owner]; - private static float ExplosionRadius = 300f; - - public override void SetDefaults() - { - //These shouldn't matter because its circular - Projectile.width = 300; - Projectile.height = 300; - Projectile.friendly = true; - Projectile.DamageType = AverageDamageClass.Instance; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.penetrate = -1; - Projectile.timeLeft = 2; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - } - public override void AI() - { - Player player = Main.player[Projectile.owner]; - for (int i = 0; i <= 30; i++) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 218 : ModContent.DustType(), new Vector2(5, 5).RotatedByRandom(MathHelper.ToRadians(360)) * Main.rand.NextFloat(1.1f, 2.2f), 0, default, Main.rand.NextFloat(2.8f, 3.4f)); - dust.shader = GameShaders.Armor.GetSecondaryShader(player.cFace, player); - dust.noGravity = true; - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 360); - SoundEngine.PlaySound(SoundID.Item89 with { Volume = 0.5f, PitchVariance = 0.4f }, Projectile.Center); - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox); - public override bool? CanDamage() => base.CanDamage(); - public override bool? CanCutTiles() => false; - } -} diff --git a/Systems/Collections/CalamityBuffSets.cs b/Systems/Collections/CalamityBuffSets.cs index afd3ba2ca8..48c092ed60 100644 --- a/Systems/Collections/CalamityBuffSets.cs +++ b/Systems/Collections/CalamityBuffSets.cs @@ -59,14 +59,15 @@ namespace CalamityMod.Systems.Collections /// public static bool[] IsDebuff = Factory.CreateBoolSet(BuffID.Poisoned, BuffID.Darkness, BuffID.Cursed, BuffID.OnFire, BuffID.Bleeding, BuffID.Confused, BuffID.Slow, BuffID.Weak, BuffID.Silenced, BuffID.BrokenArmor, BuffID.CursedInferno, BuffID.Frostburn, BuffID.Chilled, BuffID.Frozen, BuffID.Burning, BuffID.Suffocation, BuffID.Ichor, - BuffID.Venom, BuffID.Blackout, BuffID.Electrified, BuffID.Rabies, BuffID.Webbed, BuffID.Stoned, BuffID.Dazed, BuffID.VortexDebuff, BuffID.WitheredArmor, BuffID.WitheredWeapon, - BuffID.OgreSpit, BuffID.BetsysCurse, BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), + BuffID.Venom, BuffID.Blackout, BuffID.Electrified, BuffID.Rabies, BuffID.Webbed, BuffID.Stoned, BuffID.Dazed, BuffID.VortexDebuff, BuffID.WitheredArmor, BuffID.WitheredWeapon, BuffID.ShadowFlame, + BuffID.OgreSpit, BuffID.BetsysCurse, BuffID.Wet, BuffID.Slimed, BuffID.OnFire3, BuffID.Frostburn2, BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), - BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType()); + BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), + BuffType(), BuffType(), BuffType()); /// /// If for a buff type, then that buff is a whip tag buff on the player.
diff --git a/Systems/Mechanic/RecipeSystem.cs b/Systems/Mechanic/RecipeSystem.cs index 391f0a3aa1..9d8535f641 100644 --- a/Systems/Mechanic/RecipeSystem.cs +++ b/Systems/Mechanic/RecipeSystem.cs @@ -485,7 +485,7 @@ namespace CalamityMod.Systems // Life Crystal Recipe.Create(ItemID.LifeCrystal). - AddIngredient(ItemID.StoneBlock, 5). + AddRecipeGroup("AnyStoneBlock", 5). AddIngredient(ItemID.Ruby, 2). AddIngredient(ItemID.HealingPotion). AddTile(TileID.Anvils). @@ -1436,7 +1436,7 @@ namespace CalamityMod.Systems // Encumbering Stone r = Recipe.Create(ItemID.EncumberingStone); - r.AddIngredient(ItemID.StoneBlock, 100); + r.AddRecipeGroup("AnyStoneBlock", 100); r.AddTile(TileID.Anvils); r.Register(); } @@ -1448,13 +1448,13 @@ namespace CalamityMod.Systems // Wooden Chest weapons // Wooden Boomerang Recipe r = Recipe.Create(ItemID.WoodenBoomerang); - r.AddIngredient(ItemID.Wood, 7); + r.AddRecipeGroup("Wood", 7); r.AddTile(TileID.WorkBenches); r.Register(); // Wand of Sparking r = Recipe.Create(ItemID.WandofSparking); - r.AddIngredient(ItemID.Wood, 5); + r.AddRecipeGroup("Wood", 5); r.AddIngredient(ItemID.Torch, 3); r.AddIngredient(ItemID.FallenStar); r.AddCondition(Condition.NotRemixWorld); @@ -1599,7 +1599,7 @@ namespace CalamityMod.Systems r = Recipe.Create(ItemID.SandstorminaBottle); r.AddIngredient(ItemID.Bottle); r.AddIngredient(ItemID.Cloud, 5); - r.AddIngredient(ItemID.SandBlock, 5); + r.AddRecipeGroup("Sand", 5); r.AddIngredient(3); r.AddIngredient(ItemID.Feather, 3); r.AddTile(TileID.Anvils); diff --git a/Tiles/Crags/Tree/SpineSapling.cs b/Tiles/Crags/Tree/SpineSapling.cs index e122340eb9..aed63f0f69 100644 --- a/Tiles/Crags/Tree/SpineSapling.cs +++ b/Tiles/Crags/Tree/SpineSapling.cs @@ -10,6 +10,32 @@ namespace CalamityMod.Tiles.Crags.Tree { public class SpineSapling : ModTile { + public override void Load() + { + On_Player.TryReplantingTree += LetAxeofRegrowthReplant; + } + + private static void LetAxeofRegrowthReplant(On_Player.orig_TryReplantingTree orig, Player self, int x, int y) + { + if (Main.tile[x, y + 1].TileType == ModContent.TileType()) + { + // Destroy the Spine Tree tile above the base to give space for the Small Spine to place + WorldGen.KillTile(x, y - 1); + if (!TileObject.CanPlace(Player.tileTargetX, Player.tileTargetY, ModContent.TileType(), 0, self.direction, out var objectData)) + return; + bool placed = TileObject.Place(objectData); + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + if (placed) + { + TileObjectData.CallPostPlacementPlayerHook(Player.tileTargetX, Player.tileTargetY, ModContent.TileType(), 0, self.direction, objectData.alternate, objectData); + if (Main.netMode == NetmodeID.MultiplayerClient) + NetMessage.SendObjectPlacement(-1, Player.tileTargetX, Player.tileTargetY, objectData.type, objectData.style, objectData.alternate, objectData.random, self.direction); + } + } + else + orig(self, x, y); + } + public override void SetStaticDefaults() { Main.tileFrameImportant[Type] = true; diff --git a/Tiles/Crags/Tree/SpineTree.cs b/Tiles/Crags/Tree/SpineTree.cs index 06d6eaffc3..d58e40d647 100644 --- a/Tiles/Crags/Tree/SpineTree.cs +++ b/Tiles/Crags/Tree/SpineTree.cs @@ -171,14 +171,14 @@ namespace CalamityMod.Tiles.Crags.Tree public override void NearbyEffects(int i, int j, bool closer) { - //kill the tree tiles if there are no tiles below it - if (!Framing.GetTileSafely(i, j + 1).HasTile) + // Kill the tree tiles if there are no tiles below it or if a Sapling is below it + // The Sapling check exists for Axe of Regrowth sapling replanting + Tile belowTile = Framing.GetTileSafely(i, j + 1); + if (!belowTile.HasTile || belowTile.TileType == ModContent.TileType()) { - WorldGen.KillTile(i, j, false, false, false); + WorldGen.KillTile(i, j); if (Main.netMode == NetmodeID.MultiplayerClient) - { NetMessage.SendData(MessageID.TileManipulation, -1, -1, null, 0, i, j); - } } } diff --git a/Tiles/SunkenSea/EutrophicSand.cs b/Tiles/SunkenSea/EutrophicSand.cs index 440d1cbc81..c015c371b2 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -12,8 +12,6 @@ namespace CalamityMod.Tiles.SunkenSea { public override void SetStaticDefaults() { - TileID.Sets.GeneralPlacementTiles[Type] = false; - Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; TileID.Sets.HasSlopeFrames[Type] = true; diff --git a/Tiles/SunkenSea/Navystone.cs b/Tiles/SunkenSea/Navystone.cs index b4243dd14c..0f702a8bbc 100644 --- a/Tiles/SunkenSea/Navystone.cs +++ b/Tiles/SunkenSea/Navystone.cs @@ -11,8 +11,6 @@ namespace CalamityMod.Tiles.SunkenSea { public override void SetStaticDefaults() { - TileID.Sets.GeneralPlacementTiles[Type] = false; - Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; TileID.Sets.HasSlopeFrames[Type] = true; diff --git a/UI/DialogueDisplay/DisplayEffects/AltarText.cs b/UI/DialogueDisplay/DisplayEffects/AltarText.cs new file mode 100644 index 0000000000..e04228bf16 --- /dev/null +++ b/UI/DialogueDisplay/DisplayEffects/AltarText.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.UI.DialogueDisplay.DisplayEffects +{ + public class AltarText : DisplayEffect + { + public override bool FadeWhenTooFar => false; + + public override bool DespawnWithAttachedNPC => false; + + public override Vector2 TextOffsetFromStart(Vector2 startPos, Vector2 textSize) + { + Vector2 halfSize = textSize * 0.5f; + return startPos - halfSize + (Vector2.UnitY * (textSize.Y - 60)); + } + float OffsetDisappearTime(float time, float ratio) => MathHelper.Clamp((time - (ratio * TimeToDisappear / 2f)) / (TimeToDisappear / 2f), 0f, 1f); + + public override Vector2 DisappearPositioning(Vector2 startPos, float time, DialogueCharacterData charData) => Vector2.Lerp(startPos, startPos + (Vector2.unitXVector * 12 * charData.Scale), CalamityUtils.SineOutEasing(OffsetDisappearTime(time, charData.CompletionRatio), 1)); + + public override float DisappearOpacity(float startOpacity, float time, DialogueCharacterData charData) => 1 - CalamityUtils.SineOutEasing(OffsetDisappearTime(time, charData.CompletionRatio), 1); + + public override Vector2 DisappearScale(Vector2 startScale, float time, DialogueCharacterData charData) => Vector2.Lerp(startScale, startScale * 0.75f, CalamityUtils.ExpOutEasing(OffsetDisappearTime(time, charData.CompletionRatio), 1)); + + public override void PreDraw(SpriteBatch spriteBatch, Vector2 textStart, Vector2 textSize, int textTimer, int switchTimer) + { + if (textTimer < 0) + return; + + float Opacity = 1f; + if (textTimer < 30f) + Opacity = MathHelper.Lerp(0f, 1f, CalamityUtils.CircOutEasing(textTimer / 30f, 1)); + + if (switchTimer > 0) + Opacity *= 1 - CalamityUtils.CircOutEasing(switchTimer / 60f, 1); + + Texture2D tex = ModContent.Request("CalamityMod/Particles/SmallBloom").Value; + spriteBatch.Draw(tex, textStart + textSize * 0.5f - Main.screenPosition, null, Color.Black * 0.6f * Opacity, 0f, tex.Size() * 0.5f, new Vector2(textSize.X / 160f, textSize.Y / 120f), 0, 0); + } + } +} diff --git a/Utilities/ItemUtils.cs b/Utilities/ItemUtils.cs index 3c29818724..7ad793f3ad 100644 --- a/Utilities/ItemUtils.cs +++ b/Utilities/ItemUtils.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatBuffs; using CalamityMod.DataStructures; using CalamityMod.UI.CalamitasEnchants; using Microsoft.Xna.Framework; @@ -127,8 +128,10 @@ namespace CalamityMod public static Color ElectricDebuffColor => new(255, 245, 0); public static Color BuffColor => new(255, 105, 237); public static Color TypelessDebuffColor => new(230, 202, 250); + public static Color GodSlayerInfernoColor => new(241, 107, 250); public static Color VulnHexDebuffColor => new(196, 35, 43); public static Color MiracleBlightDebuffColor => Main.DiscoColor; + public static Color SmashedEvilDebuffColor => Color.Lerp(new Color(162, 88, 231), new Color(221, 66, 97), MathHelper.SmoothStep(0, 1, (MathF.Sin(Main.GlobalTimeWrappedHourly * 2) + 1) * 0.5f)); private static readonly Dictionary> debuffColorWeightsCache = []; @@ -136,6 +139,7 @@ namespace CalamityMod { var color = TypelessDebuffColor; + // God Slayer Inferno, Vulnerability Hex, and Miracle Blight receive special colors if (debuffId == ModContent.BuffType() || debuffId == ModContent.BuffType()) { color = Color.Lerp(VulnHexDebuffColor, FireDebuffColor, (MathF.Sin(Main.GlobalTimeWrappedHourly * 2) + 1) / 4f); @@ -144,6 +148,18 @@ namespace CalamityMod { color = MiracleBlightDebuffColor; } + else if (debuffId == ModContent.BuffType()) + { + color = GodSlayerInfernoColor; + } + else if (debuffId == ModContent.BuffType() && CalamityClientConfig.Instance.TextEffects) + { + color = SmashedEvilDebuffColor; + } + + // Color debuffs based on their element type in the vulnerability and resistance system + // If a debuff has multiple types, the colors are mixed + // If a debuff is typeless, is gets the typeless color else if (BuffDatasets.DebuffDataset[debuffId] is not null) { if (!debuffColorWeightsCache.TryGetValue(debuffId, out var weights)) @@ -180,6 +196,9 @@ namespace CalamityMod color = new Color(normalColor); } } + // If this is actually a beneficial buff, color it as so + else if (!Main.debuff[debuffId]) + color = BuffColor; return color; } diff --git a/World/DraedonStructures.cs b/World/DraedonStructures.cs index 083849c346..b4441f1453 100644 --- a/World/DraedonStructures.cs +++ b/World/DraedonStructures.cs @@ -338,35 +338,60 @@ namespace CalamityMod.World public static void PlaceSunkenSeaLab(out Point placementPoint, List workshopPoints, StructureMap structures) { + int tries = 0; string mapKey = SunkenSeaLabKey; PilePlacementMaps.TryGetValue(mapKey, out PilePlacementFunction pilePlacementFunction); SchematicMetaTile[,] schematic = TileMaps[mapKey]; int labWidth = schematic.GetLength(0); int labHeight = schematic.GetLength(1); - int sunkenSeaX = (GenVars.UndergroundDesertLocation.Left + GenVars.UndergroundDesertLocation.Right) / 2; - int sunkenSeaY = Main.maxTilesY / 2; + do + { + // Pick a location based on the Underground Desert, because the Sunken Sea is based on the Underground Desert + Rectangle ugDesert = GenVars.UndergroundDesertLocation; + int placementPositionX = -1; - int placementPositionX = sunkenSeaX < Main.maxTilesX / 2 ? sunkenSeaX - 120 : sunkenSeaX + 120; - int placementPositionY = (sunkenSeaY + (Main.maxTilesY / 4) - 25) - labHeight; + // Desperation generation: if 75% of attempts failed, start generating literally anywhere in the Sunken Sea + if (tries >= 1500) + placementPositionX = WorldGen.genRand.Next(ugDesert.Left, ugDesert.Right - labWidth); + // 50% chance to be on either the left or the right. + // If it's on the right then shove it left because all schematics are placed based on their top left corner. + else if (WorldGen.genRand.NextBool()) + placementPositionX = WorldGen.genRand.Next(ugDesert.Left - 20, ugDesert.Left + 10); + else + placementPositionX = WorldGen.genRand.Next(ugDesert.Right - 10, ugDesert.Right + 20) - labWidth; - placementPoint = new Point(placementPositionX, placementPositionY); - Vector2 schematicSize = new Vector2(schematic.GetLength(0), schematic.GetLength(1)); + int sunkenSeaY = 0; - /* - I do not think that this check needs to exist for now, no other structures exist in the sunken sea at the moment - Once other sunken sea structures are added, i will likely re-enable this and modify the generation so that it avoids protected areas again - This is just so i can have it generating in time for the patreon beta - */ + //copied the desert position code from the sunken sea's generation so the lab always generates within the sunken sea properly + for (int y = Main.maxTilesY - 200; y >= Main.worldSurface; y--) + { + if (Main.tile[placementPositionX, y].WallType == ModContent.WallType()) + { + sunkenSeaY = y - 80; //offset so it generates nicely + break; + } + } - //if (structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) - //{ - bool hasPlacedLogAndSchematic = false; - PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref hasPlacedLogAndSchematic, new Action(FillSunkenSeaLaboratoryChest)); - CalamityUtils.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 20); - //Reverted changes to center point placement; the change caused it to not center like it should, offsetting the range at which the bio lab theme plays - CalamityWorld.SunkenSeaLabCenter = placementPoint.ToWorldCoordinates() + new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)) * 8f; - //} + int placementPositionY = sunkenSeaY - labHeight; + + placementPoint = new Point(placementPositionX, placementPositionY); + Vector2 schematicSize = new Vector2(schematic.GetLength(0), schematic.GetLength(1)); + + if (structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) + { + bool hasPlacedLogAndSchematic = false; + PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref hasPlacedLogAndSchematic, new Action(FillSunkenSeaLaboratoryChest)); + CalamityUtils.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 20); + //Reverted changes to center point placement; the change caused it to not center like it should, offsetting the range at which the bio lab theme plays + CalamityWorld.SunkenSeaLabCenter = placementPoint.ToWorldCoordinates() + new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)) * 8f; + break; + } + //try again if the structure is colliding with a structure from another mod + else + tries++; + } + while (tries <= 2000); } #endregion diff --git a/World/ShimmerShrine.cs b/World/ShimmerShrine.cs index 7beb14fd6c..67220466ef 100644 --- a/World/ShimmerShrine.cs +++ b/World/ShimmerShrine.cs @@ -20,6 +20,23 @@ namespace CalamityMod.World int placementPositionY = (int)Main.worldSurface - 300; int offset = 28; + int width = schematic.GetLength(0); + int height = schematic.GetLength(1); + // If the point directly above the shimmer is blocked by something, try to move to the side a bit + if (!structures.CanPlace(new Rectangle(placementPositionX - width, placementPositionY - height, width, height))) + { + int attempts = 0; + while (attempts < 1000) + { + attempts++; + placementPositionX = Main.rand.Next((int)GenVars.shimmerPosition.X - 100, (int)GenVars.shimmerPosition.X + 100); + if (structures.CanPlace(new Rectangle(placementPositionX - width, placementPositionY - height, width, height))) + break; + } + // If still not good, just give up and place it directly above the shimmer regardless + placementPositionX = (int)GenVars.shimmerPosition.X; + } + while (!Main.tile[placementPositionX, placementPositionY].HasTile) placementPositionY++;