triage
This commit is contained in:
parent
6c7b6b741f
commit
2908296410
@ -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 healing = new_hp.saturating_sub(target.hp.value);
|
||||||
let overhealing = target.hp.value.saturating_add(cryp.phys_dmg.value).saturating_sub(target.stamina.value);
|
let overhealing = target.hp.value.saturating_add(cryp.phys_dmg.value).saturating_sub(target.stamina.value);
|
||||||
target.hp.value = new_hp;
|
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)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use skill::*;
|
use skill::*;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user