From 194373d0a675ab68af474015110e89526ec9f271 Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 10 Dec 2019 16:19:36 +1000 Subject: [PATCH] remove construct var --- core/src/construct.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/src/construct.rs b/core/src/construct.rs index 07737370..d612e62f 100644 --- a/core/src/construct.rs +++ b/core/src/construct.rs @@ -713,7 +713,6 @@ impl Construct { fn red_healing(&mut self, amount: usize) -> Vec { let mut events = vec![]; if self.is_ko() { return events; } - let construct = self.id; let mods = self.effects.iter() .filter(|e| e.effect.modifications().contains(&Stat::RedHealingReceived)) @@ -764,7 +763,6 @@ impl Construct { fn green_healing(&mut self, amount: usize) -> Vec { let mut events = vec![]; if self.is_ko() { return events; } - let construct = self.id; let mods = self.effects.iter() .filter(|e| e.effect.modifications().contains(&Stat::GreenHealingReceived)) @@ -784,7 +782,7 @@ impl Construct { let overhealing = modified_power - healing; events.push(Event::Healing { - construct, + construct: self.id, amount: healing, overhealing, colour: Colour::Green, @@ -797,7 +795,7 @@ impl Construct { let delta = current_green_life - self.stat(Stat::GreenLife); events.push(Event::Damage { - construct, + construct: self.id, amount: delta, mitigation: 0, colour: Colour::Green, @@ -805,7 +803,7 @@ impl Construct { }); if self.is_ko() { - events.push(Event::Ko { construct }); + events.push(Event::Ko { construct: self.id }); } } } @@ -816,7 +814,6 @@ impl Construct { fn blue_healing(&mut self, amount: usize) -> Vec { let mut events = vec![]; if self.is_ko() { return events; } - let construct = self.id; let mods = self.effects.iter() .filter(|e| e.effect.modifications().contains(&Stat::BlueHealingReceived))