This commit is contained in:
ntr 2019-12-10 12:04:30 +10:00
parent 1c24ab02bc
commit e0ee05ca33
2 changed files with 8 additions and 4 deletions

View File

@ -913,6 +913,8 @@ impl Construct {
}
pub fn damage_trigger_casts(&mut self, cast: &Cast, event: &Event) -> Vec<Cast> {
if self.is_ko() { return vec![] }
match event {
Event::Damage { construct, colour, amount, mitigation, display: _ } => {
let mut casts = vec![];

View File

@ -549,6 +549,8 @@ impl Game {
let casts = match event {
Event::Damage { construct, colour, amount, mitigation, display: _ } =>
self.construct_by_id(*construct).unwrap().damage_trigger_casts(cast, event),
// Event::Ko {} => recalculate_stats()
// Event::Cast {} => set_cooldown()
_ => vec![],
};
@ -573,10 +575,10 @@ impl Game {
Value::Effects { construct, mult } =>
self.construct_by_id(*construct).unwrap().effects.len().pct(*mult),
Value::ColourSkills { construct, colour, mult } => unimplemented!(),
// self.construct_by_id(*construct).unwrap().skills.iter()
// .filter(|ce| ce.)
// .count(),
Value::ColourSkills { construct, colour, mult } =>
self.construct_by_id(*construct).unwrap().skills.iter()
.filter(|cs| cs.)
.count(),
Value::DamageTaken { construct, colour, mult } =>
events.iter().fold(0, |dmg, e| match e {