Skip to content
Permalink
Browse files

Genetech Cost Multiplier Fix

Application Changes:

- Fixed an issue where the GenetechCostMultiplier improvement would not work properly. Part of #3741.
  • Loading branch information...
Gabriel Rath
Gabriel Rath committed Jul 8, 2019
1 parent 39425ce commit 813d17ca79a0273d4a7d41b3965704c1889a86a9
Showing with 15 additions and 0 deletions.
  1. +14 −0 Chummer/Backend/Equipment/Cyberware.cs
  2. +1 −0 Chummer/changelog.txt
@@ -3080,6 +3080,20 @@ private decimal TotalCostWithoutModifiers
if (DiscountCost)
decReturn *= 0.9m;

// Genetech Cost multiplier.
if (SourceType == Improvement.ImprovementSource.Bioware &&
(Category.StartsWith("Genetech") || Category.StartsWith("Genetic Infusions") || Category.StartsWith("Genemods")) &&
ImprovementManager.ValueOf(_objCharacter, Improvement.ImprovementType.GenetechCostMultiplier) != 0)
{
decimal decMultiplier = 1.0m;
foreach (Improvement objImprovement in _objCharacter.Improvements)
{
if (objImprovement.ImproveType == Improvement.ImprovementType.GenetechCostMultiplier && objImprovement.Enabled)
decMultiplier -= (1.0m - (Convert.ToDecimal(objImprovement.Value, GlobalOptions.InvariantCultureInfo) / 100.0m));
}
decReturn *= decMultiplier;
}

// Add in the cost of all child components.
foreach (Cyberware objChild in Children)
{
@@ -8,6 +8,7 @@ Application Fixes:
- Changing priorities or metatypes in Create mode will no longer reset all points and karma put into attributes.
- Fixed a bug where special attributes would not update properly with changes to the Special priority category.
- Fixed a UI issue where tooltips to improve attributes or skills that are at their maximum rating would show the regular improvement tooltip with a karma cost of -1 instead of a message saying that the item is at its maximum. Closes #3664.
- Fixed an issue where the GenetechCostMultiplier improvement would not work properly. Part of #3741.

Data Changes:

0 comments on commit 813d17c

Please sign in to comment.
You can’t perform that action at this time.