mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-22 20:32:31 +08:00
Fixing whitespace conformity in outside.js
This commit is contained in:
+149
-153
@@ -2,8 +2,8 @@
|
|||||||
* Events that can occur when the Outside module is active
|
* Events that can occur when the Outside module is active
|
||||||
**/
|
**/
|
||||||
Events.Outside = [
|
Events.Outside = [
|
||||||
{ /* Ruined traps */
|
{ /* Ruined traps */
|
||||||
title: _('A Ruined Trap'),
|
title: _('A Ruined Trap'),
|
||||||
isAvailable: function() {
|
isAvailable: function() {
|
||||||
return Engine.activeModule == Outside && $SM.get('game.buildings["trap"]', true) > 0;
|
return Engine.activeModule == Outside && $SM.get('game.buildings["trap"]', true) > 0;
|
||||||
},
|
},
|
||||||
@@ -45,9 +45,9 @@ Events.Outside = [
|
|||||||
},
|
},
|
||||||
'catch': {
|
'catch': {
|
||||||
text: [
|
text: [
|
||||||
_('not far from the village lies a large beast, its fur matted with blood.'),
|
_('not far from the village lies a large beast, its fur matted with blood.'),
|
||||||
_('it puts up little resistance before the knife.')
|
_('it puts up little resistance before the knife.')
|
||||||
],
|
],
|
||||||
reward: {
|
reward: {
|
||||||
fur: 100,
|
fur: 100,
|
||||||
meat: 100,
|
meat: 100,
|
||||||
@@ -61,147 +61,144 @@ Events.Outside = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{ /* Sickness */
|
{ /* Sickness */
|
||||||
title: _('Sickness'),
|
title: _('Sickness'),
|
||||||
isAvailable: function() {
|
isAvailable: function() {
|
||||||
return Engine.activeModule == Outside &&
|
return Engine.activeModule == Outside && $SM.get('game.population', true) > 10 && $SM.get('game.population', true) < 50 && $SM.get('stores.medicine', true) > 0;
|
||||||
$SM.get('game.population', true) > 10 &&
|
},
|
||||||
$SM.get('game.population', true) < 50 &&
|
scenes: {
|
||||||
$SM.get('stores.medicine', true) > 0;
|
'start': {
|
||||||
},
|
text: [
|
||||||
scenes: {
|
_('a sickness is spreading through the village.'),
|
||||||
'start': {
|
_('medicine is needed immediately.')
|
||||||
text: [
|
],
|
||||||
_('a sickness is spreading through the village.'),
|
buttons: {
|
||||||
_('medicine is needed immediately.')
|
'heal': {
|
||||||
],
|
text: _('1 medicine'),
|
||||||
buttons: {
|
cost: { 'medicine' : 1 },
|
||||||
'heal': {
|
nextScene: {1: 'healed'}
|
||||||
text: _('1 medicine'),
|
},
|
||||||
cost: { 'medicine' : 1 },
|
'ignore': {
|
||||||
nextScene: {1: 'healed'}
|
text: _('ignore it'),
|
||||||
},
|
nextScene: {1: 'death'}
|
||||||
'ignore': {
|
}
|
||||||
text: _('ignore it'),
|
}
|
||||||
nextScene: {1: 'death'}
|
},
|
||||||
}
|
'healed': {
|
||||||
}
|
text: [
|
||||||
},
|
_('the sickness is cured in time.')
|
||||||
'healed': {
|
],
|
||||||
text: [
|
buttons: {
|
||||||
_('the sickness is cured in time.')
|
'end': {
|
||||||
],
|
text: _('go home'),
|
||||||
buttons: {
|
nextScene: 'end'
|
||||||
'end': {
|
}
|
||||||
text: _('go home'),
|
}
|
||||||
nextScene: 'end'
|
},
|
||||||
}
|
'death': {
|
||||||
}
|
text: [
|
||||||
},
|
_('the sickness spreads through the village.'),
|
||||||
'death': {
|
_('the days are spent with burials.'),
|
||||||
text: [
|
_('the nights are rent with screams.')
|
||||||
_('the sickness spreads through the village.'),
|
],
|
||||||
_('the days are spent with burials.'),
|
onLoad: function() {
|
||||||
_('the nights are rent with screams.')
|
var numKilled = Math.floor(Math.random() * 20) + 1;
|
||||||
],
|
Outside.killVillagers(numKilled);
|
||||||
onLoad: function() {
|
},
|
||||||
var numKilled = Math.floor(Math.random() * 20) + 1;
|
buttons: {
|
||||||
Outside.killVillagers(numKilled);
|
'end': {
|
||||||
},
|
text: _('go home'),
|
||||||
buttons: {
|
nextScene: 'end'
|
||||||
'end': {
|
}
|
||||||
text: _('go home'),
|
}
|
||||||
nextScene: 'end'
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
|
||||||
}
|
{ /* Plague */
|
||||||
},
|
title: _('Plague'),
|
||||||
|
isAvailable: function() {
|
||||||
{ /* Plague */
|
return Engine.activeModule == Outside && $SM.get('game.population', true) > 50 && $SM.get('stores.medicine', true) > 0;
|
||||||
title: _('Plague'),
|
},
|
||||||
isAvailable: function() {
|
scenes: {
|
||||||
return Engine.activeModule == Outside && $SM.get('game.population', true) > 50 && $SM.get('stores.medicine', true) > 0;
|
'start': {
|
||||||
},
|
text: [
|
||||||
scenes: {
|
_('a terrible plague is fast spreading through the village.'),
|
||||||
'start': {
|
_('medicine is needed immediately.')
|
||||||
text: [
|
],
|
||||||
_('a terrible plague is fast spreading through the village.'),
|
buttons: {
|
||||||
_('medicine is needed immediately.')
|
'heal': {
|
||||||
],
|
text: _('5 medicine'),
|
||||||
buttons: {
|
cost: { 'medicine' : 5 },
|
||||||
'heal': {
|
nextScene: {1: 'healed'}
|
||||||
text: _('5 medicine'),
|
},
|
||||||
cost: { 'medicine' : 5 },
|
'ignore': {
|
||||||
nextScene: {1: 'healed'}
|
text: _('do nothing'),
|
||||||
},
|
nextScene: {1: 'death'}
|
||||||
'ignore': {
|
}
|
||||||
text: _('do nothing'),
|
}
|
||||||
nextScene: {1: 'death'}
|
},
|
||||||
}
|
'healed': {
|
||||||
}
|
text: [
|
||||||
},
|
_('the plague is kept from spreading.'),
|
||||||
'healed': {
|
_('only a few die.'),
|
||||||
text: [
|
_('the rest bury them.')
|
||||||
_('the plague is kept from spreading.'),
|
],
|
||||||
_('only a few die.'),
|
onLoad: function() {
|
||||||
_('the rest bury them.')
|
var numKilled = Math.floor(Math.random() * 5) + 2;
|
||||||
],
|
Outside.killVillagers(numKilled);
|
||||||
onLoad: function() {
|
},
|
||||||
var numKilled = Math.floor(Math.random() * 5) + 2;
|
buttons: {
|
||||||
Outside.killVillagers(numKilled);
|
'end': {
|
||||||
},
|
text: _('go home'),
|
||||||
buttons: {
|
nextScene: 'end'
|
||||||
'end': {
|
}
|
||||||
text: _('go home'),
|
}
|
||||||
nextScene: 'end'
|
},
|
||||||
}
|
'death': {
|
||||||
}
|
text: [
|
||||||
},
|
_('the plague rips through the village.'),
|
||||||
'death': {
|
_('the nights are rent with screams.'),
|
||||||
text: [
|
_('the only hope is a quick death.')
|
||||||
_('the plague rips through the village.'),
|
],
|
||||||
_('the nights are rent with screams.'),
|
onLoad: function() {
|
||||||
_('the only hope is a quick death.')
|
var numKilled = Math.floor(Math.random() * 80) + 10;
|
||||||
],
|
Outside.killVillagers(numKilled);
|
||||||
onLoad: function() {
|
},
|
||||||
var numKilled = Math.floor(Math.random() * 80) + 10;
|
buttons: {
|
||||||
Outside.killVillagers(numKilled);
|
'end': {
|
||||||
},
|
text: _('go home'),
|
||||||
buttons: {
|
nextScene: 'end'
|
||||||
'end': {
|
}
|
||||||
text: _('go home'),
|
}
|
||||||
nextScene: 'end'
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
|
||||||
}
|
{ /* Beast attack */
|
||||||
},
|
title: _('A Beast Attack'),
|
||||||
|
|
||||||
{ /* Beast attack */
|
|
||||||
title: _('A Beast Attack'),
|
|
||||||
isAvailable: function() {
|
isAvailable: function() {
|
||||||
return Engine.activeModule == Outside && $SM.get('game.population', true) > 0;
|
return Engine.activeModule == Outside && $SM.get('game.population', true) > 0;
|
||||||
},
|
},
|
||||||
scenes: {
|
scenes: {
|
||||||
'start': {
|
'start': {
|
||||||
text: [
|
text: [
|
||||||
_('a pack of snarling beasts pours out of the trees.'),
|
_('a pack of snarling beasts pours out of the trees.'),
|
||||||
_('the fight is short and bloody, but the beasts are repelled.'),
|
_('the fight is short and bloody, but the beasts are repelled.'),
|
||||||
_('the villagers retreat to mourn the dead.')
|
_('the villagers retreat to mourn the dead.')
|
||||||
],
|
],
|
||||||
onLoad: function() {
|
onLoad: function() {
|
||||||
var numKilled = Math.floor(Math.random() * 10) + 1;
|
var numKilled = Math.floor(Math.random() * 10) + 1;
|
||||||
Outside.killVillagers(numKilled);
|
Outside.killVillagers(numKilled);
|
||||||
},
|
},
|
||||||
reward: {
|
reward: {
|
||||||
fur: 100,
|
fur: 100,
|
||||||
meat: 100,
|
meat: 100,
|
||||||
teeth: 10
|
teeth: 10
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
'end': {
|
'end': {
|
||||||
text: _('go home'),
|
text: _('go home'),
|
||||||
nextScene: 'end'
|
nextScene: 'end'
|
||||||
@@ -209,29 +206,29 @@ Events.Outside = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{ /* Soldier attack */
|
{ /* Soldier attack */
|
||||||
title: _('A Military Raid'),
|
title: _('A Military Raid'),
|
||||||
isAvailable: function() {
|
isAvailable: function() {
|
||||||
return Engine.activeModule == Outside && $SM.get('game.population', true) > 0 && $SM.get('game.cityCleared');;
|
return Engine.activeModule == Outside && $SM.get('game.population', true) > 0 && $SM.get('game.cityCleared');;
|
||||||
},
|
},
|
||||||
scenes: {
|
scenes: {
|
||||||
'start': {
|
'start': {
|
||||||
text: [
|
text: [
|
||||||
_('a gunshot rings through the trees.'),
|
_('a gunshot rings through the trees.'),
|
||||||
_('well armed men charge out of the forest, firing into the crowd.'),
|
_('well armed men charge out of the forest, firing into the crowd.'),
|
||||||
_('after a skirmish they are driven away, but not without losses.')
|
_('after a skirmish they are driven away, but not without losses.')
|
||||||
],
|
],
|
||||||
onLoad: function() {
|
onLoad: function() {
|
||||||
var numKilled = Math.floor(Math.random() * 40) + 1;
|
var numKilled = Math.floor(Math.random() * 40) + 1;
|
||||||
Outside.killVillagers(numKilled);
|
Outside.killVillagers(numKilled);
|
||||||
},
|
},
|
||||||
reward: {
|
reward: {
|
||||||
bullets: 10,
|
bullets: 10,
|
||||||
'cured meat': 50
|
'cured meat': 50
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
'end': {
|
'end': {
|
||||||
text: _('go home'),
|
text: _('go home'),
|
||||||
nextScene: 'end'
|
nextScene: 'end'
|
||||||
@@ -239,6 +236,5 @@ Events.Outside = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
Reference in New Issue
Block a user