missionWon beta
Function of @v12-engine/engine
ts
export declare function missionWon<D extends object = Record<string, unknown>>(progress: CampaignProgress<D>, mission: string, seconds: number, heroes: HeroRecord[], next?: string, data?: Partial<D>): CampaignProgress<D>;A mission won: how long it took, the best time kept, the heroes it ends with to carry on, the campaign at the mission after it (next), or still at this one when it was the last, and what it carries of the game's own (data: its keys over the ones kept, the rest kept as they were). A new progress: the one given is left as it was