Begin fleshing out readme

This commit is contained in:
Endeavorance 2025-02-20 17:32:38 -05:00
parent cb5e0396e2
commit 29e1c3c09e
2 changed files with 79 additions and 2 deletions

View file

@ -79,6 +79,25 @@ export const PlaybillResourceSchema = z.object({
description: DescriptionSchema,
});
// An object with optional properties to define passive effects
// offered from an ability. These are aggregated by the game
// engine at runtime to determine the final stats of a character.
export const AbilityEffectSchema = z.object({
bonusMaxHp: z.number().optional(),
bonusMaxAp: z.number().optional(),
muscleProwess: TalentProwessSchema.optional(),
knowledgeProwess: TalentProwessSchema.optional(),
focusProwess: TalentProwessSchema.optional(),
charmProwess: TalentProwessSchema.optional(),
cunningProwess: TalentProwessSchema.optional(),
sparkProwess: TalentProwessSchema.optional(),
});
export const BaggageSchema = z.object({
title: z.string(),
description: z.string(),
});
// Playbill component shapes
export const AbilitySchema = PlaybillResourceSchema.extend({
$define: z.literal("ability"),
@ -89,6 +108,7 @@ export const AbilitySchema = PlaybillResourceSchema.extend({
banes: z.array(z.string()).default([]),
boons: z.array(z.string()).default([]),
});
export type PlaybillAbility = z.infer<typeof AbilitySchema>;
export const EntitySchema = PlaybillResourceSchema.extend({
@ -97,8 +117,9 @@ export const EntitySchema = PlaybillResourceSchema.extend({
species: z.string(IDSchema),
abilities: z.array(IDSchema),
stats: StatSpreadSchema,
statMaxModifiers: StatSpreadSchema,
talents: TalentSpreadSchema,
damage: z.number().default(0),
baggage: z.array(BaggageSchema).default([]),
});
export const ItemTagSchema = PlaybillResourceSchema.extend({