AGE Official Update: Improve spell labels and attack spell metadata - #98
AGE Official Update: Improve spell labels and attack spell metadata#98nighthunter226-but-real wants to merge 9 commits into
Conversation
…t syntax to print spell power/focus TN based on system
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe ChangesSpell Data Shape & UI Expansion
Utility Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ageofficial/src/components/magic/CharacterSpell.vue`:
- Around line 64-67: The span displaying spell.spellTest information on line 67
hardcodes the resistance label as "Spellpower", but this should be
system-specific. For Modern AGE games (where gameSystem equals 'mage'), the
label should show "Force" instead. Create a computed property or method in the
CharacterSpell component that returns the appropriate resistance label based on
the gameSystem value, then use that in place of the hardcoded "Spellpower"
string in the spellTest display span to maintain consistency with the damage
chat generation logic.
- Around line 16-20: The disable logic for the spell casting button in
CharacterSpell.vue allows casting when settings.userPowerFatigue is true
(bypassing the MP cost check), but the handlePrint method or the underlying
magicStore.ts spendMP function still deducts MP from char.magic even in
power-fatigue mode for non-blue-rose systems. To fix this inconsistency, ensure
that when settings.userPowerFatigue is enabled and a spell is cast, the spendMP
call in magicStore.ts (around line 109) is skipped for non-blue-rose systems, or
add a power-fatigue mode check in handlePrint to prevent the MP deduction from
occurring when power-fatigue is active, so the resource handling matches the UI
behavior.
In `@ageofficial/src/components/magic/SpellModal.vue`:
- Around line 200-209: The Conditions label and input elements (the span with id
"basic-addon1" and the text input with v-model="spell.conditions") are not
properly wrapped in a column container, causing structural misalignment. Wrap
both the Conditions label span and input field inside a new div element with the
classes "mb-3 col" to match the expected Bootstrap grid structure and ensure
proper nesting with the closing div tag on line 209. This will align the
Conditions field structure with other form fields in the component and prevent
layout breakage for subsequent fields.
In `@ageofficial/src/sheet/stores/magic/magicStore.ts`:
- Around line 77-79: The condition `if (spell?.fatigue)` at the fatigue
assignment in magicStore.ts uses a truthy check, which skips assignment when
fatigue is 0 (a valid falsy value). Replace this truthy check with an explicit
check for existence, such as `if (spell?.fatigue !== undefined)` or `if
('fatigue' in spell && spell.fatigue !== undefined)`, to ensure that explicit
zero-fatigue values are preserved during spell add/edit flows.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 10a2a66a-8ee6-48b0-8474-9decdaa40038
📒 Files selected for processing (3)
ageofficial/src/components/magic/CharacterSpell.vueageofficial/src/components/magic/SpellModal.vueageofficial/src/sheet/stores/magic/magicStore.ts
Submission Checklist
New Sheet Checklist
Not applicable. This is an update to the existing AGE official sheet.
Changes / Description (optional)
Updates AGE spell/power handling and related attack metadata:
Forcefor Modern AGE resistance targets andSpellpowerfor Fantasy AGE/Blue Rose.Validation:
npm run buildpasses.Summary by CodeRabbit
Release Notes
New Features
Bug Fixes