diff --git a/src/app/tools/compare/page.tsx b/src/app/tools/compare/page.tsx index 8fac4e87f..19ced8231 100644 --- a/src/app/tools/compare/page.tsx +++ b/src/app/tools/compare/page.tsx @@ -98,7 +98,7 @@ export default function Page() { stockGun: thisMember.tank.turrets[0].guns[0], stockTrack: thisMember.tank.tracks[0], stockTurret: thisMember.tank.turrets[0], - applyReactive: members.some( + applyReactiveArmor: members.some( (member) => member.key !== thisMember.key && member.consumables.includes(33), diff --git a/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx b/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx index 02b3dc4cc..8cb663fa9 100644 --- a/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx +++ b/src/app/tools/tankopedia/[id]/components/Characteristics/index.tsx @@ -49,7 +49,7 @@ export function Characteristics() { ? total + awaitedProvisionDefinitions[provision].crew! / 100 : total, 0, - ) + (hasImprovedVentilation ? 0.05 : 0); + ) + (hasImprovedVentilation ? 0.08 : 0); const commanderMastery = crewMastery + provisionCrewBonus; const crewMemberMastery = commanderMastery * 1.1; const consumables = useDuel((state) => state.protagonist!.consumables); @@ -85,7 +85,7 @@ export function Characteristics() { stockGun, stockTrack, stockTurret, - applyReactive: false, + applyReactiveArmor: false, applyDynamicArmor: false, applySpallLiner: false, }, @@ -101,11 +101,17 @@ export function Characteristics() { const hasImprovedVerticalStabilizer = useEquipment(122); const penetrationCoefficient = coefficient([ hasCalibratedShells, - isExplosive(shell.type) ? 0.1 : 0.05, + shell.type === 'ap' + ? 0.08 + : shell.type === 'ap_cr' + ? 0.05 + : shell.type === 'hc' + ? 0.13 + : 0.8, ]); const penetrationLossOverDistanceCoefficient = coefficient([ hasSupercharger, - -0.5, + -0.6, ]); useEffect(() => { diff --git a/src/components/Armor/components/CoreArmorSceneComponent/index.tsx b/src/components/Armor/components/CoreArmorSceneComponent/index.tsx index 5a2bb0aa2..97041bbae 100644 --- a/src/components/Armor/components/CoreArmorSceneComponent/index.tsx +++ b/src/components/Armor/components/CoreArmorSceneComponent/index.tsx @@ -91,7 +91,7 @@ export function CoreArmorSceneComponent({ equipment, ); material.uniforms.thickness.value = hasEnhancedArmor - ? thickness * 1.04 + ? thickness * 1.03 : thickness; } async function handleAntagonistEquipmentChange(equipment: EquipmentMatrix) { @@ -106,7 +106,14 @@ export function CoreArmorSceneComponent({ ); material.uniforms.penetration.value = hasCalibratedShells - ? penetration * (isExplosive(duel.antagonist!.shell.type) ? 1.1 : 1.05) + ? penetration * + (duel.antagonist!.shell.type === 'ap' + ? 0.08 + : duel.antagonist!.shell.type === 'ap_cr' + ? 0.05 + : duel.antagonist!.shell.type === 'hc' + ? 0.13 + : 0.8) : penetration; } diff --git a/src/components/Armor/components/SpacedArmorSceneComponent/components/SpacedArmorSubExternal/index.tsx b/src/components/Armor/components/SpacedArmorSceneComponent/components/SpacedArmorSubExternal/index.tsx index a800cde43..93dcad4f1 100644 --- a/src/components/Armor/components/SpacedArmorSceneComponent/components/SpacedArmorSubExternal/index.tsx +++ b/src/components/Armor/components/SpacedArmorSceneComponent/components/SpacedArmorSubExternal/index.tsx @@ -7,7 +7,6 @@ import { ShaderMaterial, } from 'three'; import { ArmorUserData, ExternalModuleVariant } from '../..'; -import { isExplosive } from '../../../../../../core/blitz/isExplosive'; import { resolveNearPenetration } from '../../../../../../core/blitz/resolveNearPenetration'; import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment'; import { jsxTree } from '../../../../../../core/blitzkit/jsxTree'; @@ -62,7 +61,7 @@ export function SpacedArmorSubExternal({ equipment, ); material.uniforms.thickness.value = hasEnhancedArmor - ? thickness * 1.04 + ? thickness * 1.03 : thickness; } async function handleAntagonistEquipmentChange(equipment: EquipmentMatrix) { @@ -76,7 +75,14 @@ export function SpacedArmorSubExternal({ equipment, ); material.uniforms.penetration.value = hasCalibratedShells - ? penetration * (isExplosive(duel.antagonist!.shell.type) ? 1.1 : 1.05) + ? penetration * + (duel.antagonist!.shell.type === 'ap' + ? 0.08 + : duel.antagonist!.shell.type === 'ap_cr' + ? 0.05 + : duel.antagonist!.shell.type === 'hc' + ? 0.13 + : 0.8) : penetration; } diff --git a/src/components/Armor/components/SpacedArmorSceneComponent/components/SpacedArmorSubSpaced/index.tsx b/src/components/Armor/components/SpacedArmorSceneComponent/components/SpacedArmorSubSpaced/index.tsx index 8fe3b7ed6..45e738c5a 100644 --- a/src/components/Armor/components/SpacedArmorSceneComponent/components/SpacedArmorSubSpaced/index.tsx +++ b/src/components/Armor/components/SpacedArmorSceneComponent/components/SpacedArmorSubSpaced/index.tsx @@ -7,7 +7,6 @@ import { } from 'three'; import { degToRad } from 'three/src/math/MathUtils'; import { ArmorUserData } from '../..'; -import { isExplosive } from '../../../../../../core/blitz/isExplosive'; import { resolveNearPenetration } from '../../../../../../core/blitz/resolveNearPenetration'; import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment'; import { jsxTree } from '../../../../../../core/blitzkit/jsxTree'; @@ -69,7 +68,7 @@ export function SpacedArmorSubSpaced({ equipment, ); material.uniforms.thickness.value = hasEnhancedArmor - ? thickness * 1.04 + ? thickness * 1.03 : thickness; } async function handleAntagonistEquipmentChange(equipment: EquipmentMatrix) { @@ -82,7 +81,14 @@ export function SpacedArmorSubSpaced({ equipment, ); material.uniforms.penetration.value = hasCalibratedShells - ? penetration * (isExplosive(shell.type) ? 1.1 : 1.05) + ? penetration * + (duel.antagonist!.shell.type === 'ap' + ? 0.08 + : duel.antagonist!.shell.type === 'ap_cr' + ? 0.05 + : duel.antagonist!.shell.type === 'hc' + ? 0.13 + : 0.8) : penetration; } diff --git a/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx b/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx index ef76591d2..b0c3569e5 100644 --- a/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx +++ b/src/components/Armor/components/SpacedArmorSceneComponent/index.tsx @@ -105,16 +105,20 @@ export function SpacedArmorSceneComponent({ duel.protagonist!.tank.equipment, duel.protagonist!.equipmentMatrix, ); - const thicknessCoefficient = hasEnhancedArmor ? 1.04 : 1; + const thicknessCoefficient = hasEnhancedArmor ? 1.03 : 1; const shell = useDuel.getState().antagonist!.shell; const explosive = isExplosive(shell.type); const splashing = canSplash(shell.type); const penetration = resolveNearPenetration(shell.penetration) * (hasCalibratedShells - ? isExplosive(shell.type) - ? 1.1 - : 1.05 + ? duel.antagonist!.shell.type === 'ap' + ? 0.08 + : duel.antagonist!.shell.type === 'ap_cr' + ? 0.05 + : duel.antagonist!.shell.type === 'hc' + ? 0.13 + : 0.8 : 1); const shot: Shot = { layers: [], diff --git a/src/components/ConsumablesManager.tsx b/src/components/ConsumablesManager.tsx index e3bfc3b92..6daa17159 100644 --- a/src/components/ConsumablesManager.tsx +++ b/src/components/ConsumablesManager.tsx @@ -46,7 +46,7 @@ export function ConsumablesManager({ cooldown={ timers ? consumable.cooldown * - (hasConsumableDeliverySystem ? 0.85 : 1) * + (hasConsumableDeliverySystem ? 0.88 : 1) * (1 - cooldownBooster! * 0.1) : undefined } diff --git a/src/core/blitz/applyPitchYawLimits.ts b/src/core/blitz/applyPitchYawLimits.ts index 79ff5413d..f51cef659 100644 --- a/src/core/blitz/applyPitchYawLimits.ts +++ b/src/core/blitz/applyPitchYawLimits.ts @@ -19,9 +19,10 @@ export function applyPitchYawLimits( ); } - const pitchBuff = verticalStabilizer ? degToRad(3) : 0; - let lowerPitch = -degToRad(pitchLimits.max) - pitchBuff; - let upperPitch = -degToRad(pitchLimits.min) + pitchBuff; + const depressionBuff = verticalStabilizer ? degToRad(4) : 0; + const elevationBuff = verticalStabilizer ? degToRad(3) : 0; + let lowerPitch = -degToRad(pitchLimits.max) - depressionBuff; + let upperPitch = -degToRad(pitchLimits.min) + elevationBuff; const transition = degToRad(pitchLimits.transition ?? 10); if (pitchLimits.back) { diff --git a/src/core/blitzkit/tankCharacteristics.ts b/src/core/blitzkit/tankCharacteristics.ts index 053624088..428c1960e 100644 --- a/src/core/blitzkit/tankCharacteristics.ts +++ b/src/core/blitzkit/tankCharacteristics.ts @@ -1,5 +1,4 @@ import { EquipmentMatrix } from '../../stores/duel'; -import { isExplosive } from '../blitz/isExplosive'; import { resolveNearPenetration } from '../blitz/resolveNearPenetration'; import { coefficient } from './coefficient'; import { degressiveStat } from './degressiveStat'; @@ -38,7 +37,7 @@ export function tankCharacteristics( stockTrack, stockTurret, stockGun, - applyReactive, + applyReactiveArmor, applyDynamicArmor, applySpallLiner, }: { @@ -58,7 +57,7 @@ export function tankCharacteristics( provisions: number[]; crewSkills: Record; camouflage: boolean; - applyReactive: boolean; + applyReactiveArmor: boolean; applyDynamicArmor: boolean; applySpallLiner: boolean; }, @@ -94,7 +93,7 @@ export function tankCharacteristics( return provisions.includes(id); } - const hasRammer = equipment(100); + const hasGunRammer = equipment(100); const hasImprovedVentilation = equipment(102); const hasCalibratedShells = equipment(103); const hasEnhancedGunLayingDrive = equipment(104); @@ -115,6 +114,7 @@ export function tankCharacteristics( const hasEnginePowerBoost = consumable(14); const hasImprovedEnginePowerBoost = consumable(27); const hasReticleCalibration = consumable(28); + const hasReducedEnginePowerBoost = consumable(80); const hasStandardFuel = provision(18); const hasImprovedFuel = provision(19); @@ -133,7 +133,7 @@ export function tankCharacteristics( ? total + provisionDefinitions[provision].crew! / 100 : total, 0, - ) + (hasImprovedVentilation ? 0.05 : 0); + ) + (hasImprovedVentilation ? 0.08 : 0); const commanderMastery = crewMastery + provisionCrewBonus; const crewMemberMastery = commanderMastery * 1.1; @@ -141,42 +141,48 @@ export function tankCharacteristics( const damageCoefficient = coefficient([hasTungsten, 0.15]) * coefficient( - [applyReactive, -0.2], + [applyReactiveArmor, -0.27], [applyDynamicArmor, -0.1], [applySpallLiner && shell.type === 'he', -0.2], ); const reloadCoefficient = - (coefficient([hasRammer, -0.07]) * + (coefficient([hasGunRammer, -0.05]) * coefficient([true, degressiveStat(crewMemberMastery)])) / - coefficient([hasAdrenaline && gun.type === 'regular', 0.2]); + coefficient([hasAdrenaline && gun.type === 'regular', 0.17]); const penetrationCoefficient = coefficient([ hasCalibratedShells, - isExplosive(shell.type) ? 0.1 : 0.05, + shell.type === 'ap' + ? 0.08 + : shell.type === 'ap_cr' + ? 0.05 + : shell.type === 'hc' + ? 0.13 + : 0.8, ]); const healthCoefficient = coefficient( [hasSandbagArmor, 0.03], [hasEnhancedSandbagArmor, 0.06], - [hasImprovedAssembly, 0.06], + [hasImprovedAssembly, 0.04], ); const shellVelocityCoefficient = coefficient( - [hasSupercharger, 0.3], + [hasSupercharger, 0.35], [hasImprovedGunPowder, 0.3], ); const penetrationLossOverDistanceCoefficient = coefficient([ hasSupercharger, - -0.5, + -0.6, ]); const aimTimeCoefficient = coefficient( - [hasEnhancedGunLayingDrive, -0.1], - [hasReticleCalibration, -0.4], + [hasEnhancedGunLayingDrive, -0.15], + [hasReticleCalibration, -0.3], ) * coefficient([true, degressiveStat(crewMemberMastery)]); const dispersionStillCoefficient = - coefficient([hasRefinedGun, -0.1], [hasReticleCalibration, -0.4]) * + coefficient([hasRefinedGun, -0.15], [hasReticleCalibration, -0.3]) * coefficient([true, degressiveStat(crewMemberMastery)]); const dispersionDamagedCoefficient = coefficient([ hasVerticalStabilizer, - -0.15, + -0.12, ]); const dispersionHullTraverseCoefficient = coefficient( [hasVerticalStabilizer, -0.15], @@ -196,17 +202,12 @@ export function tankCharacteristics( ); const enginePowerCoefficient = coefficient( [ - hasEngineAccelerator && - (tank.class === 'lightTank' || tank.class === 'mediumTank'), - 0.05, - ], - [ - hasEngineAccelerator && - (tank.class === 'heavyTank' || tank.class === 'AT-SPG'), - 0.07, + hasEngineAccelerator, + tank.class === 'heavyTank' || tank.class === 'AT-SPG' ? 0.05 : 0.04, ], + [hasReducedEnginePowerBoost, 0.1], [hasEnginePowerBoost, 0.2], - [hasImprovedEnginePowerBoost, 0.4], + [hasImprovedEnginePowerBoost, 0.35], [hasStandardFuel, 0.03], [hasImprovedFuel, 0.1], [hasGearOil, 0.03], @@ -217,32 +218,50 @@ export function tankCharacteristics( coefficient([true, progressiveStat(crewMemberMastery)]); const hullTraverseCoefficient = coefficient( - [hasImprovedControl, 0.1], - [hasImprovedEnginePowerBoost, 0.05], + [hasImprovedControl, 0.11], + [hasImprovedEnginePowerBoost, 0.01], [true, crewSkills.virtuoso / 100], ) * coefficient([true, progressiveStat(crewMemberMastery)]); - const resistanceCoefficient = coefficient([hasImprovedSuspension, -0.25]); + const resistanceHardCoefficient = coefficient([hasImprovedSuspension, -0.2]); + const resistanceMediumCoefficient = coefficient([ + hasImprovedSuspension, + -0.15, + ]); + const resistanceSoftCoefficient = coefficient([hasImprovedSuspension, -0.3]); const viewRangeCoefficient = coefficient([ hasImprovedOptics, - tank.class === 'AT-SPG' ? 0.05 : tank.class === 'heavyTank' ? 0.07 : 0.1, + tank.class === 'heavyTank' + ? 0.06 + : tank.class === 'mediumTank' + ? 0.08 + : tank.class === 'lightTank' + ? 0.11 + : 0.04, ]) * coefficient([true, progressiveStat(commanderMastery)]); const fireChanceCoefficient = coefficient([hasProtectiveKit, -0.2]); const speedForwardsSum = sum( - [hasImprovedEnginePowerBoost, 5], + [hasImprovedEnginePowerBoost, 4], [hasGearOil, 2], [hasImprovedGearOil, 4], ); const speedBackwardsSum = sum( - [hasImprovedEnginePowerBoost, 10], + [hasImprovedEnginePowerBoost, 8], [hasGearOil, 2], [hasImprovedGearOil, 4], ); const camouflageSumMoving = sum( [ hasCamouflageNet, - tank.class === 'heavyTank' ? 0.03 : tank.class === 'AT-SPG' ? 0.07 : 0.05, + + tank.class === 'heavyTank' + ? 0.02 + : tank.class === 'mediumTank' + ? 0.04 + : tank.class === 'lightTank' + ? 0.07 + : 0.1, ], [ camouflage, @@ -252,12 +271,13 @@ export function tankCharacteristics( const camouflageSumStill = sum( [ hasCamouflageNet, - 2 * - (tank.class === 'heavyTank' - ? 0.03 - : tank.class === 'AT-SPG' - ? 0.07 - : 0.05), + tank.class === 'heavyTank' + ? 0.04 + : tank.class === 'mediumTank' + ? 0.08 + : tank.class === 'lightTank' + ? 0.14 + : 0.2, ], [ camouflage, @@ -362,7 +382,7 @@ export function tankCharacteristics( const gunDepression = gunModelDefinition.pitch.max + gunDefaultPitch + - (hasImprovedVerticalStabilizer ? 3 : 0); + (hasImprovedVerticalStabilizer ? 4 : 0); const gunElevation = -gunModelDefinition.pitch.min - gunDefaultPitch + @@ -385,35 +405,37 @@ export function tankCharacteristics( const powerToWeightRatioHardTerrain = resolvedEnginePower / weightTons / - (track.resistance.hard * resistanceCoefficient); + (track.resistance.hard * resistanceHardCoefficient); const powerToWeightRatioMediumTerrain = resolvedEnginePower / weightTons / - (track.resistance.medium * resistanceCoefficient); + (track.resistance.medium * resistanceMediumCoefficient); const powerToWeightRatioSoftTerrain = resolvedEnginePower / weightTons / - (track.resistance.soft * resistanceCoefficient); + (track.resistance.soft * resistanceSoftCoefficient); const weight = weightTons; const turretTraverseSpeed = turret.traverseSpeed * turretTraverseCoefficient; const hullTraverseHardTerrain = (resolvedEnginePower / stockEngine.power) * track.traverseSpeed * hullTraverseCoefficient * - (track.resistance.hard / (track.resistance.hard * resistanceCoefficient)) * + (track.resistance.hard / + (track.resistance.hard * resistanceHardCoefficient)) * (stockWeight / weightKg); const hullTraverseMediumTerrain = (resolvedEnginePower / stockEngine.power) * track.traverseSpeed * hullTraverseCoefficient * (track.resistance.hard / - (track.resistance.medium * resistanceCoefficient)) * + (track.resistance.medium * resistanceMediumCoefficient)) * (stockWeight / weightKg); const hullTraverseSoftTerrain = (resolvedEnginePower / stockEngine.power) * track.traverseSpeed * hullTraverseCoefficient * - (track.resistance.hard / (track.resistance.soft * resistanceCoefficient)) * + (track.resistance.hard / + (track.resistance.soft * resistanceSoftCoefficient)) * (stockWeight / weightKg); const health = (tank.health + turret.health) * healthCoefficient; const fireChance = engine.fireChance * fireChanceCoefficient;