diff --git a/script/events/outside.js b/script/events/outside.js index 71d7790..1a6e763 100644 --- a/script/events/outside.js +++ b/script/events/outside.js @@ -148,7 +148,7 @@ Events.Outside = [ } } }, - + { /* Plague */ title: _('Plague'), isAvailable: function() { @@ -275,7 +275,7 @@ Events.Outside = [ bullets: 10, 'cured meat': 50 }, - + blink: true, buttons: { 'end': { @@ -287,4 +287,5 @@ Events.Outside = [ } } } + ]; diff --git a/script/events/room.js b/script/events/room.js index 64f4937..1e70a3e 100644 --- a/script/events/room.js +++ b/script/events/room.js @@ -40,7 +40,7 @@ Events.Room = [ cost: { fur: 300, scales: 15, teeth: 5 }, reward: { 'compass': 1 }, notification: _('the old compass is dented and dusty, but it looks to work.') - }, + }, 'goodbye': { text: _('say goodbye'), nextScene: 'end' @@ -48,7 +48,7 @@ Events.Room = [ } } } - }, + }, { /* Noises Outside -- gain wood/fur */ title: _('Noises'), isAvailable: function() { @@ -257,7 +257,63 @@ Events.Room = [ } } }, - + {/* The Shady Builder */ + title: _('The Shady Builder'), + isAvailable: function() { + return Engine.activeModule == Room && $SM.get('game.buildings["hut"]', true) >= 5 && $SM.get('game.buildings["hut"]', true) < 20; + }, + scenes: { + 'start':{ + text: [ + _('a shady builder passes through'), + _('says he can build you a hut for less wood') + ], + notification: _('a shady builder passes through'), + buttons: { + 'build': { + text: _('300 wood'), + cost: { 'wood' : 300 }, + nextScene: {0.6: 'steal', 1: 'build'} + }, + 'deny': { + text: _('say goodbye'), + nextScene: 'end' + } + } + }, + 'steal': { + text:[ + _("the shady builder has made off with your wood") + ], + notification: _('the shady builder has made off with your wood'), + buttons: { + 'end': { + text: _('go home'), + nextScene: 'end' + } + } + }, + 'build': { + text:[ + _("the shady builder builds a hut") + ], + notification: _('the shady builder builds a hut'), + onLoad: function() { + var n = $SM.get('game.buildings["hut"]', true); + if(n < 20){ + $SM.set('game.buildings["hut"]',n+1); + } + }, + buttons: { + 'end': { + text: _('go home'), + nextScene: 'end' + } + } + } + } + }, + { /* Mysterious Wanderer -- wood gambling */ title: _('The Mysterious Wanderer'), isAvailable: function() { @@ -336,7 +392,7 @@ Events.Room = [ } } }, - + { /* Mysterious Wanderer -- fur gambling */ title: _('The Mysterious Wanderer'), isAvailable: function() { @@ -415,7 +471,7 @@ Events.Room = [ } } }, - + { /* The Scout -- Map Merchant */ title: _('The Scout'), isAvailable: function() { @@ -457,7 +513,7 @@ Events.Room = [ } } }, - + { /* The Wandering Master */ title: _('The Master'), isAvailable: function() { @@ -530,7 +586,7 @@ Events.Room = [ } } }, - + { /* The Sick Man */ title: _('The Sick Man'), isAvailable: function() {