V1.23.0: every subclass, 43 species, the Artificer, and the road to level 20
- All 123 official subclasses (2014 books and the 2024 Player's Handbook), each with its book and features up to level 20; one file per class - The builder has a subclass step after the class: pick one, let a die suggest one, or decide later; its gifts arrive at the class's choice level - 2024 updates (Wild Heart, Warrior of the Elements) offer a one-click switch - The Road Ahead: a level 1-20 timeline on every sheet and in the builder - 33 new species (2024 Aasimar and Goliath, Monsters of the Multiverse) with chosen +2/+1 or +1/+1/+1 bonuses; species roll is now a d8 by family - The Artificer: class, half-caster slots from level 1, features, Flash of Genius - Class tables and counters run to level 20; a fifth Boon, Resolve Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import { apiClient } from './client';
|
||||
import type {
|
||||
BuildOptions,
|
||||
Campaign,
|
||||
CharacterClass,
|
||||
CampaignLibrary,
|
||||
CampaignMemberSummary,
|
||||
CharacterDetail,
|
||||
@@ -20,6 +21,7 @@ import type {
|
||||
Monster,
|
||||
Note,
|
||||
Npc,
|
||||
ProgressionLevel,
|
||||
SaleOffer,
|
||||
QuickStats,
|
||||
RestResult,
|
||||
@@ -360,6 +362,21 @@ export function useBuildOptions() {
|
||||
});
|
||||
}
|
||||
|
||||
// What each level from 1 to 20 gives a class, with a subclass's lines when one is given.
|
||||
export function useProgression(characterClass: CharacterClass | null | undefined, subclass?: string | null) {
|
||||
return useQuery({
|
||||
queryKey: ['progression', characterClass, subclass ?? null],
|
||||
enabled: Boolean(characterClass),
|
||||
staleTime: Infinity, // rules: they never change while the app is open
|
||||
queryFn: async () =>
|
||||
(
|
||||
await apiClient.get<{ levels: ProgressionLevel[] }>('/reference/progression', {
|
||||
params: { class: characterClass, ...(subclass ? { subclass } : {}) },
|
||||
})
|
||||
).data.levels,
|
||||
});
|
||||
}
|
||||
|
||||
function invalidateCharacter(qc: ReturnType<typeof useQueryClient>, characterId: string) {
|
||||
qc.invalidateQueries({ queryKey: ['character', characterId] });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user