- summary: A fighter's action points (AP) or movement points (MP) change by some amount.
- area: Game.Action
A fighter's action points (AP) or movement points (MP) change by some amount.
Kind struct · Area Game.Action
An AP/MP change: the payload of GameActionFightEvent.points_variation.
READ IT LIKE THIS
1. PointsVariation.target_id is the fighter whose points change.
2. GameActionFightEvent.action_id says which points and why: AP lost (101), AP used
(102), AP won (120), MP won (78), MP lost (127), MP used (129). Any other id is ignored
by the client (it logs "Points variation with unsupported action").
3. Add PointsVariation.delta to those points (it is negative for a loss or a use).
4. Ignore the record's other members: the client never reads them.
WHAT THE OFFICIAL CLIENT DOES. It picks an AP step or an MP step from the action id and shows the signed amount ("+{0}" for a gain); the fight log prints ui.fight.lostAP, winAP, lostMP or winMP.
Not sent on its own — it travels inside GameActionFightEvent.points_variation. proven
Used by
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 2 | delta | int32 | The signed change: negative for points lost or used, positive for points won. (action or movement points) Which points (AP or MP) comes from GameActionFightEvent.action_id. | never |
| 3 | target_id | int64 | The fighter whose AP or MP change. (fighter (entity) id) | never |