removes need to pass BUC to effects
This commit is contained in:
parent
1d9cb04d1f
commit
db9e04069a
4 changed files with 18 additions and 15 deletions
|
|
@ -3,15 +3,9 @@ use crate::{HungerClock, BUC};
|
|||
use specs::prelude::*;
|
||||
|
||||
pub fn restore_food(ecs: &mut World, effect: &EffectSpawner, target: Entity) {
|
||||
if let EffectType::RestoreNutrition { buc } = &effect.effect_type {
|
||||
if let EffectType::RestoreNutrition { amount } = &effect.effect_type {
|
||||
if let Some(hc) = ecs.write_storage::<HungerClock>().get_mut(target) {
|
||||
if buc == &BUC::Blessed {
|
||||
hc.duration += 600;
|
||||
} else if buc == &BUC::Uncursed {
|
||||
hc.duration += 400;
|
||||
} else if buc == &BUC::Cursed {
|
||||
hc.duration += 200;
|
||||
}
|
||||
hc.duration += amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue