This library lets you write code for the Overwatch Workshop in rust.
```rust use dragon_blade::*;
bindsubroutines! { converttohealing; } bindplayervariables! { converteddamage: Number; }
fn main() { let script = Script::new("Heal for damage dealt"); script.add(Rule { name: "Heal for adaptive amoumt", event: SubroutineBody(Subroutine::converttohealing()), conditions: conditions([]), actions: || { let amount = (1.15 - EventPlayer.normalizedhealth()) * EventPlayer.converteddamage() * 4; EventPlayer.heal(Null, amount); }, }); script.add(Rule { name: "heal player when they deal damage", event: PlayerDealtDamage(Team::Team1, Everyone), conditions: conditions([EventPlayer.isalive()]), actions: || { cfabortif(Victim.equal(EventPlayer)); EventPlayer.converteddamage().set(EventDamage); Subroutine::converttohealing().call(); }, }); let script = script.generate(); script.writetofile("script.txt"); script.copytoclipboard(); } ```