mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
fix: multiplicative camouflage
This commit is contained in:
1 parent
94b8cfefcf
commit
17439bf559
1 file changed
+7
-8
@@ -246,10 +246,9 @@ export function tankCharacteristics(
|
|||||||
[hasGearOil, 2],
|
[hasGearOil, 2],
|
||||||
[hasImprovedGearOil, 4],
|
[hasImprovedGearOil, 4],
|
||||||
);
|
);
|
||||||
const camouflageSumMoving = sum(
|
const camouflageCoefficientMoving = coefficient(
|
||||||
[
|
[
|
||||||
hasCamouflageNet,
|
hasCamouflageNet,
|
||||||
|
|
||||||
tank.class === 'heavyTank'
|
tank.class === 'heavyTank'
|
||||||
? 0.02
|
? 0.02
|
||||||
: tank.class === 'mediumTank'
|
: tank.class === 'mediumTank'
|
||||||
@@ -263,7 +262,7 @@ export function tankCharacteristics(
|
|||||||
tank.class === 'AT-SPG' ? 0.04 : tank.class === 'heavyTank' ? 0.03 : 0.02,
|
tank.class === 'AT-SPG' ? 0.04 : tank.class === 'heavyTank' ? 0.03 : 0.02,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
const camouflageSumStill = sum(
|
const camouflageCoefficientStill = coefficient(
|
||||||
[
|
[
|
||||||
hasCamouflageNet,
|
hasCamouflageNet,
|
||||||
tank.class === 'heavyTank'
|
tank.class === 'heavyTank'
|
||||||
@@ -435,14 +434,14 @@ export function tankCharacteristics(
|
|||||||
const health = (tank.health + turret.health) * healthCoefficient;
|
const health = (tank.health + turret.health) * healthCoefficient;
|
||||||
const fireChance = engine.fireChance * fireChanceCoefficient;
|
const fireChance = engine.fireChance * fireChanceCoefficient;
|
||||||
const viewRange = turret.viewRange * viewRangeCoefficient;
|
const viewRange = turret.viewRange * viewRangeCoefficient;
|
||||||
const camouflageStill = tank.camouflage.still + camouflageSumStill;
|
const camouflageStill = tank.camouflage.still * camouflageCoefficientStill;
|
||||||
const camouflageMoving = tank.camouflage.moving + camouflageSumMoving;
|
const camouflageMoving = tank.camouflage.moving * camouflageCoefficientMoving;
|
||||||
const camouflageShootingStill =
|
const camouflageShootingStill =
|
||||||
tank.camouflage.still * gun.camouflageLoss + camouflageSumStill;
|
tank.camouflage.still * gun.camouflageLoss * camouflageCoefficientStill;
|
||||||
const camouflageShootingMoving =
|
const camouflageShootingMoving =
|
||||||
tank.camouflage.moving * gun.camouflageLoss + camouflageSumMoving;
|
tank.camouflage.moving * gun.camouflageLoss * camouflageCoefficientMoving;
|
||||||
const camouflageCaughtOnFire =
|
const camouflageCaughtOnFire =
|
||||||
tank.camouflage.onFire * tank.camouflage.still + camouflageSumStill;
|
tank.camouflage.onFire * tank.camouflage.still * camouflageCoefficientStill;
|
||||||
const width = size[2];
|
const width = size[2];
|
||||||
const height = size[0];
|
const height = size[0];
|
||||||
const length = size[1];
|
const length = size[1];
|
||||||
|
|||||||
Reference in new issue
Block a user