diff --git a/dialog.js b/dialog.js index 12850e9..eefc2e2 100644 --- a/dialog.js +++ b/dialog.js @@ -1,6 +1,6 @@ "use strict"; -function DialogNode { +function DialogNode() { this.text = "Foo bar baz."; this.hooks = []; @@ -16,3 +16,20 @@ function DialogNode { this.choices.push({"text": text, "node": node}); } } + +function EatDude() { + DialogNode.call(this); + + this.text = "You approach the nerd."; + + let eatHim = new DialogNode(); + + eatHim.text = "You eat the nerd. Burp."; + eatHim.hooks.push(function() { player.health += 100 } ); + + let dontEatHim = new DialogNode(); + dontEatHim.text = "You don't eat the nerd."; + + this.addChoice("Eat him lol",eatHim); + this.addChoice("Actually don't",dontEatHim); +} diff --git a/feast.css b/feast.css index 839ddf5..78b5b94 100644 --- a/feast.css +++ b/feast.css @@ -15,32 +15,24 @@ button { display: none; } -.compass-button { - width: 100px; - height: 100px; - font-size: 18px; -} - -.active-compass-button { +.active-button { } -.inactive-compass-button { +.inactive-button { background: #111; } -.action-button { +.compass-button { width: 100px; height: 100px; font-size: 18px; } -.active-action-button { - -} - -.inactive-action-button { - background: #111; +.action-button { + width: 100px; + height: 100px; + font-size: 18px; } .combat-button { @@ -49,12 +41,10 @@ button { font-size: 18px; } -.active-combat-button { - -} - -.inactive-combat-button { - background: #111; +.dialog-button { + width: 100px; + height: 100px; + font-size: 18px;s } #log { diff --git a/feast.html b/feast.html index 66af074..37f712c 100644 --- a/feast.html +++ b/feast.html @@ -5,6 +5,7 @@
| + + | ++ + | ++ + | +
|---|