intrinsic speed + regeneration
This commit is contained in:
parent
e8b5f6d997
commit
921fee2ecc
7 changed files with 78 additions and 10 deletions
|
|
@ -25,6 +25,8 @@ use super::{
|
|||
Viewshed,
|
||||
BlocksTile,
|
||||
Bleeds,
|
||||
HasDamageModifiers,
|
||||
Intrinsics,
|
||||
};
|
||||
use crate::data::entity;
|
||||
use crate::data::visuals::BLOODSTAIN_COLOUR;
|
||||
|
|
@ -32,7 +34,7 @@ use crate::gamesystem::*;
|
|||
use bracket_lib::prelude::*;
|
||||
use specs::prelude::*;
|
||||
use specs::saveload::{ MarkedBuilder, SimpleMarker };
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{ HashMap, HashSet };
|
||||
|
||||
/// Spawns the player and returns his/her entity object.
|
||||
pub fn player(ecs: &mut World, player_x: i32, player_y: i32) -> Entity {
|
||||
|
|
@ -86,7 +88,9 @@ pub fn player(ecs: &mut World, player_x: i32, player_y: i32) -> Entity {
|
|||
weight: 0.0,
|
||||
god: false,
|
||||
})
|
||||
.with(EquipmentChanged {})
|
||||
.with(HasDamageModifiers { modifiers: HashMap::new() })
|
||||
.with(Intrinsics { list: HashSet::new() })
|
||||
.with(EquipmentChanged {}) // To force re-calc of equipment bonuses.
|
||||
.with(skills)
|
||||
.with(Energy { current: 0, speed: entity::NORMAL_SPEED })
|
||||
.marked::<SimpleMarker<SerializeMe>>()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue