GroupMovedEvent
A monster group's distance from the party line changed.
Full documentation: GroupMovedEvent. Wire type: group_moved.
Default visibility: player
Message codes: battle.group.moved
JSON Schema
{
"$defs": {
"Visibility": {
"description": "Who may see an event: the players, or only the referee.\n\nEvery event has one of these values, because in B/X the referee makes some rolls behind a screen. Filter\na log on it before you show anything to a player, or call\n`GameSession.view`, which builds the players' view and the referee's\nview for you. A narrator that plays the referee reads every event.\n\nA serialized event contains the lowercase value. The values stay fixed within a `schema_version`, the version\nstamp of the saved format.\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 line changed.\n\nThe party line is where the party stood when the encounter opened. Each group's distance is\nmeasured from it, and each party member stands at their own place on the same track, which\n`MemberMovedEvent` reports. When every member the\nmonsters can see has fallen back behind the line, the line moves back to the foremost of them,\nand every group's distance grows by the same amount with no event, because nobody moved toward\nor away from anyone. `BattleState.advance_feet`\ndescribes it.\n\nEmitted by `ResolveBattleRound`\nwhenever a group's distance changes: monsters closing to strike, a broken group running\naway, and the whole party backing away from every group in a formation move. A member who\ncloses on a group by themselves doesn't move the group, so that emits a `MemberMovedEvent`\nand no `GroupMovedEvent`.\n\nThe event reports the group's distance right after its move. When the party line moves back\nlater in the round, the distance grows with no event, so use this event to narrate or animate\nthe move, not to draw where the group stands. A member's distance to this group is the group's\n`distance_feet` minus the member's entry in\n`EncounterView.advance_feet`, and\n`EncounterGroupView.member_distance_feet`\nlists it for you in the player view after the round.",
"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 event type, `group_moved`, which identifies this class in serialized form."
},
"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 is from the party line, in feet, after the move. A group that closes\nin stops within `MELEE_RANGE_FEET` of the nearest\nmember it can see, where the two fight hand to hand."
}
},
"required": [
"group_id",
"distance_feet"
],
"title": "GroupMovedEvent",
"type": "object"
}