This library lets you write code for the Overwatch Workshop in rust.
```rust use dragon_blade::*;
bindsubroutine!(converttohealing); bindplayervariable!(converteddamage: Number);
fn main() { let script = Script::new(); script.add(Rule { name: "Heal for adaptive amoumt", event: SubroutineBody(Subroutine::converttohealing()), condition: vec![], actions: || { let amount = (number(1.15) - EventPlayer.normalizedhealth()) * EventPlayer.converteddamage().get() * number(4); heal(EventPlayer, Null, amount); }, }); script.add(Rule { name: "heal player when they deal damage", event: PlayerDealtDamage(Team::Team1, Everyone), condition: vec![EventPlayer.isalive()], actions: || { EventPlayer.converteddamage().set(EventDamage); callsubroutine(Subroutine::convertto_healing()); }, }); std::fs::write("script.txt", script.generate()).unwrap(); } ```