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