feat: Foundry Sync Brief 2026-10-26 (partial: casting penalties, prayer route, Hartowany, Próg Obłędu) #11
@@ -5,6 +5,11 @@ All notable changes to the **HbM RPG v3** Foundry VTT system.
|
|||||||
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
||||||
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.5.2] - 2026-10-26
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- A character with the discipline Magia Sakralna - Egzorcyzmy (`sacredExorcism`) is now treated as a Sacred Magic caster in the spell discipline gate. Before, it only matched its own id, so exorcists failed the requirement for Sacred spells. The match is one-way: a plain Sacred mage is not an exorcist.
|
||||||
|
|
||||||
## [1.5.1] - 2026-10-22
|
## [1.5.1] - 2026-10-22
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hbm-rpg-v3-foundry",
|
"name": "hbm-rpg-v3-foundry",
|
||||||
"version": "1.5.1",
|
"version": "1.5.2",
|
||||||
"description": "Foundry VTT system for Homebrew Magic: Role Playing Game v3",
|
"description": "Foundry VTT system for Homebrew Magic: Role Playing Game v3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ function actorHasTalent(actor: CastableActor, talentId: string): boolean {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchDiscipline(disciplineId: string, targetId: string): boolean {
|
export function matchDiscipline(disciplineId: string, targetId: string): boolean {
|
||||||
const d1 = disciplineId.toLowerCase().trim();
|
const d1 = disciplineId.toLowerCase().trim();
|
||||||
const d2 = targetId.toLowerCase().trim();
|
const d2 = targetId.toLowerCase().trim();
|
||||||
if (d1 === d2) return true;
|
if (d1 === d2) return true;
|
||||||
@@ -52,6 +52,8 @@ function matchDiscipline(disciplineId: string, targetId: string): boolean {
|
|||||||
abyssprimal: ['abyssprimal', 'magia otchłani', 'primal', 'eldritch', 'eldritch magic', 'abyss - primal', 'magia otchłani - pierwotna magia', 'pierwotna magia'],
|
abyssprimal: ['abyssprimal', 'magia otchłani', 'primal', 'eldritch', 'eldritch magic', 'abyss - primal', 'magia otchłani - pierwotna magia', 'pierwotna magia'],
|
||||||
witch: ['witch', 'wiedźmia magia', 'witch magic', 'dzika wiedźmia magia', 'wildwitch'],
|
witch: ['witch', 'wiedźmia magia', 'witch magic', 'dzika wiedźmia magia', 'wildwitch'],
|
||||||
blood: ['blood', 'magia krwi', 'blood magic'],
|
blood: ['blood', 'magia krwi', 'blood magic'],
|
||||||
|
sacred: ['sacred', 'magia sakralna', 'sacred magic'],
|
||||||
|
sacredexorcism: ['sacredexorcism', 'magia sakralna - egzorcyzmy', 'egzorcyzmy', 'exorcism', 'exorcisms', 'sacred - exorcisms'],
|
||||||
};
|
};
|
||||||
|
|
||||||
let key1: string | null = null;
|
let key1: string | null = null;
|
||||||
@@ -63,6 +65,8 @@ function matchDiscipline(disciplineId: string, targetId: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (key1 && key2 && key1 === key2) return true;
|
if (key1 && key2 && key1 === key2) return true;
|
||||||
|
// Egzorcyzmy are a sub-discipline of Magia Sakralna: an exorcist counts as Sacred, not the other way round.
|
||||||
|
if (key1 === 'sacredexorcism' && key2 === 'sacred') return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"id": "hbm-rpg-v3",
|
"id": "hbm-rpg-v3",
|
||||||
"title": "Homebrew Magic: RPG v3",
|
"title": "Homebrew Magic: RPG v3",
|
||||||
"description": "System Foundry VTT dla Homebrew Magic: Role Playing Game v3 - autorska gra fabularna z mechaniką puli kości d6 (TS - Trudność:Sukcesy).",
|
"description": "System Foundry VTT dla Homebrew Magic: Role Playing Game v3 - autorska gra fabularna z mechaniką puli kości d6 (TS - Trudność:Sukcesy).",
|
||||||
"version": "1.5.1",
|
"version": "1.5.2",
|
||||||
"manifest": "https://vtt-content.octoturge.com/packages/system/hbm-rpg-v3.json",
|
"manifest": "https://vtt-content.octoturge.com/packages/system/hbm-rpg-v3.json",
|
||||||
"download": "https://vtt-content.octoturge.com/packages/system/hbm-rpg-v3-v1.5.0.zip",
|
"download": "https://vtt-content.octoturge.com/packages/system/hbm-rpg-v3-v1.5.0.zip",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import { describe, it, expect } from 'vitest';
|
||||||
|
import { matchDiscipline } from '../../src/logic/spell-validation';
|
||||||
|
|
||||||
|
describe('matchDiscipline: Magia Sakralna - Egzorcyzmy', () => {
|
||||||
|
it('an exorcist counts as Sacred Magic for casting', () => {
|
||||||
|
expect(matchDiscipline('sacredExorcism', 'sacred')).toBe(true);
|
||||||
|
expect(matchDiscipline('Magia Sakralna - Egzorcyzmy', 'sacred')).toBe(true);
|
||||||
|
expect(matchDiscipline('Egzorcyzmy', 'Magia Sakralna')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('a plain Sacred mage is not an exorcist', () => {
|
||||||
|
expect(matchDiscipline('sacred', 'sacredExorcism')).toBe(false);
|
||||||
|
expect(matchDiscipline('Magia Sakralna', 'egzorcyzmy')).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not leak into other disciplines', () => {
|
||||||
|
expect(matchDiscipline('sacredExorcism', 'witch')).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user