saltyhotdog / BattletechIssueTracker

Public issue tracker to communicate with modders and HBS.
MIT License
6 stars 0 forks source link

Multi-shot weapon damage not summed correctly in summary #25

Open Sheep-y opened 6 years ago

Sheep-y commented 6 years ago

Describe the problem Multi-shot weapons such as LRM and SRM does not report correct damage and instability in firepower summary in mech bay.

Provide an example of the code where the problem occurs BattleTech.StatTooltipData.SetFirepowerData, the loop adds weaponDef.Damage and weaponDef.Instability without multiplying them by number of shots.

Provide an example of your proposed solution Simply multiply the numbers by weaponDef.ShotsWhenFired.

See BattleTech.MechStatisticsRules.CalculateFirepowerStat for an example. That method is responsible for firepower meter calculation.

Provide a link to a commit in the private repo for this issue Repo request pending.

Leave any additional comments here