Browse Source

feat: initial task

develop
Dale 1 year ago
parent
commit
ef873f22e2
Signed by: Deiru GPG Key ID: AA250C0277B927E1
  1. 2
      src/game.tsx
  2. 2
      src/lib/store.ts
  3. 1
      src/lib/tasks.ts

2
src/game.tsx

@ -233,6 +233,7 @@ const nodes: INode<IGameState>[] = [
if (!talkedAboutTrapdoor) {
dispatch(setState({ talkedAboutTrapdoor: true }));
awardSkill(dispatch, skillPoints);
dispatch(setTask('trapdoor', { stagesComplete: [0, 1] })(dispatch));
return { text: 'You feel like this will help you search for the trap door. [+1 Skill Point]' };
}
}
@ -266,6 +267,7 @@ const actors: IActor<IGameState>[] = [
if (!haveTalkedToHelper) {
dispatch(setState({ haveTalkedToHelper: true }));
dispatch(setTask('outside', { stagesComplete: [0, 1, 2] })(dispatch));
dispatch(setTask('trapdoor', { stages: [0, 1], stagesComplete: [0] })(dispatch));
}
},
{ actorId: 'char_helper', text: 'Back again, huh?' },

2
src/lib/store.ts

@ -71,7 +71,7 @@ const defaultState: IGameState = {
ui: { menuTab: 'skills' },
db: {
characters: [],
tasks: [],
tasks: [{ id: 'trapdoor', stages: [0], stagesComplete: [] }],
},
backlog: [],
};

1
src/lib/tasks.ts

@ -6,6 +6,7 @@ const tasks: TaskInfo = {
description: "\"You're here to find a famous trap door leading to adventure and treasure!\"",
stages: [
"Find the trap door",
"Ask Helper about trap door",
]
},
choice: {

Loading…
Cancel
Save