Skip to content

PLAYUNIT, PLAYUNITIRON

stanislawbartkowski edited this page May 24, 2019 · 5 revisions

Action

Action should be used during the battle only. PLAYUNIT move the standing unit into the battle, PLAYUNITIRON increased the unit power by iron.

Battle description

The battle is enforced when 'battle' attribute in the board is different than None. During the battle the player should not use 'command' list, the battle cannot be stopped unless is completed. During the battle, only PLAYUNIT and PLAYUNITIRON action can be issued.

The battle format: https://github.com/stanislawbartkowski/CivilizationEngine/wiki#battle

Format

executeCommand(token,"PLAYUNIT",indexfrom, indexto,null)

Parameters

  • indexfrom : the position of the unit on "waiting" line
  • indexto: position on "fighting" line where a unit is played to

Usage example

executeCommand("secret token",0,0,null)

Waiting unit from position 0 is moving to position 0 in the fighting line.