cleanup and bugfixes, standardising log colours
This commit is contained in:
parent
dd4e0aaee4
commit
ff1afed92c
10 changed files with 153 additions and 73 deletions
|
|
@ -2,7 +2,7 @@ use super::{add_effect, targeting, EffectSpawner, EffectType, Entity, Targets, W
|
|||
use crate::{
|
||||
gamelog,
|
||||
gamesystem::{hp_per_level, mana_per_level},
|
||||
Attributes, GrantsXP, Map, Player, Pools, DEFAULT_PARTICLE_LIFETIME, LONG_PARTICLE_LIFETIME,
|
||||
Attributes, Confusion, GrantsXP, Map, Player, Pools, DEFAULT_PARTICLE_LIFETIME, LONG_PARTICLE_LIFETIME,
|
||||
};
|
||||
use rltk::prelude::*;
|
||||
use specs::prelude::*;
|
||||
|
|
@ -53,6 +53,14 @@ pub fn heal_damage(ecs: &mut World, heal: &EffectSpawner, target: Entity) {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn add_confusion(ecs: &mut World, effect: &EffectSpawner, target: Entity) {
|
||||
if let EffectType::Confusion { turns } = &effect.effect_type {
|
||||
ecs.write_storage::<Confusion>()
|
||||
.insert(target, Confusion { turns: *turns })
|
||||
.expect("Unable to insert Confusion");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bloodstain(ecs: &mut World, target: usize) {
|
||||
let mut map = ecs.fetch_mut::<Map>();
|
||||
// If the current tile isn't bloody, bloody it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue