Thread inspector says where Roll it with … instead is when it's hidden

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
RobinFiredrake 2026-11-14 14:40:03 -06:00
parent de942d57ee
commit 77d262e969
3 changed files with 9 additions and 0 deletions

View file

@ -80,6 +80,7 @@ A thread carries the roll from a result to another card.
## Rolling with other dice
A thread can roll a card with numbered ranges using different dice, just this once.
- Type the dice in [b]Roll it with … instead[/b], such as `3d10+70`. Leave it empty to use the card's own dice.
- The field is in the thread's inspector, and only shows when the card it leads to has numbered ranges (Ranged in that card's settings). Otherwise the inspector says so.
- Example: a World Feature card is rolled with 1d100, but "Multiple features" rolls it twice with 3d10+70, so only the higher results come up.
## Rolling again on some results

View file

@ -97,6 +97,9 @@ func _test_selection() -> void:
_eq(insp.selection.get("to"), "loot", "select_pipe")
_eq(insp.pipe_parts.keys(), ["loot"], "a thread shows only its own box")
_eq(main.board.pipes.select_key, "beyond:e2>loot", "the selected thread is highlighted on the spread")
var plain_target: bool = not main.data.get_table("loot").is_ranged()
var hints := insp.find_children("*", "Label", true, false).filter(func(l: Label) -> bool: return l.has_meta("dice_hint"))
_check(not plain_target or hints.size() == 1, "a thread into a card without ranges says where Roll it with … instead is")
main.clear_inspector()
_check(insp.selection.is_empty(), "clear_inspector")
main.open_pipe_options("beyond:e2>curios", Vector2(10, 10))

View file

@ -50,6 +50,11 @@ static func rows(insp: Inspector, e: TableEntry, to: String, target: RollTable,
return
if target.is_ranged():
_dice_row(insp, e, to, target, v, parts)
else:
# Say why "Roll it with … instead" isn't here, so it can be found.
var hint := InspectorKit.note("Rolling it with other dice needs numbered ranges: make %s Ranged in its own settings." % Inspector._title_of(target.name, "the card"), Style.MUTED, 12)
hint.set_meta("dice_hint", true)
v.add_child(hint)
_reroll_rows(insp, e, to, target, v, parts)