Skip to content

Commit

Permalink
fix: ECM drones do not have DPS
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain committed May 5, 2024
1 parent af58e2f commit 3ff565f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/calculate/pass_4/drone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ pub fn attribute_drone_damage(ship: &mut Ship) {
let attr_damage_without_reload_dps = AttributeId::damageWithoutReloadDps as i32;

for item in &mut ship.items {
if item.flag == 87 && item.state == EffectCategory::Active {
if item.flag == 87
&& item.state == EffectCategory::Active
&& item.attributes.contains_key(&attr_damage_alpha_hp)
{
let damage_alpha_hp = item.attributes.get(&attr_damage_alpha_hp).unwrap();
total_base_alpha_hp += damage_alpha_hp.base_value;
total_alpha_hp += damage_alpha_hp.value.unwrap();
Expand Down

0 comments on commit 3ff565f

Please sign in to comment.