From 2908296410c041438122cf008d86116ef1c45681 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 9 Nov 2018 14:00:51 +1100 Subject: [PATCH] triage --- server/src/skill.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/src/skill.rs b/server/src/skill.rs index b20ef700..9566dc1c 100755 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -492,9 +492,20 @@ fn heal(cryp: &mut Cryp, target: &mut Cryp, res: &mut Resolution) { let healing = new_hp.saturating_sub(target.hp.value); let overhealing = target.hp.value.saturating_add(cryp.phys_dmg.value).saturating_sub(target.stamina.value); target.hp.value = new_hp; - res.text = format!("{:?} -> {:?} | Heal for {:?} ({:?}OH)", cryp.name, target.name, healing, overhealing); + res.text = format!("{:?} -> {:?} | Heal for {:?} ({:?} OH)", cryp.name, target.name, healing, overhealing); } +fn triage(cryp: &mut Cryp, target: &mut Cryp, res: &mut Resolution) { + target.hp.value.saturating_add(cryp.spell_dmg.value.wrapping_div(2)), + let healing = new_hp.saturating_sub(target.hp.value); + let overhealing = target.hp.value.saturating_add(cryp.phys_dmg.value).saturating_sub(target.stamina.value); + target.hp.value = new_hp; + res.text = format!("{:?} -> {:?} | Heal for {:?} ({:?} OH)", cryp.name, target.name, healing, overhealing); +} + + + + #[cfg(test)] mod tests { use skill::*;