Commit Graph

16 Commits

Author SHA1 Message Date
Cal Corum
7f06ec229a Add Roll Damage button to spell chat cards
Spell damage is now rolled separately via button click instead of
automatically, matching the attack roll behavior. Includes spell chat
card styling fixes for proper header layout and damage display.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 18:14:04 -06:00
Cal Corum
a30cc62957 Add crit threshold stepper to attack and spell roll dialogs
- Add always-visible crit threshold display with +/- adjustment buttons
- Store modifier relative to base threshold, clamped between 1 and 20
- Reset modifier when changing weapon/spell selection
- Use Math.clamp (not deprecated Math.clamped) for Foundry v13 compatibility
- Pass effective crit threshold to attackCheck() and skillCheck()
- Add SCSS styling for stepper control with hover states

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 15:42:11 -06:00
Cal Corum
bf2cd92e93 Add Status item system and separate attack/damage rolls
Status System:
- Add StatusData model with mechanical modifiers (damageDealt, healingReceived)
- Add status item sheet with modifier configuration
- Add status-bar.hbs for displaying status chips on actor sheets
- Status chips show tooltip on hover, can be removed via click
- Add 17 status items to compendium (Blinded, Burning, Charmed, etc.)
- Frightened applies -2 damage dealt, Sickened applies -2 healing received

Attack Roll Changes:
- Separate attack and damage into two discrete rolls
- Attack hit now shows "Roll Damage" button instead of auto-rolling
- Button click rolls damage and updates the chat message in-place
- Store weapon/attack data in message flags for later damage rolling
- Fix favor/hinder and modifier preset buttons in attack dialog
- Show individual damage dice results in chat card breakdown

Mechanical Integration:
- Add _applyStatusModifiers() to VagabondActor for aggregating status effects
- Update getRollData() to include statusModifiers for roll formulas
- Update damageRoll() to automatically apply damageDealt modifier
- Update applyHealing() to respect healingReceived modifier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 14:36:57 -06:00
Cal Corum
06e0dc01c0 Complete P2-P5: Perks, Feature Choices, Ancestry Traits, Caster Progression
- P2: Perks with changes[] arrays create Active Effects on drop/delete
- P3: Feature choice UI for Fighting Style (auto-grants Situational
  Awareness + selected training perk, ignoring prerequisites)
- P4: Ancestry traits apply Active Effects (Dwarf Darksight/Tough working)
- P5: Caster progression accumulates mana from class progression table

Key patterns:
- Manual UUID construction: Compendium.${pack.collection}.Item.${entry._id}
- ignorePrereqs flag for specific choices bypassing all prerequisites
- Mode 5 (OVERRIDE) for boolean senses like darkvision
- Form data merging with direct DOM reading for reliable selection capture

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 14:23:44 -06:00
Cal Corum
a7862bedd5 Implement class level-up system with Active Effects
- Add level-up dialog (ApplicationV2) showing features gained per level
- Class features with `changes` arrays auto-create Active Effects
- Valor I/II/III on Fighter reduces crit threshold cumulatively (-1/-2/-3)
- Perk selection UI in dialog (awaits perk compendium content)
- Fix duplicate item creation bug (was double drop handling)
- Configure proper dragDrop in ActorSheetV2 DEFAULT_OPTIONS
- Add ancestries and classes compendium packs with LevelDB format
- Docker compose PUID/PGID for proper file permissions

Key patterns established:
- Class progression stored in item.system.progression[]
- Features with changes[] become ActiveEffects on level-up
- applyClassFeatures() is idempotent (checks existing effects)
- updateClassFeatures() handles level changes incrementally

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 12:14:08 -06:00
Cal Corum
26cac676f0 Complete accessibility audit (Task 5.9)
Color Contrast (WCAG AA 4.5:1 compliance):
- accent-highlight: #cd853f → #7a4f1d (5.23:1)
- warning: #b8860b → #705308 (5.29:1)
- dark theme muted: #8a7e6e → #9a8e7e (5.39:1)
- dark theme warning: #d4a32c → #c99020 (6.17:1)

Accessibility Utilities (_base.scss):
- .sr-only for screen reader only content
- .skip-link visible on focus
- .interactive-row with focus-visible styles
- prefers-reduced-motion media query support

Interactive Element Improvements:
- Save/attack rows: role="button", tabindex="0", aria-label
- Stat inputs: proper label for= associations
- Decorative icons: aria-hidden="true"
- Keyboard activation via _setupKeyboardAccessibility()

Editor Fix:
- Simplified editor-wrapper styles to restore ProseMirror toggle button
- Resize feature remains deferred to Task 5.11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 15:56:52 -06:00
Cal Corum
8b9daa1f36 Add light/dark theme system with CSS variables, fix ProseMirror editors
Theme System:
- Add _theme-variables.scss with light (parchment) and dark color palettes
- Register theme options in system.json for Foundry v13 color scheme support
- Convert all SCSS color variables to CSS custom properties
- Update base, mixins, components, and sheet styles for theme support
- Add _applyThemeClass() to actor and item sheet classes

ProseMirror Editor Fix (v13 ApplicationV2):
- Replace {{editor}} helper with <prose-mirror> custom element
- Add TextEditor.enrichHTML() for rich text content preparation
- Update all 8 item templates (spell, weapon, armor, equipment, etc.)
- Fix toolbar hiding content by renaming wrapper to .editor-wrapper
- Style prose-mirror with sticky toolbar and proper flex layout

Roll Dialog & Chat Card Styling:
- Complete roll dialog styling with favor/hinder toggles, info panels
- Complete chat card styling with roll results, damage display, animations
- Mark tasks 5.7 and 5.8 complete in roadmap
- Add task 5.11 for deferred resizable editor feature

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 15:36:16 -06:00
Cal Corum
5ddd33c41c Implement complete item sheet system with Effects tab
Phase 4 (Item Sheets) complete:
- Created VagabondItemSheet base class using ApplicationV2 + HandlebarsApplicationMixin
- Implemented templates for all 8 item types: weapon, armor, equipment, ancestry, class, spell, perk, feature
- Added Details and Effects tabs to all item sheets
- Effects tab provides full CRUD for Active Effects (create, edit, toggle, delete)
- Added ~150 localization strings for item fields and UI elements
- Comprehensive SCSS styling matching parchment theme

Key features:
- Type-specific templates with appropriate fields for each item type
- Array field management for traits, progression tables, features
- Wider dropdowns for ancestry Being Type and Size fields
- Effect controls remain clickable when effect is disabled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 02:30:18 -06:00
Cal Corum
694b11f423 Implement movement capability system with boolean toggles
Movement types (Climb, Cling, Fly, Phase, Swim) now use boolean
toggles instead of separate speed values, matching RAW where all
special movement uses base speed.

Changes:
- Update NPC and Character data models with movement schema
- Add movement section to NPC stats template (grid layout)
- Add movement section to character biography template
- Add localization strings with tooltip hints for each type
- Style movement grid to match senses section pattern
- Add rollable # Appearing label for NPC sheets
- Fix NPC sheet scrollbar visibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 00:16:44 -06:00
Cal Corum
15fd9f684f Style Magic and Biography tabs, update senses system
Magic tab:
- Mana display matching inventory header format
- Focus status panel with active spell tracking
- Spell list with damage/effect badges and cast buttons
- Spellcasting reference guide with delivery/duration costs

Biography tab:
- Character details section with Size and Being Type dropdowns
- Senses as 3-column grid of boolean checkboxes
- Biography and Notes textareas with proper styling
- Languages section hidden (not yet implemented)

Senses system overhaul:
- Changed from mixed boolean/number to all boolean toggles
- Renamed darksight to darkvision
- Added: allsight, echolocation, seismicsense, telepathy
- Removed: tremorsense (not in system)
- Updated both character and NPC data models
- Updated NPC sheet template and hasSenses logic

