Skip to content

AchievementCondition beta ​

TypeAlias of @v12-engine/client

ts
export type AchievementCondition = {
    stat: string;
    atLeast?: number;
    atMost?: number;
} | {
    won: true;
} | {
    lost: true;
} | {
    objective: string;
    status?: 'done' | 'failed';
} | {
    all: AchievementCondition[];
} | {
    any: AchievementCondition[];
} | {
    not: AchievementCondition;
} | ((facts: AchievementFacts) => boolean);

When an achievement is earned, as data: a stat of the player's (stat, at least or at most so much), the game won or lost, an objective of theirs done or failed, any or all of others, or not another; or a function of what is so (AchievementFacts)