| @@ -3,7 +3,7 @@ | |||||
| const old = getStat("suspicion", state); | const old = getStat("suspicion", state); | ||||
| if (add >= 0) { | if (add >= 0) { | ||||
| add *= state.geta.awareness; | |||||
| add *= state.info.awareness.value; | |||||
| } | } | ||||
| changeStat("suspicion", add, state); | changeStat("suspicion", add, state); | ||||
| @@ -28,8 +28,22 @@ | |||||
| "intro": { | "intro": { | ||||
| "start": "pepper-grinder", | "start": "pepper-grinder", | ||||
| "setup": state => { | "setup": state => { | ||||
| state.geta = {}; | |||||
| state.geta.awareness = 1; | |||||
| state.info.awareness = { | |||||
| id: "awareness", | |||||
| name: "Geta's Awareness", | |||||
| type: "counter", | |||||
| value: 1, | |||||
| get render() { | |||||
| if (this.value < 1) { | |||||
| return "Distracted"; | |||||
| } else if (this.value == 1) { | |||||
| return "Normal" | |||||
| } else { | |||||
| return "Alert" | |||||
| } | |||||
| } | |||||
| } | |||||
| state.player.stats.health = { name: "Health", type: "meter", value: 100, min: 0, max: 100, color: "rgb(255,55,55)" }; | state.player.stats.health = { name: "Health", type: "meter", value: 100, min: 0, max: 100, color: "rgb(255,55,55)" }; | ||||
| state.player.stats.suspicion = { name: "Suspicion", type: "meter", value: 0, min: 0, max: 100, color: "rgb(100,100,100)" }; | state.player.stats.suspicion = { name: "Suspicion", type: "meter", value: 0, min: 0, max: 100, color: "rgb(100,100,100)" }; | ||||
| @@ -92,44 +106,47 @@ | |||||
| if (random < 0.7) { | if (random < 0.7) { | ||||
| print(["Geta slurps up a spoonful of cereal."]); | print(["Geta slurps up a spoonful of cereal."]); | ||||
| return Math.random() * 3000 + 3000 | |||||
| } else if (random < 0.9) { | } else if (random < 0.9) { | ||||
| state.geta.awareness = 0.1; | |||||
| state.info.awareness.value = 0.1; | |||||
| print(["The fox yawns and stretches."]); | print(["The fox yawns and stretches."]); | ||||
| startTimer({ | startTimer({ | ||||
| id: "yawn-end", | id: "yawn-end", | ||||
| func: state => { | func: state => { | ||||
| print(["Geta finishes his stretch"]); | print(["Geta finishes his stretch"]); | ||||
| state.geta.awareness = 1; | |||||
| state.info.awareness.value = 1; | |||||
| return true; | return true; | ||||
| }, | }, | ||||
| delay: 2000, | |||||
| delay: 5000, | |||||
| loop: false, | loop: false, | ||||
| classes: [ | classes: [ | ||||
| "free" | "free" | ||||
| ] | ] | ||||
| }, state); | }, state); | ||||
| return Math.random() * 3000 + 5000 | |||||
| } else { | } else { | ||||
| state.geta.awareness = 2; | |||||
| state.info.awareness.value = 2; | |||||
| print(["Geta narrows his eyes and looks around the table. Something seems off to him..."]); | print(["Geta narrows his eyes and looks around the table. Something seems off to him..."]); | ||||
| startTimer({ | startTimer({ | ||||
| id: "squint-end", | id: "squint-end", | ||||
| func: state => { | func: state => { | ||||
| print(["He goes back to his breakfast."]); | print(["He goes back to his breakfast."]); | ||||
| state.geta.awareness = 1; | |||||
| state.info.awareness.value = 1; | |||||
| return true; | return true; | ||||
| }, | }, | ||||
| delay: 4000, | |||||
| delay: 5000, | |||||
| loop: false, | loop: false, | ||||
| classes: [ | classes: [ | ||||
| "free" | "free" | ||||
| ] | ] | ||||
| }, state); | }, state); | ||||
| return Math.random() * 1000 + 6000 | |||||
| } | } | ||||
| return 5000 | |||||
| }, | }, | ||||
| delay: 5000, | delay: 5000, | ||||
| loop: true, | loop: true, | ||||
| @@ -437,7 +454,7 @@ | |||||
| "name": "Geta's Maw", | "name": "Geta's Maw", | ||||
| "desc": "You've been slurped up into the fox's jaws", | "desc": "You've been slurped up into the fox's jaws", | ||||
| "move": (room, state) => { | "move": (room, state) => { | ||||
| }, | }, | ||||
| "enter": (room, state) => { | "enter": (room, state) => { | ||||
| stopClassTimers("free", state); | stopClassTimers("free", state); | ||||