Also updated PROJECT_ROADMAP.json with styling progress notes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-14 22:36:11 -06:00
Cal Corum
10963403e9 Style abilities tab with ancestry, features, perks, and effects
- Add ancestry block with header (image, name, type, size) and traits list
- Style features and perks lists with grid layout for image/info/description
- Add active effects display for temporary and passive effects
- Fix perk prerequisites display using getPrerequisiteString() method
- Add responsive layout for narrow containers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 21:56:49 -06:00
Cal Corum
7489b60281 Style inventory tab with item lists and header
- Add inline header with item slots and currency inputs (gold/silver/copper)
- Style item sections (weapons, armor, equipment) with proper list layout
- Constrain item thumbnails to 32x32px
- Add colored stat badges for damage (red) and armor (blue)
- Style equip toggle and delete buttons with hover states
- Add responsive layout for narrow containers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 21:19:00 -06:00
Cal Corum
8e097c9b2d Implement character sheet foundation with ApplicationV2
Add actor sheet implementation using Foundry VTT v13 ApplicationV2 API:
- Base actor sheet class with tab navigation, drag-drop, scroll preservation
- Character sheet with header, main tab (stats, saves, skills, attacks)
- NPC sheet structure (templates only, styling pending)
- Resource bars with fill effect and backdrop pills for legibility
- Responsive layout using CSS Container Queries
- Fix for ApplicationV2 tab switching (cleanup stale parts)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 16:43:28 -06:00
Cal Corum
6247004b58 Implement spell casting system with rulebook-accurate mana costs
- Add SpellCastDialog with delivery/duration/damage configuration
- Fix mana cost calculation to match rulebook formula:
  - Effect-only or 1d6 damage-only = 0 mana
  - Both damage AND effect = 1 mana base
  - +1 per extra damage die beyond first
  - +delivery cost (Touch/Remote/Imbue=0, Cube=1, Area=2)
  - Duration has no initial cost (Focus requires maintenance)
- Add "Include Effect" toggle for damage vs effect choice
- Create spell cast chat card template
- Add 20+ i18n strings for spell casting UI
- Create comprehensive Quench tests for mana calculation
- Add Cast Spell macro for testing
- Update CLAUDE.md with NoteDiscovery access instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 20:22:20 -06:00
Cal Corum
27a5f481aa Implement attack and save roll systems with difficulty fix
Phase 2 Tasks 2.6 & 2.7: Complete roll dialog system
- Add AttackRollDialog with weapon selection, grip toggle, attack type display
- Add SaveRollDialog with save type selection, defense options (block/dodge)
- Fix Handlebars template context resolution bug ({{this.difficulty}} pattern)
- Calculate difficulty once in dialog, pass to roll function via options
- Add difficulty/critThreshold pass-through tests for skill checks
- Fix attack check tests: use embedded items, correct damageType to "slashing"
- Add i18n strings for saves, attacks, defense types
- Add chat card and dialog styles for all roll types
- Export all roll dialogs and create system macros

Key technical fix: Handlebars was resolving {{difficulty}} through context
chain to actor.system.skills.X.difficulty (schema default 20) instead of
root template data. Using {{this.difficulty}} explicitly references root.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 19:52:28 -06:00
Cal Corum
463a130c18 Implement skill check system with roll dialogs and debug tools
Phase 2.5: Skill Check System Implementation

Features:
- ApplicationV2-based roll dialogs with HandlebarsApplicationMixin
- Base VagabondRollDialog class for shared dialog functionality
- SkillCheckDialog for skill checks with auto-calculated difficulty
- Favor/Hinder system using Active Effects flags (simplified from schema)
- FavorHinderDebug panel for testing flags without actor sheets
- Auto-created development macros (Favor/Hinder Debug, Skill Check)
- Custom chat cards for skill roll results

Technical Changes:
- Removed favorHinder from character schema (now uses flags)
- Updated getNetFavorHinder() to use flag-based approach
- Returns { net, favorSources, hinderSources } for transparency
- Universal form styling fixes for Foundry dark theme compatibility
- Added Macro to ESLint globals

Flag Convention:
- flags.vagabond.favor.skills.<skillId>
- flags.vagabond.hinder.skills.<skillId>
- flags.vagabond.favor.attacks
- flags.vagabond.hinder.attacks
- flags.vagabond.favor.saves.<saveType>
- flags.vagabond.hinder.saves.<saveType>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 17:31:15 -06:00