Skip to content

feat(bigshot.lic): v5.16.0 add crtrStatus command checks, migrate flying/rooted/frozen/prone - #2415

Open
mrhoribu wants to merge 1 commit into
feat/bigshot-creature-targeting-migrationfrom
feat/bigshot-crtrstatus-command-checks
Open

feat(bigshot.lic): v5.16.0 add crtrStatus command checks, migrate flying/rooted/frozen/prone#2415
mrhoribu wants to merge 1 commit into
feat/bigshot-creature-targeting-migrationfrom
feat/bigshot-crtrstatus-command-checks

Conversation

@mrhoribu

Copy link
Copy Markdown
Contributor

feat(bigshot.lic): v5.16.0 add crtrStatus command checks, migrate flying/rooted/frozen/prone

Adds command-check modifiers for the crtrStatus data the previous
migration made available, and moves the checks that have a clean
native equivalent off GameObj's status/type strings.

New modifiers, all with !-negation:

  • statuses (has_status?): calm, disoriented, hovering, immobilized,
    kneeling, sitting, sleeping, stunned, webbed
  • classification flags (crtr_flag?): ascended, ascension_boss,
    challenging, disengaged, inferior, mini_boss, mount, rider,
    sympathetic
  • Combat::Tracker data: wounded, fatalcrit, smote, ucsdecent,
    ucsgood, ucsexcellent, ucstierup - additive only, none of these
    touch $bigshot_unarmed_tier or any other existing tier/targeting
    logic, since replacing that load-bearing engine wasn't asked for
    and carries real regression risk for a smaller, unconfirmed
    benefit

flying and rooted move to native has_status? reads, both clean 1:1
mappings with no ambiguity.

frozen and prone are the more interesting migrations, and were wrong
twice before landing here:

  • frozen was first assumed to have no crtrStatus equivalent at all.
    It does: the feed's immobile="1" attribute maps to the canonical
    immobilized status, and the message parser reaches the same state
    from the entangling/restricting-force messages.
  • prone was then assumed to be a compound state needing the GameObj
    regex kept around for "^lying", on the theory that crtrStatus has
    no equivalent for lying down. It does - "^lying" is the room-
    players phrasing for the same state crtrStatus calls prone, not a
    separate condition. Confirmed against real GS4 session logs: a
    creature that is prone and nothing else renders "that is lying
    down.", so GameObj.status is "lying down" and the old ^lying regex
    always matched it. This makes the native prone read a robustness
    improvement rather than a bug fix - across ~1000 creature
    observations in those logs, the old regex and the native read
    agree on every live creature, because GameObj.status is single-
    valued with a precedence order (a creature holding two statuses
    only ever advertises the higher one - renders as "that appears stunned.") and every masking
    status observed is itself in the old PRONE regex. The one case
    the string genuinely cannot see is dead+prone, where GameObj
    reports only "dead"; dead_or_gone? gates that case first regardless.

