intrinsic speed + regeneration
This commit is contained in:
parent
e8b5f6d997
commit
921fee2ecc
7 changed files with 78 additions and 10 deletions
|
|
@ -6,7 +6,7 @@ use specs::error::NoError;
|
|||
use specs::prelude::*;
|
||||
use specs::saveload::{ ConvertSaveload, Marker };
|
||||
use specs_derive::*;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{ HashMap, HashSet };
|
||||
|
||||
// Serialization helper code. We need to implement ConvertSaveload for each type that contains an
|
||||
// Entity.
|
||||
|
|
@ -418,6 +418,17 @@ impl HasDamageModifiers {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub enum Intrinsic {
|
||||
Regeneration, // Regenerate 1 HP on every tick
|
||||
Speed, // 4/3x speed multiplier
|
||||
}
|
||||
|
||||
#[derive(Component, Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct Intrinsics {
|
||||
pub list: HashSet<Intrinsic>,
|
||||
}
|
||||
|
||||
#[derive(Component, Debug, ConvertSaveload, Clone)]
|
||||
pub struct InflictsDamage {
|
||||
pub damage_type: DamageType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue