Repository navigation
A mount with a rider on it is a creature on the board: a blast or a laid area catches it apart from its rider, it threatens, an aura it holds has squares, and the GM's board text gives it a line - #1066
Open
Smoebo wants to merge 7 commits into
Conversation
…t saves to stay on, a push at the rider takes it alone out of the saddle, and a mount that goes down drops it A rider knocked prone, or whose mount is pushed, pulled or force-moved, makes the DC 10 Dexterity save from its own stat block once as the call finishes, and a failure leaves it prone beside its mount (issue 1055). A push, pull or forced move that names the rider moves the rider alone, prone where the push ends, with no save, and the mount stays (ruling 6). A mount knocked prone or dropped to 0 costs its rider its reaction to land standing, and a rider with none falls prone. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…h of one call Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… and a pull at the mount draws the pair Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… its own name, and tests hold the cast push, the thrown foe and the psionic push for a pair A mount carrying a rider has no token of its own, and three places in the area code looked for one. A mount whose turn started in Gust of Wind was never asked its save, a mount caught by Web walked on to the square it was making for, and an area that pushes had no token to move. Each now finds the pair's token, and the push moves the mount as the pair, so its rider saves once to stay on. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…aid area catches it apart from its rider, it threatens, an aura it holds has squares, and the GM's board text gives it a line Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows the falls piece of #1055 (#1065). Ruling 6 says "an area that catches both creatures resolves each one separately". The engine could not do that, and this is why.
This branch is stacked on #1065. It is cut from that branch, so until #1065 merges the diff here shows both. The commit of this piece is the last one. Part of #1055; it does not close it.
What was wrong
A pair stands on one token, the rider's (ruling 1 of #1036 and of #1055). So the list of pieces on the board,
listTokens, has no entry for a mount with a rider on it.getTokenByRefalready finds such a mount on its rider's token. Every rule that reads the list instead passed the mount over:I counted 107 calls of
listTokensin 70 files and classed every one. About half draw, count, place or move the pieces themselves and are right as they are. The rest ask a rules question and are wrong for a ridden mount.What this does
One new function,
listStandingsinsrc/lib/db/battle-maps.ts: the pieces on the board, plus one entry for each ridden mount. That entry is the rider's token under the mount's own id, name and kind. It covers an enemy's mount (#1055) and a character's independent mount (#1036) alike. Rules code that asks who stands where reads it. Code that moves or draws pieces keepslistTokens, because the two entries of a pair are one row and a write made for each would be made twice.listHiddenRefIdsnow holds the mount of a hidden rider too.The doors switched, and what ran:
creaturesInBlast,standingIninaoe-shape.tsareaProbleminaoe-shape.tscreaturesInLaidZoneinaoe-shape.tsgroundedIninzone-quake.tsliveZonesinzone-store.tsmomentForinzone-triggers.tsthreatSpotsinattack-spatial.tslashOutinconfusion.tscheckPcAttackRange,unknownCombatantinmap-tools.tsserializeMapForPrompt, called fromturn.tsbuildPlayerMapViewinview.tslistHiddenRefIdsSwitched the same way, read and type-checked but not run: where a cast area is centred and the foe a sphere is sent beside (
zone-cast.ts), a drifting cloud's caster and a character's mount pushed by a standing area (zone-triggers.ts), the two swarm doors (genre-cc-a-spends.ts,genre-cc-a-turns.ts), a thrown area's named target (genre-b-zones.ts), the ally beside a Sneak Attack target and the Hand's walls check (map-tools.ts,attack-spatial.ts), Rakish Audacity's duel (authored-hooks.ts), a strike on a projected body (spirit-projection.ts), a summon's anchor (summon-store.ts), Cauterizing Flames (cauterizing-flames.ts), Naturally Stealthy's screen (hide-traits.ts) and a walking heal's target (authored-heal-area.ts).Choices that are yours to overrule
What is not in it
Each of these is wrong for a ridden mount today and needs more than the new list. They are steps of the same plan, not surprises.
Settings, options and controls
Tests
test-enforce-ridden-mount-standings(new, 12 tests). WithlistStandingsstubbed to return the plain list and every other change removed, all 12 fail. The first of them tests the list itself, so it fails by construction.test-enforce-enemy-rider-falls31,test-enforce-enemy-riders22,test-enforce-independent-mounts16,test-enforce-zones65,test-enforce-last-spells18,test-enforce-area-shapes14,test-enforce-area-attacker3,test-enforce-srd-combat44.npx tsc --noEmit: clean.npx eslinton every changed file: clean.npm test: 1268 of 1270 files passed. The two that fail,test-backup-in-appandtest-backup-restore, fail on my Windows machine onmainas well.npm run build: passes.score-cards); I have no local model.Checks
npm run buildpasses and lint is clean on every changed file;npm testas stated above..envfiles or players' names in the code, the tests or this description.🤖 Generated with Claude Code