- Area attack: every target's AC counts as {penalty} higher (+{AREA_AC_STEP} for each target beyond the first). Untick anyone the roll missed. + Area attack{penalty > 0 && `: every target's AC counts as ${penalty} higher (+${acStep} for each target beyond the first)`}. Untick anyone the + roll missed.
)} @@ -861,6 +864,7 @@ export function EncounterPage() { const targetIds = encounter.targetParticipantIds ?? []; const targets = targetIds.map((id) => participants.find((p) => p.id === id)).filter((p): p is EncounterParticipant => p !== undefined); // The DM marks targets whenever they like; a player while their own character is on turn. + const acStep = campaignData?.campaign.areaAttackAcPenalty ?? 0; const canTarget = isDM || (active?.character != null && active.character.userId === user?.id); const builtCharacters = characters?.filter((c) => c.buildStage === 'COMPLETE') ?? []; const onError = (err: unknown) => setFormError(extractErrorMessage(err)); @@ -891,7 +895,7 @@ export function EncounterPage() { onPatch={(data) => patchParticipant.mutate({ participantId: p.id, ...data }, fail)} canRollInitiative={isDM || (p.character != null && p.character.userId === user?.id)} targetedBy={targetIds.includes(p.id) ? (active && active.id !== p.id ? active.displayName : '') : undefined} - acPenalty={areaPenalty(targets.length)} + acPenalty={areaPenalty(targets.length, acStep)} onTarget={ canTarget ? () => setTargets.mutate(targetIds.includes(p.id) ? targetIds.filter((id) => id !== p.id) : [...targetIds, p.id], fail) @@ -1037,6 +1041,7 @@ export function EncounterPage() {