Both npc_frozen? and npc_prone? keep the GameObj-string read as a
fallback for npcs with no CreatureInstance behind them (bridged
bandits, leader_target?'s fallback - see the previous PR), so they're
a strict superset of the pre-existing checks, not a narrowing.

leader_target? now wraps its result in BigshotCreature (looking up the
Creature registry by GameObj.target's id) instead of returning a raw
GameObj. This PR is what makes that necessary: once check_state_condition
calls .creature.crtr_flag?/.creature.has_status? on whatever it's
handed, a raw GameObj reaching those calls would raise. Falls back to
the raw GameObj only if no registry entry exists yet; every native-only
reader added here (npc_has_status?, npc_crtr_flag?, npc_frozen?,
npc_prone?, and the five Tracker-data readers) guards against that case
via creature_backed? and degrades to a safe default rather than raising.

Testing: spec/bigshot/creature_adapter_spec.rb extended with coverage
for every new reader, the frozen/prone native-vs-fallback behavior
(including a case built directly from a real feed line), and
leader_target?'s wrapping. Each new check verified non-tautological
against its pre-fix baseline.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 18f627dc-0549-475b-a215-a62033fbd19b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mrhoribu
mrhoribu force-pushed the feat/bigshot-crtrstatus-command-checks branch from ae9dfb7 to b2558cc Compare August 17, 2026 23:38
…ing/rooted/frozen/prone

Adds command-check modifiers for the crtrStatus data the previous
migration made available, and moves the checks that have a clean
native equivalent off GameObj's status/type strings.

New modifiers, all with !-negation:
  - statuses (has_status?): calm, disoriented, hovering, immobilized,
    kneeling, sitting, sleeping, stunned, webbed
  - classification flags (crtr_flag?): ascended, ascension_boss,
    challenging, disengaged, inferior, mini_boss, mount, rider,
    sympathetic
  - Combat::Tracker data: wounded, fatalcrit, smote, ucsdecent,
    ucsgood, ucsexcellent, ucstierup - additive only, none of these
    touch $bigshot_unarmed_tier or any other existing tier/targeting
    logic, since replacing that load-bearing engine wasn't asked for
    and carries real regression risk for a smaller, unconfirmed
    benefit

flying and rooted move to native has_status? reads, both clean 1:1
mappings with no ambiguity.

frozen and prone are the more interesting migrations, and were wrong
twice before landing here:
  - frozen was first assumed to have no crtrStatus equivalent at all.
    It does: the feed's immobile="1" attribute maps to the canonical
    immobilized status, and the message parser reaches the same state
    from the entangling/restricting-force messages.
  - prone was then assumed to be a compound state needing the GameObj
    regex kept around for "^lying", on the theory that crtrStatus has
    no equivalent for lying down. It does - "^lying" is the room-
    players phrasing for the same state crtrStatus calls prone, not a
    separate condition. Confirmed against real GS4 session logs: a
    creature that is prone and nothing else renders "that is lying
    down.", so GameObj.status is "lying down" and the old ^lying regex
    always matched it. This makes the native prone read a robustness
    improvement rather than a bug fix - across ~1000 creature
    observations in those logs, the old regex and the native read
    agree on every live creature, because GameObj.status is single-
    valued with a precedence order (a creature holding two statuses
    only ever advertises the higher one - <crtrStatus stunned="1"
    prone="1"/> renders as "that appears stunned.") and every masking
    status observed is itself in the old PRONE regex. The one case
    the string genuinely cannot see is dead+prone, where GameObj
    reports only "dead"; dead_or_gone? gates that case first regardless.

Both npc_frozen? and npc_prone? keep the GameObj-string read as a
fallback for npcs with no CreatureInstance behind them (bridged
bandits, leader_target?'s fallback - see the previous PR), so they're
a strict superset of the pre-existing checks, not a narrowing.

leader_target? now wraps its result in BigshotCreature (looking up the
Creature registry by GameObj.target's id) instead of returning a raw
GameObj. This PR is what makes that necessary: once check_state_condition
calls .creature.crtr_flag?/.creature.has_status? on whatever it's
handed, a raw GameObj reaching those calls would raise. Falls back to
the raw GameObj only if no registry entry exists yet; every native-only
reader added here (npc_has_status?, npc_crtr_flag?, npc_frozen?,
npc_prone?, and the five Tracker-data readers) guards against that case
via creature_backed? and degrades to a safe default rather than raising.

Testing: spec/bigshot/creature_adapter_spec.rb extended with coverage
for every new reader, the frozen/prone native-vs-fallback behavior
(including a case built directly from a real feed line), and
leader_target?'s wrapping. Each new check verified non-tautological
against its pre-fix baseline.
@mrhoribu
mrhoribu force-pushed the feat/bigshot-crtrstatus-command-checks branch from b2558cc to 1986078 Compare August 17, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants