Skip to content

Commit

Permalink
Merge pull request #263 from WoWs-Builder-Team/development
Browse files Browse the repository at this point in the history
Version 2.2 Update 1 (Desktop)
  • Loading branch information
floribe2000 authored Oct 14, 2023
2 parents b565ff6 + 9b84297 commit c7c73a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private static CvAircraftDataContainer ProcessCvPlane(Aircraft plane, int shipTi
break;
}

var allPlaneHpModifiers = modifiers.FindModifiers("planeHealth", true);
var allPlaneHpModifiers = modifiers.FindModifiers("planeHealthCoeff", true);
var finalPlaneHp = (int)Math.Round(allPlaneHpModifiers.Aggregate(planeHp, (current, modifier) => current * modifier), 0);

int planeHpPerTierIndex = modifiers.FindModifierIndex("planeHealthPerLevel");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ public static ManeuverabilityDataContainer FromShip(Ship ship, List<ShipUpgrade>
decimal maxSpeedModifier = modifiers.FindModifiers("speedCoef", true).Aggregate(1m, (current, modifier) => current * (decimal)modifier);
maxSpeedModifier = modifiers.FindModifiers("shipSpeedCoeff", true).Aggregate(maxSpeedModifier, (current, modifier) => current * (decimal)modifier);

var speedBoostModifier = modifiers.FindModifiers("speedBoost_boostCoeff", true).Sum(); // Speed boost is additive
var speedBoostModifier = modifiers.FindModifiers("speedBoost_boostCoeff", true).Sum();
if (speedBoostModifier != 0)
{
maxSpeedModifier *= (decimal)(1 + speedBoostModifier + modifiers.FindModifiers("boostCoeffForsage").Sum()); // needed for Halland UU
maxSpeedModifier += (decimal)(speedBoostModifier + modifiers.FindModifiers("boostCoeffForsage").Sum()); // Speed boost is additive, Halland UU bonus only applies if regular speed boost is active
}

decimal maxDiveSpeedModifier = modifiers.FindModifiers("maxBuoyancySpeedCoeff", true).Aggregate(1m, (current, modifier) => current * (decimal)modifier);
Expand Down
7 changes: 4 additions & 3 deletions WoWsShipBuilder.Common/wwwroot/scripts/ChartsHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export function ChangeSuggestedMax(chartId, newSuggestedMax)
export function CreateChart(chartId, title, xLabel, yLabel, xUnit, yUnit)
{
const ctx = document.getElementById(chartId);
const fixColor = (color, value) => Chart.helpers.color(color).opaquer(1).rgbString();
const chart = new Chart(ctx,
{
type: 'line',
Expand Down Expand Up @@ -338,10 +339,10 @@ export function CreateChart(chartId, title, xLabel, yLabel, xUnit, yUnit)
{
mode: 'dataset',
customize(context) {
const index = context.datasetIndex;
const colors = context.colors;
return {
background: GetColor(index),
border: GetColor(index)
background: fixColor(colors.background, 0.5),
border: fixColor(colors.border, 0.5),
};
}
}
Expand Down

0 comments on commit c7c73a5

Please sign in to comment.