From f268ec77b9d11286129493855d395110fd331cf0 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 4 May 2020 19:11:27 -0400 Subject: [PATCH 1/3] Fixed double rogue crit shenanigans. --- Buffs/CalamityGlobalBuff.cs | 11 ---------- CalPlayer/CalamityPlayer.cs | 2 +- Items/CalamityGlobalItem.cs | 40 ------------------------------------- 3 files changed, 1 insertion(+), 52 deletions(-) diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index c4852c0263..d8d9834430 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -26,17 +26,6 @@ namespace CalamityMod.Buffs { player.lavaMax += 420; } - // Rogue weapons benefit from vanilla throwing crit, so don't double-increase rogue crit chance with these buffs. - /* - else if (type == BuffID.Rage) - { - player.Calamity().throwingCrit += 10; - } - else if (type == BuffID.WellFed) - { - player.Calamity().throwingCrit += 2; - } - */ else if (type >= BuffID.NebulaUpDmg1 && type <= BuffID.NebulaUpDmg3) { float nebulaDamage = 0.075f * (float)player.nebulaLevelDamage; //7.5% to 22.5% diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index ff818d43b0..fd691464e7 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -224,7 +224,7 @@ namespace CalamityMod.CalPlayer public float throwingDamage = 1f; public float throwingVelocity = 1f; - public int throwingCrit = 4; + public int throwingCrit = 0; public bool throwingAmmoCost75 = false; public bool throwingAmmoCost66 = false; public bool throwingAmmoCost50 = false; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index de3ae8848c..8f9ad88a04 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -2787,35 +2787,11 @@ Provides heat and cold protection in Death Mode"; #region Body if (item.type == ItemID.GladiatorBreastplate || item.type == ItemID.ObsidianShirt) player.Calamity().throwingCrit += 3; - else if (item.type == ItemID.PalladiumBreastplate) - player.Calamity().throwingCrit += 2; - else if (item.type == ItemID.CobaltBreastplate) - player.Calamity().throwingCrit += 3; - else if (item.type == ItemID.OrichalcumBreastplate) - player.Calamity().throwingCrit += 6; - else if (item.type == ItemID.TitaniumBreastplate) - player.Calamity().throwingCrit += 3; - else if (item.type == ItemID.HallowedPlateMail) - player.Calamity().throwingCrit += 7; - else if (item.type == ItemID.ChlorophytePlateMail) - player.Calamity().throwingCrit += 7; - else if (item.type == ItemID.Gi) - player.Calamity().throwingCrit += 5; #endregion #region Legs if (item.type == ItemID.GladiatorLeggings || item.type == ItemID.ObsidianPants) player.Calamity().throwingVelocity += 0.03f; - else if (item.type == ItemID.PalladiumLeggings) - player.Calamity().throwingCrit += 1; - else if (item.type == ItemID.MythrilGreaves) - player.Calamity().throwingCrit += 3; - else if (item.type == ItemID.AdamantiteLeggings) - player.Calamity().throwingCrit += 4; - else if (item.type == ItemID.TitaniumLeggings) - player.Calamity().throwingCrit += 3; - else if (item.type == ItemID.ChlorophyteGreaves) - player.Calamity().throwingCrit += 8; #endregion } #endregion @@ -3098,21 +3074,6 @@ Provides heat and cold protection in Death Mode"; if (item.type == ItemID.HandWarmer) modPlayer.handWarmer = true; - if ((item.type == ItemID.MoonStone && !Main.dayTime) || (item.type == ItemID.SunStone && Main.dayTime)) - { - player.Calamity().throwingCrit += 2; - } - if (item.type == ItemID.CelestialStone) - player.Calamity().throwingCrit += 2; - if (item.type == ItemID.CelestialShell) - player.Calamity().throwingCrit += 2; - if (item.type == ItemID.DestroyerEmblem) - player.Calamity().throwingCrit += 8; - if (item.type == ItemID.EyeoftheGolem) - player.Calamity().throwingCrit += 10; - if (item.type == ItemID.PutridScent) - player.Calamity().throwingCrit += 5; - // Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR if (item.prefix == PrefixID.Hard) { @@ -3158,7 +3119,6 @@ Provides heat and cold protection in Death Mode"; player.rangedCrit -= 1; player.magicCrit -= 1; player.thrownCrit -= 1; - player.Calamity().throwingCrit += item.prefix == PrefixID.Lucky ? 3 : 1; } } #endregion From 2ff2a199b4f4d28565649956addf6d714a1ac3b0 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 4 May 2020 23:40:46 -0400 Subject: [PATCH 2/3] goddamn it base 4% reset effects --- CalPlayer/CalamityPlayer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index fd691464e7..73c55c3cf8 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1245,7 +1245,7 @@ namespace CalamityMod.CalPlayer throwingDamage = 1f; throwingVelocity = 1f; - throwingCrit = 4; + throwingCrit = 0; throwingAmmoCost75 = false; throwingAmmoCost66 = false; throwingAmmoCost50 = false; @@ -1931,7 +1931,7 @@ namespace CalamityMod.CalPlayer throwingDamage = 1f; throwingVelocity = 1f; - throwingCrit = 4; + throwingCrit = 0; throwingAmmoCost75 = false; throwingAmmoCost66 = false; throwingAmmoCost50 = false; From 4e2e12d5237c910cf8f49815c6b5de607d630de4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 4 May 2020 23:50:42 -0400 Subject: [PATCH 3/3] fixed stealth again for real i swear --- CalPlayer/CalamityPlayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 73c55c3cf8..e7b5fc9ee5 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -9296,7 +9296,7 @@ namespace CalamityMod.CalPlayer bool isPickaxe = it.pick > 0; bool isAxe = it.axe > 0; bool isHammer = it.hammer > 0; - bool isPlaced = it.createTile != 0; + bool isPlaced = it.createTile != -1; bool hasNonWeaponFunction = isPickaxe || isAxe || isHammer || isPlaced; bool playerUsingWeapon = hasDamage && hasHitboxes && !hasNonWeaponFunction; if (!stealthStrikeThisFrame && player.itemAnimation == player.itemAnimationMax - 1 && playerUsingWeapon)