delucis / delucis/bgio-effects
Send effects to some players only
- Dominant language
- TypeScript
- Stars
- 25
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
In some cases, it can be useful to restrict an effect to be seen only by a subset of players. For example, in the case of a mulligan in a card game, one player shouldn't receive the mulliganing effects of their opponent.
### User story
As a developer, I want to call an effect and have it sent to only a subset of players. That means the players not in that subset should not even know about the existence of that effect or its data, as that can contain private data.
### API proposition
Here's a proposition of API based on my usage of the library and the existing code:
```js
// Definition
ctx.effects.myEffect(data, position, duration, players);
// Call example
ctx.effects.myEffect({ secret: 1 }, '>', '1', [ '0' ]);
```
### Questions
Looking at the code, and based on my current knowledge of boardgame.io, I'm not sure how the "unconcerned players do not know about the effect" feature can be implemented. Is there an equivalent of `stripSecrets` for plugins / `ctx`?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the existing ctx.effects API and boardgame.io's stripSecrets handling, then inspect how plugins and ctx data are exposed to players. Done means an effect can target a player subset while excluded players learn neither that the effect exists nor its private data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100