This commit is contained in:
ntr 2018-11-09 14:00:51 +11:00
parent 6c7b6b741f
commit 2908296410

View File

@ -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::*;