MemberMovedEvent
A party member moved by themselves on the range track, closing on a group or falling back.
Full documentation: MemberMovedEvent. Wire type: member_moved.
Default visibility: player
Message codes: battle.member.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 party member moved by themselves on the range track, closing on a group or falling back.\n\nThe range track is how a battle measures distance. Each group stands at a distance from the\nparty line, the place where the party stood when the encounter opened. Each member stands at\nan advance, in feet, forward of that line toward the monsters. Every member starts the battle\non the line, at an advance of zero.\n\nEmitted by `ResolveBattleRound` in the party's\nmovement step, once for each member whose advance changes:\n\n- A member who declares `move=\"close\"`, with a `move` action or with an `attack`, moves at\n their own encounter movement rate toward the group they named. They stop 5' from that group,\n and they never come closer than 5' to another group that's still in the fight.\n- A member who makes a `fighting_withdrawal` or a `retreat` that not every declarer makes moves\n back alone, at half their encounter rate or their full rate. Their advance goes down, and it\n can go below zero, behind the line.\n\nWhen the moves leave every member the monsters can see behind the line, the line moves back to\nthe foremost of them at the end of the movement step, as\n`BattleState.advance_feet` describes. The session\nemits no event for that, and no distance between a member and a group changes.\n\nThe events come in two runs, each in marching order: the members who fall back first, then\nthe members who close. A member who closes while already within 5' of the group doesn't move,\nand the session emits nothing for them. A formation move, a defensive move that every declarer\nmakes, moves the groups instead of the members, so it emits\n`GroupMovedEvent`s and none of these.\n\nThe event reports the member's advance right after their move, before the party line moves back,\nso it isn't always where the member stands once the round is over. Use it to narrate or animate\nthe move. To draw where each member stands, read\n`EncounterView.advance_feet` and\n`EncounterGroupView.member_distance_feet`\nfrom the player view after the round.",
"properties": {
"code": {
"default": "battle.member.moved",
"title": "Code",
"type": "string",
"description": "The message code, always `battle.member.moved`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: the party sees its own members move."
},
"event_type": {
"const": "member_moved",
"default": "member_moved",
"title": "Event Type",
"type": "string",
"description": "The event type, `member_moved`, which identifies this class in serialized form."
},
"character_id": {
"title": "Character Id",
"type": "string",
"description": "The member who moved, by party member id."
},
"move": {
"title": "Move",
"type": "string",
"description": "The move the member made: `\"close\"`, `\"fighting_withdrawal\"`, or `\"retreat\"`, as they\ndeclared it in `BattleDeclaration.move`."
},
"advance_feet": {
"title": "Advance Feet",
"type": "integer",
"description": "The member's advance right after the move, in feet forward of the party line. Zero is the line,\nand a negative value is behind it. When the party line moves back at the end of the movement step,\nevery member's advance grows by the same amount, and this value isn't updated. Read\n`EncounterView.advance_feet` after the round for\nwhere the member stands."
},
"group_id": {
"title": "Group Id",
"type": "string",
"description": "The group `distance_feet` is measured to. For a `close`, it's the group the member closed\non. For a `fighting_withdrawal` or a `retreat`, it's the group nearest the member after the\nmove, among the groups that haven't fled and still have a living member. When two are equally\nnear, it's the one that comes first in\n`EncounterView.groups`."
},
"distance_feet": {
"title": "Distance Feet",
"type": "integer",
"description": "The member's distance to the group in `group_id` after the move, in feet. It's that group's\ndistance from the party line minus `advance_feet`. At 5' or less, the member and the group can\nreach each other in melee."
}
},
"required": [
"character_id",
"move",
"advance_feet",
"group_id",
"distance_feet"
],
"title": "MemberMovedEvent",
"type": "object"
}