Closed rzulian closed 5 years ago
Yea. Also it means that everywhere that power can be spent, code needs to be added specifically for nevlas (e.g. new board actions, ...) as spendablePowerTokens()
doesn't take into account the discount. This is a small technical debt for the future. Taklons don't have that issue.
I think the main issue was the visualisation, and that's why the issue was opened in gaia-viewer at first. Maybe the new player info design will make it a bit less confusing, since there's no 'pw' text in it but three drawn bowls?
Actually, only now I think that a much simpler solution would be to change 0/2/2 pw
to something like0/2/2(=4) pw
in the viewer for nevlas.
I'm really sorry about realizing this now and dragging this out until the PR is ready.
The only missing visualisation in viewer is actually only the hint in the boardActions, which has to be different when Nevlas with PI.
Managing th legacy games is a different issue. we can either do conditional code, or repairs old games (which I had to do for tests).
On the conditional code we could ad a EngineVersion
property on the game. What do you think?
I think EngineVersion
is probably going to be needed at some point. Actually it can be directly read from package.json
and filled in when creating a game.
Repairing old games will need to be added at some point to the site (to remove legacy format handling code in the engine for example, eg .sanitizeOptions(), or when something like https://github.com/donkeytech/gaia-engine/issues/178 is added).
I also think that regarding this particular nevlas issue, we have the choice between:
I think I would be ok (with the discount()
) but it would break ongoing games on the site where it's nevlas' turn to play, if they chose to use a power command.
We can put this on hold until we decide what to do. The problem I see is that our logs are wrong. We will see.
@coyotte508 : I've removed
tokenModifier
and added adiscounted
property in the boardActions. I've left thediscount
method in thereward
. The real problem I see is that this is not backward compatible.