mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: more progress
This commit is contained in:
1 parent
a3653b1c1f
commit
a2bf592eaf
1 file changed
+15
-2
@@ -238,7 +238,9 @@ export function SpacedArmorSceneComponent({
|
||||
}
|
||||
}
|
||||
|
||||
if (remainingPenetration <= 0) break;
|
||||
if (shell.type !== ShellType.HE && remainingPenetration <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
@@ -271,6 +273,8 @@ export function SpacedArmorSceneComponent({
|
||||
shot.layersIn.length > 1 ||
|
||||
lastLayer.status === 'blocked'
|
||||
) {
|
||||
console.log(finalDamage);
|
||||
|
||||
shot.status = finalDamage > 0 ? 'splash' : 'blocked';
|
||||
shot.damage = finalDamage;
|
||||
} else {
|
||||
@@ -278,7 +282,16 @@ export function SpacedArmorSceneComponent({
|
||||
shot.damage = shell.damage.armor;
|
||||
}
|
||||
} else {
|
||||
shot.status = lastLayer.status;
|
||||
if (lastLayer.status === 'blocked') {
|
||||
shot.status = 'blocked';
|
||||
shot.damage = 0;
|
||||
} else if (lastLayer.status === 'penetration') {
|
||||
shot.status = 'penetration';
|
||||
shot.damage = shell.damage.armor;
|
||||
} else {
|
||||
// check second array for result
|
||||
shot.status = 'ricochet';
|
||||
}
|
||||
}
|
||||
|
||||
console.log(shot);
|
||||
|
||||
Reference in new issue
Block a user