Skip to content

Commit

Permalink
Ignore weapons with zero dmg besides explosive ones
Browse files Browse the repository at this point in the history
  • Loading branch information
KingDarBoja committed Apr 19, 2024
1 parent 54d2e21 commit 8faefea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/unitStats/dpsCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const getSbpsWeapons = (sbps: SbpsType, ebpsList: EbpsType[], weapons: We
if (!unit_ebps) continue;

let num = loadout.num;
if (crew_demand > 0) num = num - crew_demand;
if (crew_demand > 0) num -= crew_demand;

crew_demand = unit_ebps.crew_size;

Expand All @@ -262,9 +262,10 @@ export const getSbpsWeapons = (sbps: SbpsType, ebpsList: EbpsType[], weapons: We
// ignore loadout when no damage dealing weapon found
if (
!weapon ||
(weapon as WeaponType).weapon_bag.damage_max == 0 ||
(weapon.weapon_bag.damage_damage_type == "explosive" &&
weapon.weapon_bag.aoe_outer_radius == 0)
((weapon as WeaponType).weapon_bag.damage_max == 0 &&
weapon.weapon_bag.damage_damage_type !== "explosive") ||
(weapon.weapon_bag.damage_damage_type === "explosive" &&
weapon.weapon_bag.aoe_outer_radius === 0)
)
continue;

Expand Down

0 comments on commit 8faefea

Please sign in to comment.