|
From: Vest <no...@gi...> - 2026-08-09 23:18:29
|
Branch: refs/heads/master Home: https://github.com/PCGen/pcgen Commit: 9f7b2eb8728b11bc997a1c14be66f71ea06615d8 https://github.com/PCGen/pcgen/commit/9f7b2eb8728b11bc997a1c14be66f71ea06615d8 Author: Vest <Ve...@us...> Date: 2026-08-10 (Mon, 10 Aug 2026) Changed paths: M code/src/java/pcgen/core/PlayerCharacter.java M code/src/slowtest/pcgen/core/PlayerCharacterTest.java M docs/listfilepages/globalfilestagpages/globalfilesbonus.html Log Message: ----------- Implement BONUS:CASTERLEVEL|ALLSPELLS (#7690) * fix: implement BONUS:CASTERLEVEL|ALLSPELLS BONUS:CASTERLEVEL|ALLSPELLS has been documented since 5.7.1 but was never implemented: getTotalCasterLevelWithSpellBonus() queried CLASS/TYPE/SPELL/ SCHOOL/SUBSCHOOL/DESCRIPTOR/DOMAIN targets but never ALLSPELLS, so the bonus parsed as a legal var yet silently did nothing. DC and CONCENTRATION already honor ALLSPELLS; CASTERLEVEL did not. Add an ALLSPELLS lookup in the aSpell != null branch, following the SCHOOL pattern: main bonus applied on != 0 so negatives count (Rod of Foiled Magic, Energy Drained, Moon Circlet), plus an ALLSPELLS.RESET variant. Because the term evaluator calls this method once per casting class, the bonus applies per class across both arcane and divine, matching the "effective caster level" semantics (Orange Prism Ioun Stone, Half-Elf Multidisciplined, Dread Lord Magical Mastery). Purely additive: data without ALLSPELLS is unaffected, and no inttest character uses an ALLSPELLS ability, so no csheet fixtures change. * docs: correct BONUS:CASTERLEVEL|ALLSPELLS description and document intent The ALLSPELLS help text claimed the bonus applies to 'both arcane and divine' and told users to filter with TYPE.Divine, but Divine is not a SPELLTYPE in shipped data and the implementation is tradition-agnostic: it applies to every spell of every casting class regardless of type. Reword to match the code and use TYPE.x (e.g. TYPE.Arcane) as the filter example. P.S. it works with TYPE.Divine, TYPE.Occult. Also add a Javadoc documenting the aSpell null/non-null contract (null = class-total query) and expand the inline comment to explain why the ALLSPELLS block sits with the per-spell TYPE/SPELL/SCHOOL group and after the aSpell == null guard. No behavior change. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> To unsubscribe from these emails, change your notification settings at https://github.com/PCGen/pcgen/settings/notifications |