Hello,
after a short break I wanted to have another look at Russian Railroads and try to implement or correct some suggestions/bugs reported by the community. For example, if I now use the automatic pass when no actions are available (saves a lot of time in turn-based games), this works without problems when using the existing "onPass" action. But since it is a special case, I would like to output other log notifications etc. for which I want to trigger a new action (e.g. "onMustPass").
My problem is now, that
still triggers onPass and I just cannot figure out why. If I rename the button to button_mustPass, I get an error that the move is not authorized (now it seems that onMustPass was finally called). But again, I do not get what the issue is because I added "mustPass" to the possible actions array in the *.states.php file:
Then, on http://en.doc.boardgamearena.com/Game_i ... amename.js you say that buttons I add via "addActionButton" must use an ID that is unique in my HMTL DOM file. But when I clone the project, I don't have an html file where I can define the object specifications or where something has already been defined. Where can I find this file or do I really need it?
I've also tried other approaches, like checking if the next player can still make moves while the next player is being determined and then let him pass immediately, or adding a new state to the state machine where the current player automatically passes. It all comes down to the fact that I can't perform the actions with the error message reported above. So I guess that the state machine is not updated properly. Is there anything else I need to do? Many thanks for your help!
after a short break I wanted to have another look at Russian Railroads and try to implement or correct some suggestions/bugs reported by the community. For example, if I now use the automatic pass when no actions are available (saves a lot of time in turn-based games), this works without problems when using the existing "onPass" action. But since it is a special case, I would like to output other log notifications etc. for which I want to trigger a new action (e.g. "onMustPass").
My problem is now, that
Code: Select all
this.addActionButton('button_pass', _('Pass'), 'onMustPass');Code: Select all
'playerTurnPlaceWorker' => array (
"type" => "activeplayer",
"description" => '${actplayer} must select an action or pass',
"descriptionmyturn" => '${you} must select an action or pass',
"possibleactions" => array (
"placeWorker(alphanum worker_ids,alphanum place_id,alphanum choices?)",
"pass",
>>> "mustPass",
),
"transitions" => array (
"next" => "gameTurnNextPlayer",
"endbonus" => "playerTurnSelectEndBonus",
)
),
I've also tried other approaches, like checking if the next player can still make moves while the next player is being determined and then let him pass immediately, or adding a new state to the state machine where the current player automatically passes. It all comes down to the fact that I can't perform the actions with the error message reported above. So I guess that the state machine is not updated properly. Is there anything else I need to do? Many thanks for your help!