mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-12 20:26:10 +01:00
applySpallLiner
This commit is contained in:
1 parent
1a19cff268
commit
16637dac71
10 files changed
+133
-36
No files matched your search
@@ -33,10 +33,28 @@ export const characteristics = {
|
||||
|
||||
if (environment.equalize) coefficient *= equalizer.damage;
|
||||
|
||||
// tungsten shells
|
||||
script("protagonist", "TungstenTip", (effect) => {
|
||||
coefficient *= (effect.minDamageFactor + effect.maxDamageFactor) / 2;
|
||||
});
|
||||
|
||||
// reactive armor
|
||||
script("antagonist", "ShieldKit", (effect) => {
|
||||
if (shell.type === ShellType.SHELL_TYPE_HE) return;
|
||||
coefficient *= 1 - effect.shieldCoef;
|
||||
});
|
||||
|
||||
// dynamic armour system
|
||||
script("antagonist", "ArmorMover", (effect) => {
|
||||
coefficient *= 1 - effect.bonusValues!.damageReductionPercent / 100;
|
||||
});
|
||||
|
||||
// spall liner
|
||||
script("antagonist", "AntiHighExplosive", (effect) => {
|
||||
if (shell.type !== ShellType.SHELL_TYPE_HE) return;
|
||||
coefficient *= effect.bonusValues!.factor;
|
||||
});
|
||||
|
||||
return coefficient * shell.armor_damage;
|
||||
},
|
||||
},
|
||||
@@ -46,19 +64,11 @@ export const characteristics = {
|
||||
compute({ shell, script }) {
|
||||
let coefficient = 1;
|
||||
|
||||
// tungsten shells
|
||||
script("protagonist", "TungstenTip", (effect) => {
|
||||
coefficient *= (effect.minDamageFactor + effect.maxDamageFactor) / 2;
|
||||
});
|
||||
|
||||
script("antagonist", "ShieldKit", (effect) => {
|
||||
if (shell.type === ShellType.SHELL_TYPE_HE) return;
|
||||
coefficient *= 1 - effect.shieldCoef;
|
||||
});
|
||||
|
||||
script("antagonist", "ArmorMover", (effect) => {
|
||||
coefficient *= 1 - effect.bonusValues!.damageReductionPercent / 100;
|
||||
});
|
||||
|
||||
return coefficient * shell.module_damage;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user