Add Sapped and Slowed conditions for 5.5e weapon mastery
These D&D 2024 weapon mastery conditions are edition-gated: they only appear in the condition picker when 5.5e rules are selected. Applied conditions still render correctly regardless of edition setting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ export type ConditionId =
|
||||
| "poisoned"
|
||||
| "prone"
|
||||
| "restrained"
|
||||
| "sapped"
|
||||
| "slowed"
|
||||
| "stunned"
|
||||
| "unconscious";
|
||||
|
||||
@@ -24,6 +26,8 @@ export interface ConditionDefinition {
|
||||
readonly description5e: string;
|
||||
readonly iconName: string;
|
||||
readonly color: string;
|
||||
/** When set, the condition only appears in this edition's picker. */
|
||||
readonly edition?: RulesEdition;
|
||||
}
|
||||
|
||||
export function getConditionDescription(
|
||||
@@ -159,6 +163,26 @@ export const CONDITION_DEFINITIONS: readonly ConditionDefinition[] = [
|
||||
iconName: "Link",
|
||||
color: "neutral",
|
||||
},
|
||||
{
|
||||
id: "sapped",
|
||||
label: "Sapped",
|
||||
description:
|
||||
"Disadvantage on next attack roll before the start of your next turn. (Weapon Mastery: Sap)",
|
||||
description5e: "",
|
||||
iconName: "ShieldMinus",
|
||||
color: "amber",
|
||||
edition: "5.5e",
|
||||
},
|
||||
{
|
||||
id: "slowed",
|
||||
label: "Slowed",
|
||||
description:
|
||||
"Speed reduced by 10 ft. until the start of your next turn. (Weapon Mastery: Slow)",
|
||||
description5e: "",
|
||||
iconName: "Snail",
|
||||
color: "sky",
|
||||
edition: "5.5e",
|
||||
},
|
||||
{
|
||||
id: "stunned",
|
||||
label: "Stunned",
|
||||
@@ -184,3 +208,11 @@ export const CONDITION_DEFINITIONS: readonly ConditionDefinition[] = [
|
||||
export const VALID_CONDITION_IDS: ReadonlySet<string> = new Set(
|
||||
CONDITION_DEFINITIONS.map((d) => d.id),
|
||||
);
|
||||
|
||||
export function getConditionsForEdition(
|
||||
edition: RulesEdition,
|
||||
): readonly ConditionDefinition[] {
|
||||
return CONDITION_DEFINITIONS.filter(
|
||||
(d) => d.edition === undefined || d.edition === edition,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user