CombatSystem
JSON Format
{
"type": "CombatSystem",
"stats": ...,
"combatant_types": ...,
"encounter_resolution_message": ...,
"initiative_system": ...,
"difficulty_levels": ...,
"is_encounter_within_difficulty_level": ...
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
is_encounter_within_difficulty_level | StatFormulaComponent | Optional. This StatFormulaComponent should return a boolean stating if the encounter is valid for the given selected difficulty level. The current selected difficulty level is available as a stat with the id $combat_difficulty. All included combatants are available under $combat.combatants. A particular combatant's type can be queried by using their $combatant_type property, which will return the combatant type ID of that combatant. The actual resources being used can be checked via $combatant.$template_resource_id or $combatant.$instance_resource_id. e.g: rpgs filter( $combatants, filter = ($combatant) => $combatant.$combatant_type == "monster" ) When creating an encounter, the app will choose monsters and query this formula to understand if the encounter it's creating is exceeding the threshold or if it should continue to add monsters. If this property is omitted, the app will only rely on min/max constraints for encounter building.@type bool |