feat: renaming, conditions, summon, and encounter controls#7
Open
arrowedisgaming wants to merge 1 commit into
Open
feat: renaming, conditions, summon, and encounter controls#7arrowedisgaming wants to merge 1 commit into
arrowedisgaming wants to merge 1 commit into
Conversation
Adversary Renaming: - Auto-suffix duplicate names on insert (Bladed Guard 2, 3, etc.) - Inline rename on rendered cards (double-click name to edit) - Per-instance naming for multi-count adversaries Condition Tracking: - Toggle badges for 8 standard Daggerheart conditions per instance - Custom conditions via YAML `conditions` field - Ad-hoc custom conditions via "+" button on condition bar Summon Buttons: - Features with `summon` field render insert buttons - Summoned adversaries get unique IDs and auto-suffixed names Encounter Controls: - Clickable "Mark a Stress" text with instance picker for multi-count - Per-stat +/- and clear buttons for HP and Stress rows All changes are backward-compatible with existing state data.
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.
Summary
This PR adds several features from BeastVault's planned roadmap plus encounter management improvements:
conditionsfield or ad-hoc "+" buttonsummonfield render a button that inserts the referenced adversaryAll changes are backward-compatible — no state migration needed, existing data is preserved.
Details
Files changed
src/main.ts— state type extended withconditionsandinstanceName,ctxpassthrough to AdversaryCard,Datatype widened for arrayssrc/ui.ts— all UI additions (renaming, conditions, summon, mark-a-stress, stat controls)src/utils.ts—escapeRegex(),autoSuffixName(),DH_CONDITIONSconstantstyles.css— ~70 lines of new CSS for all featuresNew YAML fields
conditionson adversaries — list of custom condition namessummonon features — adversary name or list of names to summonDesign decisions
updateCardsince it's designed for scalar key-pathsautoSuffixName()in utilsTest plan
summonfield renders button, inserts adversary