assaultDamageCoefficient

This commit is contained in:
tresabhi committed 2026-10-04 17:57:12 -05:00
1 parent 16637dac71
commit 474e71843d
3 files changed
+11 -13

No files matched your search

@@ -28,7 +28,7 @@ export const characteristics = {
damage: {
type: CharacteristicType.Number,
compute({ shell, environment, equalizer, script }) {
compute({ shell, environment, equalizer, script, gun }) {
let coefficient = 1;
if (environment.equalize) coefficient *= equalizer.damage;
@@ -55,6 +55,14 @@ export const characteristics = {
coefficient *= effect.bonusValues!.factor;
});
if (gun.assault_ranges && gun.assault_ranges.types.includes(shell.type)) {
const range = gun.assault_ranges.ranges.find(
({ distance }) => distance >= environment.distance,
);
if (range) coefficient *= range.factor;
}
return coefficient * shell.armor_damage;
},
},