Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions source/Features/OverrideStatTooltips/Stats/DurabilityStat.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BattleTech;
using BattleTech;
using Localize;
using MechEngineer.Features.ArmorStructureChanges;
using MechEngineer.Features.OverrideStatTooltips.Helper;
Expand All @@ -13,13 +13,12 @@ public void SetupTooltip(StatTooltipData tooltipData, MechDef mechDef)
{
var value = mechDef.MechDefAssignedArmor;
value *= ArmorMultiplier(mechDef);
value *= DamageReductionMultiplierAll(mechDef);
tooltipData.dataList.Add("<u>" + Strings.T("Armor") + "</u>", $"{value}");
}

{
var value = DamageReductionMultiplierAll(mechDef);
tooltipData.dataList.Add("<u>" + Strings.T("Damage Reduction") + "</u>", Strings.T("{0} %", value));
var reduction = 1 - DamageReductionMultiplierAll(mechDef);
tooltipData.dataList.Add("<u>" + Strings.T("Damage Reduction") + "</u>", Strings.T("{0:P0}", reduction));
/*
<float>("DamageReductionMultiplierAll", 1f);
<float>("DamageReductionMultiplierMelee", 1f);
Expand Down Expand Up @@ -69,7 +68,7 @@ public float BarValue(MechDef mechDef)
{
var armor = mechDef.MechDefAssignedArmor;
armor *= ArmorMultiplier(mechDef);
armor *= DamageReductionMultiplierAll(mechDef);
armor /= DamageReductionMultiplierAll(mechDef);

var stats = UnityGameInstance.BattleTechGame.MechStatisticsConstants;
return MechStatUtils.NormalizeToFraction(armor, 0, stats.MaxArmorFactor);
Expand Down