everything except iron and tungsten

This commit is contained in:
Altixal authored and Cameron Ewell committed 2025-07-25 10:57:43 -04:00
1 parent 8010fa7fff
commit 090b1077d8
11 files changed
+19 -212

No files matched your search

+3 -59
View File
@@ -980,64 +980,8 @@ namespace CalamityMod.Items
EditTooltipByNum(1, (line) => line.Text = EditedTooltip("Gi"));
#endregion
// Pre-Hardmode ore armor tooltip edits
#region Pre-Hardmode Ore Armor
// Copper
if (item.type == ItemID.CopperHelmet)
AddTooltip("CopperHelmet");
if (item.type == ItemID.CopperChainmail)
AddTooltip("CopperChainmail");
if (item.type == ItemID.CopperGreaves)
AddTooltip("CopperGreaves");
// Tin
if (item.type == ItemID.TinHelmet)
AddTooltip("TinHelmet");
if (item.type == ItemID.TinChainmail)
AddTooltip("TinChainmail");
if (item.type == ItemID.TinGreaves)
AddTooltip("TinGreaves");
// Iron
if (item.type == ItemID.IronHelmet || item.type == ItemID.AncientIronHelmet || item.type == ItemID.IronChainmail || item.type == ItemID.IronGreaves)
AddTooltip("IronPieces");
// Lead
if (item.type == ItemID.LeadHelmet || item.type == ItemID.LeadChainmail || item.type == ItemID.LeadGreaves)
AddTooltip("LeadPieces");
// Silver
if (item.type == ItemID.SilverHelmet)
AddTooltip("SilverHelmet");
if (item.type == ItemID.SilverChainmail)
AddTooltip("SilverChainmail");
if (item.type == ItemID.SilverGreaves)
AddTooltip("SilverGreaves");
// Tungsten
if (item.type == ItemID.TungstenHelmet)
AddTooltip("TungstenHelmet");
if (item.type == ItemID.TungstenChainmail)
AddTooltip("TungstenChainmail");
if (item.type == ItemID.TungstenGreaves)
AddTooltip("TungstenGreaves");
// Gold
if (item.type == ItemID.GoldHelmet || item.type == ItemID.AncientGoldHelmet)
AddTooltip("GoldHelmet");
if (item.type == ItemID.GoldChainmail)
AddTooltip("GoldChainmail");
if (item.type == ItemID.GoldGreaves)
AddTooltip("GoldGreaves");
// Platinum
if (item.type == ItemID.PlatinumHelmet)
AddTooltip("PlatinumHelmet");
if (item.type == ItemID.PlatinumChainmail)
AddTooltip("PlatinumChainmail");
if (item.type == ItemID.PlatinumGreaves)
AddTooltip("PlatinumGreaves");
// Pre-Hardmode armor tooltip edits
#region Pre-Hardmode Armor
// Jungle
if (item.type == ItemID.JungleHat || item.type == ItemID.AncientCobaltHelmet)
{
@@ -1065,7 +1009,7 @@ namespace CalamityMod.Items
#endregion
// Hardmode armor tooltip edits
#region Hardmode Ore Armor
#region Hardmode Armor
// Cobalt
if (item.type == ItemID.CobaltHat)
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("40", $"{CobaltArmorSetChange.MaxManaBoost + 40}"));
@@ -15,20 +15,11 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override string ArmorSetName => "Copper";
public const float HeadDamage = 0.05f;
public const float ChestCrit = 3f;
public const float LegsMoveSpeed = 0.05f;
public const float SetBonusFlatDamage = 2.0f;
public override void ApplyHeadPieceEffect(Player player) => player.GetDamage<GenericDamageClass>() += HeadDamage;
public override void ApplyBodyPieceEffect(Player player) => player.GetCritChance<GenericDamageClass>() += ChestCrit;
public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed;
public override void UpdateSetBonusText(ref string setBonusText)
{
setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}";
setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusFlatDamage.ToString("N0"))}";
}
public override void ApplyArmorSetBonus(Player player)
@@ -17,43 +17,17 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override string ArmorSetName => "Gold";
public const float HeadDamage = 0.05f;
public const float ChestDR = 0.05f;
public const float LegsMoveSpeed = 0.1f;
public const float GoldDropChanceFromEnemies = 0.02f;
public const int GoldFromBosses = 3;
public const float SetBonusCritPerGoldCoin = 0.1f; // 10 gold coins = +1% crit chance
public const float MaximumCritBonus = 7f;
public override void ApplyHeadPieceEffect(Player player) => player.GetDamage<GenericDamageClass>() += HeadDamage;
public override void ApplyBodyPieceEffect(Player player) => player.endurance += ChestDR;
public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed;
public override void UpdateSetBonusText(ref string setBonusText)
{
setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}";
setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(GoldDropChanceFromEnemies.ToPercent(), GoldFromBosses)}";
}
public override void ApplyArmorSetBonus(Player player)
{
player.Calamity().goldArmorGoldDrops = true;
float critFromGold;
// Give the crit chance from gold in inventory.
// If you have any platinum, this guarantees the max boost.
if (player.InventoryHas(ItemID.PlatinumCoin))
critFromGold = MaximumCritBonus;
else
{
// 13FEB2024: Ozzatron: this function doesn't cap at its second argument, it just stops counting if it exceeds that number
// so this can give up to 100 gold coins
int goldCoins = player.CountItem(ItemID.GoldCoin, 90);
critFromGold = Math.Min(goldCoins * SetBonusCritPerGoldCoin, MaximumCritBonus);
}
player.GetCritChance<GenericDamageClass>() += critFromGold;
}
}
}
@@ -16,16 +16,9 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override string ArmorSetName => "Iron";
public const float ArmorPieceDR = 0.03f;
public const float SetBonusDR = 0.06f;
public const int SetBonusLifeRegen = 2;
public override void ApplyHeadPieceEffect(Player player) => player.endurance += ArmorPieceDR;
public override void ApplyBodyPieceEffect(Player player) => player.endurance += ArmorPieceDR;
public override void ApplyLegPieceEffect(Player player) => player.endurance += ArmorPieceDR;
public override void UpdateSetBonusText(ref string setBonusText)
{
setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}";
@@ -13,16 +13,6 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override string ArmorSetName => "Lead";
public const float ArmorPieceDR = 0.02f;
public const float SetBonusDR = 0.04f;
public const int SetBonusLifeRegen = 1;
public override void ApplyHeadPieceEffect(Player player) => player.endurance += ArmorPieceDR;
public override void ApplyBodyPieceEffect(Player player) => player.endurance += ArmorPieceDR;
public override void ApplyLegPieceEffect(Player player) => player.endurance += ArmorPieceDR;
public override void UpdateSetBonusText(ref string setBonusText)
{
setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}";
@@ -30,8 +20,6 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override void ApplyArmorSetBonus(Player player)
{
player.endurance += SetBonusDR;
player.lifeRegen += SetBonusLifeRegen;
player.noKnockback = true;
}
}
@@ -15,34 +15,16 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override string ArmorSetName => "Platinum";
public const float HeadDamage = 0.06f;
public const float ChestCrit = 3f;
public const float LegsMoveSpeed = 0.1f;
public const float SetBonusDamagePerDefense = 0.1f; // 10 defense = +1% damage, this gets divided by 100
public const int SetBonusDefenseCap = 50;
public override void ApplyHeadPieceEffect(Player player) => player.GetDamage<GenericDamageClass>() += HeadDamage;
public override void ApplyBodyPieceEffect(Player player) => player.GetCritChance<GenericDamageClass>() += ChestCrit;
public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed;
public const float SetBonusDR = 0.1f;
public override void UpdateSetBonusText(ref string setBonusText)
{
setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}";
setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusDR.ToPercent())}";
}
public override void ApplyArmorSetBonus(Player player)
{
// 07MAY2024: Ozzatron: Platinum armor doesn't count its own defense for its set bonus
// CIT 1MAR2025: Platinum armor should not count its set bonus defense here, because it hasn't been applied yet
int defenseBesidesThisArmor = player.statDefense - (5 + 6 + 5);
if (defenseBesidesThisArmor <= 0)
return;
if (defenseBesidesThisArmor > SetBonusDefenseCap)
defenseBesidesThisArmor = SetBonusDefenseCap;
player.GetDamage<GenericDamageClass>() += (float)Math.Floor(defenseBesidesThisArmor * SetBonusDamagePerDefense) * 0.01f;
player.endurance += SetBonusDR;
}
}
}
@@ -16,29 +16,17 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override string ArmorSetName => "Silver";
public const float HeadCrit = 5f;
public const int ChestLifeRegen = 2;
public const float LegsMoveSpeed = 0.08f;
public const int SetBonusLifeRegen = 1;
public const double SetBonusMinimumDamageToHeal = 20.0;
public const int SetBonusHealTime = 120;
public const int SetBonusHealAmount = 10;
public override void ApplyHeadPieceEffect(Player player) => player.GetCritChance<GenericDamageClass>() += HeadCrit;
public override void ApplyBodyPieceEffect(Player player) => player.lifeRegen += ChestLifeRegen;
public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed;
public override void UpdateSetBonusText(ref string setBonusText)
{
setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}";
setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusHealTime.FramesToSeconds(), SetBonusMinimumDamageToHeal.ToString("N0"), SetBonusHealAmount)}";
}
public override void ApplyArmorSetBonus(Player player)
{
player.lifeRegen += SetBonusLifeRegen;
player.Calamity().silverMedkit = true;
}
+3 -12
View File
@@ -15,25 +15,16 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override string ArmorSetName => "Tin";
public const float HeadCrit = 4f;
public const int ChestLifeRegen = 1;
public const float LegsMoveSpeed = 0.05f;
public const float SetBonusArmorPen = 5.0f;
public override void ApplyHeadPieceEffect(Player player) => player.GetCritChance<GenericDamageClass>() += HeadCrit;
public override void ApplyBodyPieceEffect(Player player) => player.lifeRegen += ChestLifeRegen;
public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed;
public const float SetBonusCrit = 10f;
public override void UpdateSetBonusText(ref string setBonusText)
{
setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}";
setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusCrit.ToPercent())}";
}
public override void ApplyArmorSetBonus(Player player)
{
player.GetArmorPenetration<GenericDamageClass>() += SetBonusArmorPen;
player.GetCritChance<GenericDamageClass>() += SetBonusCrit;
}
}
}
@@ -16,18 +16,9 @@ namespace CalamityMod.Items.VanillaArmorChanges
public override string ArmorSetName => "Tungsten";
public const float HeadDamage = 0.07f;
public const int ChestLifeRegen = 1;
public const float LegsMoveSpeed = 0.08f;
public const float KnockbackMultiplier = 1.33f;
public const float MaxKnockbackCritConversion = 10f;
public override void ApplyHeadPieceEffect(Player player) => player.GetDamage<GenericDamageClass>() += HeadDamage;
public override void ApplyBodyPieceEffect(Player player) => player.lifeRegen += ChestLifeRegen;
public override void ApplyLegPieceEffect(Player player) => player.moveSpeed += LegsMoveSpeed;
public override void UpdateSetBonusText(ref string setBonusText)
{
Player player = Main.LocalPlayer;
@@ -28,7 +28,7 @@ SetBonus: {
Melee: 10% increased melee damage
}
Copper: Increases all damage by 2
Copper: Increases all damage by {0}
Crimson:
'''
Greatly increased natural life regen
@@ -65,8 +65,8 @@ SetBonus: {
'''
Gold:
'''
All enemies have a 2% chance to drop 1 gold; bosses killed drop 3 gold
You gain 1% critical strike chance for every 10 gold in your inventory, capped at 7%
All enemies have a {0}% chance to drop 1 extra gold
All bosses drop {1} extra gold
'''
Iron:
'''
@@ -74,12 +74,7 @@ SetBonus: {
+1 HP/s life regen
'''
Jungle: 10% reduced mana costs
Lead:
'''
Increases damage reduction by 4%
+0.5 HP/s life regen
Grants immunity to knockback
'''
Lead: Grants immunity to knockback
Meteor: All magic guns cost 33% mana
Mining: Mining ore will sometimes have additional yield
Molten:
@@ -125,20 +120,13 @@ SetBonus: {
Grants +2 HP/s life regeneration after striking an enemy
This life regeneration bypasses negative life regeneration
'''
PlatinumChainmail: 3% increased critical strike chance
Platinum:
'''
Every 10 extra defense gives you 1% increased damage
The 20 defense from the Platinum Armor itself does not contribute to this effect
Bonus damage caps at 50 extra defense
'''
Platinum: Increases damage reduction by {0}%
Silver:
'''
+0.5 HP/s life regen
Two seconds after getting hit for 20 or more damage, you heal for 10
{0} seconds after getting hit for {1} or more damage, you heal for {2}
Getting hit again resets the timer, delaying the heal
'''
Tin: Increases armor penetration by 5
Tin: "{0}% increased critical strike chance"
Tungsten:
'''
Increases your critical strike chance by 100% of the knockback of your held weapon
@@ -59,29 +59,6 @@ AddedTooltip: {
YoyoGlove: Secondary yoyos will do 50% less damage
DefensePrefix: +{0}% damage reduction
LuckyPrefix: +0.05 luck
/*
Armor
*/
CopperHelmet: 5% increased damage
CopperChainmail: 3% increased critical strike chance
CopperGreaves: 5% increased movement speed
TinHelmet: 3% increased critical strike chance
TinChainmail: +0.5 HP/s life regen
TinGreaves: 5% increased movement speed
IronPieces: Increases damage reduction by 3%
LeadPieces: Increases damage reduction by 2%
SilverHelmet: 5% increased critical strike chance
SilverChainmail: +1 HP/s life regen
SilverGreaves: 8% increased movement speed
TungstenHelmet: 7% increased damage
TungstenChainmail: +0.5 HP/s life regen
TungstenGreaves: 8% increased movement speed
GoldHelmet: 5% increased damage
GoldChainmail: Increases damage reduction by 5%
GoldGreaves: 10% increased movement speed
PlatinumHelmet: 6% increased damage
PlatinumChainmail: 3% increased critical strike chance
PlatinumGreaves: 10% increased movement speed
CrimsonBreastplate: +1 HP/s life regen
CrimsonOtherPieces: +0.5 HP/s life regen
Picksaw: Can mine Scoria Ore located in the Abyss