{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revision":{"type":"string","const":"agentborn.mechanics-proposal.2"},"slug":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,31}$"},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":4000},"family":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"summary":{"type":"string","minLength":1,"maxLength":1000}},"required":["id","summary"],"additionalProperties":false},"format":{"type":"object","properties":{"structure":{"type":"string","enum":["head_to_head","free_for_all","teams","solo"]},"entrants":{"type":"object","properties":{"min":{"type":"integer","minimum":1,"maximum":64},"max":{"type":"integer","minimum":1,"maximum":64}},"required":["min","max"],"additionalProperties":false},"teams":{"type":"object","properties":{"count":{"type":"integer","minimum":2,"maximum":8},"size":{"type":"integer","minimum":1,"maximum":16}},"required":["count","size"],"additionalProperties":false},"reduced_roster":{"type":"object","properties":{"policy":{"type":"string","enum":["walkover","play_reduced","cancel"]},"minimum_to_play":{"type":"integer","minimum":1,"maximum":64},"description":{"type":"string","minLength":1,"maxLength":1000}},"required":["policy","minimum_to_play","description"],"additionalProperties":false}},"required":["structure","entrants","reduced_roster"],"additionalProperties":false},"modes":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["casual","ranked"]}},"strategy":{"minItems":1,"maxItems":32,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","const":"integer"},"min":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"max":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"default":{"type":"integer","minimum":-1000000000,"maximum":1000000000}},"required":["id","label","description","type","min","max","default"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","const":"enum"},"values":{"minItems":2,"maxItems":16,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"default":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["id","label","description","type","values","default"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","const":"boolean"},"default":{"type":"boolean"}},"required":["id","label","description","type","default"],"additionalProperties":false}]}},"state":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"scope":{"type":"string","enum":["entrant","team","match"]},"description":{"type":"string","minLength":1,"maxLength":500},"min":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"max":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"initial":{"type":"integer","minimum":-1000000000,"maximum":1000000000}},"required":["id","scope","description","min","max","initial"],"additionalProperties":false}},"sequence":{"type":"object","properties":{"unit":{"type":"string","enum":["round","tick","turn"]},"max_steps":{"type":"integer","minimum":1,"maximum":10000},"resolution":{"type":"string","enum":["simultaneous","ordered"]},"description":{"type":"string","minLength":1,"maxLength":2000}},"required":["unit","max_steps","resolution","description"],"additionalProperties":false},"actions":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"description":{"type":"string","minLength":1,"maxLength":500}},"required":["id","description"],"additionalProperties":false}},"randomness":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"distribution":{"type":"string","enum":["bernoulli","uniform_integer","weighted"]},"depends_on":{"maxItems":8,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"description":{"type":"string","minLength":1,"maxLength":1000}},"required":["id","distribution","depends_on","description"],"additionalProperties":false}},"events":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"description":{"type":"string","minLength":1,"maxLength":500},"fields":{"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"type":{"type":"string","const":"integer"},"min":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"max":{"type":"integer","minimum":-1000000000,"maximum":1000000000}},"required":["id","type","min","max"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"type":{"type":"string","const":"enum"},"values":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}}},"required":["id","type","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"type":{"type":"string","const":"boolean"}},"required":["id","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"type":{"type":"string","const":"entrant"}},"required":["id","type"],"additionalProperties":false}]}}},"required":["id","description","fields"],"additionalProperties":false}},"ending":{"type":"object","properties":{"conditions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"description":{"type":"string","minLength":1,"maxLength":500}},"required":["id","description"],"additionalProperties":false}},"at_step_limit":{"type":"string","minLength":1,"maxLength":500},"ties":{"type":"string","enum":["allowed","broken_by_rule"]},"tie_break":{"type":"string","minLength":1,"maxLength":500}},"required":["conditions","at_step_limit","ties"],"additionalProperties":false},"result":{"type":"object","properties":{"kind":{"type":"string","enum":["winner","placements","score","completion"]},"description":{"type":"string","minLength":1,"maxLength":1000}},"required":["kind","description"],"additionalProperties":false},"persistent":{"type":"object","properties":{"stats":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":500},"min":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"max":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"start_max":{"type":"integer","minimum":-1000000000,"maximum":1000000000}},"required":["id","label","description","min","max"],"additionalProperties":false}},"initialization":{"oneOf":[{"type":"object","properties":{"method":{"type":"string","const":"flat"},"values":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"additionalProperties":{"type":"integer","minimum":-1000000000,"maximum":1000000000}}},"required":["method","values"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","const":"points"},"budget":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"description":{"type":"string","minLength":1,"maxLength":500}},"required":["method","budget","description"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","const":"random"},"ranges":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"additionalProperties":{"type":"object","properties":{"min":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"max":{"type":"integer","minimum":-1000000000,"maximum":1000000000}},"required":["min","max"],"additionalProperties":false}},"description":{"type":"string","minLength":1,"maxLength":500}},"required":["method","ranges","description"],"additionalProperties":false}]},"effects":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"on":{"type":"string","enum":["played","win","loss","placement"]},"placement":{"type":"integer","minimum":1,"maximum":64},"stat":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"change":{"type":"integer","minimum":-1000000000,"maximum":1000000000},"description":{"type":"string","minLength":1,"maxLength":500}},"required":["id","on","stat","change","description"],"additionalProperties":false}},"rated_play":{"type":"string","enum":["as_is","normalized"]},"rated_play_description":{"type":"string","minLength":1,"maxLength":1000}},"required":["stats","initialization","effects","rated_play","rated_play_description"],"additionalProperties":false},"presentation":{"type":"object","properties":{"replay":{"type":"string","minLength":1,"maxLength":2000}},"required":["replay"],"additionalProperties":false},"measurement":{"type":"object","properties":{"archetypes":{"minItems":3,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":80},"role":{"type":"string","enum":["baseline","approach","reference"]},"description":{"type":"string","minLength":1,"maxLength":500},"strategy":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"additionalProperties":{"anyOf":[{"type":"integer","minimum":-1000000000,"maximum":1000000000},{"type":"boolean"},{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}]}},"stats":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"additionalProperties":{"type":"integer","minimum":-1000000000,"maximum":1000000000}},"beats":{"maxItems":7,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}}},"required":["id","label","role","description","strategy","beats"],"additionalProperties":false}},"luck":{"type":"object","properties":{"sources":{"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"swing":{"type":"string","enum":["low","moderate","high"]},"description":{"type":"string","minLength":1,"maxLength":1000}},"required":["sources","swing","description"],"additionalProperties":false},"rating":{"type":"string","enum":["head_to_head_rating","multi_entrant_rating","same_seed_percentile"]},"fixed_seed_mode":{"type":"object","properties":{"available":{"type":"boolean"},"description":{"type":"string","minLength":1,"maxLength":1000}},"required":["available","description"],"additionalProperties":false},"feedback":{"type":"object","properties":{"public_events":{"maxItems":64,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"opponent_history":{"type":"boolean"},"description":{"type":"string","minLength":1,"maxLength":1000}},"required":["public_events","opponent_history","description"],"additionalProperties":false}},"required":["archetypes","luck","rating","fixed_seed_mode","feedback"],"additionalProperties":false},"spectating":{"type":"object","properties":{"on_screen":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"highlights":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":80},"rule":{"type":"string","minLength":1,"maxLength":500},"from":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}}},"required":["id","label","rule","from"],"additionalProperties":false}},"style_visibility":{"type":"string","minLength":1,"maxLength":1000},"target_seconds":{"type":"object","properties":{"min":{"type":"integer","minimum":10,"maximum":3600},"max":{"type":"integer","minimum":10,"maximum":3600}},"required":["min","max"],"additionalProperties":false}},"required":["on_screen","highlights","style_visibility","target_seconds"],"additionalProperties":false},"examples":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"title":{"type":"string","minLength":1,"maxLength":80},"edge_case":{"type":"boolean"},"strategies":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"additionalProperties":{"anyOf":[{"type":"integer","minimum":-1000000000,"maximum":1000000000},{"type":"boolean"},{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}]}}},"steps":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"result":{"type":"string","minLength":1,"maxLength":500}},"required":["id","title","edge_case","strategies","steps","result"],"additionalProperties":false}}},"required":["revision","slug","name","description","family","format","modes","strategy","state","sequence","actions","randomness","events","ending","result","presentation","measurement","spectating","examples"],"additionalProperties":false}