123ishaTest/ludiek
[Buff] Add auto-decreasing buffs that decrease with time
Ouverte
#116 ouverte le 14 oct. 2025
enginegood first issueplugin
Métriques du dépôt
- Stars
- (12 étoiles)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
Prepare the engine
- Add a
plugin.preTick(delta: number)to theLudiekPluginwith an empty default. - Update
engine.preTick(delta: number)to call all registered pluginspreTick(delta)after calculating bonuses.
Implement the behaviour
- Add an optional boolean
autoDecreaseto theBuffDefinitionto toggle this behaviour (default false) - In the
BuffPlugin, implementpreTick()to decrease all autoDecreasing buffs bydelta
Update the documentation
- Currently the
BuffDemonstration.sveltemanually ticks down each buff, but now we can just callengine.preTickand it will do it for us!
Add tests
- Add tests that show that buffs with this behaviour go down on
preTick, and another to show that buffs without don't