task 11 brief - xopherdeep/do-it-for-the-xp GitHub Wiki
Files:
- Create:
src/lib/services/copy/credits.ts(privacy gate: see Global Constraints),src/components/organisms/CreditsRoll/CreditsRoll.vue,src/app/Console/MyPortal/HomeTown/components/ProjectTrophySheet.vue,src/app/Admin/XpApprovals/components/ApprovalFamilyRewardRow.vue - Modify:
src/app/Admin/XpApprovals/XpApprovals.vue(the row at the top of the achievements tab),src/app/Admin/XpDashboard/dashboardTiles.ts(approvalsTotal, L38),src/app/Console/MyPortal/MyPortal.ts(the reward reveal and the credits on open) - Test:
tests/unit/credits.spec.ts,tests/unit/CreditsRoll.spec.ts,tests/unit/ApprovalFamilyRewardRow.spec.ts
Interfaces:
- Consumes: Tasks 7, 8.
- Produces:
-
interface Maker { name: string; role: string; birthYear: number },MAKERS: readonly Maker[],makerAge(maker: Maker, year: number): number(year - birthYear) -
interface HeroCredit { heroId: string; name: string; className: string; chores: number; bosses: number; floors: string[] },heroCredits(project: ProjectRecord, quests: readonly Achievement[], paid: readonly QuestLogEntry[], heroes: readonly { id: string; name: string; className: string }[]): HeroCredit[]
-
- Step 1: Write the failing tests
-
MAKERSin order: Producer "Xopher Pollard aka XP" (1984); Character Design / Original Chore List "Krislynn Night" (2007); World Map Design "Khronus Infinidee" (2010); Bestiary / Chore / Enemy Design "Gaia Rhae-Satori" (2014); Dungeon Mechanics "Ronan Tesla" (2014); Play Tester "Kairos Sol" (2020).makerAgein 2027 gives 43, 20, 17, 13, 13, 7. -
heroCreditscounts each hero's paid project chores, the boss rooms among them, and the floors they worked; a team finale counts for every assignee. -
CreditsRollrenders the heroes' part titled "The Heroes of " with the dates and days early, then "Do It For The XP" with each maker's role, name and age, then "Thank you for playing!"; it emitsdoneat the end or on skip. - The Approvals row shows "Family reward earned: " and "Mark as given" calls
markRewardGiven;approvalsTotalcounts an earned, ungiven reward as one. - On portal open a hero who is not in
reward.seenBygets the reward reveal once (thenmarkSeen(hero, "reward")); a hero not increditsSeenBygets the credits once after the roof is beaten. - The trophy sheet lists cleared runs (newest first) with dates and each floor's multiplier, "Watch the credits", and "Start again" (opens the wizard with
choresFromLastRun).
-
- Step 2: Run the three specs. Expected: FAIL.
- Step 3: Implement. The credits scroll is CSS-animated, StatusPlz font, cream text on the theme's window colour, the tower's music kept playing. Before the lead commits
credits.ts, the lead asks the owner to confirm the names and ages may be public. - Step 4: Run the three specs. Expected: PASS.
- Step 5: Lead commits
feat(projects): the finish: the family reward, the credits roll, the trophy.