GroupMovedEvent
A monster group's distance from the party changed.
Full documentation: GroupMovedEvent. Wire type: group_moved.
Default visibility: player
Message codes: battle.group.moved
JSON Schema
{
"$defs": {
"Visibility": {
"description": "Who is allowed to see an event.\n\nEvery event has one of these two values, and the split exists because B/X keeps some rolls behind the\nreferee's screen. Filter a log on it before you show anything to a player, or call\n`GameSession.view`, which builds the player's and the referee's\nviews for you. A narrator playing referee reads both.\n\nThe values are the lowercase strings and they serialize into every event, so a renamed value is a\n`schema_version` bump.\n\nExamples:\n ```python\n from osrlib.core.events import DamageDealtEvent, HitPointsReportedEvent, Visibility\n\n log = [\n DamageDealtEvent(target_id=\"monster-0001\", amount=5),\n HitPointsReportedEvent(target_id=\"monster-0001\", current_hp=2, max_hp=7),\n ]\n shown = [event.code for event in log if event.visibility is Visibility.PLAYER]\n assert shown == [\"combat.damage.dealt\"] # the goblin's remaining hit points stay hidden\n ```",
"enum": [
"player",
"referee"
],
"title": "Visibility",
"type": "string"
}
},
"description": "A monster group's distance from the party changed.\n\nEmitted by `ResolveBattleRound`\nwhenever the range track moves: the party closing on a group or backing away\nfrom every group, monsters closing to strike, and a broken group running for the\nexit.\n\nDistance decides what can reach what, so this is the event a battle screen\nredraws its ranks from.",
"properties": {
"code": {
"default": "battle.group.moved",
"title": "Code",
"type": "string",
"description": "The message code, always `battle.group.moved`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: the party watches them come on or draw off."
},
"event_type": {
"const": "group_moved",
"default": "group_moved",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `group_moved`."
},
"group_id": {
"title": "Group Id",
"type": "string",
"description": "Which group moved, as its encounter group id."
},
"distance_feet": {
"title": "Distance Feet",
"type": "integer",
"description": "How far that group now stands from the party, in feet, after the move. Melee happens at the\ntrack's shortest step."
}
},
"required": [
"group_id",
"distance_feet"
],
"title": "GroupMovedEvent",
"type": "object"
}