Browse Source

based clip

kill_counters
andy 2 years ago
parent
commit
d07c61d009
  1. 11
      src/entity/item/unit.rs

11
src/entity/item/unit.rs

@ -480,13 +480,10 @@ impl Unit {
}
pub fn apply_modifier(&mut self, modifier: &UnitModifier) {
match modifier {
UnitModifier::AddKill{enemy: _} => {
if let Some(kills) = self.kills {
self.kills = Some(kills + 1);
}
},
_ => {},
if let UnitModifier::AddKill{enemy: _} = modifier {
if let Some(kills) = self.kills {
self.kills = Some(kills + 1);
}
};
}
}
Loading…
Cancel
Save