Adornee based conditional system that is sufficiently generic to script gameplay.
npm install @quenty/conditions --save
The issue for conditions is they must be scriptable enough that anything can implement them, including external consumers, but flexibile enough that any gameplay can be constructed with them.
Additionally, we want to observe conditions for an adornee over specifically having them on a loop, so we want to definitely leverage Observables/Rx here.
Finally, there's a networking component here, where we want to define code once, but network it across many places. But we're also latency sensitive for conditions, that is, we should be able to deny actions as soon as they occur on the client.
For this reason, we end up with basically just a way to bind functions to a folder. Thus, we're scriptable. To allow replication/avoid duplicate implementation at the server/client layer we'll add another layer here where we'll bind conditions to the client/server.