babylon.engine.actions.negotiate
NEGOTIATE verb resolver (verb-dispatch engine).
Bilateral edge state machine (ActionType.PROPOSE_ALLIANCE). Success is
gated on the acting org’s leverage (cohesion + cadre_level). On success:
an existing antagonistic-class edge (exploitation / competition / repression / antagonistic) is flipped to
TRANSACTIONAL;otherwise a fresh
TRANSACTIONALedge is created between the two parties.
Only the round-trip edge field edge_type (mirrored to the internal
_edge_type key) is written, matching the layer-3 ORGANIZE flip precedent.
Functions
|
Resolve a player NEGOTIATE action: flip or forge a TRANSACTIONAL edge. |
- babylon.engine.actions.negotiate.resolve_negotiate(action, org_attrs, graph, services)[source]
Resolve a player NEGOTIATE action: flip or forge a TRANSACTIONAL edge.
- Parameters:
action (
Action) – The NEGOTIATE action (action_type == ActionType.PROPOSE_ALLIANCE).org_attrs (
dict[str,Any]) – Acting organization’s node attributes (leverage source).graph (
BabylonGraph) – World graph (mutated in place on the org→target edge).services (
ServicesProtocol) – ServicesProtocol (unused; no NegotiateDefines exist yet).
- Return type:
ActionResult- Returns:
ActionResult;success=Falsewhen the counterparty is missing or the org lacks leverage.