V1.7.0: area attacks on several targets
- More than one combatant can be marked as a target; the Target button now adds to the targets instead of moving the mark. - Several targets make an area attack, which is harder to land: every target's AC counts as 2 higher for each target beyond the first. The attack bar shows the AC to beat, and each target's card names the penalty. - The DM unticks any target the roll missed, then applies one total: split evenly between those hit (remainder to the first marked), or the full amount to each. Each share is shown before it is applied. - The single target column from V1.6.0 becomes a list, carried over by the migration. - All packages at version 1.7.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -750,12 +750,12 @@ export function usePatchEncounter(encounterId: string) {
|
||||
}
|
||||
type EncounterStatusInput = 'PLANNING' | 'ACTIVE' | 'COMPLETE';
|
||||
|
||||
// Marks a combatant as the target (null clears it). The DM at any time; a
|
||||
// player while their own character is on turn.
|
||||
export function useSetTarget(encounterId: string) {
|
||||
// Sets which combatants are marked as targets (an empty list clears them).
|
||||
// The DM at any time; a player while their own character is on turn.
|
||||
export function useSetTargets(encounterId: string) {
|
||||
const qc = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async (participantId: string | null) => (await apiClient.put(`/encounters/${encounterId}/target`, { participantId })).data,
|
||||
mutationFn: async (participantIds: string[]) => (await apiClient.put(`/encounters/${encounterId}/targets`, { participantIds })).data,
|
||||
onSuccess: () => qc.invalidateQueries({ queryKey: ['encounter', encounterId] }),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user