babylon.engine.actions.move

MOVE verb resolver (verb-dispatch engine).

Relocate an organization’s spatial presence (ActionType.MOVE). Validates the target is an existing territory node, then rewrites the acting org’s territory_ids (a round-trip Organization model field):

  • relocate (default): territory_ids = [target] and headquarters_id = target (keeps the headquarters_id in territory_ids invariant).

  • expand: append the target to the existing territory_ids.

An invalid target fails loud (success=False).

Functions

resolve_move(action, org_attrs, graph, services)

Resolve a player MOVE action: relocate or expand org presence.

babylon.engine.actions.move.resolve_move(action, org_attrs, graph, services)[source]

Resolve a player MOVE action: relocate or expand org presence.

Parameters:
  • action (Action) – The MOVE action (action_type == ActionType.MOVE).

  • org_attrs (dict[str, Any]) – Acting organization’s node attributes.

  • graph (BabylonGraph) – World graph (mutated in place on the acting org node).

  • services (ServicesProtocol) – ServicesProtocol (unused; no MoveDefines exist yet).

Return type:

ActionResult

Returns:

ActionResult; success=False when the target is missing / not a territory, or the acting org node is absent.