Ammo Consumption Changes Part2

-Moves the ammo saving from the set bonus of Tarragon, Bloodflare, God Slayer, and Auric to the helmet for consistency with other calamity bonuses, and late game vanilla ones.
-Adjusts Plague Reaper, Hydrothermic, and Daedalus ammo bonuses to use non booleans so they scale properly with other bonuses of the same amount. Additionally, adjusts these sets to use common tooltips for ease of localization.
-Adds 25% ammo saving to Lunic Corps, to be on par with the sets around it (astral, hydrothermic)
This commit is contained in:
Raesh committed 2025-09-25 23:17:17 -04:00
1 parent 8a7ab5b8d2
commit 78f71bcde5
10 files changed
+60 -39

No files matched your search

+5 -6
View File
@@ -23,10 +23,8 @@ namespace CalamityMod.Items.Armor.Auric
public static float RangedDamageBoost = 0.22f;
public static int RangedCritBoost = 20;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
// Set Bonus
public static float SetBonusAmmoReduction = 0.7f;
public static float AmmoReduction = 0.7f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
public override void SetDefaults()
{
@@ -43,7 +41,7 @@ namespace CalamityMod.Items.Armor.Auric
public override void UpdateArmorSet(Player player)
{
player.setBonus = this.GetLocalization("SetBonus").Format((1f - SetBonusAmmoReduction).ToPercent());
player.setBonus = this.GetLocalizedValue("SetBonus");
var modPlayer = player.Calamity();
modPlayer.tarraSet = true;
modPlayer.tarraRanged = true;
@@ -53,7 +51,6 @@ namespace CalamityMod.Items.Armor.Auric
modPlayer.godSlayerRanged = true;
modPlayer.auricSet = true;
player.crimsonRegen = true; // Inherited from Bloodflare
modPlayer.ammoCost *= SetBonusAmmoReduction;
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
modPlayer.DeferredDashID = GodslayerArmorDash.ID;
@@ -61,6 +58,8 @@ namespace CalamityMod.Items.Armor.Auric
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= AmmoReduction;
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
}
@@ -17,11 +17,11 @@ namespace CalamityMod.Items.Armor.Bloodflare
public static readonly SoundStyle ActivationSound = new("CalamityMod/Sounds/Custom/AbilitySounds/BloodflareRangerActivation");
public static float RangedDamageBoost = 0.1f;
public static float AmmoReduction = 0.75f;
public static int RangedCritBoost = 10; // NOTE: Tooltip shares this number with damage % as they're equal
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent());
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), (1f - AmmoReduction).ToPercent());
// Set Bonus
public static float SetBonusAmmoReduction = 0.75f;
public static int SoulCooldown = CalamityUtils.SecondsToFrames(30);
public static int SoulDamage = 300;
public static int SoulAmount = 16;
@@ -45,15 +45,16 @@ namespace CalamityMod.Items.Armor.Bloodflare
public override void UpdateArmorSet(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= SetBonusAmmoReduction;
modPlayer.bloodflareSet = true;
modPlayer.bloodflareRanged = true;
player.setBonus = this.GetLocalization("SetBonus").Format(CalamityUtils.GetArmorSetBonusKey(), SoulCooldown.FramesToSeconds(), BloodBombCooldown.FramesToSeconds(), (1f - SetBonusAmmoReduction).ToPercent());
player.setBonus = this.GetLocalization("SetBonus").Format(CalamityUtils.GetArmorSetBonusKey(), SoulCooldown.FramesToSeconds(), BloodBombCooldown.FramesToSeconds());
player.crimsonRegen = true;
}
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= AmmoReduction;
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
}
+4 -3
View File
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Armor.Daedalus
public static float RangedDamageBoost = 0.13f;
public static int RangedCritBoost = 7;
// NOTE: Ammo conservation is a bool so the number is manually added in the tooltip and equip
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
public static float AmmoReduction = 0.8f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
// Set Bonus
public static int ShardDamage => CalamityUtils.ScaleWithDifficulty(30);
@@ -47,9 +47,10 @@ namespace CalamityMod.Items.Armor.Daedalus
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= AmmoReduction;
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
player.ammoCost80 = true;
}
public override void AddRecipes()
+5 -4
View File
@@ -17,11 +17,11 @@ namespace CalamityMod.Items.Armor.GodSlayer
public static float RangedDamageBoost = 0.1f;
public static int RangedCritBoost = 12;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
public static float AmmoReduction = 0.7f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
// Set Bonus
public static int ShrapnelRoundCooldown = CalamityUtils.SecondsToFrames(2.5f);
public static float SetBonusAmmoReduction = 0.7f;
public static double ShrapnelRoundDamageRatio = 1D;
public static int ShrapnelRoundDamageSoftcap = 800;
@@ -41,11 +41,10 @@ namespace CalamityMod.Items.Armor.GodSlayer
public override void UpdateArmorSet(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= SetBonusAmmoReduction;
modPlayer.godSlayer = true;
modPlayer.godSlayerRanged = true;
var hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString();
player.setBonus = this.GetLocalization("SetBonus").Format(ShrapnelRoundCooldown.FramesToSeconds(), hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds(), (1f - SetBonusAmmoReduction).ToPercent());
player.setBonus = this.GetLocalization("SetBonus").Format(ShrapnelRoundCooldown.FramesToSeconds(), hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds());
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
{
@@ -56,6 +55,8 @@ namespace CalamityMod.Items.Armor.GodSlayer
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= AmmoReduction;
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
}
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Armor.Hydrothermic
public static float RangedDamageBoost = 0.12f;
public static int RangedCritBoost = 10;
// NOTE: Ammo conservation is a bool so the number is manually added in the tooltip and equip
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
public static float AmmoReduction = 0.75f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
// Set Bonus
public static int FlareCooldown = CalamityUtils.SecondsToFrames(0.33f);
@@ -49,9 +49,10 @@ namespace CalamityMod.Items.Armor.Hydrothermic
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= AmmoReduction;
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
player.ammoCost75 = true;
}
public override void AddRecipes()
+4 -1
View File
@@ -27,7 +27,8 @@ namespace CalamityMod.Items.Armor.LunicCorps
public static readonly SoundStyle BreakSound = new("CalamityMod/Sounds/Custom/RoverDriveBreak") { Volume = 0.75f };
public static float NonArrowDamageBoost = 0.15f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(NonArrowDamageBoost.ToPercent());
public static float AmmoReduction = 0.75f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(NonArrowDamageBoost.ToPercent(), (1f - AmmoReduction).ToPercent());
// Set Bonus
public static float SetBonusJumpSpeedBoost = 1f;
@@ -94,6 +95,8 @@ namespace CalamityMod.Items.Armor.LunicCorps
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= AmmoReduction;
player.bulletDamage += NonArrowDamageBoost;
player.specialistDamage += NonArrowDamageBoost;
player.nightVision = true;
+4 -3
View File
@@ -19,8 +19,8 @@ namespace CalamityMod.Items.Armor.PlagueReaper
public static float RangedDamageBoost = 0.1f;
public static int RangedCritBoost = 8;
// NOTE: Ammo conservation is a bool so the number is manually added in the tooltip and equip
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
public static float AmmoReduction = 0.75f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
// Set Bonus
public static float SetBonusFlightTimeBoost = 0.05f;
@@ -63,9 +63,10 @@ namespace CalamityMod.Items.Armor.PlagueReaper
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= AmmoReduction;
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
player.ammoCost75 = true;
}
public override void AddRecipes()
+5 -4
View File
@@ -16,11 +16,11 @@ namespace CalamityMod.Items.Armor.Tarragon
public static float RangedDamageBoost = 0.1f;
public static int RangedCritBoost = 7;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
public static float AmmoReduction = 0.75f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost, (1f - AmmoReduction).ToPercent());
// Set Bonus
public static int OnHitEffectCooldown = CalamityUtils.SecondsToFrames(1);
public static float SetBonusAmmoReduction = 0.75f;
public static float LeafDamageRatio = 0.25f;
public static int LeafDamageSoftcap = 150;
public static float EnergyDamageRatio = 0.33f;
@@ -46,14 +46,15 @@ namespace CalamityMod.Items.Armor.Tarragon
public override void UpdateArmorSet(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= SetBonusAmmoReduction;
modPlayer.tarraSet = true;
modPlayer.tarraRanged = true;
player.setBonus = this.GetLocalization("SetBonus").Format((1f - SetBonusAmmoReduction).ToPercent());
player.setBonus = this.GetLocalizedValue("SetBonus");
}
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.ammoCost *= AmmoReduction;
player.GetDamage<RangedDamageClass>() += RangedDamageBoost;
player.GetCritChance<RangedDamageClass>() += RangedCritBoost;
}
@@ -96,7 +96,7 @@ DaedalusHeadRanged: {
Tooltip:
'''
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
20% chance to save ammo
{$Common.AmmoUseReduction@2}
'''
SetBonus: Getting hit causes you to emit a blast of crystal shards
}
@@ -239,7 +239,7 @@ HydrothermicHeadRanged: {
Tooltip:
'''
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
25% chance to save ammo
{$Common.AmmoUseReduction@2}
'''
SetBonus:
'''
@@ -301,6 +301,7 @@ LunicCorpsHelmet: {
DisplayName: Lunic Corps Helmet
Tooltip:
'''
{$Common.AmmoUseReduction@1}
Increases non-bow damage by {0}%
Improves vision and shows the location of enemies
'''
@@ -394,7 +395,7 @@ PlagueReaperMask: {
Tooltip:
'''
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
25% chance to save ammo
{$Common.AmmoUseReduction@2}
'''
SetBonus:
'''
@@ -16,10 +16,13 @@ AuricTeslaCuisses: {
AuricTeslaHeadRanged: {
DisplayName: Auric Tesla Hooded Facemask
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}"
Tooltip:
'''
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
{$Common.AmmoUseReduction@2}
'''
SetBonus:
'''
{$Common.AmmoUseReduction@0}
Ranged Tarragon, Bloodflare and God Slayer armor effects
Hold Shift to view these set bonus details and press Shift repeatedly to cycle through them
'''
@@ -219,11 +222,14 @@ BloodflareHeadMelee: {
BloodflareHeadRanged: {
DisplayName: Bloodflare Horned Helm
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamageCritChance}"
Tooltip:
'''
{$CommonItemTooltip.PercentIncreasedRangedDamageCritChance}
{$Common.AmmoUseReduction@1}
'''
SetBonus: "{$BloodflareHeadRanged.SetBonusEffect}"
SetBonusEffect:
'''
{$Common.AmmoUseReduction@3}
{0} to unleash the lost souls of polterghast to destroy your enemies
This effect has a {1} second cooldown
Ranged weapons fire bloodsplosion orbs every {2} seconds
@@ -447,11 +453,14 @@ GodSlayerHeadMelee: {
GodSlayerHeadRanged: {
DisplayName: God Slayer Helmet
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}"
Tooltip:
'''
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
{$Common.AmmoUseReduction@2}
'''
SetBonus: "{$GodSlayerHeadRanged.SetBonusEffect}"
SetBonusEffect:
'''
{$Common.AmmoUseReduction@3}
Ranged weapons fire a god killer shrapnel round every {0} seconds
{$GodSlayerChestplate.CommonSetBonus@1}
'''
@@ -670,11 +679,14 @@ TarragonHeadMelee: {
TarragonHeadRanged: {
DisplayName: Tarragon Visage
Tooltip: "{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}"
Tooltip:
'''
{$CommonItemTooltip.PercentIncreasedRangedDamage} and {$CommonItemTooltip.PercentIncreasedRangedCritChance@1}
{$Common.AmmoUseReduction@2}
'''
SetBonus: "{$TarragonHeadRanged.SetBonusEffect}"
SetBonusEffect:
'''
{$Common.AmmoUseReduction@0}
Ranged projectiles spawn homing life energy and leaves on enemy hits
{$TarragonBreastplate.CommonSetBonus}
'''