Skip to main content

Receive Condition (Power Type)

Holds a condition that other powers ask about with apoli:send_condition. It never does anything by itself.

Use it to define, in one place, some state that many powers depend on. Change the definition here and everything that asks follows it. Revoke the power and every sender reads false.

Type ID: apoli:receive_condition (also shappoli:receive_condition)

Fields

FieldTypeDefaultDescription
entity_conditionEntity ConditionoptionalThe answer given to an entity apoli:send_condition. Without it the answer is yes: the sender passes as long as this power exists and is active.
bientity_conditionBi-Entity ConditionoptionalThe answer given to a bi-entity apoli:send_condition.
item_conditionItem ConditionoptionalThe answer given to an item apoli:send_condition.

A receiver with no fields still has a use. It answers yes whenever the entity has it, so the power itself becomes a flag that senders can test.

Example

Define "transformed" once:

{
  "type": "apoli:receive_condition",
  "entity_condition": {
    "type": "apoli:and",
    "conditions": [
      { "type": "apoli:power_active", "power": "vampire:bat_form" },
      { "type": "apoli:resource", "resource": "vampire:blood", "comparison": ">", "compare_to": 0 }
    ]
  }
}

Then ask from as many powers as you like:

{
  "type": "apoli:send_condition",
  "receiver": "vampire:is_transformed"
}