town -> woods -> one floor of dungeon; infinite dungeon elsewhere
just trying things out.
This commit is contained in:
parent
486807fc84
commit
02be487334
10 changed files with 72 additions and 18 deletions
|
|
@ -11,6 +11,8 @@ use crate::{
|
|||
Pools,
|
||||
Name,
|
||||
Blind,
|
||||
HungerClock,
|
||||
HungerState,
|
||||
};
|
||||
use crate::gui::with_article;
|
||||
use crate::data::visuals::{ DEFAULT_PARTICLE_LIFETIME, LONG_PARTICLE_LIFETIME };
|
||||
|
|
@ -277,5 +279,15 @@ pub fn entity_death(ecs: &mut World, effect: &EffectSpawner, target: Entity) {
|
|||
source_pools.mana.current += mana_gained;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if target == *player {
|
||||
if let Some(hc) = ecs.read_storage::<HungerClock>().get(target) {
|
||||
if hc.state == HungerState::Starving {
|
||||
gamelog::record_event(EVENT::PLAYER_DIED("You starved to death!".to_string()));
|
||||
}
|
||||
} else {
|
||||
gamelog::record_event(EVENT::PLAYER_DIED("You died from unknown causes!".to_string()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue