diff --git a/help/topics.txt b/help/topics.txt index 414e490..b75653a 100644 --- a/help/topics.txt +++ b/help/topics.txt @@ -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 diff --git a/tests/test_inspector.gd b/tests/test_inspector.gd index 3ce50b7..79eedb2 100644 --- a/tests/test_inspector.gd +++ b/tests/test_inspector.gd @@ -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)) diff --git a/ui/inspector_thread_rolls.gd b/ui/inspector_thread_rolls.gd index e2ae563..3081e35 100644 --- a/ui/inspector_thread_rolls.gd +++ b/ui/inspector_thread_rolls.gd @@ -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)