After you registered and received a token you can join the battle. To join you must pass a player type
BattleHelper helper = new BattleHelper(TOKEN, SERVER_URL);
GameObject me = helper.join(PlayerType.GOPHER);For the move action you must pass a direction
GameObject me = helper.move(Direction.LEFT);For the attack action you must pass a direction
helper.attack(Direction.LEFT);To use a spell you must pass the spell index, the direction, and an extra string(needed just for a few spells).
helper.spell(1, Direction.LEFT, "");You can request the your stats at any time.
GameObject me = helper.me();You can request the battleMap at any time.
Map battleMap = helper.battleMap();You can receive multiple types of exceptions.
- Cooldown exception - received when the command you are trying to do is on cooldown. You can also access the remaining time.
- Behaviour exception - received when the command you are trying to do is blocked by a certain event(stun, freeze, disarm, silence, etc). You can also access the remaining time.
- Info exception - it is a simple exception