Fixes: adv/dis as a global toggle, auto-number duplicate combatants
- Advantage/Disadvantage are now toggle modes (rollStore.mode) applied to d20 rolls everywhere (dice page, sheet skills/saves/attacks), preserving modifiers; applyRollMode() rewrites the first d20 -> 2d20kh1/kl1 - addCombatant auto-numbers duplicate names (Goblin 1, Goblin 2, …); the first duplicate also renames the original. Quantity add relies on this. - Tests for applyRollMode + duplicate numbering Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -202,7 +202,7 @@ function AddCombatantBar({
|
||||
for (let i = 0; i < n; i++) {
|
||||
onAdd({
|
||||
id: newId(),
|
||||
name: n > 1 ? `${name.trim()} ${i + 1}` : name.trim(),
|
||||
name: name.trim(), // engine auto-numbers duplicates
|
||||
kind: 'monster',
|
||||
initiative: init,
|
||||
initBonus: 0,
|
||||
|
||||
Reference in New Issue
Block a user