An experimental, status effects-as-entities system for Bevy.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add `poison_falloff` to examples readme.

+6 -5
+5 -4
examples/README.md
··· 1 1 # Examples 2 2 3 - | Example | Description | 4 - |-----------------------|-----------------------------------| 5 - | [`poison`](poison.rs) | A simple damage-over-time effect. | 3 + | Example | Description | 4 + |---------------------------------------|--------------------------------------------------------------------------------| 5 + | [`poison`](poison.rs) | A simple damage-over-time effect. | 6 + | [`poison_falloff`](poison_falloff.rs) | A damage-over-time effect where the damage falls off as more stacks are added. | 6 7 7 8 ## Immediate Stats 8 9 Examples in the `immediate_stats` subdirectory utilize the [`immediate_stats`](https://github.com/AlephCubed/immediate_stats) crate, which I also created. 9 - Some of these examples include a copy that utilizes [`bevy_auto_plugin`](https://github.com/StrikeForceZero/bevy_auto_plugin), which should behave exactly the same. 10 + Some of these examples include a version that utilizes [`bevy_auto_plugin`](https://github.com/StrikeForceZero/bevy_auto_plugin), which should behave exactly the same. 10 11 11 12 | Example | Description | 12 13 |--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
+1 -1
examples/poison_falloff.rs
··· 80 80 // Each subsequent stack has a decreasing effect, the first deals 5 damage, the next 4, then 3, and so on. 81 81 let stacks = poison.damage.min(stacks.0 as i32); // Clamp stacks to prevent negative damage. 82 82 let sub = (stacks * (stacks - 1)) / 2; 83 - let damage = (poison.damage * stacks - sub).max(0); 83 + let damage = poison.damage * stacks - sub; 84 84 85 85 info!("Dealt {damage} damage!"); 86 86