refactors wands/items with charges
This commit is contained in:
parent
1002844098
commit
66f5a8d826
13 changed files with 67 additions and 357 deletions
|
|
@ -2,7 +2,8 @@ use super::{add_effect, targeting, EffectSpawner, EffectType, Entity, Targets, W
|
|||
use crate::{
|
||||
gamelog,
|
||||
gamesystem::{hp_per_level, mana_per_level},
|
||||
Attributes, Confusion, GrantsXP, Map, Player, Pools, DEFAULT_PARTICLE_LIFETIME, LONG_PARTICLE_LIFETIME,
|
||||
Attributes, Confusion, Destructible, GrantsXP, Map, Player, Pools, DEFAULT_PARTICLE_LIFETIME,
|
||||
LONG_PARTICLE_LIFETIME,
|
||||
};
|
||||
use rltk::prelude::*;
|
||||
use specs::prelude::*;
|
||||
|
|
@ -30,6 +31,8 @@ pub fn inflict_damage(ecs: &mut World, damage: &EffectSpawner, target: Entity) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if let Some(_destructible) = ecs.read_storage::<Destructible>().get(target) {
|
||||
add_effect(damage.source, EffectType::EntityDeath, Targets::Entity { target });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue