Merge pull request #548 from BAirborne/master

New event in the village
This commit is contained in:
Michael Townsend
2017-05-18 11:15:00 -04:00
committed by GitHub
2 changed files with 66 additions and 9 deletions
+3 -2
View File
@@ -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 = [
}
}
}
];
+63 -7
View File
@@ -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() {