boardgamers / gaia-engine

Javascript engine for project gaia
MIT License
13 stars 6 forks source link

real cost for Nevlas with PI #183

Closed rzulian closed 5 years ago

rzulian commented 6 years ago

@coyotte508 : I've removed tokenModifier and added a discounted property in the boardActions. I've left the discount method in the reward. The real problem I see is that this is not backward compatible.

coyotte508 commented 6 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.

rzulian commented 6 years ago

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?

coyotte508 commented 6 years ago

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:

image

image

coyotte508 commented 6 years ago

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.

rzulian commented 6 years ago

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.

screen shot 2018-10-14 at 18 43 41