From 024ec6c3f07313b2829d7d81c31b1074efcbc289 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 3 Oct 2022 14:38:54 -0500 Subject: [PATCH 1/7] Exoblade damage -> 825 --- Items/Weapons/Melee/Exoblade.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/Exoblade.cs b/Items/Weapons/Melee/Exoblade.cs index 1bb8769eb5..6d24f15b7b 100644 --- a/Items/Weapons/Melee/Exoblade.cs +++ b/Items/Weapons/Melee/Exoblade.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 80; Item.height = 114; - Item.damage = 640; + Item.damage = 825; Item.useStyle = ItemUseStyleID.Swing; Item.useTime = BaseUseTime; Item.useAnimation = BaseUseTime; From 45cdd02c44118c2449b0bd8df7bdc0cc8c8c8127 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Mon, 3 Oct 2022 17:41:54 -0400 Subject: [PATCH 2/7] Flask tooltip improvements, added a const byte for our flasks, made brimstone flask melee dust bigger --- Buffs/CalamityGlobalBuff.cs | 4 +++- Buffs/Potions/AbyssalWeapon.cs | 4 ++-- Buffs/Potions/ArmorCrumbling.cs | 4 ++-- CalPlayer/CalamityPlayer.cs | 2 +- Items/CalamityGlobalItemTooltip.cs | 16 ++++++++-------- Items/Potions/CrumblingPotion.cs | 3 +-- Items/Potions/FlaskOfBrimstone.cs | 3 +-- Projectiles/CalamityGlobalProjectile.cs | 5 +++-- 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 6554df4349..f0608ffc31 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -8,6 +8,8 @@ namespace CalamityMod.Buffs { public class CalamityGlobalBuff : GlobalBuff { + public const byte ModdedFlaskEnchant = 99; + public override void Update(int type, Player player, ref int buffIndex) { if (type == BuffID.Archery) @@ -164,7 +166,7 @@ namespace CalamityMod.Buffs case BuffID.WeaponImbueIchor: case BuffID.WeaponImbueNanites: case BuffID.WeaponImbuePoison: - tip = "Rogue and " + tip; + tip = tip.Insert(tip.IndexOf("Melee") + 5, ", Whip, and Rogue"); break; case BuffID.WeaponImbueConfetti: diff --git a/Buffs/Potions/AbyssalWeapon.cs b/Buffs/Potions/AbyssalWeapon.cs index f2975b9768..da741f376d 100644 --- a/Buffs/Potions/AbyssalWeapon.cs +++ b/Buffs/Potions/AbyssalWeapon.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Potions public override void SetStaticDefaults() { DisplayName.SetDefault("Weapon Imbue: Brimstone"); - Description.SetDefault("Melee and Rogue attacks ignite enemies with brimstone flames"); + Description.SetDefault("Melee, Whip, and Rogue attacks ignite enemies with brimstone flames"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; @@ -22,7 +22,7 @@ namespace CalamityMod.Buffs.Potions { player.Calamity().aWeapon = true; // A very large number to indicate it's a modded Flask - player.meleeEnchant = 99; + player.meleeEnchant = CalamityGlobalBuff.ModdedFlaskEnchant; } } } diff --git a/Buffs/Potions/ArmorCrumbling.cs b/Buffs/Potions/ArmorCrumbling.cs index a43bf72c55..192d7d3f29 100644 --- a/Buffs/Potions/ArmorCrumbling.cs +++ b/Buffs/Potions/ArmorCrumbling.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Potions public override void SetStaticDefaults() { DisplayName.SetDefault("Weapon Imbue: Crumbling"); - Description.SetDefault("Melee and Rogue attacks reduce enemy damage reduction"); + Description.SetDefault("Melee, Whip, and Rogue attacks reduce enemy damage reduction"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; @@ -22,7 +22,7 @@ namespace CalamityMod.Buffs.Potions { player.Calamity().armorCrumbling = true; // A very large number to indicate it's a modded Flask - player.meleeEnchant = 99; + player.meleeEnchant = CalamityGlobalBuff.ModdedFlaskEnchant; } } } diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 44515a88d2..2da10fa0cb 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4270,7 +4270,7 @@ namespace CalamityMod.CalPlayer { if (Main.rand.NextBool(3)) { - Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType(), Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 0.75f); + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType(), Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 1f); } } if (armorCrumbling) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 54349a14a3..e9ce89075a 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -531,22 +531,22 @@ namespace CalamityMod.Items // Flasks apply to Rogue weapons #region Rogue Flask Tooltips if (item.type == ItemID.FlaskofCursedFlames) - EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks inflict enemies with cursed flames"); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue")); if (item.type == ItemID.FlaskofFire) - EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks set enemies on fire"); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue")); if (item.type == ItemID.FlaskofGold) - EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks make enemies drop more gold"); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue")); if (item.type == ItemID.FlaskofIchor) - EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks decrease enemy defense"); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue")); if (item.type == ItemID.FlaskofNanites) - EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks confuse enemies"); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue")); // party flask is unique because it affects ALL projectiles in Calamity, not just "also rogue ones" if (item.type == ItemID.FlaskofParty) - EditTooltipByNum(0, (line) => line.Text = "All attacks cause confetti to appear"); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("Melee and Whip", "All")); if (item.type == ItemID.FlaskofPoison) - EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks poison enemies"); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue")); if (item.type == ItemID.FlaskofVenom) - EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks inflict Venom on enemies"); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" and Whip", ", Whip, and Rogue")); #endregion // Rebalances to vanilla item stats diff --git a/Items/Potions/CrumblingPotion.cs b/Items/Potions/CrumblingPotion.cs index 5539c59117..1bb65b389d 100644 --- a/Items/Potions/CrumblingPotion.cs +++ b/Items/Potions/CrumblingPotion.cs @@ -12,8 +12,7 @@ namespace CalamityMod.Items.Potions { SacrificeTotal = 20; DisplayName.SetDefault("Flask of Crumbling"); - Tooltip.SetDefault("Melee and Whip attacks inflict Armor Crunch on enemies\n" + - "Rogue attacks inflict Armor Crunch on enemies"); + Tooltip.SetDefault("Melee, Whip, and Rogue attacks inflict Armor Crunch on enemies"); } public override void SetDefaults() diff --git a/Items/Potions/FlaskOfBrimstone.cs b/Items/Potions/FlaskOfBrimstone.cs index eefb63de62..69635e50d0 100644 --- a/Items/Potions/FlaskOfBrimstone.cs +++ b/Items/Potions/FlaskOfBrimstone.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.Potions { SacrificeTotal = 20; DisplayName.SetDefault("Flask of Brimstone"); - Tooltip.SetDefault("Melee and Whip attacks inflict Brimstone Flames on enemies\n" + - "Rogue attacks inflict Brimstone Flames on enemies"); + Tooltip.SetDefault("Melee, Whip, and Rogue attacks inflict Brimstone Flames on enemies"); } public override void SetDefaults() diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 1fd3609996..1b68872a36 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1,4 +1,5 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Dusts; @@ -2260,7 +2261,7 @@ namespace CalamityMod.Projectiles Main.dust[index].velocity *= 0.25f; } break; - case 99: + case CalamityGlobalBuff.ModdedFlaskEnchant: int dustType = player.Calamity().aWeapon ? ModContent.DustType() : DustID.Stone; if (Main.rand.NextBool(4)) { From 7ef920927a45fbbe6c799c887f15bff738731ea6 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Mon, 3 Oct 2022 22:56:07 -0400 Subject: [PATCH 3/7] Added a custom icon for WikiThis --- ModSupport/WeakReferenceSupport.cs | 4 +++- ModSupport/WikiThisIcon.png | Bin 0 -> 1666 bytes 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 ModSupport/WikiThisIcon.png diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index dc2188973c..68dffcd15a 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -186,7 +186,9 @@ namespace CalamityMod return; wiki.Call("AddModURL", calamity, CalamityWikiURL); - wiki.Call("0", calamity, CalamityWikiURL); + wiki.Call(0, calamity, CalamityWikiURL); + wiki.Call("AddWikiTexture", calamity, ModContent.Request("CalamityMod/ModSupport/WikiThisIcon")); + wiki.Call(3, calamity, ModContent.Request("CalamityMod/ModSupport/WikiThisIcon")); // Clear up name conflicts void ItemRedirect(int item, string pageName) diff --git a/ModSupport/WikiThisIcon.png b/ModSupport/WikiThisIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..a136c7ce798ca142be3de027ed3c59b0aace5b0d GIT binary patch literal 1666 zcmV-|27UR7P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1{X<0K~zXft(I$S z6jc<*|95t0XJ@zF?F(8UU<|Z@8i-H}Edk3zNg+gxNu`Y@5ED&|i7_Drj6`EJQQ?D$ zkN83Hkr*Lq`~V?QK2V{6ZIM=xhe#>gR!U*%b9cKlJF_#_b7z+V-9C8uOJ-;1zW#I0 zJ?GrP{{?@oOy)IJS?R}7l695s{N+Xd^y4T}`u@lmQF*WFHv0H`ch=NvD|%cWHjn-I z*GRf)l!q4P0J}k!2y1vvsmBJcjF{Yme^$C&cRjm-~`%OYG~@ zJ@g{f6!f{_b+LS>a|}}oyIJxDvFxA;v<+H_4{2Z$gG85Z7%0pM;EM%-%f&Ez?gF^o zOfD@caeS$9nn~lvV^U#l^RlfJG@qW2+Q`pRoi^PtVVFr2dgw(~spuYvV9#(6mc^lu z80gSv!sT_N{-O_(k%VqqF=yf!CKT2;FQ4m@r0+4KZe~(>aE5{lKf228!x}L$+}@9Y{w{lw=~LLTV>I$!#uYYeE0c`nF&lQosYo6>97YW21wX@MtblT-8E&H_Rh5T_TIJ<)g55rdaAOE3 zug0+HiTHqTf77@TEy&noavPJt>L^G@Da;GvvtkNsA~a|temw$o(nbE}l*i)E=q0oZ zVHiGzx(1;tQl2wm0y2ZErpiyb_*g}wjv^AwBbVB?jkQHGs0ulI+t@h*t8)nO&~$3( z`KlG%&0x@m`?W4?U!mZ`h8WI0TW*PZEsRO8K1znL4sDuAzFk$|a`rYF*AY)pK_FF8 znFL(}VT8~1Qj(KzuE)@JHG*GuHKH#(f}odKhGov#wK@yMdF~Dcd zDAg_N{KAGf6YgfTiDHkp&6BZZjx4mW`-JA)AJ3nTLMqUWp&q`vp-ONYJNAh z+Qej749o17CC0WFdmK@LxPNjbl@UowY$2kVoboh`mhK+B{j}-?nUi)L8L2ZKnZo;9 z!WQRkugr0$8&Y^_q}XGD$lV<)eR#7%#T(01v{Pjhd+)#{s%cY`AxvwMXZbtgAiBHE z3TxJ%apOR5(upbYoH7vD&|;$eG)1;}mUvK%pNdS238mdU!Z_b8YH^fY>h-uWt0)&Y zhobm48bDQ>j55mcCmZ6ZJ}aYSb{?i@D~=}^$E0a=n{kC%Ypdx|w2!GXey!SvLCwUq z8IC)o&j}0q1uL#uXN@AI=W(B(JbIL+5%w9gp-D zx&gncpdgrq2pt-|{X-b0vYC_Xqi3DQ(8&#CrB89N{7%6G3k%eJry4vKFXY_X zNFL_VL=s)qewax*Oc~pg9yTct?CQG_-`jq-=hoj*Tb`dSk-_{`bzk#0>F!B+D2s2C zTi+UCj5jR|q?TclblmxKA3Tz<$R5*{wo!4rME?&e*W`|L*AxK%0ndPmfj0bEPyhe` M07*qoM6N<$f}w~M-v9sr literal 0 HcmV?d00001 From 66191575f0e924bb52a8ae02962570a646c62c45 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Mon, 3 Oct 2022 23:16:48 -0400 Subject: [PATCH 4/7] Updated the URL for when WikiThis updates --- ModSupport/WeakReferenceSupport.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 68dffcd15a..7c2e97a523 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -121,7 +121,8 @@ namespace CalamityMod internal class WeakReferenceSupport { - public const string CalamityWikiURL = "calamitymod.wiki.gg"; + public const string CalamityWikiURLOld = "calamitymod.wiki.gg"; + public const string CalamityWikiURL = "https://calamitymod.wiki.gg/wiki/{}"; private static readonly Dictionary BossDifficulty = new Dictionary { @@ -185,8 +186,10 @@ namespace CalamityMod if (wiki is null) return; - wiki.Call("AddModURL", calamity, CalamityWikiURL); - wiki.Call(0, calamity, CalamityWikiURL); + bool oldVersion = wiki.Version < new Version(2, 4, 7, 5); + + wiki.Call("AddModURL", calamity, oldVersion ? CalamityWikiURLOld : CalamityWikiURL); + wiki.Call(0, calamity, oldVersion ? CalamityWikiURLOld : CalamityWikiURL); wiki.Call("AddWikiTexture", calamity, ModContent.Request("CalamityMod/ModSupport/WikiThisIcon")); wiki.Call(3, calamity, ModContent.Request("CalamityMod/ModSupport/WikiThisIcon")); From 8b1773ec2bfb4dd7a85ab6dac42c4f118aa6f0ed Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Tue, 4 Oct 2022 00:51:37 -0400 Subject: [PATCH 5/7] why do we set stacks to 9999 then later set some stuff to 999, also platinum coins are 2147 stack size now cuz integer overflow --- Items/CalamityGlobalItem.cs | 4 ++++ Items/CalamityGlobalItemTweaks.cs | 11 +++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 402c614e65..ac2aba6403 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -135,6 +135,10 @@ namespace CalamityMod.Items if (item.maxStack == 30 || item.maxStack == 50 || item.maxStack == 75 || item.maxStack == 99 || item.maxStack == 999) item.maxStack = 9999; + // Having more than this causes integer overflow + if (item.type == ItemID.PlatinumCoin) + item.maxStack = 2147; + // Shield of Cthulhu cannot be enchanted (it is an accessory with a damage value). // TODO -- there are better ways to do this. Just stop letting accessories be enchanted, even if they do have a damage value. if (item.type == ItemID.EoCShield) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 28fae78c60..e33fae728e 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items IItemTweak[] trueMeleeNoSpeed = Do(TrueMeleeNoSpeed); IItemTweak[] pointBlank = Do(PointBlank); IItemTweak[] autoReuse = Do(AutoReuse); - IItemTweak[] maxStack999 = Do(MaxStack(999)); + IItemTweak[] maxStack9999 = Do(MaxStack(9999)); IItemTweak[] nonConsumableBossSummon = Do(MaxStack(1), NotConsumable, UseTimeExact(10)); // Please keep this strictly alphabetical. It's the only way to keep it sane. Thanks in advance. @@ -79,8 +79,6 @@ namespace CalamityMod.Items { ItemID.BorealWoodBow, Do(PointBlank, DamageRatio(1.1f)) }, { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, { ItemID.BorealWoodSword, Do(AutoReuse, UseTurn) }, - { ItemID.BouncyBomb, maxStack999 }, - { ItemID.BouncyDynamite, maxStack999 }, { ItemID.BreakerBlade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(97)) }, { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, AxePower(150), UseTimeExact(3), TileBoostExact(+0)) }, { ItemID.CactusPickaxe, Do(PickPower(34), UseTimeExact(9)) }, @@ -175,7 +173,6 @@ namespace CalamityMod.Items { ItemID.DiamondStaff, Do(DamageExact(26)) }, { ItemID.Drax, Do(TrueMeleeNoSpeed, PickPower(200), AxePower(110), UseTimeExact(4), TileBoostExact(+1)) }, { ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageRatio(1.33f)) }, - { ItemID.Dynamite, maxStack999 }, { ItemID.EbonwoodBow, Do(PointBlank, DamageRatio(1.1f)) }, { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) }, { ItemID.EbonwoodSword, Do(AutoReuse, UseTurn) }, @@ -229,7 +226,7 @@ namespace CalamityMod.Items { ItemID.GreenPhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) }, { ItemID.GreenSolution, Do(Value(Item.buyPrice(silver: 5))) }, { ItemID.GrenadeLauncher, Do(DamageRatio(1.5f)) }, - { ItemID.GuideVoodooDoll, maxStack999 }, + { ItemID.GuideVoodooDoll, maxStack9999 }, { ItemID.Gungnir, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(92), ShootSpeedRatio(1.25f)) }, { ItemID.HallowedGreaves, Do(DefenseDelta(+2)) }, { ItemID.HallowedPlateMail, Do(DefenseDelta(+3)) }, @@ -483,8 +480,6 @@ namespace CalamityMod.Items { ItemID.Starfury, autoReuse }, { ItemID.PortableStool, Do(Value(Item.sellPrice(copper: 20))) }, // Step Stool { ItemID.StarWrath, Do(DamageRatio(0.9f), AttackSpeedExact(0.33f)) }, - { ItemID.StickyBomb, maxStack999 }, - { ItemID.StickyDynamite, maxStack999 }, { ItemID.StormTigerStaff, Do(AutoReuse, DamageExact(49), UseExact(20)) }, // Desert Tiger Staff { ItemID.StylistKilLaKillScissorsIWish, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(33)) }, { ItemID.SuspiciousLookingEye, nonConsumableBossSummon }, @@ -926,7 +921,7 @@ namespace CalamityMod.Items #region Max Stack internal class MaxStackRule : IItemTweak // max stack plus - calamity style { - internal readonly int newMaxStack = 999; + internal readonly int newMaxStack = 9999; public MaxStackRule(int stk) => newMaxStack = stk; public bool AppliesTo(Item it) => true; From a14caba5f697c33469bf1bab74bb198a23954fad Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Tue, 4 Oct 2022 19:00:05 -0400 Subject: [PATCH 6/7] PSA tweaks --- Buffs/Summon/ProfanedBabs.cs | 12 ++----- CalPlayer/CalamityPlayerMiscEffects.cs | 42 ++++++++--------------- Items/Accessories/ProfanedSoulArtifact.cs | 6 ++-- 3 files changed, 19 insertions(+), 41 deletions(-) diff --git a/Buffs/Summon/ProfanedBabs.cs b/Buffs/Summon/ProfanedBabs.cs index f702040c52..71e92fe041 100644 --- a/Buffs/Summon/ProfanedBabs.cs +++ b/Buffs/Summon/ProfanedBabs.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("The Profaned Soul"); - Description.SetDefault("The healer will heal your wounds!"); + Description.SetDefault("The Profaned Babs will fight for and defend you!"); Main.buffNoTimeDisplay[Type] = true; Main.buffNoSave[Type] = true; //Main.persistentBuff[Type] = true; @@ -34,18 +34,10 @@ namespace CalamityMod.Buffs.Summon Player player = Main.player[Main.myPlayer]; bool offense = player.Calamity().gOffense; bool defense = player.Calamity().gDefense; - if (player.Calamity().profanedCrystal && (!player.Calamity().profanedCrystalBuffs && !DownedBossSystem.downedSCal)) + if (player.Calamity().profanedCrystal && (!player.Calamity().profanedCrystalBuffs && (!DownedBossSystem.downedSCal || !DownedBossSystem.downedExoMechs))) { tip = "The Profaned Babs will accompany you!"; } - else if (offense && defense) - { - tip = "The Profaned Babs will fight for and defend you!"; - } - else if (offense || defense) - { - tip = "The " + (offense ? "Offensive" : "Defensive") + " Duo will " + (offense ? "fight for and heal you!" : "protect and heal you!"); - } } } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index d7a467c699..98b07595d9 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -976,12 +976,6 @@ namespace CalamityMod.CalPlayer Player.endurance += 0.025f + (attack ? 0.025f : 0f); } - - if (attack) - { - Player.GetDamage() += 0.1f + - (defend ? 0.05f : 0f); - } } // You always get the max minions, even during the effect of the burnout debuff @@ -3095,36 +3089,28 @@ namespace CalamityMod.CalPlayer if (Player.FindBuffIndex(ModContent.BuffType()) == -1 && !profanedCrystalBuffs) Player.AddBuff(ModContent.BuffType(), 3600, true); - bool crystal = profanedCrystal && !profanedCrystalForce; - bool summonSet = tarraSummon || bloodflareSummon || silvaSummon || dsSetBonus || omegaBlueSet || fearmongerSet; int guardianAmt = 1; if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < guardianAmt) Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -6f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, 0f); - if (crystal || Player.maxMinions >= 10) - { - gDefense = true; + gDefense = true; - if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < guardianAmt) - { - int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -3f, ModContent.ProjectileType(), 1, 1f, Main.myPlayer, 0f, 0f); - if (Main.projectile.IndexInRange(guardian)) - Main.projectile[guardian].originalDamage = 1; - } - } + if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < guardianAmt) + { + int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -3f, ModContent.ProjectileType(), 1, 1f, Main.myPlayer, 0f, 0f); + if (Main.projectile.IndexInRange(guardian)) + Main.projectile[guardian].originalDamage = 1; + } - if (crystal || summonSet) - { - gOffense = true; + gOffense = true; - if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < guardianAmt) - { - int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType(), 1, 1f, Main.myPlayer, 0f, 0f); - if (Main.projectile.IndexInRange(guardian)) - Main.projectile[guardian].originalDamage = 1; - } - } + if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < guardianAmt) + { + int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType(), 1, 1f, Main.myPlayer, 0f, 0f); + if (Main.projectile.IndexInRange(guardian)) + Main.projectile[guardian].originalDamage = 1; + } } } diff --git a/Items/Accessories/ProfanedSoulArtifact.cs b/Items/Accessories/ProfanedSoulArtifact.cs index 8cfcace48e..d5e22d1623 100644 --- a/Items/Accessories/ProfanedSoulArtifact.cs +++ b/Items/Accessories/ProfanedSoulArtifact.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Items.Accessories SacrificeTotal = 1; DisplayName.SetDefault("Profaned Soul Artifact"); Tooltip.SetDefault("Purity\n" + - "Summons a healer guardian which heals for a certain amount of health every few seconds\n" + - "Summons a defensive guardian if you have at least 10 minion slots, which boosts your movement speed and your damage resistance\n" + - "Summons an offensive guardian if you are wearing the tarragon summon set (or stronger), which boosts your summon damage and your minion slots\n" + + "Summons a healer guardian, which heals for a certain amount of health every few seconds\n" + + "Summons a defensive guardian, which boosts your movement speed and damage resistance\n" + + "Summons an offensive guardian, which boosts your minion slots\n" + "If you get hit, most of their effects will disappear for 5 seconds"); Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6)); ItemID.Sets.AnimatesAsSoul[Type] = true; From df97b5a637deba806f794028c1faa1c4354bda09 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Wed, 5 Oct 2022 14:54:33 -0400 Subject: [PATCH 7/7] Viral Sprout debuff now scales with minion count properly as intended --- NPCs/CalamityGlobalNPC.cs | 6 ++++-- Projectiles/Summon/SageNeedle.cs | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 25e56d9142..094a39c43b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -958,8 +958,10 @@ namespace CalamityMod.NPCs // Sage Poison if (sagePoisonTime > 0) { - int baseSagePoisonDoTValue = (int)(90 * sicknessDamageMult); - ApplyDPSDebuff(baseSagePoisonDoTValue, npc.Calamity().sagePoisonDamage, ref npc.lifeRegen, ref damage); + // npc.Calamity().sagePoisonDamage = 20 * (float)(Math.Pow(totalSageSpirits, 0.73D) + Math.Pow(totalSageSpirits, 1.1D)) * 0.5f + // See SageNeedle.cs for details + int baseSagePoisonDoTValue = (int)(npc.Calamity().sagePoisonDamage * sicknessDamageMult); + ApplyDPSDebuff(baseSagePoisonDoTValue, baseSagePoisonDoTValue / 5, ref npc.lifeRegen, ref damage); } // Kami Debuff from Yanmei's Knife diff --git a/Projectiles/Summon/SageNeedle.cs b/Projectiles/Summon/SageNeedle.cs index ccca8583ce..96b6aaa9e7 100644 --- a/Projectiles/Summon/SageNeedle.cs +++ b/Projectiles/Summon/SageNeedle.cs @@ -47,12 +47,12 @@ namespace CalamityMod.Projectiles.Summon // at around 344 allocated slots. float averageDamageMultiplier = (float)(Math.Pow(totalSageSpirits, 0.73D) + Math.Pow(totalSageSpirits, 1.1D)) * 0.5f; - // 1 slot provides 40 DoT. - // 2 slots provide 76 DoT. - // 3 slots provide 111 DoT. - // 4 slots provide 146 DoT. - // 5 slots provide 182 DoT. - int sagePoisonDamage = (int)(40 * averageDamageMultiplier); + // 1 slot provides 20 DoT. + // 2 slots provide 38 DoT. + // 3 slots provide 56 DoT. + // 4 slots provide 73 DoT. + // 5 slots provide 91 DoT. + int sagePoisonDamage = (int)(20 * averageDamageMultiplier); target.AddBuff(ModContent.BuffType(), 300); target.Calamity().sagePoisonDamage = sagePoisonDamage; }