- summary: A fighter's turn is over; carries that fighter's id and the extra time it banked for its next turn.
- area: Game.Fight
A fighter's turn is over; carries that fighter's id and the extra time it banked for its next turn.
Kind event · Area Game.Fight
Closes one fighter's turn.
WHAT TO DO WHEN YOU RECEIVE IT
1. Mark FightTurnEndEvent.character_id's turn as over. Stop sending actions for
that fighter: if it is yours, your turn is finished, whether you ended it or the
server did.
2. Record FightTurnEndEvent.extra_time for that fighter. It is the time the
fighter banked by ending its turn early, and the server adds it to that
fighter's next turn.
3. Expect FightIsTurnReadyEvent next. That is the message you must answer
(with FightTurnReadyRequest); this one needs no answer.
WHAT THE CLIENT DOES. The battle message handler stores the fighter id as the fighter whose turn just ended, publishes a "turn ended for this entity" notification with that id, refreshes the entity, and publishes a separate notification carrying the extra time. The end-turn widget listens to the latter in a handler Ankama named OnPlayerGivenExtraTime, which is where the meaning of the int32 comes from.
THE TURN LENGTH OF THE NEXT TURN IS NOT HERE. The next turn's duration arrives with the event that starts it; the extra time is already folded into it there.
When you may send it
- Requires
character_loadedinferred
Related messages
- Unsolicited - nothing you send causes this the server ends turns on its own (turn finished, timer elapsed, fighter died); no request asks for this message
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | extra_time | int32 | Time the fighter banked by ending its turn early; the server adds it to that fighter's next turn. Named after the client's own handler for it, OnPlayerGivenExtraTime on the end-turn widget. Beta does not declare this member. Unit not proven here: the turn-start event's durations are deciseconds (the client multiplies them by 100 to get milliseconds); this value is presumably in the same unit. | never |
| 2 | character_id | int64 | The fighter whose turn just ended. (entity id) | never |