").addClass('row_val').text(options.cost[k]).appendTo(costTooltip);
+ }
+ if(costTooltip.children().length > 0) {
+ costTooltip.appendTo(el);
+ }
+ }
+
+ if(options.width) {
+ el.css('width', options.width);
+ }
+
+ return el;
+ },
+
+ setDisabled: function(btn, disabled) {
+ if(btn) {
+ if(!disabled && !btn.data('onCooldown')) {
+ btn.removeClass('disabled');
+ } else if(disabled) {
+ btn.addClass('disabled');
+ }
+ btn.data('disabled', disabled);
+ }
+ },
+
+ isDisabled: function(btn) {
+ if(btn) {
+ return btn.data('disabled') === true;
+ }
+ return false;
+ },
+
+ cooldown: function(btn) {
+ var cd = btn.data("cooldown");
+ if(cd > 0) {
+ $('div.cooldown', btn).stop(true, true).width("100%").animate({width: '0%'}, cd * 1000, 'linear', function() {
+ var b = $(this).closest('.button');
+ b.data('onCooldown', false);
+ if(!b.data('disabled')) {
+ b.removeClass('disabled');
+ }
+ });
+ btn.addClass('disabled');
+ btn.data('onCooldown', true);
+ }
+ },
+
+ clearCooldown: function(btn) {
+ $('div.cooldown', btn).stop(true, true);
+ btn.data('onCooldown', false);
+ if(!btn.data('disabled')) {
+ btn.removeClass('disabled');
+ }
+ }
};
\ No newline at end of file
diff --git a/script/dropbox.js b/script/dropbox.js
index 1cbb118cb..82f4d7223 100644
--- a/script/dropbox.js
+++ b/script/dropbox.js
@@ -1,362 +1,362 @@
-(function (Engine, Events, Dropbox, $) {
-
- /**
- * Module that enables a save of the gamestate to the dropbox datastore
- * @see https://www.dropbox.com/developers/datastore
- *
- * The dropbox datastore (dbds) connector lets you save your data to your own dropbox datastore
- * without jamming files to it.
- *
- * This connector uses the game engines own base64 encoder.
- */
-
- 'use strict';
-
- if (!Engine) { return false; } // Game Engine not available
- if (!Dropbox) { return false; } // Dropbox Connector not available
-
- var DropboxConnector = {
-
- options: {
- log: false,
- key: 'q7vyvfsakyfmp3o',
- table: 'adarkroom'
- },
-
- client: false,
- table: false,
- dropboxAccount: false,
- savegameKey: false,
- savegames: {0: null, 1: null, 2: null, 3: null, 4: null},
-
- init: function (options) {
- this.options = $.extend(
- this.options,
- options
- );
-
- this._log = this.options.log;
-
- this.client = new Dropbox.Client({key: DropboxConnector.options.key});
- this.connectToDropbox(false);
-
- return this;
- },
-
- startDropbox: function () {
- if (!DropboxConnector.client || !DropboxConnector.table) {
- DropboxConnector.startDropboxConnectEvent();
- } else {
- DropboxConnector.startDropboxImportEvent();
- }
- },
-
- /**
- * ******
- * Events
- * ******
- */
-
- startDropboxConnectEvent: function () {
- Events.startEvent({
- title: _('Dropbox connection'),
- scenes: {
- start: {
- text: [_('connect game to dropbox local storage')],
- buttons: {
- 'connect': {
- text: _('connect'),
- nextScene: 'end',
- onChoose: function () {
- DropboxConnector.connectToDropbox(DropboxConnector.startDropboxImportEvent);
- }
- },
- 'cancel': {
- text: _('cancel'),
- nextScene: 'end'
- }
- }
- }
- }
- });
- },
-
- startDropboxImportEvent: function () {
- Events.startEvent({
- title: _('Dropbox Export / Import'),
- scenes: {
- start: {
- text: [_('export or import save data to dropbox datastorage'),
- _('your are connected to dropbox with account / email ') + DropboxConnector.dropboxAccount],
- buttons: {
- 'save': {
- text: _('save'),
- nextScene: {1: 'saveToSlot'}
- },
- 'load': {
- text: _('load'),
- nextScene: {1: 'loadFromSlot'},
- onChoose: DropboxConnector.loadGamesFromDropbox
- },
- 'signout': {
- text: _('signout'),
- nextScene: 'end',
- onChoose: DropboxConnector.signout
- },
- 'cancel': {
- text: _('cancel'),
- nextScene: 'end'
- }
- }
- },
- saveToSlot: {
- text: [_('choose one slot to save to')],
- buttons: (function () {
- var buttons = {};
-
- $.each(DropboxConnector.savegames, function (n, savegame) {
- buttons['savegame' + n] = {
- text: _('save to slot') + n + ' ' + (savegame ? DropboxConnector.prepareSaveDate(savegame.get('timestamp')) : 'empty'),
- nextScene: 'end',
- onChoose: function () {
- DropboxConnector.log('Save to slot ' + n + ' initiated');
- // timeout prevents error due to fade out animation of the previous event
- window.setTimeout(function () {
- DropboxConnector.log('Save to slot ' + n);
- DropboxConnector.saveGameToDropbox(n, DropboxConnector.savedtoDropboxEvent);
- }, 1000);
- }
- };
- });
-
- buttons.cancel = {
- text: _('cancel'),
- nextScene: 'end'
- };
-
- return buttons;
- }())
- },
- loadFromSlot: {
- text: [_('choose one slot to load from')],
- buttons: (function () {
- var buttons = {};
-
- $.each(DropboxConnector.savegames, function (n, savegame) {
- if (savegame) {
- buttons['savegame' + n] = {
- text: _('load from slot') + n + ' ' + DropboxConnector.prepareSaveDate(savegame.get('timestamp')),
- nextScene: 'end',
- onChoose: function () {
- DropboxConnector.log('Load from slot ' + n + ' initiated');
- // timeout prevents error due to fade out animation of the previous event
- window.setTimeout(function () {
- DropboxConnector.log('Load from slot ' + n);
- DropboxConnector.loadGameFromDropbox(n);
- }, 1000);
- }
- };
- }
- });
-
- buttons.cancel = {
- text: _('cancel'),
- nextScene: 'end'
- };
-
- return buttons;
- }())
- }
- }
- });
- },
-
- savedtoDropboxEvent: function (success) {
- Events.startEvent({
- title: _('Dropbox Export / Import'),
- scenes: {
- start: {
- text: success ? [_('successfully saved to dropbox datastorage')] :
- [_('error while saving to dropbox datastorage')],
- buttons: {
- 'ok': {
- text: _('ok'),
- nextScene: 'end'
- }
- }
- }
- }
- });
- },
-
- /**
- * ***************
- * functional code
- * ***************
- */
-
- /**
- * Initiate dropbox connection
- *
- * @param interactive
- * @param callback
- */
- connectToDropbox: function (interactive, callback) {
-
- DropboxConnector.log('start dropbox');
-
- var client = this.client;
-
- client.authenticate({interactive: interactive}, function (error) {
- if (error) {
- DropboxConnector.log('Dropbox Authentication error: ' + error);
- }
- });
-
- if (client.isAuthenticated()) {
-
- var datastoreManager = client.getDatastoreManager();
- datastoreManager.openDefaultDatastore(function (error, datastore) {
- if (error) {
- DropboxConnector.log('Error opening default datastore: ' + error);
- } else {
- DropboxConnector.table = datastore.getTable(DropboxConnector.options.table);
- DropboxConnector.loadGamesFromDropbox();
-
- DropboxConnector.log(DropboxConnector.client.credentials());
-
- DropboxConnector.client.getAccountInfo({}, function (error, info) {
- if (!error) {
- DropboxConnector.dropboxAccount = info.email;
- }
- });
-
- DropboxConnector.log("Got savegames", DropboxConnector.savegames);
-
- if (typeof callback === "function") {
- callback.call(DropboxConnector.table);
- }
- }
- });
- } else {
- DropboxConnector.log('Not connected to dropbox.');
- }
- },
-
- /**
- * Requests your savegames fom dbds
- *
- * @returns {*}
- */
- loadGamesFromDropbox: function () {
- var savegames = DropboxConnector.savegames;
-
- $.each(savegames, function (n) {
- var results = DropboxConnector.table.query({savegameId: DropboxConnector.prepareSavegameID(n)});
- savegames[n] = results[0];
- });
-
- return savegames;
- },
-
- /**
- * Imports a gamestate of a given slotnumber to your game
- *
- * @param slotnumber
- */
- loadGameFromDropbox: function (slotnumber) {
-
- var table = DropboxConnector.table;
- var id = DropboxConnector.prepareSavegameID(slotnumber);
- var results = table.query({savegameId: id});
- var record = results[0];
-
- if (record && record.get('gameState')) {
- Engine.import64(record.get('gameState'));
- }
- },
-
- /**
- * Saves a gamestate to a given slot in dbds
- *
- * @param slotnumber
- * @param callback
- */
- saveGameToDropbox: function (slotnumber, callback) {
-
- var table = DropboxConnector.table;
- var record = null;
- var success = false;
- var id = DropboxConnector.prepareSavegameID(slotnumber);
-
- var saveGame = {
- gameState: Engine.generateExport64(),
- timestamp: new Date().getTime()
- };
-
- if (DropboxConnector.savegames[slotnumber]) { // slot aleady used -> overwrite
- record = DropboxConnector.savegames[slotnumber];
- try {
- record.update(saveGame);
- DropboxConnector.log("Updated savegame ", slotnumber);
- success = true;
- } catch (e) {
- success = false;
- }
-
- } else {
- saveGame.savegameId = id;
- try {
- record = table.insert(saveGame);
- DropboxConnector.log("Inserted savegame ", record.getId());
- success = true;
- } catch (e) {
- success = false;
- }
- }
- if (typeof callback === "function") {
- callback(success);
- }
- },
-
- /**
- * Terminates the connection to your db account
- */
- signout: function () {
- DropboxConnector.client.signOut({}, function (error) {
- if (error) {
- alert('Error while logout from dropbox');
- } else {
- alert('Successfully signed out.');
- DropboxConnector.client = null;
- DropboxConnector.savegames = null;
- DropboxConnector.dropboxAccount = null;
- }
- });
- },
-
- /**
- * **************
- * Helper methods
- * **************
- */
-
- prepareSavegameID: function (slotnumber) {
- return 'adarkroom_savegame_' + slotnumber;
- },
-
- prepareSaveDate: function (timestamp) {
- var date = new Date(timestamp);
- return date.toLocaleDateString() + ' ' + date.toLocaleTimeString();
- },
-
- log: function () {
- if (this._log) {
- console.log(arguments);
- }
- }
- };
-
- Engine.Dropbox = DropboxConnector;
-
+(function (Engine, Events, Dropbox, $) {
+
+ /**
+ * Module that enables a save of the gamestate to the dropbox datastore
+ * @see https://www.dropbox.com/developers/datastore
+ *
+ * The dropbox datastore (dbds) connector lets you save your data to your own dropbox datastore
+ * without jamming files to it.
+ *
+ * This connector uses the game engines own base64 encoder.
+ */
+
+ 'use strict';
+
+ if (!Engine) { return false; } // Game Engine not available
+ if (!Dropbox) { return false; } // Dropbox Connector not available
+
+ var DropboxConnector = {
+
+ options: {
+ log: false,
+ key: 'q7vyvfsakyfmp3o',
+ table: 'adarkroom'
+ },
+
+ client: false,
+ table: false,
+ dropboxAccount: false,
+ savegameKey: false,
+ savegames: {0: null, 1: null, 2: null, 3: null, 4: null},
+
+ init: function (options) {
+ this.options = $.extend(
+ this.options,
+ options
+ );
+
+ this._log = this.options.log;
+
+ this.client = new Dropbox.Client({key: DropboxConnector.options.key});
+ this.connectToDropbox(false);
+
+ return this;
+ },
+
+ startDropbox: function () {
+ if (!DropboxConnector.client || !DropboxConnector.table) {
+ DropboxConnector.startDropboxConnectEvent();
+ } else {
+ DropboxConnector.startDropboxImportEvent();
+ }
+ },
+
+ /**
+ * ******
+ * Events
+ * ******
+ */
+
+ startDropboxConnectEvent: function () {
+ Events.startEvent({
+ title: _('Dropbox connection'),
+ scenes: {
+ start: {
+ text: [_('connect game to dropbox local storage')],
+ buttons: {
+ 'connect': {
+ text: _('connect'),
+ nextScene: 'end',
+ onChoose: function () {
+ DropboxConnector.connectToDropbox(DropboxConnector.startDropboxImportEvent);
+ }
+ },
+ 'cancel': {
+ text: _('cancel'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ });
+ },
+
+ startDropboxImportEvent: function () {
+ Events.startEvent({
+ title: _('Dropbox Export / Import'),
+ scenes: {
+ start: {
+ text: [_('export or import save data to dropbox datastorage'),
+ _('your are connected to dropbox with account / email ') + DropboxConnector.dropboxAccount],
+ buttons: {
+ 'save': {
+ text: _('save'),
+ nextScene: {1: 'saveToSlot'}
+ },
+ 'load': {
+ text: _('load'),
+ nextScene: {1: 'loadFromSlot'},
+ onChoose: DropboxConnector.loadGamesFromDropbox
+ },
+ 'signout': {
+ text: _('signout'),
+ nextScene: 'end',
+ onChoose: DropboxConnector.signout
+ },
+ 'cancel': {
+ text: _('cancel'),
+ nextScene: 'end'
+ }
+ }
+ },
+ saveToSlot: {
+ text: [_('choose one slot to save to')],
+ buttons: (function () {
+ var buttons = {};
+
+ $.each(DropboxConnector.savegames, function (n, savegame) {
+ buttons['savegame' + n] = {
+ text: _('save to slot') + n + ' ' + (savegame ? DropboxConnector.prepareSaveDate(savegame.get('timestamp')) : 'empty'),
+ nextScene: 'end',
+ onChoose: function () {
+ DropboxConnector.log('Save to slot ' + n + ' initiated');
+ // timeout prevents error due to fade out animation of the previous event
+ window.setTimeout(function () {
+ DropboxConnector.log('Save to slot ' + n);
+ DropboxConnector.saveGameToDropbox(n, DropboxConnector.savedtoDropboxEvent);
+ }, 1000);
+ }
+ };
+ });
+
+ buttons.cancel = {
+ text: _('cancel'),
+ nextScene: 'end'
+ };
+
+ return buttons;
+ }())
+ },
+ loadFromSlot: {
+ text: [_('choose one slot to load from')],
+ buttons: (function () {
+ var buttons = {};
+
+ $.each(DropboxConnector.savegames, function (n, savegame) {
+ if (savegame) {
+ buttons['savegame' + n] = {
+ text: _('load from slot') + n + ' ' + DropboxConnector.prepareSaveDate(savegame.get('timestamp')),
+ nextScene: 'end',
+ onChoose: function () {
+ DropboxConnector.log('Load from slot ' + n + ' initiated');
+ // timeout prevents error due to fade out animation of the previous event
+ window.setTimeout(function () {
+ DropboxConnector.log('Load from slot ' + n);
+ DropboxConnector.loadGameFromDropbox(n);
+ }, 1000);
+ }
+ };
+ }
+ });
+
+ buttons.cancel = {
+ text: _('cancel'),
+ nextScene: 'end'
+ };
+
+ return buttons;
+ }())
+ }
+ }
+ });
+ },
+
+ savedtoDropboxEvent: function (success) {
+ Events.startEvent({
+ title: _('Dropbox Export / Import'),
+ scenes: {
+ start: {
+ text: success ? [_('successfully saved to dropbox datastorage')] :
+ [_('error while saving to dropbox datastorage')],
+ buttons: {
+ 'ok': {
+ text: _('ok'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ });
+ },
+
+ /**
+ * ***************
+ * functional code
+ * ***************
+ */
+
+ /**
+ * Initiate dropbox connection
+ *
+ * @param interactive
+ * @param callback
+ */
+ connectToDropbox: function (interactive, callback) {
+
+ DropboxConnector.log('start dropbox');
+
+ var client = this.client;
+
+ client.authenticate({interactive: interactive}, function (error) {
+ if (error) {
+ DropboxConnector.log('Dropbox Authentication error: ' + error);
+ }
+ });
+
+ if (client.isAuthenticated()) {
+
+ var datastoreManager = client.getDatastoreManager();
+ datastoreManager.openDefaultDatastore(function (error, datastore) {
+ if (error) {
+ DropboxConnector.log('Error opening default datastore: ' + error);
+ } else {
+ DropboxConnector.table = datastore.getTable(DropboxConnector.options.table);
+ DropboxConnector.loadGamesFromDropbox();
+
+ DropboxConnector.log(DropboxConnector.client.credentials());
+
+ DropboxConnector.client.getAccountInfo({}, function (error, info) {
+ if (!error) {
+ DropboxConnector.dropboxAccount = info.email;
+ }
+ });
+
+ DropboxConnector.log("Got savegames", DropboxConnector.savegames);
+
+ if (typeof callback === "function") {
+ callback.call(DropboxConnector.table);
+ }
+ }
+ });
+ } else {
+ DropboxConnector.log('Not connected to dropbox.');
+ }
+ },
+
+ /**
+ * Requests your savegames fom dbds
+ *
+ * @returns {*}
+ */
+ loadGamesFromDropbox: function () {
+ var savegames = DropboxConnector.savegames;
+
+ $.each(savegames, function (n) {
+ var results = DropboxConnector.table.query({savegameId: DropboxConnector.prepareSavegameID(n)});
+ savegames[n] = results[0];
+ });
+
+ return savegames;
+ },
+
+ /**
+ * Imports a gamestate of a given slotnumber to your game
+ *
+ * @param slotnumber
+ */
+ loadGameFromDropbox: function (slotnumber) {
+
+ var table = DropboxConnector.table;
+ var id = DropboxConnector.prepareSavegameID(slotnumber);
+ var results = table.query({savegameId: id});
+ var record = results[0];
+
+ if (record && record.get('gameState')) {
+ Engine.import64(record.get('gameState'));
+ }
+ },
+
+ /**
+ * Saves a gamestate to a given slot in dbds
+ *
+ * @param slotnumber
+ * @param callback
+ */
+ saveGameToDropbox: function (slotnumber, callback) {
+
+ var table = DropboxConnector.table;
+ var record = null;
+ var success = false;
+ var id = DropboxConnector.prepareSavegameID(slotnumber);
+
+ var saveGame = {
+ gameState: Engine.generateExport64(),
+ timestamp: new Date().getTime()
+ };
+
+ if (DropboxConnector.savegames[slotnumber]) { // slot aleady used -> overwrite
+ record = DropboxConnector.savegames[slotnumber];
+ try {
+ record.update(saveGame);
+ DropboxConnector.log("Updated savegame ", slotnumber);
+ success = true;
+ } catch (e) {
+ success = false;
+ }
+
+ } else {
+ saveGame.savegameId = id;
+ try {
+ record = table.insert(saveGame);
+ DropboxConnector.log("Inserted savegame ", record.getId());
+ success = true;
+ } catch (e) {
+ success = false;
+ }
+ }
+ if (typeof callback === "function") {
+ callback(success);
+ }
+ },
+
+ /**
+ * Terminates the connection to your db account
+ */
+ signout: function () {
+ DropboxConnector.client.signOut({}, function (error) {
+ if (error) {
+ alert('Error while logout from dropbox');
+ } else {
+ alert('Successfully signed out.');
+ DropboxConnector.client = null;
+ DropboxConnector.savegames = null;
+ DropboxConnector.dropboxAccount = null;
+ }
+ });
+ },
+
+ /**
+ * **************
+ * Helper methods
+ * **************
+ */
+
+ prepareSavegameID: function (slotnumber) {
+ return 'adarkroom_savegame_' + slotnumber;
+ },
+
+ prepareSaveDate: function (timestamp) {
+ var date = new Date(timestamp);
+ return date.toLocaleDateString() + ' ' + date.toLocaleTimeString();
+ },
+
+ log: function () {
+ if (this._log) {
+ console.log(arguments);
+ }
+ }
+ };
+
+ Engine.Dropbox = DropboxConnector;
+
})(Engine, Events, Dropbox, jQuery);
\ No newline at end of file
diff --git a/script/engine.js b/script/engine.js
index 1e527aeb0..145fdc317 100644
--- a/script/engine.js
+++ b/script/engine.js
@@ -605,30 +605,42 @@
switch(e.which) {
case 38: // Up
case 87:
+ if(Engine.activeModule == Outside || Engine.activeModule == Path) {
+ Engine.activeModule.scrollSidebar('up');
+ }
Engine.log('up');
break;
case 40: // Down
case 83:
+ if (Engine.activeModule == Outside || Engine.activeModule == Path) {
+ Engine.activeModule.scrollSidebar('down');
+ }
Engine.log('down');
break;
case 37: // Left
case 65:
if(Engine.activeModule == Ship && Path.tab)
Engine.travelTo(Path);
- else if(Engine.activeModule == Path && Outside.tab)
+ else if(Engine.activeModule == Path && Outside.tab){
+ Engine.activeModule.scrollSidebar('left', true);
Engine.travelTo(Outside);
- else if(Engine.activeModule == Outside && Room.tab)
+ }else if(Engine.activeModule == Outside && Room.tab){
+ Engine.activeModule.scrollSidebar('left', true);
Engine.travelTo(Room);
+ }
Engine.log('left');
break;
case 39: // Right
case 68:
if(Engine.activeModule == Room && Outside.tab)
Engine.travelTo(Outside);
- else if(Engine.activeModule == Outside && Path.tab)
+ else if(Engine.activeModule == Outside && Path.tab){
+ Engine.activeModule.scrollSidebar('right', true);
Engine.travelTo(Path);
- else if(Engine.activeModule == Path && Ship.tab)
+ }else if(Engine.activeModule == Path && Ship.tab){
+ Engine.activeModule.scrollSidebar('right', true);
Engine.travelTo(Ship);
+ }
Engine.log('right');
break;
}
@@ -718,6 +730,33 @@
})();
+function inView(dir, elem){
+
+ var scTop = $('#main').offset().top;
+ var scBot = scTop + $('#main').height();
+
+ var elTop = elem.offset().top;
+ var elBot = elTop + elem.height();
+
+ if( dir == 'up' ){
+ // STOP MOVING IF BOTTOM OF ELEMENT IS VISIBLE IN SCREEN
+ return ( elBot < scBot );
+ }else if( dir == 'down' ){
+ return ( elTop > scTop );
+ }else{
+ return ( ( elBot <= scBot ) && ( elTop >= scTop ) );
+ }
+
+}
+
+function scrollByX(elem, x){
+
+ var elTop = parseInt( elem.css('top'), 10 );
+ elem.css( 'top', ( elTop + x ) + "px" );
+
+}
+
+
//create jQuery Callbacks() to handle object events
$.Dispatch = function( id ) {
var callbacks, topic = id && Engine.topics[ id ];
diff --git a/script/events/encounters.js b/script/events/encounters.js
index df89ac034..a5aca7892 100644
--- a/script/events/encounters.js
+++ b/script/events/encounters.js
@@ -1,400 +1,400 @@
-/**
- * Events that can occur when wandering around the world
- **/
-Events.Encounters = [
- /* Tier 1 */
- { /* Snarling Beast */
- title: _('A Snarling Beast'),
- isAvailable: function() {
- return World.getDistance() <= 10 && World.getTerrain() == World.TILE.FOREST;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'snarling beast',
- enemyName: _('snarling beast'),
- deathMessage: _('the snarling beast is dead'),
- chara: 'B',
- damage: 1,
- hit: 0.8,
- attackDelay: 1,
- health: 5,
- loot: {
- 'fur': {
- min: 1,
- max: 3,
- chance: 1
- },
- 'meat': {
- min: 1,
- max: 3,
- chance: 1
- },
- 'teeth': {
- min: 1,
- max: 3,
- chance: 0.8
- }
- },
- notification: _('a snarling beast leaps out of the underbrush')
- }
- }
- },
- { /* Gaunt Man */
- title: _('A Gaunt Man'),
- isAvailable: function() {
- return World.getDistance() <= 10 && World.getTerrain() == World.TILE.BARRENS;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'gaunt man',
- enemyName: _('gaunt man'),
- deathMessage: _('the gaunt man is dead'),
- chara: 'G',
- damage: 2,
- hit: 0.8,
- attackDelay: 2,
- health: 6,
- loot: {
- 'cloth': {
- min: 1,
- max: 3,
- chance: 0.8
- },
- 'teeth': {
- min: 1,
- max: 2,
- chance: 0.8
- },
- 'leather': {
- min: 1,
- max: 2,
- chance: 0.5
- }
- },
- notification: _('a gaunt man approaches, a crazed look in his eye')
- }
- }
- },
- { /* Strange Bird */
- title: _('A Strange Bird'),
- isAvailable: function() {
- return World.getDistance() <= 10 && World.getTerrain() == World.TILE.FIELD;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'strange bird',
- enemyName: _('strange bird'),
- deathMessage: _('the strange bird is dead'),
- chara: 'B',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 4,
- loot: {
- 'scales': {
- min: 1,
- max: 3,
- chance: 0.8
- },
- 'teeth': {
- min: 1,
- max: 2,
- chance: 0.5
- },
- 'meat': {
- min: 1,
- max: 3,
- chance: 0.8
- }
- },
- notification: _('a strange looking bird speeds across the plains')
- }
- }
- },
- /* Tier 2*/
- { /* Shivering Man */
- title: _('A Shivering Man'),
- isAvailable: function() {
- return World.getDistance() > 10 && World.getDistance() <= 20 && World.getTerrain() == World.TILE.BARRENS;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'shivering man',
- enemyName: _('shivering man'),
- deathMessage: _('the shivering man is dead'),
- chara: 'S',
- damage: 5,
- hit: 0.5,
- attackDelay: 1,
- health: 20,
- loot: {
- 'cloth': {
- min: 1,
- max: 1,
- chance: 0.2
- },
- 'teeth': {
- min: 1,
- max: 2,
- chance: 0.8
- },
- 'leather': {
- min: 1,
- max: 1,
- chance: 0.2
- },
- 'medicine': {
- min: 1,
- max: 3,
- chance: 0.7
- }
- },
- notification: _('a shivering man approaches and attacks with surprising strength')
- }
- }
- },
- { /* Man-eater */
- title: _('A Man-Eater'),
- isAvailable: function() {
- return World.getDistance() > 10 && World.getDistance() <= 20 && World.getTerrain() == World.TILE.FOREST;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'man-eater',
- enemyName: _('man-eater'),
- deathMessage: _('the man-eater is dead'),
- chara: 'E',
- damage: 3,
- hit: 0.8,
- attackDelay: 1,
- health: 25,
- loot: {
- 'fur': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'meat': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'teeth': {
- min: 5,
- max: 10,
- chance: 0.8
- }
- },
- notification: _('a large creature attacks, claws freshly bloodied')
- }
- }
- },
- { /* Scavenger */
- title: _('A Scavenger'),
- isAvailable: function() {
- return World.getDistance() > 10 && World.getDistance() <= 20 && World.getTerrain() == World.TILE.BARRENS;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'scavenger',
- enemyName: _('scavenger'),
- deathMessage: _('the scavenger is dead'),
- chara: 'S',
- damage: 4,
- hit: 0.8,
- attackDelay: 2,
- health: 30,
- loot: {
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'leather': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'iron': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'medicine': {
- min: 1,
- max: 2,
- chance: 0.1
- }
- },
- notification: _('a scavenger draws close, hoping for an easy score')
- }
- }
- },
- { /* Huge Lizard */
- title: _('A Huge Lizard'),
- isAvailable: function() {
- return World.getDistance() > 10 && World.getDistance() <= 20 && World.getTerrain() == World.TILE.FIELD;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'lizard',
- enemyName: _('lizard'),
- deathMessage: _('the lizard is dead'),
- chara: 'L',
- damage: 5,
- hit: 0.8,
- attackDelay: 2,
- health: 20,
- loot: {
- 'scales': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'teeth': {
- min: 5,
- max: 10,
- chance: 0.5
- },
- 'meat': {
- min: 5,
- max: 10,
- chance: 0.8
- }
- },
- notification: _('the grass thrashes wildly as a huge lizard pushes through')
- }
- }
- },
- /* Tier 3*/
- { /* Feral Terror */
- title: _('A Feral Terror'),
- isAvailable: function() {
- return World.getDistance() > 20 && World.getTerrain() == World.TILE.FOREST;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'feral terror',
- enemyName: _('feral terror'),
- deathMessage: _('the feral terror is dead'),
- chara: 'F',
- damage: 6,
- hit: 0.8,
- attackDelay: 1,
- health: 45,
- loot: {
- 'fur': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'meat': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'teeth': {
- min: 5,
- max: 10,
- chance: 0.8
- }
- },
- notification: _('a beast, wilder than imagining, erupts out of the foliage')
- }
- }
- },
- { /* Soldier */
- title: _('A Soldier'),
- isAvailable: function() {
- return World.getDistance() > 20 && World.getTerrain() == World.TILE.BARRENS;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'soldier',
- enemyName: _('soldier'),
- deathMessage: _('the soldier is dead'),
- ranged: true,
- chara: 'D',
- damage: 8,
- hit: 0.8,
- attackDelay: 2,
- health: 50,
- loot: {
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.2
- },
- 'medicine': {
- min: 1,
- max: 2,
- chance: 0.1
- }
- },
- notification: _('a soldier opens fire from across the desert')
- }
- }
- },
- { /* Sniper */
- title: _('A Sniper'),
- isAvailable: function() {
- return World.getDistance() > 20 && World.getTerrain() == World.TILE.FIELD;
- },
- scenes: {
- 'start': {
- combat: true,
- enemy: 'sniper',
- enemyName: _('sniper'),
- deathMessage: _('the sniper is dead'),
- chara: 'S',
- damage: 15,
- hit: 0.8,
- attackDelay: 4,
- health: 30,
- ranged: true,
- loot: {
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.2
- },
- 'medicine': {
- min: 1,
- max: 2,
- chance: 0.1
- }
- },
- notification: _('a shot rings out, from somewhere in the long grass')
- }
- }
- }
-];
+/**
+ * Events that can occur when wandering around the world
+ **/
+Events.Encounters = [
+ /* Tier 1 */
+ { /* Snarling Beast */
+ title: _('A Snarling Beast'),
+ isAvailable: function() {
+ return World.getDistance() <= 10 && World.getTerrain() == World.TILE.FOREST;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'snarling beast',
+ enemyName: _('snarling beast'),
+ deathMessage: _('the snarling beast is dead'),
+ chara: 'B',
+ damage: 1,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 5,
+ loot: {
+ 'fur': {
+ min: 1,
+ max: 3,
+ chance: 1
+ },
+ 'meat': {
+ min: 1,
+ max: 3,
+ chance: 1
+ },
+ 'teeth': {
+ min: 1,
+ max: 3,
+ chance: 0.8
+ }
+ },
+ notification: _('a snarling beast leaps out of the underbrush')
+ }
+ }
+ },
+ { /* Gaunt Man */
+ title: _('A Gaunt Man'),
+ isAvailable: function() {
+ return World.getDistance() <= 10 && World.getTerrain() == World.TILE.BARRENS;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'gaunt man',
+ enemyName: _('gaunt man'),
+ deathMessage: _('the gaunt man is dead'),
+ chara: 'G',
+ damage: 2,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 6,
+ loot: {
+ 'cloth': {
+ min: 1,
+ max: 3,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 1,
+ max: 2,
+ chance: 0.8
+ },
+ 'leather': {
+ min: 1,
+ max: 2,
+ chance: 0.5
+ }
+ },
+ notification: _('a gaunt man approaches, a crazed look in his eye')
+ }
+ }
+ },
+ { /* Strange Bird */
+ title: _('A Strange Bird'),
+ isAvailable: function() {
+ return World.getDistance() <= 10 && World.getTerrain() == World.TILE.FIELD;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'strange bird',
+ enemyName: _('strange bird'),
+ deathMessage: _('the strange bird is dead'),
+ chara: 'B',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 4,
+ loot: {
+ 'scales': {
+ min: 1,
+ max: 3,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 1,
+ max: 2,
+ chance: 0.5
+ },
+ 'meat': {
+ min: 1,
+ max: 3,
+ chance: 0.8
+ }
+ },
+ notification: _('a strange looking bird speeds across the plains')
+ }
+ }
+ },
+ /* Tier 2*/
+ { /* Shivering Man */
+ title: _('A Shivering Man'),
+ isAvailable: function() {
+ return World.getDistance() > 10 && World.getDistance() <= 20 && World.getTerrain() == World.TILE.BARRENS;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'shivering man',
+ enemyName: _('shivering man'),
+ deathMessage: _('the shivering man is dead'),
+ chara: 'S',
+ damage: 5,
+ hit: 0.5,
+ attackDelay: 1,
+ health: 20,
+ loot: {
+ 'cloth': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ },
+ 'teeth': {
+ min: 1,
+ max: 2,
+ chance: 0.8
+ },
+ 'leather': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ },
+ 'medicine': {
+ min: 1,
+ max: 3,
+ chance: 0.7
+ }
+ },
+ notification: _('a shivering man approaches and attacks with surprising strength')
+ }
+ }
+ },
+ { /* Man-eater */
+ title: _('A Man-Eater'),
+ isAvailable: function() {
+ return World.getDistance() > 10 && World.getDistance() <= 20 && World.getTerrain() == World.TILE.FOREST;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'man-eater',
+ enemyName: _('man-eater'),
+ deathMessage: _('the man-eater is dead'),
+ chara: 'E',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 25,
+ loot: {
+ 'fur': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'teeth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ }
+ },
+ notification: _('a large creature attacks, claws freshly bloodied')
+ }
+ }
+ },
+ { /* Scavenger */
+ title: _('A Scavenger'),
+ isAvailable: function() {
+ return World.getDistance() > 10 && World.getDistance() <= 20 && World.getTerrain() == World.TILE.BARRENS;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'scavenger',
+ enemyName: _('scavenger'),
+ deathMessage: _('the scavenger is dead'),
+ chara: 'S',
+ damage: 4,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 30,
+ loot: {
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'leather': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'iron': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'medicine': {
+ min: 1,
+ max: 2,
+ chance: 0.1
+ }
+ },
+ notification: _('a scavenger draws close, hoping for an easy score')
+ }
+ }
+ },
+ { /* Huge Lizard */
+ title: _('A Huge Lizard'),
+ isAvailable: function() {
+ return World.getDistance() > 10 && World.getDistance() <= 20 && World.getTerrain() == World.TILE.FIELD;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'lizard',
+ enemyName: _('lizard'),
+ deathMessage: _('the lizard is dead'),
+ chara: 'L',
+ damage: 5,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 20,
+ loot: {
+ 'scales': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 5,
+ max: 10,
+ chance: 0.5
+ },
+ 'meat': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ }
+ },
+ notification: _('the grass thrashes wildly as a huge lizard pushes through')
+ }
+ }
+ },
+ /* Tier 3*/
+ { /* Feral Terror */
+ title: _('A Feral Terror'),
+ isAvailable: function() {
+ return World.getDistance() > 20 && World.getTerrain() == World.TILE.FOREST;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'feral terror',
+ enemyName: _('feral terror'),
+ deathMessage: _('the feral terror is dead'),
+ chara: 'F',
+ damage: 6,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 45,
+ loot: {
+ 'fur': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'teeth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ }
+ },
+ notification: _('a beast, wilder than imagining, erupts out of the foliage')
+ }
+ }
+ },
+ { /* Soldier */
+ title: _('A Soldier'),
+ isAvailable: function() {
+ return World.getDistance() > 20 && World.getTerrain() == World.TILE.BARRENS;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'soldier',
+ enemyName: _('soldier'),
+ deathMessage: _('the soldier is dead'),
+ ranged: true,
+ chara: 'D',
+ damage: 8,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 50,
+ loot: {
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ },
+ 'medicine': {
+ min: 1,
+ max: 2,
+ chance: 0.1
+ }
+ },
+ notification: _('a soldier opens fire from across the desert')
+ }
+ }
+ },
+ { /* Sniper */
+ title: _('A Sniper'),
+ isAvailable: function() {
+ return World.getDistance() > 20 && World.getTerrain() == World.TILE.FIELD;
+ },
+ scenes: {
+ 'start': {
+ combat: true,
+ enemy: 'sniper',
+ enemyName: _('sniper'),
+ deathMessage: _('the sniper is dead'),
+ chara: 'S',
+ damage: 15,
+ hit: 0.8,
+ attackDelay: 4,
+ health: 30,
+ ranged: true,
+ loot: {
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ },
+ 'medicine': {
+ min: 1,
+ max: 2,
+ chance: 0.1
+ }
+ },
+ notification: _('a shot rings out, from somewhere in the long grass')
+ }
+ }
+ }
+];
diff --git a/script/events/global.js b/script/events/global.js
index 87ad42131..ff6e662d2 100644
--- a/script/events/global.js
+++ b/script/events/global.js
@@ -1,66 +1,66 @@
-/**
- * Events that can occur when any module is active (Except World. It's special.)
- **/
-Events.Global = [
- { /* The Thief */
- title: _('The Thief'),
- isAvailable: function() {
- return (Engine.activeModule == Room || Engine.activeModule == Outside) && $SM.get('game.thieves') == 1;
- },
- scenes: {
- 'start': {
- text: [
- _('the villagers haul a filthy man out of the store room.'),
- _("say his folk have been skimming the supplies."),
- _('say he should be strung up as an example.')
- ],
- notification: _('a thief is caught'),
- blink: true,
- buttons: {
- 'kill': {
- text: _('hang him'),
- nextScene: {1: 'hang'}
- },
- 'spare': {
- text: _('spare him'),
- nextScene: {1: 'spare'}
- }
- }
- },
- 'hang': {
- text: [
- _('the villagers hang the thief high in front of the store room.'),
- _('the point is made. in the next few days, the missing supplies are returned.')
- ],
- onLoad: function() {
- $SM.set('game.thieves', 2);
- $SM.remove('income.thieves');
- $SM.addM('stores', $SM.get('game.stolen'));
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'spare': {
- text: [
- _("the man says he's grateful. says he won't come around any more."),
- _("shares what he knows about sneaking before he goes.")
- ],
- onLoad: function() {
- $SM.set('game.thieves', 2);
- $SM.remove('income.thieves');
- $SM.addPerk('stealthy');
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- }
- }
- }
-];
+/**
+ * Events that can occur when any module is active (Except World. It's special.)
+ **/
+Events.Global = [
+ { /* The Thief */
+ title: _('The Thief'),
+ isAvailable: function() {
+ return (Engine.activeModule == Room || Engine.activeModule == Outside) && $SM.get('game.thieves') == 1;
+ },
+ scenes: {
+ 'start': {
+ text: [
+ _('the villagers haul a filthy man out of the store room.'),
+ _("say his folk have been skimming the supplies."),
+ _('say he should be strung up as an example.')
+ ],
+ notification: _('a thief is caught'),
+ blink: true,
+ buttons: {
+ 'kill': {
+ text: _('hang him'),
+ nextScene: {1: 'hang'}
+ },
+ 'spare': {
+ text: _('spare him'),
+ nextScene: {1: 'spare'}
+ }
+ }
+ },
+ 'hang': {
+ text: [
+ _('the villagers hang the thief high in front of the store room.'),
+ _('the point is made. in the next few days, the missing supplies are returned.')
+ ],
+ onLoad: function() {
+ $SM.set('game.thieves', 2);
+ $SM.remove('income.thieves');
+ $SM.addM('stores', $SM.get('game.stolen'));
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'spare': {
+ text: [
+ _("the man says he's grateful. says he won't come around any more."),
+ _("shares what he knows about sneaking before he goes.")
+ ],
+ onLoad: function() {
+ $SM.set('game.thieves', 2);
+ $SM.remove('income.thieves');
+ $SM.addPerk('stealthy');
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ }
+];
diff --git a/script/events/setpieces.js b/script/events/setpieces.js
index 066cfa848..2480b6792 100644
--- a/script/events/setpieces.js
+++ b/script/events/setpieces.js
@@ -1,3574 +1,3574 @@
-/**
- * Events that only occur at specific times. Launched manually.
- **/
-Events.Setpieces = {
- "outpost": { /* Friendly Outpost */
- title: _('An Outpost'),
- scenes: {
- 'start': {
- text: [
- _('a safe place in the wilds.')
- ],
- notification: _('a safe place in the wilds.'),
- loot: {
- 'cured meat': {
- min: 5,
- max: 10,
- chance: 1
- }
- },
- onLoad: function() {
- World.useOutpost();
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- }
- }
- },
- "swamp": { /* Swamp */
- title: _('A Murky Swamp'),
- scenes: {
- 'start': {
- text: [
- _('rotting reeds rise out of the swampy earth.'),
- _('a lone frog sits in the muck, silently.')
- ],
- notification: _('a swamp festers in the stagnant air.'),
- buttons: {
- 'enter': {
- text: _('enter'),
- nextScene: {1: 'cabin'}
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'cabin': {
- text: [
- _('deep in the swamp is a moss-covered cabin.'),
- _('an old wanderer sits inside, in a seeming trance.')
- ],
- buttons: {
- 'talk': {
- cost: {'charm': 1},
- text: _('talk'),
- nextScene: {1: 'talk'}
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'talk': {
- text: [
- _('the wanderer takes the charm and nods slowly.'),
- _('he speaks of once leading the great fleets to fresh worlds.'),
- _('unfathomable destruction to fuel wanderer hungers.'),
- _('his time here, now, is his penance.')
- ],
- onLoad: function() {
- $SM.addPerk('gastronome');
- World.markVisited(World.curPos[0], World.curPos[1]);
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- }
- }
- },
- "cave": { /* Cave */
- title: _('A Damp Cave'),
- scenes: {
- 'start': {
- text: [
- _('the mouth of the cave is wide and dark.'),
- _("can't see what's inside.")
- ],
- notification: _('the earth here is split, as if bearing an ancient wound'),
- buttons: {
- 'enter': {
- text: _('go inside'),
- cost: { torch: 1 },
- nextScene: {0.3: 'a1', 0.6: 'a2', 1: 'a3'}
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
-
- 'a1': {
- combat: true,
- enemy: 'beast',
- chara: 'B',
- damage: 1,
- hit: 0.8,
- attackDelay: 1,
- health: 5,
- notification: _('a startled beast defends its home'),
- loot: {
- 'fur': {
- min: 1,
- max: 10,
- chance: 1
- },
- 'teeth': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'b1', 1: 'b2'}
- },
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'a2': {
- text: [
- _('the cave narrows a few feet in.'),
- _("the walls are moist and moss-covered")
- ],
- buttons: {
- 'continue': {
- text: _('squeeze'),
- nextScene: {0.5: 'b2', 1: 'b3'}
- },
- 'leave': {
- text: _('leave cave'),
- nextScene: 'end'
- }
- }
- },
- 'a3': {
- text: [
- _('the remains of an old camp sits just inside the cave.'),
- _('bedrolls, torn and blackened, lay beneath a thin layer of dust.')
- ],
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 1
- },
- 'torch': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'leather': {
- min: 1,
- max: 5,
- chance: 0.3
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'b3', 1: 'b4'}
- },
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b1': {
- text: [
- _('the body of a wanderer lies in a small cavern.'),
- _("rot's been to work on it, and some of the pieces are missing."),
- /// TRANSLATORS : 'it' is a rotting wanderer's body
- _("can't tell what left it here.")
- ],
- loot: {
- 'iron sword': {
- min: 1,
- max: 1,
- chance: 1
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'torch': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'medicine': {
- min: 1,
- max: 2,
- chance: 0.1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'c1' }
- },
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b2': {
- text: [
- _('the torch sputters and dies in the damp air'),
- _('the darkness is absolute')
- ],
- notification: _('the torch goes out'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cost: {'torch': 1},
- nextScene: { 1: 'c1' }
- },
- 'leave': {
- text: _('leave cave'),
- nextScene: 'end'
- }
- }
- },
- 'b3': {
- combat: true,
- enemy: 'beast',
- chara: 'B',
- damage: 1,
- hit: 0.8,
- attackDelay: 1,
- health: 5,
- notification: _('a startled beast defends its home'),
- loot: {
- 'fur': {
- min: 1,
- max: 3,
- chance: 1
- },
- 'teeth': {
- min: 1,
- max: 2,
- chance: 0.8
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'c2'}
- },
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b4': {
- combat: true,
- enemy: 'cave lizard',
- chara: 'L',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 6,
- notification: _('a cave lizard attacks'),
- loot: {
- 'scales': {
- min: 1,
- max: 3,
- chance: 1
- },
- 'teeth': {
- min: 1,
- max: 2,
- chance: 0.8
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'c2'}
- },
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'c1': {
- combat: true,
- enemy: 'beast',
- chara: 'B',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 10,
- notification: _('a large beast charges out of the dark'),
- loot: {
- 'fur': {
- min: 1,
- max: 3,
- chance: 1
- },
- 'teeth': {
- min: 1,
- max: 3,
- chance: 1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end1', 1: 'end2'}
- },
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'c2': {
- combat: true,
- enemy: 'lizard',
- chara: 'L',
- damage: 4,
- hit: 0.8,
- attackDelay: 2,
- health: 10,
- notification: _('a giant lizard shambles forward'),
- loot: {
- 'scales': {
- min: 1,
- max: 3,
- chance: 1
- },
- 'teeth': {
- min: 1,
- max: 3,
- chance: 1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.7: 'end2', 1: 'end3'}
- },
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end1': {
- text: [
- _('the nest of a large animal lies at the back of the cave.')
- ],
- onLoad: function() {
- World.clearDungeon();
- },
- loot: {
- 'meat': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'fur': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'scales': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'teeth': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.5
- }
- },
- buttons: {
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end2': {
- text: [
- _('a small supply cache is hidden at the back of the cave.')
- ],
- loot: {
- 'cloth': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'leather': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'iron': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'cured meat': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'steel': {
- min: 5,
- max: 10,
- chance: 0.5
- },
- 'bolas': {
- min: 1,
- max: 3,
- chance: 0.3
- },
- 'medicine': {
- min: 1,
- max: 4,
- chance: 0.15
- }
- },
- onLoad: function() {
- World.clearDungeon();
- },
- buttons: {
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end3': {
- text: [
- _('an old case is wedged behind a rock, covered in a thick layer of dust.')
- ],
- loot: {
- 'steel sword': {
- min: 1,
- max: 1,
- chance: 1
- },
- 'bolas': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'medicine': {
- min: 1,
- max: 3,
- chance: 0.3
- }
- },
- onLoad: function() {
- World.clearDungeon();
- },
- buttons: {
- 'leave': {
- text: _('leave cave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- }
- }
- },
- "town": { /* Town */
- title: _('A Deserted Town'),
- scenes: {
- 'start': {
- text: [
- _('a small suburb lays ahead, empty houses scorched and peeling.'),
- _("broken streetlights stand, rusting. light hasn't graced this place in a long time.")
- ],
- notification: _("the town lies abandoned, its citizens long dead"),
- buttons: {
- 'enter': {
- text: _('explore'),
- nextScene: {0.3: 'a1', 0.7: 'a3', 1: 'a2'}
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
-
- 'a1': {
- text: [
- _("where the windows of the schoolhouse aren't shattered, they're blackened with soot."),
- _('the double doors creak endlessly in the wind.')
- ],
- buttons: {
- 'enter': {
- text: _('enter'),
- nextScene: {0.5: 'b1', 1: 'b2'},
- cost: {torch: 1}
- },
- 'leave': {
- text: _('leave town'),
- nextScene: 'end'
- }
- }
- },
-
- 'a2': {
- combat: true,
- enemy: 'thug',
- chara: 'T',
- damage: 4,
- hit: 0.8,
- attackDelay: 2,
- health: 30,
- loot: {
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'leather': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.5
- }
- },
- notification: _('ambushed on the street.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'b3', 1: 'b4'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'a3': {
- text: [
- _("a squat building up ahead."),
- _('a green cross barely visible behind grimy windows.')
- ],
- buttons: {
- 'enter': {
- text: _('enter'),
- nextScene: {0.5: 'b5', 1: 'end5'},
- cost: {torch: 1}
- },
- 'leave': {
- text: _('leave town'),
- nextScene: 'end'
- }
- }
- },
- 'b1': {
- text: [
- _('a small cache of supplies is tucked inside a rusting locker.')
- ],
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 1
- },
- 'torch': {
- min: 1,
- max: 3,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.3
- },
- 'medicine': {
- min: 1,
- max: 3,
- chance: 0.05
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'c1', 1: 'c2'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b2': {
- combat: true,
- enemy: 'scavenger',
- chara: 'S',
- damage: 4,
- hit: 0.8,
- attackDelay: 2,
- health: 30,
- loot: {
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'leather': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.5
- }
- },
- notification: _('a scavenger waits just inside the door.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'c2', 1: 'c3'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b3': {
- combat: true,
- enemy: 'beast',
- chara: 'B',
- damage: 3,
- hit: 0.8,
- attackDelay: 1,
- health: 25,
- loot: {
- 'teeth': {
- min: 1,
- max: 5,
- chance: 1
- },
- 'fur': {
- min: 5,
- max: 10,
- chance: 1
- }
- },
- notification: _('a beast stands alone in an overgrown park.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'c4', 1: 'c5'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b4': {
- text: [
- _('an overturned caravan is spread across the pockmarked street.'),
- _("it's been picked over by scavengers, but there's still some things worth taking.")
- ],
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'torch': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.3
- },
- 'medicine': {
- min: 1,
- max: 3,
- chance: 0.1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'c5', 1: 'c6' }
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b5': {
- combat: true,
- enemy: 'madman',
- chara: 'M',
- damage: 6,
- hit: 0.3,
- attackDelay: 1,
- health: 10,
- loot: {
- 'cloth': {
- min: 2,
- max: 4,
- chance: 0.3
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.9
- },
- 'medicine': {
- min: 1,
- max: 2,
- chance: 0.4
- }
- },
- notification: _('a madman attacks, screeching.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.3: 'end5', 1: 'end6'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'c1': {
- combat: true,
- enemy: 'thug',
- chara: 'T',
- damage: 4,
- hit: 0.8,
- attackDelay: 2,
- health: 30,
- loot: {
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'leather': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.5
- }
- },
- notification: _('a thug moves out of the shadows.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'd1'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'c2': {
- combat: true,
- enemy: 'beast',
- chara: 'B',
- damage: 3,
- hit: 0.8,
- attackDelay: 1,
- health: 25,
- loot: {
- 'teeth': {
- min: 1,
- max: 5,
- chance: 1
- },
- 'fur': {
- min: 5,
- max: 10,
- chance: 1
- }
- },
- notification: _('a beast charges out of a ransacked classroom.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'd1'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'c3': {
- text: [
- _('through the large gymnasium doors, footsteps can be heard.'),
- _('the torchlight casts a flickering glow down the hallway.'),
- _('the footsteps stop.')
- ],
- buttons: {
- 'continue': {
- text: _('enter'),
- nextScene: {1: 'd1'}
- },
- 'leave': {
- text: _('leave town'),
- nextScene: 'end'
- }
- }
- },
- 'c4': {
- combat: true,
- enemy: 'beast',
- chara: 'B',
- damage: 4,
- hit: 0.8,
- attackDelay: 1,
- health: 25,
- loot: {
- 'teeth': {
- min: 1,
- max: 5,
- chance: 1
- },
- 'fur': {
- min: 5,
- max: 10,
- chance: 1
- }
- },
- notification: _('another beast, draw by the noise, leaps out of a copse of trees.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'd2'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'c5': {
- text: [
- _("something's causing a commotion a ways down the road."),
- _("a fight, maybe.")
- ],
- buttons: {
- 'continue': {
- text: _('continue'),
- nextScene: {1: 'd2'}
- },
- 'leave': {
- text: _('leave town'),
- nextScene: 'end'
- }
- }
- },
- 'c6': {
- text: [
- _('a small basket of food is hidden under a park bench, with a note attached.'),
- _("can't read the words.")
- ],
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'd2'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'd1': {
- combat: true,
- enemy: 'scavenger',
- chara: 'S',
- damage: 5,
- hit: 0.8,
- attackDelay: 2,
- health: 30,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 1
- },
- 'leather': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'steel sword': {
- min: 1,
- max: 1,
- chance: 0.5
- }
- },
- notification: _('a panicked scavenger bursts through the door, screaming.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end1', 1: 'end2'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'd2': {
- combat: true,
- enemy: 'vigilante',
- chara: 'V',
- damage: 6,
- hit: 0.8,
- attackDelay: 2,
- health: 30,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 1
- },
- 'leather': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'steel sword': {
- min: 1,
- max: 1,
- chance: 0.5
- }
- },
- notification: _("a man stands over a dead wanderer. notices he's not alone."),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end3', 1: 'end4'}
- },
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end1': {
- text: [
- _('scavenger had a small camp in the school.'),
- _('collected scraps spread across the floor like they fell from heaven.')
- ],
- onLoad: function() {
- World.clearDungeon();
- },
- loot: {
- 'steel sword': {
- min: 1,
- max: 1,
- chance: 1
- },
- 'steel': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'cured meat': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'bolas': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'medicine': {
- min: 1,
- max: 2,
- chance: 0.3
- }
- },
- buttons: {
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end2': {
- text: [
- _("scavenger'd been looking for supplies in here, it seems."),
- _("a shame to let what he'd found go to waste.")
- ],
- onLoad: function() {
- World.clearDungeon();
- },
- loot: {
- 'coal': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'cured meat': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'leather': {
- min: 5,
- max: 10,
- chance: 1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end3': {
- text: [
- _("beneath the wanderer's rags, clutched in one of its many hands, a glint of steel."),
- _("worth killing for, it seems.")
- ],
- onLoad: function() {
- World.clearDungeon();
- },
- loot: {
- 'rifle': {
- min: 1,
- max: 1,
- chance: 1
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end4': {
- text: [
- _("eye for an eye seems fair."),
- _("always worked before, at least."),
- _("picking the bones finds some useful trinkets.")
- ],
- onLoad: function() {
- World.clearDungeon();
- },
- loot: {
- 'cured meat': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'iron': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'torch': {
- min: 1,
- max: 5,
- chance: 1
- },
- 'bolas': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'medicine': {
- min: 1,
- max: 2,
- chance: 0.1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end5': {
- text: [
- _('some medicine abandoned in the drawers.')
- ],
- onLoad: function() {
- World.clearDungeon();
- },
- loot: {
- 'medicine': {
- min: 2,
- max: 5,
- chance: 1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave town'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'end6': {
- text: [
- _('the clinic has been ransacked.'),
- _('only dust and stains remain.')
- ],
- onLoad: function() {
- World.clearDungeon();
- },
- buttons: {
- 'leave': {
- text: _('leave town'),
-
- nextScene: 'end'
- }
- }
- }
- }
- },
- "city": { /* City */
- title: _('A Ruined City'),
- scenes: {
- 'start': {
- text: [
- _('a battered highway sign stands guard at the entrance to this once-great city.'),
- _("the towers that haven't crumbled jut from the landscape like the ribcage of some ancient beast."),
- _('might be things worth having still inside.')
- ],
- notification: _("the towers of a decaying city dominate the skyline"),
- buttons: {
- 'enter': {
- text: _('explore'),
- nextScene: {0.2: 'a1', 0.5: 'a2', 0.8: 'a3', 1: 'a4'}
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'a1': {
- text:[
- _('the streets are empty.'),
- _('the air is filled with dust, driven relentlessly by the hard winds.')
- ],
- buttons: {
- 'continue': {
- text: _('continue'),
- nextScene: {0.5: 'b1', 1: 'b2'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
- 'a2': {
- text:[
- _('orange traffic cones are set across the street, faded and cracked.'),
- _('lights flash through the alleys between buildings.')
- ],
- buttons: {
- 'continue': {
- text: _('continue'),
- nextScene: {0.5: 'b3', 1: 'b4'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
- 'a3': {
- text: [
- _('a large shanty town sprawls across the streets.'),
- _('faces, darkened by soot and blood, stare out from crooked huts.')
- ],
- buttons: {
- 'continue': {
- text: _('continue'),
- nextScene: {0.5: 'b5', 1: 'b6'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
- 'a4': {
- text: [
- _('the shell of an abandoned hospital looms ahead.')
- ],
- buttons: {
- 'enter': {
- text: _('enter'),
- cost: { 'torch': 1 },
- nextScene: {0.5: 'b7', 1: 'b8'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
- 'b1': {
- text: [
- _('the old tower seems mostly intact.'),
- _('the shell of a burned out car blocks the entrance.'),
- _('most of the windows at ground level are busted anyway.')
- ],
- buttons: {
- 'enter': {
- text: _('enter'),
- nextScene: {0.5: 'c1', 1: 'c2'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
- 'b2': {
- combat: true,
- notification: _('a huge lizard scrambles up out of the darkness of an old metro station.'),
- enemy: 'lizard',
- chara: 'L',
- damage: 5,
- hit: 0.8,
- attackDelay: 2,
- health: 20,
- loot: {
- 'scales': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'teeth': {
- min: 5,
- max: 10,
- chance: 0.5
- },
- 'meat': {
- min: 5,
- max: 10,
- chance: 0.8
- }
- },
- buttons: {
- 'descend': {
- text: _('descend'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'c2', 1: 'c3'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b3': {
- notification: _('the shot echoes in the empty street.'),
- combat: true,
- enemy: 'sniper',
- chara: 'S',
- damage: 15,
- hit: 0.8,
- attackDelay: 4,
- health: 30,
- ranged: true,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.2
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'c4', 1: 'c5'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b4': {
- notification: _('the soldier steps out from between the buildings, rifle raised.'),
- combat: true,
- enemy: 'soldier',
- ranged: true,
- chara: 'D',
- damage: 8,
- hit: 0.8,
- attackDelay: 2,
- health: 50,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.2
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'c5', 1: 'c6'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b5': {
- notification: _('a frail man stands defiantly, blocking the path.'),
- combat: true,
- enemy: 'frail man',
- chara: 'M',
- damage: 1,
- hit: 0.8,
- attackDelay: 2,
- health: 10,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'leather': {
- min: 1,
- max: 1,
- chance: 0.2
- },
- 'medicine': {
- min: 1,
- max: 3,
- chance: 0.05
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'c7', 1: 'c8'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'b6': {
- text: [
- _('nothing but downcast eyes.'),
- _('the people here were broken a long time ago.')
- ],
- buttons: {
- 'continue': {
- text: _('continue'),
- nextScene: {0.5: 'c8', 1: 'c9'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
- 'b7': {
- text: [
- _('empty corridors.'),
- _('the place has been swept clean by scavengers.')
- ],
- buttons: {
- 'continue': {
- text: _('continue'),
- nextScene: {0.3: 'c12', 0.7: 'c10', 1: 'c11'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
- 'b8': {
- notification: _('an old man bursts through a door, wielding a scalpel.'),
- combat: true,
- enemy: 'old man',
- chara: 'M',
- damage: 3,
- hit: 0.5,
- attackDelay: 2,
- health: 10,
- loot: {
- 'cured meat': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'medicine': {
- min: 1,
- max: 2,
- chance: 0.5
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.3: 'c13', 0.7: 'c11', 1: 'end15'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'c1': {
- notification: _('a thug is waiting on the other side of the wall.'),
- combat: true,
- enemy: 'thug',
- chara: 'T',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 30,
- loot: {
- 'steel sword': {
- min: 1,
- max: 1,
- chance: 0.5
- },
- 'cured meat': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'd1', 1: 'd2'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'c2': {
- notification: _('a snarling beast jumps out from behind a car.'),
- combat: true,
- enemy: 'beast',
- chara: 'B',
- damage: 2,
- hit: 0.8,
- attackDelay: 1,
- health: 30,
- loot: {
- 'meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'fur': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'teeth': {
- min: 1,
- max: 5,
- chance: 0.5
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'd2'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'c3': {
- text: [
- _('street above the subway platform is blown away.'),
- _('lets some light down into the dusty haze.'),
- _('a sound comes from the tunnel, just ahead.')
- ],
- buttons: {
- 'enter': {
- text: _('investigate'),
- cost: { 'torch': 1 },
- nextScene: {0.5: 'd2', 1: 'd3'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
-
- 'c4': {
- text: [
- _('looks like a camp of sorts up ahead.'),
- /// TRANSLATORS : chainlink is a type of metal fence.
- _('rusted chainlink is pulled across an alleyway.'),
- _('fires burn in the courtyard beyond.')
- ],
- buttons: {
- 'enter': {
- text: _('continue'),
- nextScene: {0.5: 'd4', 1: 'd5'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
-
- 'c5': {
- text: [
- _('more voices can be heard ahead.'),
- _('they must be here for a reason.')
- ],
- buttons: {
- 'enter': {
- text: _('continue'),
- nextScene: {1: 'd5'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
-
- 'c6': {
- text: [
- _('the sound of gunfire carries on the wind.'),
- _('the street ahead glows with firelight.')
- ],
- buttons: {
- 'enter': {
- text: _('continue'),
- nextScene: {0.5: 'd5', 1: 'd6'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
-
- 'c7': {
- text: [
- /// TRANSLATORS : squatters occupy abandoned dwellings they don't own.
- _('more squatters are crowding around now.'),
- _('someone throws a stone.')
- ],
- buttons: {
- 'enter': {
- text: _('continue'),
- nextScene: {0.5: 'd7', 1: 'd8'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
-
- 'c8': {
- text: [
- _('an improvised shop is set up on the sidewalk.'),
- _('the owner stands by, stoic.')
- ],
- loot: {
- 'steel sword': {
- min: 1,
- max: 1,
- chance: 0.8
- },
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.5
- },
- 'bullets': {
- min: 1,
- max: 8,
- chance: 0.25
- },
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.01
- },
- 'medicine': {
- min: 1,
- max: 4,
- chance: 0.5
- }
- },
- buttons: {
- 'enter': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'd8'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'c9': {
- text: [
- _('strips of meat hang drying by the side of the street.'),
- _('the people back away, avoiding eye contact.')
- ],
- loot: {
- 'cured meat': {
- min: 5,
- max: 10,
- chance: 1
- }
- },
- buttons: {
- 'enter': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'd8', 1: 'd9'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'c10': {
- text: [
- _('someone has locked and barricaded the door to this operating theatre.')
- ],
- buttons: {
- 'enter': {
- text: _('continue'),
- nextScene: {0.2: 'end12', 0.6: 'd10', 1: 'd11'}
- },
- 'leave': {
- text: _('leave city'),
- nextScene: 'end'
- }
- }
- },
-
- 'c11': {
- notification: _('a tribe of elderly squatters is camped out in this ward.'),
- combat: true,
- enemy: 'squatters',
- plural: true,
- chara: 'SSS',
- damage: 2,
- hit: 0.7,
- attackDelay: 0.5,
- health: 40,
- loot: {
- 'cured meat': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'cloth': {
- min: 3,
- max: 8,
- chance: 0.8
- },
- 'medicine': {
- min: 1,
- max: 3,
- chance: 0.3
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'end10' }
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'c12': {
- notification: _('a pack of lizards rounds the corner.'),
- combat: true,
- enemy: 'lizards',
- plural: true,
- chara: 'LLL',
- damage: 4,
- hit: 0.7,
- attackDelay: 0.7,
- health: 30,
- loot: {
- 'meat': {
- min: 3,
- max: 8,
- chance: 1
- },
- 'teeth': {
- min: 2,
- max: 4,
- chance: 1
- },
- 'scales': {
- min: 3,
- max: 5,
- chance: 1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'end10' }
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'c13': {
- text: [
- _('strips of meat are hung up to dry in this ward.')
- ],
- loot: {
- 'cured meat': {
- min: 3,
- max: 10,
- chance: 1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 0.5: 'end10', 1: 'end11' }
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd1': {
- notification: _('a large bird nests at the top of the stairs.'),
- combat: true,
- enemy: 'bird',
- chara: 'B',
- damage: 5,
- hit: 0.7,
- attackDelay: 1,
- health: 45,
- loot: {
- 'meat': {
- min: 5,
- max: 10,
- chance: 0.8
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end1', 1: 'end2'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd2': {
- text: [
- _("the debris is denser here."),
- _("maybe some useful stuff in the rubble.")
- ],
- loot: {
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'steel': {
- min: 1,
- max: 10,
- chance: 0.8
- },
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.01
- },
- 'cloth': {
- min: 1,
- max: 10,
- chance: 1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'end2'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd3': {
- notification: _('a swarm of rats rushes up the tunnel.'),
- combat: true,
- enemy: 'rats',
- plural: true,
- chara: 'RRR',
- damage: 1,
- hit: 0.8,
- attackDelay: 0.25,
- health: 60,
- loot: {
- 'fur': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'teeth': {
- min: 5,
- max: 10,
- chance: 0.5
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end2', 1: 'end3'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd4': {
- notification: _('a large man attacks, waving a bayonet.'),
- combat: true,
- enemy: 'veteran',
- chara: 'V',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 45,
- loot: {
- 'bayonet': {
- min: 1,
- max: 1,
- chance: 0.5
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end4', 1: 'end5'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd5': {
- notification: _('a second soldier opens fire.'),
- combat: true,
- enemy: 'soldier',
- ranged: true,
- chara: 'D',
- damage: 8,
- hit: 0.8,
- attackDelay: 2,
- health: 50,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.2
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'end5'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd6': {
- notification: _('a masked soldier rounds the corner, gun drawn'),
- combat: true,
- enemy: 'commando',
- chara: 'C',
- ranged: true,
- damage: 3,
- hit: 0.9,
- attackDelay: 2,
- health: 55,
- loot: {
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.5
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end5', 1: 'end6'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd7': {
- notification: _('the crowd surges forward.'),
- combat: true,
- enemy: 'squatters',
- plural: true,
- chara: 'SSS',
- damage: 2,
- hit: 0.7,
- attackDelay: 0.5,
- health: 40,
- loot: {
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'teeth': {
- min: 1,
- max: 5,
- chance: 0.5
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end7', 1: 'end8'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd8': {
- notification: _('a youth lashes out with a tree branch.'),
- combat: true,
- enemy: 'youth',
- chara: 'Y',
- damage: 2,
- hit: 0.7,
- attackDelay: 1,
- health: 45,
- loot: {
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'teeth': {
- min: 1,
- max: 5,
- chance: 0.5
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'end8'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd9': {
- notification: _('a squatter stands firmly in the doorway of a small hut.'),
- combat: true,
- enemy: 'squatter',
- chara: 'S',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 20,
- loot: {
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'teeth': {
- min: 1,
- max: 5,
- chance: 0.5
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {0.5: 'end8', 1: 'end9'}
- },
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'd10': {
- notification: _('behind the door, a deformed figure awakes and attacks.'),
- combat: true,
- enemy: 'deformed',
- chara: 'D',
- damage: 8,
- hit: 0.6,
- attackDelay: 2,
- health: 40,
- loot: {
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'teeth': {
- min: 2,
- max: 2,
- chance: 1
- },
- 'steel': {
- min: 1,
- max: 3,
- chance: 0.6
- },
- 'scales': {
- min: 2,
- max: 3,
- chance: 0.1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'end14'}
- }
- }
- },
-
- 'd11': {
- notification: _('as soon as the door is open a little bit, hundreds of tentacles erupt.'),
- combat: true,
- enemy: 'tentacles',
- plural: true,
- chara: 'TTT',
- damage: 2,
- hit: 0.6,
- attackDelay: 0.5,
- health: 60,
- loot: {
- 'meat': {
- min: 10,
- max: 20,
- chance: 1
- }
- },
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: {1: 'end13'}
- }
- }
- },
-
- 'end1': {
- text: [
- _('bird must have liked shiney things.'),
- _('some good stuff woven into its nest.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- bullets: {
- min: 5,
- max: 10,
- chance: 0.8
- },
- bolas: {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.5
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end2': {
- text: [
- _('not much here.'),
- _('scavengers must have gotten to this place already.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- torch: {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.5
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end3': {
- text: [
- /// TRANSLATORS : a platform in the subway
- _('the tunnel opens up at another platform.'),
- _('the walls are scorched from an old battle.'),
- _('bodies and supplies from both sides litter the ground.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- rifle: {
- min: 1,
- max: 1,
- chance: 0.8
- },
- bullets: {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'laser rifle': {
- min: 1,
- max: 1,
- chance: 0.3
- },
- 'energy cell': {
- min: 1,
- max: 5,
- chance: 0.3
- },
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.3
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end4': {
- text: [
- _('the small military outpost is well supplied.'),
- _('arms and munitions, relics from the war, are neatly arranged on the store-room floor.'),
- _('just as deadly now as they were then.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- rifle: {
- min: 1,
- max: 1,
- chance: 1
- },
- bullets: {
- min: 1,
- max: 10,
- chance: 1
- },
- grenade: {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end5': {
- text: [
- _('searching the bodies yields a few supplies.'),
- _('more soldiers will be on their way.'),
- _('time to move on.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- rifle: {
- min: 1,
- max: 1,
- chance: 1
- },
- bullets: {
- min: 1,
- max: 10,
- chance: 1
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'medicine': {
- min: 1,
- max: 4,
- chance: 0.1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end6': {
- text: [
- _('the small settlement has clearly been burning a while.'),
- _('the bodies of the wanderers that lived here are still visible in the flames.'),
- _("still time to rescue a few supplies.")
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'laser rifle': {
- min: 1,
- max: 1,
- chance: 0.5
- },
- 'energy cell': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'cured meat': {
- min: 1,
- max: 10,
- chance: 1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end7': {
- text: [
- _('the remaining settlers flee from the violence, their belongings forgotten.'),
- _("there's not much, but some useful things can still be found.")
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'steel sword': {
- min: 1,
- max: 1,
- chance: 0.8
- },
- 'energy cell': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'cured meat': {
- min: 1,
- max: 10,
- chance: 1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end8': {
- text: [
- _('the young settler was carrying a canvas sack.'),
- _("it contains travelling gear, and a few trinkets."),
- _("there's nothing else here.")
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'steel sword': {
- min: 1,
- max: 1,
- chance: 0.8
- },
- 'bolas': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'cured meat': {
- min: 1,
- max: 10,
- chance: 1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end9': {
- text: [
- _('inside the hut, a child cries.'),
- _("a few belongings rest against the walls."),
- _("there's nothing else here.")
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'bolas': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.2
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end10': {
- text: [
- _('the stench of rot and death fills the operating theatres.'),
- _("a few items are scattered on the ground."),
- _('there is nothing else here.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'energy cell': {
- min: 1,
- max: 1,
- chance: 0.3
- },
- 'medicine': {
- min: 1,
- max: 5,
- chance: 0.3
- },
- 'teeth': {
- min: 3,
- max: 8,
- chance: 1
- },
- 'scales': {
- min: 4,
- max: 7,
- chance: 0.9
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end11': {
- text: [
- _('a pristine medicine cabinet at the end of a hallway.'),
- _("the rest of the hospital is empty.")
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'energy cell': {
- min: 1,
- max: 1,
- chance: 0.2
- },
- 'medicine': {
- min: 3,
- max: 10,
- chance: 1
- },
- 'teeth': {
- min: 1,
- max: 2,
- chance: 0.2
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end12': {
- text: [
- _('someone had been stockpiling loot here.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'energy cell': {
- min: 1,
- max: 3,
- chance: 0.2
- },
- 'medicine': {
- min: 3,
- max: 10,
- chance: 0.5
- },
- 'bullets': {
- min: 2,
- max: 8,
- chance: 1
- },
- 'torch': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'grenade': {
- min: 1,
- max: 1,
- chance: 0.5
- },
- 'alien alloy': {
- min: 1,
- max: 2,
- chance: 0.8
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end13': {
- text: [
- _('the tentacular horror is defeated.'),
- _('inside, the remains of its victims are everywhere.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'steel sword': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'rifle': {
- min: 1,
- max: 2,
- chance: 0.3
- },
- 'teeth': {
- min: 2,
- max: 8,
- chance: 1
- },
- 'cloth': {
- min: 3,
- max: 6,
- chance: 0.5
- },
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end14': {
- text: [
- /// TRANSLATORS : warped means extremely disfigured.
- _('the warped man lies dead.'),
- _('the operating theatre has a lot of curious equipment.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'energy cell': {
- min: 2,
- max: 5,
- chance: 0.8
- },
- 'medicine': {
- min: 3,
- max: 12,
- chance: 1
- },
- 'cloth': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'steel': {
- min: 2,
- max: 3,
- chance: 0.3
- },
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.3
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
-
- 'end15': {
- text: [
- _('the old man had a small cache of interesting items.')
- ],
- onLoad: function() {
- World.clearDungeon();
- $SM.set('game.cityCleared', true);
- },
- loot: {
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.8
- },
- 'medicine': {
- min: 1,
- max: 4,
- chance: 1
- },
- 'cured meat': {
- min: 3,
- max: 7,
- chance: 1
- },
- 'bolas': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'fur': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- buttons: {
- 'leave': {
- text: _('leave city'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- }
- }
- },
- "house": { /* Abandoned House */
- title: _('An Old House'),
- scenes: {
- 'start': {
- text: [
- _('an old house remains here, once white siding yellowed and peeling.'),
- _('the door hangs open.')
- ],
- notification: _('the remains of an old house stand as a monument to simpler times'),
- buttons: {
- 'enter': {
- text: _('go inside'),
- nextScene: { 0.25: 'medicine', 0.5: 'supplies', 1: 'occupied' }
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'supplies': {
- text: [
- _('the house is abandoned, but not yet picked over.'),
- _('still a few drops of water in the old well.')
- ],
- onLoad: function() {
- World.markVisited(World.curPos[0], World.curPos[1]);
- World.setWater(World.getMaxWater());
- Notifications.notify(null, _('water replenished'));
- },
- loot: {
- 'cured meat': {
- min: 1,
- max: 10,
- chance: 0.8
- },
- 'leather': {
- min: 1,
- max: 10,
- chance: 0.2
- },
- 'cloth': {
- min: 1,
- max: 10,
- chance: 0.5
- }
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'medicine': {
- text: [
- _('the house has been ransacked.'),
- _('but there is a cache of medicine under the floorboards.')
- ],
- onLoad: function() {
- World.markVisited(World.curPos[0], World.curPos[1]);
- },
- loot: {
- 'medicine': {
- min: 2,
- max: 5,
- chance: 1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'occupied': {
- combat: true,
- enemy: 'squatter',
- chara: 'S',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 10,
- notification: _('a man charges down the hall, a rusty blade in his hand'),
- onLoad: function() {
- World.markVisited(World.curPos[0], World.curPos[1]);
- },
- loot: {
- 'cured meat': {
- min: 1,
- max: 10,
- chance: 0.8
- },
- 'leather': {
- min: 1,
- max: 10,
- chance: 0.2
- },
- 'cloth': {
- min: 1,
- max: 10,
- chance: 0.5
- }
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- }
- }
- },
- "battlefield": { /* Discovering an old battlefield */
- title: _('A Forgotten Battlefield'),
- scenes: {
- 'start': {
- text: [
- _('a battle was fought here, long ago.'),
- _('battered technology from both sides lays dormant on the blasted landscape.')
- ],
- onLoad: function() {
- World.markVisited(World.curPos[0], World.curPos[1]);
- },
- loot: {
- 'rifle': {
- min: 1,
- max: 3,
- chance: 0.5
- },
- 'bullets': {
- min: 5,
- max: 20,
- chance: 0.8
- },
- 'laser rifle': {
- min: 1,
- max: 3,
- chance: 0.3
- },
- 'energy cell': {
- min: 5,
- max: 10,
- chance: 0.5
- },
- 'grenade': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'alien alloy': {
- min: 1,
- max: 1,
- chance: 0.3
- }
- },
- buttons: {
- 'leave': {
- text: _('leave'),
-
- nextScene: 'end'
- }
- }
- }
- }
- },
- "borehole": { /* Admiring a huge borehole */
- title: _('A Huge Borehole'),
- scenes: {
- 'start': {
- text: [
- _('a huge hole is cut deep into the earth, evidence of the past harvest.'),
- _('they took what they came for, and left.'),
- _('castoff from the mammoth drills can still be found by the edges of the precipice.')
- ],
- onLoad: function() {
- World.markVisited(World.curPos[0], World.curPos[1]);
- },
- loot: {
- 'alien alloy': {
- min: 1,
- max: 3,
- chance: 1
- }
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- }
- }
- },
- "ship": { /* Finding a way off this rock */
- title: _('A Crashed Ship'),
- scenes: {
- 'start': {
- onLoad: function() {
- World.markVisited(World.curPos[0], World.curPos[1]);
- World.drawRoad();
- World.state.ship = true;
- },
- text: [
- _('the familiar curves of a wanderer vessel rise up out of the dust and ash. '),
- _("lucky that the natives can't work the mechanisms."),
- _('with a little effort, it might fly again.')
- ],
- buttons: {
- 'leavel': {
- text: _('salvage'),
- nextScene: 'end'
- }
- }
- }
- }
- },
- "sulphurmine": { /* Clearing the Sulphur Mine */
- title: _('The Sulphur Mine'),
- scenes: {
- 'start': {
- text: [
- _("the military is already set up at the mine's entrance."),
- _('soldiers patrol the perimeter, rifles slung over their shoulders.')
- ],
- notification: _('a military perimeter is set up around the mine.'),
- buttons: {
- 'attack': {
- text: _('attack'),
- nextScene: {1: 'a1'}
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'a1': {
- combat: true,
- enemy: 'soldier',
- ranged: true,
- chara: 'D',
- damage: 8,
- hit: 0.8,
- attackDelay: 2,
- health: 50,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.2
- }
- },
- notification: _('a soldier, alerted, opens fire.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'a2' }
- },
- 'run': {
- text: _('run'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'a2': {
- combat: true,
- enemy: 'soldier',
- ranged: true,
- chara: 'D',
- damage: 8,
- hit: 0.8,
- attackDelay: 2,
- health: 50,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'bullets': {
- min: 1,
- max: 5,
- chance: 0.5
- },
- 'rifle': {
- min: 1,
- max: 1,
- chance: 0.2
- }
- },
- notification: _('a second soldier joins the fight.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'a3' }
- },
- 'run': {
- text: _('run'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'a3': {
- combat: true,
- enemy: 'veteran',
- chara: 'V',
- damage: 10,
- hit: 0.8,
- attackDelay: 2,
- health: 65,
- loot: {
- 'bayonet': {
- min: 1,
- max: 1,
- chance: 0.5
- },
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- notification: _('a grizzled soldier attacks, waving a bayonet.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'cleared' }
- }
- }
- },
- 'cleared': {
- text: [
- _('the military presence has been cleared.'),
- _('the mine is now safe for workers.')
- ],
- notification: _('the sulphur mine is clear of dangers'),
- onLoad: function() {
- World.drawRoad();
- World.state.sulphurmine = true;
- World.markVisited(World.curPos[0], World.curPos[1]);
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- }
- }
- },
- "coalmine": { /* Clearing the Coal Mine */
- title: _('The Coal Mine'),
- scenes: {
- 'start': {
- text: [
- _('camp fires burn by the entrance to the mine.'),
- _('men mill about, weapons at the ready.')
- ],
- notification: _('this old mine is not abandoned'),
- buttons: {
- 'attack': {
- text: _('attack'),
- nextScene: {1: 'a1'}
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'a1': {
- combat: true,
- enemy: 'man',
- chara: 'M',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 10,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- notification: _('a man joins the fight'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'a2' }
- },
- 'run': {
- text: _('run'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'a2': {
- combat: true,
- enemy: 'man',
- chara: 'M',
- damage: 3,
- hit: 0.8,
- attackDelay: 2,
- health: 10,
- loot: {
- 'cured meat': {
- min: 1,
- max: 5,
- chance: 0.8
- },
- 'cloth': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- notification: _('a man joins the fight'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'a3' }
- },
- 'run': {
- text: _('run'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: 'end'
- }
- }
- },
- 'a3': {
- combat: true,
- enemy: 'chief',
- chara: 'C',
- damage: 5,
- hit: 0.8,
- attackDelay: 2,
- health: 20,
- loot: {
- 'cured meat': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'iron': {
- min: 1,
- max: 5,
- chance: 0.8
- }
- },
- notification: _('only the chief remains.'),
- buttons: {
- 'continue': {
- text: _('continue'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'cleared' }
- }
- }
- },
- 'cleared': {
- text: [
- _('the camp is still, save for the crackling of the fires.'),
- _('the mine is now safe for workers.')
- ],
- notification: _('the coal mine is clear of dangers'),
- onLoad: function() {
- World.drawRoad();
- World.state.coalmine = true;
- World.markVisited(World.curPos[0], World.curPos[1]);
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- }
- }
- },
- "ironmine": { /* Clearing the Iron Mine */
- title: _('The Iron Mine'),
- scenes: {
- 'start': {
- text: [
- _('an old iron mine sits here, tools abandoned and left to rust.'),
- _('bleached bones are strewn about the entrance. many, deeply scored with jagged grooves.'),
- _('feral howls echo out of the darkness.')
- ],
- notification: _('the path leads to an abandoned mine'),
- buttons: {
- 'enter': {
- text: _('go inside'),
- nextScene: { 1: 'enter' },
- cost: { 'torch': 1 }
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'enter': {
- combat: true,
- enemy: 'beastly matriarch',
- chara: 'M',
- damage: 4,
- hit: 0.8,
- attackDelay: 2,
- health: 10,
- loot: {
- 'teeth': {
- min: 5,
- max: 10,
- chance: 1
- },
- 'scales': {
- min: 5,
- max: 10,
- chance: 0.8
- },
- 'cloth': {
- min: 5,
- max: 10,
- chance: 0.5
- }
- },
- notification: _('a large creature lunges, muscles rippling in the torchlight'),
- buttons: {
- 'leave': {
- text: _('leave'),
- cooldown: Events._LEAVE_COOLDOWN,
- nextScene: { 1: 'cleared' }
- }
- }
- },
- 'cleared': {
- text: [
- _('the beast is dead.'),
- _('the mine is now safe for workers.')
- ],
- notification: _('the iron mine is clear of dangers'),
- onLoad: function() {
- World.drawRoad();
- World.state.ironmine = true;
- World.markVisited(World.curPos[0], World.curPos[1]);
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- }
- }
- },
-
- "cache": { /* Cache - contains some of supplies from previous game */
- title: _('A Destroyed Village'),
- scenes: {
- 'start': {
- text: [
- _('a destroyed village lies in the dust.'),
- _('charred bodies litter the ground.')
- ],
- /// TRANSLATORS : tang = strong metallic smell, wanderer afterburner = ship's engines
- notification: _('the metallic tang of wanderer afterburner hangs in the air.'),
- buttons: {
- 'enter': {
- text: _('enter'),
- nextScene: {1: 'underground'}
- },
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- },
- 'underground': {
- text: [
- _('a shack stands at the center of the village.'),
- _('there are still supplies inside.')
- ],
- buttons: {
- 'take': {
- text: _('take'),
- nextScene: {1: 'exit'}
- }
- }
- },
- 'exit': {
- text: [
- _('all the work of a previous generation is here.'),
- _('ripe for the picking.')
- ],
- onLoad: function() {
- World.markVisited(World.curPos[0], World.curPos[1]);
- Prestige.collectStores();
- },
- buttons: {
- 'leave': {
- text: _('leave'),
- nextScene: 'end'
- }
- }
- }
- }
- }
-};
+/**
+ * Events that only occur at specific times. Launched manually.
+ **/
+Events.Setpieces = {
+ "outpost": { /* Friendly Outpost */
+ title: _('An Outpost'),
+ scenes: {
+ 'start': {
+ text: [
+ _('a safe place in the wilds.')
+ ],
+ notification: _('a safe place in the wilds.'),
+ loot: {
+ 'cured meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ }
+ },
+ onLoad: function() {
+ World.useOutpost();
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "swamp": { /* Swamp */
+ title: _('A Murky Swamp'),
+ scenes: {
+ 'start': {
+ text: [
+ _('rotting reeds rise out of the swampy earth.'),
+ _('a lone frog sits in the muck, silently.')
+ ],
+ notification: _('a swamp festers in the stagnant air.'),
+ buttons: {
+ 'enter': {
+ text: _('enter'),
+ nextScene: {1: 'cabin'}
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'cabin': {
+ text: [
+ _('deep in the swamp is a moss-covered cabin.'),
+ _('an old wanderer sits inside, in a seeming trance.')
+ ],
+ buttons: {
+ 'talk': {
+ cost: {'charm': 1},
+ text: _('talk'),
+ nextScene: {1: 'talk'}
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'talk': {
+ text: [
+ _('the wanderer takes the charm and nods slowly.'),
+ _('he speaks of once leading the great fleets to fresh worlds.'),
+ _('unfathomable destruction to fuel wanderer hungers.'),
+ _('his time here, now, is his penance.')
+ ],
+ onLoad: function() {
+ $SM.addPerk('gastronome');
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "cave": { /* Cave */
+ title: _('A Damp Cave'),
+ scenes: {
+ 'start': {
+ text: [
+ _('the mouth of the cave is wide and dark.'),
+ _("can't see what's inside.")
+ ],
+ notification: _('the earth here is split, as if bearing an ancient wound'),
+ buttons: {
+ 'enter': {
+ text: _('go inside'),
+ cost: { torch: 1 },
+ nextScene: {0.3: 'a1', 0.6: 'a2', 1: 'a3'}
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'a1': {
+ combat: true,
+ enemy: 'beast',
+ chara: 'B',
+ damage: 1,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 5,
+ notification: _('a startled beast defends its home'),
+ loot: {
+ 'fur': {
+ min: 1,
+ max: 10,
+ chance: 1
+ },
+ 'teeth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'b1', 1: 'b2'}
+ },
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a2': {
+ text: [
+ _('the cave narrows a few feet in.'),
+ _("the walls are moist and moss-covered")
+ ],
+ buttons: {
+ 'continue': {
+ text: _('squeeze'),
+ nextScene: {0.5: 'b2', 1: 'b3'}
+ },
+ 'leave': {
+ text: _('leave cave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a3': {
+ text: [
+ _('the remains of an old camp sits just inside the cave.'),
+ _('bedrolls, torn and blackened, lay beneath a thin layer of dust.')
+ ],
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 1
+ },
+ 'torch': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'leather': {
+ min: 1,
+ max: 5,
+ chance: 0.3
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'b3', 1: 'b4'}
+ },
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b1': {
+ text: [
+ _('the body of a wanderer lies in a small cavern.'),
+ _("rot's been to work on it, and some of the pieces are missing."),
+ /// TRANSLATORS : 'it' is a rotting wanderer's body
+ _("can't tell what left it here.")
+ ],
+ loot: {
+ 'iron sword': {
+ min: 1,
+ max: 1,
+ chance: 1
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'torch': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'medicine': {
+ min: 1,
+ max: 2,
+ chance: 0.1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'c1' }
+ },
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b2': {
+ text: [
+ _('the torch sputters and dies in the damp air'),
+ _('the darkness is absolute')
+ ],
+ notification: _('the torch goes out'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cost: {'torch': 1},
+ nextScene: { 1: 'c1' }
+ },
+ 'leave': {
+ text: _('leave cave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b3': {
+ combat: true,
+ enemy: 'beast',
+ chara: 'B',
+ damage: 1,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 5,
+ notification: _('a startled beast defends its home'),
+ loot: {
+ 'fur': {
+ min: 1,
+ max: 3,
+ chance: 1
+ },
+ 'teeth': {
+ min: 1,
+ max: 2,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'c2'}
+ },
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b4': {
+ combat: true,
+ enemy: 'cave lizard',
+ chara: 'L',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 6,
+ notification: _('a cave lizard attacks'),
+ loot: {
+ 'scales': {
+ min: 1,
+ max: 3,
+ chance: 1
+ },
+ 'teeth': {
+ min: 1,
+ max: 2,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'c2'}
+ },
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c1': {
+ combat: true,
+ enemy: 'beast',
+ chara: 'B',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 10,
+ notification: _('a large beast charges out of the dark'),
+ loot: {
+ 'fur': {
+ min: 1,
+ max: 3,
+ chance: 1
+ },
+ 'teeth': {
+ min: 1,
+ max: 3,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end1', 1: 'end2'}
+ },
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c2': {
+ combat: true,
+ enemy: 'lizard',
+ chara: 'L',
+ damage: 4,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 10,
+ notification: _('a giant lizard shambles forward'),
+ loot: {
+ 'scales': {
+ min: 1,
+ max: 3,
+ chance: 1
+ },
+ 'teeth': {
+ min: 1,
+ max: 3,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.7: 'end2', 1: 'end3'}
+ },
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end1': {
+ text: [
+ _('the nest of a large animal lies at the back of the cave.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ loot: {
+ 'meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'fur': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'scales': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'teeth': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end2': {
+ text: [
+ _('a small supply cache is hidden at the back of the cave.')
+ ],
+ loot: {
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'leather': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'iron': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'cured meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'steel': {
+ min: 5,
+ max: 10,
+ chance: 0.5
+ },
+ 'bolas': {
+ min: 1,
+ max: 3,
+ chance: 0.3
+ },
+ 'medicine': {
+ min: 1,
+ max: 4,
+ chance: 0.15
+ }
+ },
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end3': {
+ text: [
+ _('an old case is wedged behind a rock, covered in a thick layer of dust.')
+ ],
+ loot: {
+ 'steel sword': {
+ min: 1,
+ max: 1,
+ chance: 1
+ },
+ 'bolas': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'medicine': {
+ min: 1,
+ max: 3,
+ chance: 0.3
+ }
+ },
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave cave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "town": { /* Town */
+ title: _('A Deserted Town'),
+ scenes: {
+ 'start': {
+ text: [
+ _('a small suburb lays ahead, empty houses scorched and peeling.'),
+ _("broken streetlights stand, rusting. light hasn't graced this place in a long time.")
+ ],
+ notification: _("the town lies abandoned, its citizens long dead"),
+ buttons: {
+ 'enter': {
+ text: _('explore'),
+ nextScene: {0.3: 'a1', 0.7: 'a3', 1: 'a2'}
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'a1': {
+ text: [
+ _("where the windows of the schoolhouse aren't shattered, they're blackened with soot."),
+ _('the double doors creak endlessly in the wind.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('enter'),
+ nextScene: {0.5: 'b1', 1: 'b2'},
+ cost: {torch: 1}
+ },
+ 'leave': {
+ text: _('leave town'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'a2': {
+ combat: true,
+ enemy: 'thug',
+ chara: 'T',
+ damage: 4,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 30,
+ loot: {
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'leather': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ }
+ },
+ notification: _('ambushed on the street.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'b3', 1: 'b4'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a3': {
+ text: [
+ _("a squat building up ahead."),
+ _('a green cross barely visible behind grimy windows.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('enter'),
+ nextScene: {0.5: 'b5', 1: 'end5'},
+ cost: {torch: 1}
+ },
+ 'leave': {
+ text: _('leave town'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b1': {
+ text: [
+ _('a small cache of supplies is tucked inside a rusting locker.')
+ ],
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 1
+ },
+ 'torch': {
+ min: 1,
+ max: 3,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.3
+ },
+ 'medicine': {
+ min: 1,
+ max: 3,
+ chance: 0.05
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'c1', 1: 'c2'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b2': {
+ combat: true,
+ enemy: 'scavenger',
+ chara: 'S',
+ damage: 4,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 30,
+ loot: {
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'leather': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ }
+ },
+ notification: _('a scavenger waits just inside the door.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'c2', 1: 'c3'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b3': {
+ combat: true,
+ enemy: 'beast',
+ chara: 'B',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 25,
+ loot: {
+ 'teeth': {
+ min: 1,
+ max: 5,
+ chance: 1
+ },
+ 'fur': {
+ min: 5,
+ max: 10,
+ chance: 1
+ }
+ },
+ notification: _('a beast stands alone in an overgrown park.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'c4', 1: 'c5'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b4': {
+ text: [
+ _('an overturned caravan is spread across the pockmarked street.'),
+ _("it's been picked over by scavengers, but there's still some things worth taking.")
+ ],
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'torch': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.3
+ },
+ 'medicine': {
+ min: 1,
+ max: 3,
+ chance: 0.1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'c5', 1: 'c6' }
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b5': {
+ combat: true,
+ enemy: 'madman',
+ chara: 'M',
+ damage: 6,
+ hit: 0.3,
+ attackDelay: 1,
+ health: 10,
+ loot: {
+ 'cloth': {
+ min: 2,
+ max: 4,
+ chance: 0.3
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.9
+ },
+ 'medicine': {
+ min: 1,
+ max: 2,
+ chance: 0.4
+ }
+ },
+ notification: _('a madman attacks, screeching.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.3: 'end5', 1: 'end6'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c1': {
+ combat: true,
+ enemy: 'thug',
+ chara: 'T',
+ damage: 4,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 30,
+ loot: {
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'leather': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ }
+ },
+ notification: _('a thug moves out of the shadows.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'd1'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c2': {
+ combat: true,
+ enemy: 'beast',
+ chara: 'B',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 25,
+ loot: {
+ 'teeth': {
+ min: 1,
+ max: 5,
+ chance: 1
+ },
+ 'fur': {
+ min: 5,
+ max: 10,
+ chance: 1
+ }
+ },
+ notification: _('a beast charges out of a ransacked classroom.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'd1'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c3': {
+ text: [
+ _('through the large gymnasium doors, footsteps can be heard.'),
+ _('the torchlight casts a flickering glow down the hallway.'),
+ _('the footsteps stop.')
+ ],
+ buttons: {
+ 'continue': {
+ text: _('enter'),
+ nextScene: {1: 'd1'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c4': {
+ combat: true,
+ enemy: 'beast',
+ chara: 'B',
+ damage: 4,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 25,
+ loot: {
+ 'teeth': {
+ min: 1,
+ max: 5,
+ chance: 1
+ },
+ 'fur': {
+ min: 5,
+ max: 10,
+ chance: 1
+ }
+ },
+ notification: _('another beast, draw by the noise, leaps out of a copse of trees.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'd2'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c5': {
+ text: [
+ _("something's causing a commotion a ways down the road."),
+ _("a fight, maybe.")
+ ],
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ nextScene: {1: 'd2'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c6': {
+ text: [
+ _('a small basket of food is hidden under a park bench, with a note attached.'),
+ _("can't read the words.")
+ ],
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'd2'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'd1': {
+ combat: true,
+ enemy: 'scavenger',
+ chara: 'S',
+ damage: 5,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 30,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 1
+ },
+ 'leather': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'steel sword': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ }
+ },
+ notification: _('a panicked scavenger bursts through the door, screaming.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end1', 1: 'end2'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'd2': {
+ combat: true,
+ enemy: 'vigilante',
+ chara: 'V',
+ damage: 6,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 30,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 1
+ },
+ 'leather': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'steel sword': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ }
+ },
+ notification: _("a man stands over a dead wanderer. notices he's not alone."),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end3', 1: 'end4'}
+ },
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end1': {
+ text: [
+ _('scavenger had a small camp in the school.'),
+ _('collected scraps spread across the floor like they fell from heaven.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ loot: {
+ 'steel sword': {
+ min: 1,
+ max: 1,
+ chance: 1
+ },
+ 'steel': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'cured meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'bolas': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'medicine': {
+ min: 1,
+ max: 2,
+ chance: 0.3
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end2': {
+ text: [
+ _("scavenger'd been looking for supplies in here, it seems."),
+ _("a shame to let what he'd found go to waste.")
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ loot: {
+ 'coal': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'cured meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'leather': {
+ min: 5,
+ max: 10,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end3': {
+ text: [
+ _("beneath the wanderer's rags, clutched in one of its many hands, a glint of steel."),
+ _("worth killing for, it seems.")
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ loot: {
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 1
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end4': {
+ text: [
+ _("eye for an eye seems fair."),
+ _("always worked before, at least."),
+ _("picking the bones finds some useful trinkets.")
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ loot: {
+ 'cured meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'iron': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'torch': {
+ min: 1,
+ max: 5,
+ chance: 1
+ },
+ 'bolas': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'medicine': {
+ min: 1,
+ max: 2,
+ chance: 0.1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end5': {
+ text: [
+ _('some medicine abandoned in the drawers.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ loot: {
+ 'medicine': {
+ min: 2,
+ max: 5,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave town'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'end6': {
+ text: [
+ _('the clinic has been ransacked.'),
+ _('only dust and stains remain.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave town'),
+
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "city": { /* City */
+ title: _('A Ruined City'),
+ scenes: {
+ 'start': {
+ text: [
+ _('a battered highway sign stands guard at the entrance to this once-great city.'),
+ _("the towers that haven't crumbled jut from the landscape like the ribcage of some ancient beast."),
+ _('might be things worth having still inside.')
+ ],
+ notification: _("the towers of a decaying city dominate the skyline"),
+ buttons: {
+ 'enter': {
+ text: _('explore'),
+ nextScene: {0.2: 'a1', 0.5: 'a2', 0.8: 'a3', 1: 'a4'}
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a1': {
+ text:[
+ _('the streets are empty.'),
+ _('the air is filled with dust, driven relentlessly by the hard winds.')
+ ],
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ nextScene: {0.5: 'b1', 1: 'b2'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a2': {
+ text:[
+ _('orange traffic cones are set across the street, faded and cracked.'),
+ _('lights flash through the alleys between buildings.')
+ ],
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ nextScene: {0.5: 'b3', 1: 'b4'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a3': {
+ text: [
+ _('a large shanty town sprawls across the streets.'),
+ _('faces, darkened by soot and blood, stare out from crooked huts.')
+ ],
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ nextScene: {0.5: 'b5', 1: 'b6'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a4': {
+ text: [
+ _('the shell of an abandoned hospital looms ahead.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('enter'),
+ cost: { 'torch': 1 },
+ nextScene: {0.5: 'b7', 1: 'b8'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b1': {
+ text: [
+ _('the old tower seems mostly intact.'),
+ _('the shell of a burned out car blocks the entrance.'),
+ _('most of the windows at ground level are busted anyway.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('enter'),
+ nextScene: {0.5: 'c1', 1: 'c2'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b2': {
+ combat: true,
+ notification: _('a huge lizard scrambles up out of the darkness of an old metro station.'),
+ enemy: 'lizard',
+ chara: 'L',
+ damage: 5,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 20,
+ loot: {
+ 'scales': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 5,
+ max: 10,
+ chance: 0.5
+ },
+ 'meat': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'descend': {
+ text: _('descend'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'c2', 1: 'c3'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b3': {
+ notification: _('the shot echoes in the empty street.'),
+ combat: true,
+ enemy: 'sniper',
+ chara: 'S',
+ damage: 15,
+ hit: 0.8,
+ attackDelay: 4,
+ health: 30,
+ ranged: true,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'c4', 1: 'c5'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b4': {
+ notification: _('the soldier steps out from between the buildings, rifle raised.'),
+ combat: true,
+ enemy: 'soldier',
+ ranged: true,
+ chara: 'D',
+ damage: 8,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 50,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'c5', 1: 'c6'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b5': {
+ notification: _('a frail man stands defiantly, blocking the path.'),
+ combat: true,
+ enemy: 'frail man',
+ chara: 'M',
+ damage: 1,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 10,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'leather': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ },
+ 'medicine': {
+ min: 1,
+ max: 3,
+ chance: 0.05
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'c7', 1: 'c8'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b6': {
+ text: [
+ _('nothing but downcast eyes.'),
+ _('the people here were broken a long time ago.')
+ ],
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ nextScene: {0.5: 'c8', 1: 'c9'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b7': {
+ text: [
+ _('empty corridors.'),
+ _('the place has been swept clean by scavengers.')
+ ],
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ nextScene: {0.3: 'c12', 0.7: 'c10', 1: 'c11'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'b8': {
+ notification: _('an old man bursts through a door, wielding a scalpel.'),
+ combat: true,
+ enemy: 'old man',
+ chara: 'M',
+ damage: 3,
+ hit: 0.5,
+ attackDelay: 2,
+ health: 10,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'medicine': {
+ min: 1,
+ max: 2,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.3: 'c13', 0.7: 'c11', 1: 'end15'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'c1': {
+ notification: _('a thug is waiting on the other side of the wall.'),
+ combat: true,
+ enemy: 'thug',
+ chara: 'T',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 30,
+ loot: {
+ 'steel sword': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ },
+ 'cured meat': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'd1', 1: 'd2'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c2': {
+ notification: _('a snarling beast jumps out from behind a car.'),
+ combat: true,
+ enemy: 'beast',
+ chara: 'B',
+ damage: 2,
+ hit: 0.8,
+ attackDelay: 1,
+ health: 30,
+ loot: {
+ 'meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'fur': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'd2'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c3': {
+ text: [
+ _('street above the subway platform is blown away.'),
+ _('lets some light down into the dusty haze.'),
+ _('a sound comes from the tunnel, just ahead.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('investigate'),
+ cost: { 'torch': 1 },
+ nextScene: {0.5: 'd2', 1: 'd3'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c4': {
+ text: [
+ _('looks like a camp of sorts up ahead.'),
+ /// TRANSLATORS : chainlink is a type of metal fence.
+ _('rusted chainlink is pulled across an alleyway.'),
+ _('fires burn in the courtyard beyond.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('continue'),
+ nextScene: {0.5: 'd4', 1: 'd5'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c5': {
+ text: [
+ _('more voices can be heard ahead.'),
+ _('they must be here for a reason.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('continue'),
+ nextScene: {1: 'd5'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c6': {
+ text: [
+ _('the sound of gunfire carries on the wind.'),
+ _('the street ahead glows with firelight.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('continue'),
+ nextScene: {0.5: 'd5', 1: 'd6'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c7': {
+ text: [
+ /// TRANSLATORS : squatters occupy abandoned dwellings they don't own.
+ _('more squatters are crowding around now.'),
+ _('someone throws a stone.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('continue'),
+ nextScene: {0.5: 'd7', 1: 'd8'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c8': {
+ text: [
+ _('an improvised shop is set up on the sidewalk.'),
+ _('the owner stands by, stoic.')
+ ],
+ loot: {
+ 'steel sword': {
+ min: 1,
+ max: 1,
+ chance: 0.8
+ },
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ },
+ 'bullets': {
+ min: 1,
+ max: 8,
+ chance: 0.25
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.01
+ },
+ 'medicine': {
+ min: 1,
+ max: 4,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'enter': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'd8'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c9': {
+ text: [
+ _('strips of meat hang drying by the side of the street.'),
+ _('the people back away, avoiding eye contact.')
+ ],
+ loot: {
+ 'cured meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'enter': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'd8', 1: 'd9'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c10': {
+ text: [
+ _('someone has locked and barricaded the door to this operating theatre.')
+ ],
+ buttons: {
+ 'enter': {
+ text: _('continue'),
+ nextScene: {0.2: 'end12', 0.6: 'd10', 1: 'd11'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c11': {
+ notification: _('a tribe of elderly squatters is camped out in this ward.'),
+ combat: true,
+ enemy: 'squatters',
+ plural: true,
+ chara: 'SSS',
+ damage: 2,
+ hit: 0.7,
+ attackDelay: 0.5,
+ health: 40,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'cloth': {
+ min: 3,
+ max: 8,
+ chance: 0.8
+ },
+ 'medicine': {
+ min: 1,
+ max: 3,
+ chance: 0.3
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'end10' }
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c12': {
+ notification: _('a pack of lizards rounds the corner.'),
+ combat: true,
+ enemy: 'lizards',
+ plural: true,
+ chara: 'LLL',
+ damage: 4,
+ hit: 0.7,
+ attackDelay: 0.7,
+ health: 30,
+ loot: {
+ 'meat': {
+ min: 3,
+ max: 8,
+ chance: 1
+ },
+ 'teeth': {
+ min: 2,
+ max: 4,
+ chance: 1
+ },
+ 'scales': {
+ min: 3,
+ max: 5,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'end10' }
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'c13': {
+ text: [
+ _('strips of meat are hung up to dry in this ward.')
+ ],
+ loot: {
+ 'cured meat': {
+ min: 3,
+ max: 10,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 0.5: 'end10', 1: 'end11' }
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd1': {
+ notification: _('a large bird nests at the top of the stairs.'),
+ combat: true,
+ enemy: 'bird',
+ chara: 'B',
+ damage: 5,
+ hit: 0.7,
+ attackDelay: 1,
+ health: 45,
+ loot: {
+ 'meat': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end1', 1: 'end2'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd2': {
+ text: [
+ _("the debris is denser here."),
+ _("maybe some useful stuff in the rubble.")
+ ],
+ loot: {
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'steel': {
+ min: 1,
+ max: 10,
+ chance: 0.8
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.01
+ },
+ 'cloth': {
+ min: 1,
+ max: 10,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'end2'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd3': {
+ notification: _('a swarm of rats rushes up the tunnel.'),
+ combat: true,
+ enemy: 'rats',
+ plural: true,
+ chara: 'RRR',
+ damage: 1,
+ hit: 0.8,
+ attackDelay: 0.25,
+ health: 60,
+ loot: {
+ 'fur': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 5,
+ max: 10,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end2', 1: 'end3'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd4': {
+ notification: _('a large man attacks, waving a bayonet.'),
+ combat: true,
+ enemy: 'veteran',
+ chara: 'V',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 45,
+ loot: {
+ 'bayonet': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end4', 1: 'end5'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd5': {
+ notification: _('a second soldier opens fire.'),
+ combat: true,
+ enemy: 'soldier',
+ ranged: true,
+ chara: 'D',
+ damage: 8,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 50,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'end5'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd6': {
+ notification: _('a masked soldier rounds the corner, gun drawn'),
+ combat: true,
+ enemy: 'commando',
+ chara: 'C',
+ ranged: true,
+ damage: 3,
+ hit: 0.9,
+ attackDelay: 2,
+ health: 55,
+ loot: {
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end5', 1: 'end6'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd7': {
+ notification: _('the crowd surges forward.'),
+ combat: true,
+ enemy: 'squatters',
+ plural: true,
+ chara: 'SSS',
+ damage: 2,
+ hit: 0.7,
+ attackDelay: 0.5,
+ health: 40,
+ loot: {
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end7', 1: 'end8'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd8': {
+ notification: _('a youth lashes out with a tree branch.'),
+ combat: true,
+ enemy: 'youth',
+ chara: 'Y',
+ damage: 2,
+ hit: 0.7,
+ attackDelay: 1,
+ health: 45,
+ loot: {
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'end8'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd9': {
+ notification: _('a squatter stands firmly in the doorway of a small hut.'),
+ combat: true,
+ enemy: 'squatter',
+ chara: 'S',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 20,
+ loot: {
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {0.5: 'end8', 1: 'end9'}
+ },
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'd10': {
+ notification: _('behind the door, a deformed figure awakes and attacks.'),
+ combat: true,
+ enemy: 'deformed',
+ chara: 'D',
+ damage: 8,
+ hit: 0.6,
+ attackDelay: 2,
+ health: 40,
+ loot: {
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'teeth': {
+ min: 2,
+ max: 2,
+ chance: 1
+ },
+ 'steel': {
+ min: 1,
+ max: 3,
+ chance: 0.6
+ },
+ 'scales': {
+ min: 2,
+ max: 3,
+ chance: 0.1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'end14'}
+ }
+ }
+ },
+
+ 'd11': {
+ notification: _('as soon as the door is open a little bit, hundreds of tentacles erupt.'),
+ combat: true,
+ enemy: 'tentacles',
+ plural: true,
+ chara: 'TTT',
+ damage: 2,
+ hit: 0.6,
+ attackDelay: 0.5,
+ health: 60,
+ loot: {
+ 'meat': {
+ min: 10,
+ max: 20,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: {1: 'end13'}
+ }
+ }
+ },
+
+ 'end1': {
+ text: [
+ _('bird must have liked shiney things.'),
+ _('some good stuff woven into its nest.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ bullets: {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ bolas: {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end2': {
+ text: [
+ _('not much here.'),
+ _('scavengers must have gotten to this place already.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ torch: {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end3': {
+ text: [
+ /// TRANSLATORS : a platform in the subway
+ _('the tunnel opens up at another platform.'),
+ _('the walls are scorched from an old battle.'),
+ _('bodies and supplies from both sides litter the ground.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ rifle: {
+ min: 1,
+ max: 1,
+ chance: 0.8
+ },
+ bullets: {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'laser rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.3
+ },
+ 'energy cell': {
+ min: 1,
+ max: 5,
+ chance: 0.3
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.3
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end4': {
+ text: [
+ _('the small military outpost is well supplied.'),
+ _('arms and munitions, relics from the war, are neatly arranged on the store-room floor.'),
+ _('just as deadly now as they were then.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ rifle: {
+ min: 1,
+ max: 1,
+ chance: 1
+ },
+ bullets: {
+ min: 1,
+ max: 10,
+ chance: 1
+ },
+ grenade: {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end5': {
+ text: [
+ _('searching the bodies yields a few supplies.'),
+ _('more soldiers will be on their way.'),
+ _('time to move on.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ rifle: {
+ min: 1,
+ max: 1,
+ chance: 1
+ },
+ bullets: {
+ min: 1,
+ max: 10,
+ chance: 1
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'medicine': {
+ min: 1,
+ max: 4,
+ chance: 0.1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end6': {
+ text: [
+ _('the small settlement has clearly been burning a while.'),
+ _('the bodies of the wanderers that lived here are still visible in the flames.'),
+ _("still time to rescue a few supplies.")
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'laser rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ },
+ 'energy cell': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'cured meat': {
+ min: 1,
+ max: 10,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end7': {
+ text: [
+ _('the remaining settlers flee from the violence, their belongings forgotten.'),
+ _("there's not much, but some useful things can still be found.")
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'steel sword': {
+ min: 1,
+ max: 1,
+ chance: 0.8
+ },
+ 'energy cell': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'cured meat': {
+ min: 1,
+ max: 10,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end8': {
+ text: [
+ _('the young settler was carrying a canvas sack.'),
+ _("it contains travelling gear, and a few trinkets."),
+ _("there's nothing else here.")
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'steel sword': {
+ min: 1,
+ max: 1,
+ chance: 0.8
+ },
+ 'bolas': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'cured meat': {
+ min: 1,
+ max: 10,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end9': {
+ text: [
+ _('inside the hut, a child cries.'),
+ _("a few belongings rest against the walls."),
+ _("there's nothing else here.")
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'bolas': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end10': {
+ text: [
+ _('the stench of rot and death fills the operating theatres.'),
+ _("a few items are scattered on the ground."),
+ _('there is nothing else here.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'energy cell': {
+ min: 1,
+ max: 1,
+ chance: 0.3
+ },
+ 'medicine': {
+ min: 1,
+ max: 5,
+ chance: 0.3
+ },
+ 'teeth': {
+ min: 3,
+ max: 8,
+ chance: 1
+ },
+ 'scales': {
+ min: 4,
+ max: 7,
+ chance: 0.9
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end11': {
+ text: [
+ _('a pristine medicine cabinet at the end of a hallway.'),
+ _("the rest of the hospital is empty.")
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'energy cell': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ },
+ 'medicine': {
+ min: 3,
+ max: 10,
+ chance: 1
+ },
+ 'teeth': {
+ min: 1,
+ max: 2,
+ chance: 0.2
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end12': {
+ text: [
+ _('someone had been stockpiling loot here.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'energy cell': {
+ min: 1,
+ max: 3,
+ chance: 0.2
+ },
+ 'medicine': {
+ min: 3,
+ max: 10,
+ chance: 0.5
+ },
+ 'bullets': {
+ min: 2,
+ max: 8,
+ chance: 1
+ },
+ 'torch': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'grenade': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 2,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end13': {
+ text: [
+ _('the tentacular horror is defeated.'),
+ _('inside, the remains of its victims are everywhere.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'steel sword': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'rifle': {
+ min: 1,
+ max: 2,
+ chance: 0.3
+ },
+ 'teeth': {
+ min: 2,
+ max: 8,
+ chance: 1
+ },
+ 'cloth': {
+ min: 3,
+ max: 6,
+ chance: 0.5
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end14': {
+ text: [
+ /// TRANSLATORS : warped means extremely disfigured.
+ _('the warped man lies dead.'),
+ _('the operating theatre has a lot of curious equipment.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'energy cell': {
+ min: 2,
+ max: 5,
+ chance: 0.8
+ },
+ 'medicine': {
+ min: 3,
+ max: 12,
+ chance: 1
+ },
+ 'cloth': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'steel': {
+ min: 2,
+ max: 3,
+ chance: 0.3
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.3
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+
+ 'end15': {
+ text: [
+ _('the old man had a small cache of interesting items.')
+ ],
+ onLoad: function() {
+ World.clearDungeon();
+ $SM.set('game.cityCleared', true);
+ },
+ loot: {
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.8
+ },
+ 'medicine': {
+ min: 1,
+ max: 4,
+ chance: 1
+ },
+ 'cured meat': {
+ min: 3,
+ max: 7,
+ chance: 1
+ },
+ 'bolas': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'fur': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave city'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "house": { /* Abandoned House */
+ title: _('An Old House'),
+ scenes: {
+ 'start': {
+ text: [
+ _('an old house remains here, once white siding yellowed and peeling.'),
+ _('the door hangs open.')
+ ],
+ notification: _('the remains of an old house stand as a monument to simpler times'),
+ buttons: {
+ 'enter': {
+ text: _('go inside'),
+ nextScene: { 0.25: 'medicine', 0.5: 'supplies', 1: 'occupied' }
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'supplies': {
+ text: [
+ _('the house is abandoned, but not yet picked over.'),
+ _('still a few drops of water in the old well.')
+ ],
+ onLoad: function() {
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ World.setWater(World.getMaxWater());
+ Notifications.notify(null, _('water replenished'));
+ },
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 10,
+ chance: 0.8
+ },
+ 'leather': {
+ min: 1,
+ max: 10,
+ chance: 0.2
+ },
+ 'cloth': {
+ min: 1,
+ max: 10,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'medicine': {
+ text: [
+ _('the house has been ransacked.'),
+ _('but there is a cache of medicine under the floorboards.')
+ ],
+ onLoad: function() {
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ },
+ loot: {
+ 'medicine': {
+ min: 2,
+ max: 5,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'occupied': {
+ combat: true,
+ enemy: 'squatter',
+ chara: 'S',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 10,
+ notification: _('a man charges down the hall, a rusty blade in his hand'),
+ onLoad: function() {
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ },
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 10,
+ chance: 0.8
+ },
+ 'leather': {
+ min: 1,
+ max: 10,
+ chance: 0.2
+ },
+ 'cloth': {
+ min: 1,
+ max: 10,
+ chance: 0.5
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "battlefield": { /* Discovering an old battlefield */
+ title: _('A Forgotten Battlefield'),
+ scenes: {
+ 'start': {
+ text: [
+ _('a battle was fought here, long ago.'),
+ _('battered technology from both sides lays dormant on the blasted landscape.')
+ ],
+ onLoad: function() {
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ },
+ loot: {
+ 'rifle': {
+ min: 1,
+ max: 3,
+ chance: 0.5
+ },
+ 'bullets': {
+ min: 5,
+ max: 20,
+ chance: 0.8
+ },
+ 'laser rifle': {
+ min: 1,
+ max: 3,
+ chance: 0.3
+ },
+ 'energy cell': {
+ min: 5,
+ max: 10,
+ chance: 0.5
+ },
+ 'grenade': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'alien alloy': {
+ min: 1,
+ max: 1,
+ chance: 0.3
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "borehole": { /* Admiring a huge borehole */
+ title: _('A Huge Borehole'),
+ scenes: {
+ 'start': {
+ text: [
+ _('a huge hole is cut deep into the earth, evidence of the past harvest.'),
+ _('they took what they came for, and left.'),
+ _('castoff from the mammoth drills can still be found by the edges of the precipice.')
+ ],
+ onLoad: function() {
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ },
+ loot: {
+ 'alien alloy': {
+ min: 1,
+ max: 3,
+ chance: 1
+ }
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "ship": { /* Finding a way off this rock */
+ title: _('A Crashed Ship'),
+ scenes: {
+ 'start': {
+ onLoad: function() {
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ World.drawRoad();
+ World.state.ship = true;
+ },
+ text: [
+ _('the familiar curves of a wanderer vessel rise up out of the dust and ash. '),
+ _("lucky that the natives can't work the mechanisms."),
+ _('with a little effort, it might fly again.')
+ ],
+ buttons: {
+ 'leavel': {
+ text: _('salvage'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "sulphurmine": { /* Clearing the Sulphur Mine */
+ title: _('The Sulphur Mine'),
+ scenes: {
+ 'start': {
+ text: [
+ _("the military is already set up at the mine's entrance."),
+ _('soldiers patrol the perimeter, rifles slung over their shoulders.')
+ ],
+ notification: _('a military perimeter is set up around the mine.'),
+ buttons: {
+ 'attack': {
+ text: _('attack'),
+ nextScene: {1: 'a1'}
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a1': {
+ combat: true,
+ enemy: 'soldier',
+ ranged: true,
+ chara: 'D',
+ damage: 8,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 50,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ }
+ },
+ notification: _('a soldier, alerted, opens fire.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'a2' }
+ },
+ 'run': {
+ text: _('run'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a2': {
+ combat: true,
+ enemy: 'soldier',
+ ranged: true,
+ chara: 'D',
+ damage: 8,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 50,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'bullets': {
+ min: 1,
+ max: 5,
+ chance: 0.5
+ },
+ 'rifle': {
+ min: 1,
+ max: 1,
+ chance: 0.2
+ }
+ },
+ notification: _('a second soldier joins the fight.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'a3' }
+ },
+ 'run': {
+ text: _('run'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a3': {
+ combat: true,
+ enemy: 'veteran',
+ chara: 'V',
+ damage: 10,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 65,
+ loot: {
+ 'bayonet': {
+ min: 1,
+ max: 1,
+ chance: 0.5
+ },
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ notification: _('a grizzled soldier attacks, waving a bayonet.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'cleared' }
+ }
+ }
+ },
+ 'cleared': {
+ text: [
+ _('the military presence has been cleared.'),
+ _('the mine is now safe for workers.')
+ ],
+ notification: _('the sulphur mine is clear of dangers'),
+ onLoad: function() {
+ World.drawRoad();
+ World.state.sulphurmine = true;
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "coalmine": { /* Clearing the Coal Mine */
+ title: _('The Coal Mine'),
+ scenes: {
+ 'start': {
+ text: [
+ _('camp fires burn by the entrance to the mine.'),
+ _('men mill about, weapons at the ready.')
+ ],
+ notification: _('this old mine is not abandoned'),
+ buttons: {
+ 'attack': {
+ text: _('attack'),
+ nextScene: {1: 'a1'}
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a1': {
+ combat: true,
+ enemy: 'man',
+ chara: 'M',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 10,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ notification: _('a man joins the fight'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'a2' }
+ },
+ 'run': {
+ text: _('run'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a2': {
+ combat: true,
+ enemy: 'man',
+ chara: 'M',
+ damage: 3,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 10,
+ loot: {
+ 'cured meat': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ },
+ 'cloth': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ notification: _('a man joins the fight'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'a3' }
+ },
+ 'run': {
+ text: _('run'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: 'end'
+ }
+ }
+ },
+ 'a3': {
+ combat: true,
+ enemy: 'chief',
+ chara: 'C',
+ damage: 5,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 20,
+ loot: {
+ 'cured meat': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'iron': {
+ min: 1,
+ max: 5,
+ chance: 0.8
+ }
+ },
+ notification: _('only the chief remains.'),
+ buttons: {
+ 'continue': {
+ text: _('continue'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'cleared' }
+ }
+ }
+ },
+ 'cleared': {
+ text: [
+ _('the camp is still, save for the crackling of the fires.'),
+ _('the mine is now safe for workers.')
+ ],
+ notification: _('the coal mine is clear of dangers'),
+ onLoad: function() {
+ World.drawRoad();
+ World.state.coalmine = true;
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+ "ironmine": { /* Clearing the Iron Mine */
+ title: _('The Iron Mine'),
+ scenes: {
+ 'start': {
+ text: [
+ _('an old iron mine sits here, tools abandoned and left to rust.'),
+ _('bleached bones are strewn about the entrance. many, deeply scored with jagged grooves.'),
+ _('feral howls echo out of the darkness.')
+ ],
+ notification: _('the path leads to an abandoned mine'),
+ buttons: {
+ 'enter': {
+ text: _('go inside'),
+ nextScene: { 1: 'enter' },
+ cost: { 'torch': 1 }
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'enter': {
+ combat: true,
+ enemy: 'beastly matriarch',
+ chara: 'M',
+ damage: 4,
+ hit: 0.8,
+ attackDelay: 2,
+ health: 10,
+ loot: {
+ 'teeth': {
+ min: 5,
+ max: 10,
+ chance: 1
+ },
+ 'scales': {
+ min: 5,
+ max: 10,
+ chance: 0.8
+ },
+ 'cloth': {
+ min: 5,
+ max: 10,
+ chance: 0.5
+ }
+ },
+ notification: _('a large creature lunges, muscles rippling in the torchlight'),
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ cooldown: Events._LEAVE_COOLDOWN,
+ nextScene: { 1: 'cleared' }
+ }
+ }
+ },
+ 'cleared': {
+ text: [
+ _('the beast is dead.'),
+ _('the mine is now safe for workers.')
+ ],
+ notification: _('the iron mine is clear of dangers'),
+ onLoad: function() {
+ World.drawRoad();
+ World.state.ironmine = true;
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ },
+
+ "cache": { /* Cache - contains some of supplies from previous game */
+ title: _('A Destroyed Village'),
+ scenes: {
+ 'start': {
+ text: [
+ _('a destroyed village lies in the dust.'),
+ _('charred bodies litter the ground.')
+ ],
+ /// TRANSLATORS : tang = strong metallic smell, wanderer afterburner = ship's engines
+ notification: _('the metallic tang of wanderer afterburner hangs in the air.'),
+ buttons: {
+ 'enter': {
+ text: _('enter'),
+ nextScene: {1: 'underground'}
+ },
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ },
+ 'underground': {
+ text: [
+ _('a shack stands at the center of the village.'),
+ _('there are still supplies inside.')
+ ],
+ buttons: {
+ 'take': {
+ text: _('take'),
+ nextScene: {1: 'exit'}
+ }
+ }
+ },
+ 'exit': {
+ text: [
+ _('all the work of a previous generation is here.'),
+ _('ripe for the picking.')
+ ],
+ onLoad: function() {
+ World.markVisited(World.curPos[0], World.curPos[1]);
+ Prestige.collectStores();
+ },
+ buttons: {
+ 'leave': {
+ text: _('leave'),
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ }
+};
diff --git a/script/header.js b/script/header.js
index 8cf8cec92..b1f42c1c4 100644
--- a/script/header.js
+++ b/script/header.js
@@ -1,28 +1,28 @@
-/**
- * Module that takes care of header buttons
- */
-var Header = {
-
- init: function(options) {
- this.options = $.extend(
- this.options,
- options
- );
- },
-
- options: {}, // Nothing for now
-
- canTravel: function() {
- return $('div#header div.headerButton').length > 1;
- },
-
- addLocation: function(text, id, module) {
- return $('
').attr('id', "location_" + id)
- .addClass('headerButton')
- .text(text).click(function() {
- if(Header.canTravel()) {
- Engine.travelTo(module);
- }
- }).appendTo($('div#header'));
- }
+/**
+ * Module that takes care of header buttons
+ */
+var Header = {
+
+ init: function(options) {
+ this.options = $.extend(
+ this.options,
+ options
+ );
+ },
+
+ options: {}, // Nothing for now
+
+ canTravel: function() {
+ return $('div#header div.headerButton').length > 1;
+ },
+
+ addLocation: function(text, id, module) {
+ return $('
').attr('id', "location_" + id)
+ .addClass('headerButton')
+ .text(text).click(function() {
+ if(Header.canTravel()) {
+ Engine.travelTo(module);
+ }
+ }).appendTo($('div#header'));
+ }
};
\ No newline at end of file
diff --git a/script/outside.js b/script/outside.js
index 0ee34252a..6f59805e8 100644
--- a/script/outside.js
+++ b/script/outside.js
@@ -4,6 +4,7 @@
var Outside = {
name: _("Outside"),
+ _STORES_OFFSET: 0,
_GATHER_DELAY: 60,
_TRAPS_DELAY: 90,
_POP_DELAY: [0.5, 3],
@@ -439,7 +440,7 @@ var Outside = {
this.setTitle();
if(!ignoreStores && Engine.activeModule === Outside && village.children().length > 1) {
- $('#storesContainer').css({top: village.height() + 26 + 'px'});
+ $('#storesContainer').css({top: village.height() + 26 + Outside._STORES_OFFSET + 'px'});
}
},
@@ -610,6 +611,38 @@ var Outside = {
Outside.updateVillage();
Outside.updateWorkersView();
Outside.updateVillageIncome();
+ };
+ },
+
+ scrollSidebar: function(direction, reset) {
+
+ if( typeof reset != "undefined" ){
+ $('#village').css('top', '0px');
+ $('#storesContainer').css('top', '224px');
+ Outside._STORES_OFFSET = 0;
+ return false;
+ }
+
+ var momentum = 10;
+
+ // If they hit up, we scroll everything down
+ if( direction == 'up' )
+ momentum = momentum * -1;
+
+ /* Let's stop scrolling if the top or bottom bound is in the viewport, based on direction */
+ if( direction == 'down' && inView( direction, $('#village') ) ){
+
+ return false;
+
+ }else if( direction == 'up' && inView( direction, $('#storesContainer') ) ){
+
+ return false;
+
}
+
+ scrollByX( $('#village'), momentum );
+ scrollByX( $('#storesContainer'), momentum );
+ Outside._STORES_OFFSET += momentum;
+
}
};
diff --git a/script/path.js b/script/path.js
index bb73f093a..d9a8c4abe 100644
--- a/script/path.js
+++ b/script/path.js
@@ -1,7 +1,7 @@
var Path = {
DEFAULT_BAG_SPACE: 10,
-
+ _STORES_OFFSET: 0,
// Everything not in this list weighs 1
Weight: {
'bone spear': 2,
@@ -116,7 +116,7 @@ var Path = {
}
if(!ignoreStores && Engine.activeModule === Path) {
- $('#storesContainer').css({top: perks.height() + 26 + 'px'});
+ $('#storesContainer').css({top: perks.height() + 26 + Path._STORES_OFFSET + 'px'});
}
}
},
@@ -312,6 +312,36 @@ var Path = {
handleStateUpdates: function(e){
if(e.category == 'character' && e.stateName.indexOf('character.perks') === 0 && Engine.activeModule == Path){
Path.updatePerks();
+ };
+ },
+
+ scrollSidebar: function(direction, reset){
+
+ if( typeof reset != "undefined" ){
+ $('#perks').css('top', '0px');
+ $('#storesContainer').css('top', '206px');
+ Path._STORES_OFFSET = 0;
+ return;
+ }
+
+ var momentum = 10;
+
+ if( direction == 'up' )
+ momentum = momentum * -1
+
+ if( direction == 'down' && inView( direction, $('#perks') ) ){
+
+ return false;
+
+ }else if( direction == 'up' && inView( direction, $('#storesContainer') ) ){
+
+ return false;
+
}
+
+ scrollByX( $('#perks'), momentum );
+ scrollByX( $('#storesContainer'), momentum );
+ Path._STORES_OFFSET += momentum;
+
}
};
diff --git a/script/ship.js b/script/ship.js
index 3c6c006e5..3edc570fe 100644
--- a/script/ship.js
+++ b/script/ship.js
@@ -1,174 +1,174 @@
-/**
- * Module that registers the starship!
- */
-var Ship = {
- LIFTOFF_COOLDOWN: 120,
- ALLOY_PER_HULL: 1,
- ALLOY_PER_THRUSTER: 1,
- BASE_HULL: 0,
- BASE_THRUSTERS: 1,
-
- name: _("Ship"),
- init: function(options) {
- this.options = $.extend(
- this.options,
- options
- );
-
- if(!$SM.get('features.location.spaceShip')) {
- $SM.set('features.location.spaceShip', true);
- $SM.setM('game.spaceShip', {
- hull: Ship.BASE_HULL,
- thrusters: Ship.BASE_THRUSTERS
- });
- }
-
- // Create the Ship tab
- this.tab = Header.addLocation(_("An Old Starship"), "ship", Ship);
-
- // Create the Ship panel
- this.panel = $('
').attr('id', "shipPanel")
- .addClass('location')
- .appendTo('div#locationSlider');
-
- Engine.updateSlider();
-
- // Draw the hull label
- var hullRow = $('
').attr('id', 'hullRow').appendTo('div#shipPanel');
- $('
').addClass('row_key').text(_('hull:')).appendTo(hullRow);
- $('
').addClass('row_val').text($SM.get('game.spaceShip.hull')).appendTo(hullRow);
- $('
').addClass('clear').appendTo(hullRow);
-
- // Draw the thrusters label
- var engineRow = $('
').attr('id', 'engineRow').appendTo('div#shipPanel');
- $('
').addClass('row_key').text(_('engine:')).appendTo(engineRow);
- $('
').addClass('row_val').text($SM.get('game.spaceShip.thrusters')).appendTo(engineRow);
- $('
').addClass('clear').appendTo(engineRow);
-
- // Draw the reinforce button
- new Button.Button({
- id: 'reinforceButton',
- text: _('reinforce hull'),
- click: Ship.reinforceHull,
- width: '100px',
- cost: {'alien alloy': Ship.ALLOY_PER_HULL}
- }).appendTo('div#shipPanel');
-
- // Draw the engine button
- new Button.Button({
- id: 'engineButton',
- text: _('upgrade engine'),
- click: Ship.upgradeEngine,
- width: '100px',
- cost: {'alien alloy': Ship.ALLOY_PER_THRUSTER}
- }).appendTo('div#shipPanel');
-
- // Draw the lift off button
- var b = new Button.Button({
- id: 'liftoffButton',
- text: _('lift off'),
- click: Ship.checkLiftOff,
- width: '100px',
- cooldown: Ship.LIFTOFF_COOLDOWN
- }).appendTo('div#shipPanel');
-
- if($SM.get('game.spaceShip.hull') <= 0) {
- Button.setDisabled(b, true);
- }
-
- // Init Space
- Space.init();
-
- //subscribe to stateUpdates
- $.Dispatch('stateUpdate').subscribe(Ship.handleStateUpdates);
- },
-
- options: {}, // Nothing for now
-
- onArrival: function(transition_diff) {
- Ship.setTitle();
- if(!$SM.get('game.spaceShip.seenShip')) {
- Notifications.notify(Ship, _('somewhere above the debris cloud, the wanderer fleet hovers. been on this rock too long.'));
- $SM.set('game.spaceShip.seenShip', true);
- }
-
- Engine.moveStoresView(null, transition_diff);
- },
-
- setTitle: function() {
- if(Engine.activeModule == this) {
- document.title = "An Old Starship";
- }
- },
-
- reinforceHull: function() {
- if($SM.get('stores["alien alloy"]', true) < Ship.ALLOY_PER_HULL) {
- Notifications.notify(Ship, _("not enough alien alloy"));
- return false;
- }
- $SM.add('stores["alien alloy"]', -Ship.ALLOY_PER_HULL);
- $SM.add('game.spaceShip.hull', 1);
- if($SM.get('game.spaceShip.hull') > 0) {
- Button.setDisabled($('#liftoffButton', Ship.panel), false);
- }
- $('#hullRow .row_val', Ship.panel).text($SM.get('game.spaceShip.hull'));
- },
-
- upgradeEngine: function() {
- if($SM.get('stores["alien alloy"]', true) < Ship.ALLOY_PER_THRUSTER) {
- Notifications.notify(Ship, _("not enough alien alloy"));
- return false;
- }
- $SM.add('stores["alien alloy"]', -Ship.ALLOY_PER_THRUSTER);
- $SM.add('game.spaceShip.thrusters', 1);
- $('#engineRow .row_val', Ship.panel).text($SM.get('game.spaceShip.thrusters'));
- },
-
- getMaxHull: function() {
- return $SM.get('game.spaceShip.hull');
- },
-
- checkLiftOff: function() {
- if(!$SM.get('game.spaceShip.seenWarning')) {
- Events.startEvent({
- title: _('Ready to Leave?'),
- scenes: {
- 'start': {
- text: [
- _("time to get out of this place. won't be coming back.")
- ],
- buttons: {
- 'fly': {
- text: _('lift off'),
- onChoose: function() {
- $SM.set('game.spaceShip.seenWarning', true);
- Ship.liftOff();
- },
- nextScene: 'end'
- },
- 'wait': {
- text: _('linger'),
- onChoose: function() {
- Button.clearCooldown($('#liftoffButton'));
- },
- nextScene: 'end'
- }
- }
- }
- }
- });
- } else {
- Ship.liftOff();
- }
- },
-
- liftOff: function () {
- $('#outerSlider').animate({top: '700px'}, 300);
- Space.onArrival();
- Engine.activeModule = Space;
- },
-
- handleStateUpdates: function(e){
-
- }
+/**
+ * Module that registers the starship!
+ */
+var Ship = {
+ LIFTOFF_COOLDOWN: 120,
+ ALLOY_PER_HULL: 1,
+ ALLOY_PER_THRUSTER: 1,
+ BASE_HULL: 0,
+ BASE_THRUSTERS: 1,
+
+ name: _("Ship"),
+ init: function(options) {
+ this.options = $.extend(
+ this.options,
+ options
+ );
+
+ if(!$SM.get('features.location.spaceShip')) {
+ $SM.set('features.location.spaceShip', true);
+ $SM.setM('game.spaceShip', {
+ hull: Ship.BASE_HULL,
+ thrusters: Ship.BASE_THRUSTERS
+ });
+ }
+
+ // Create the Ship tab
+ this.tab = Header.addLocation(_("An Old Starship"), "ship", Ship);
+
+ // Create the Ship panel
+ this.panel = $('
').attr('id', "shipPanel")
+ .addClass('location')
+ .appendTo('div#locationSlider');
+
+ Engine.updateSlider();
+
+ // Draw the hull label
+ var hullRow = $('
').attr('id', 'hullRow').appendTo('div#shipPanel');
+ $('
').addClass('row_key').text(_('hull:')).appendTo(hullRow);
+ $('
').addClass('row_val').text($SM.get('game.spaceShip.hull')).appendTo(hullRow);
+ $('
').addClass('clear').appendTo(hullRow);
+
+ // Draw the thrusters label
+ var engineRow = $('
').attr('id', 'engineRow').appendTo('div#shipPanel');
+ $('
').addClass('row_key').text(_('engine:')).appendTo(engineRow);
+ $('
').addClass('row_val').text($SM.get('game.spaceShip.thrusters')).appendTo(engineRow);
+ $('
').addClass('clear').appendTo(engineRow);
+
+ // Draw the reinforce button
+ new Button.Button({
+ id: 'reinforceButton',
+ text: _('reinforce hull'),
+ click: Ship.reinforceHull,
+ width: '100px',
+ cost: {'alien alloy': Ship.ALLOY_PER_HULL}
+ }).appendTo('div#shipPanel');
+
+ // Draw the engine button
+ new Button.Button({
+ id: 'engineButton',
+ text: _('upgrade engine'),
+ click: Ship.upgradeEngine,
+ width: '100px',
+ cost: {'alien alloy': Ship.ALLOY_PER_THRUSTER}
+ }).appendTo('div#shipPanel');
+
+ // Draw the lift off button
+ var b = new Button.Button({
+ id: 'liftoffButton',
+ text: _('lift off'),
+ click: Ship.checkLiftOff,
+ width: '100px',
+ cooldown: Ship.LIFTOFF_COOLDOWN
+ }).appendTo('div#shipPanel');
+
+ if($SM.get('game.spaceShip.hull') <= 0) {
+ Button.setDisabled(b, true);
+ }
+
+ // Init Space
+ Space.init();
+
+ //subscribe to stateUpdates
+ $.Dispatch('stateUpdate').subscribe(Ship.handleStateUpdates);
+ },
+
+ options: {}, // Nothing for now
+
+ onArrival: function(transition_diff) {
+ Ship.setTitle();
+ if(!$SM.get('game.spaceShip.seenShip')) {
+ Notifications.notify(Ship, _('somewhere above the debris cloud, the wanderer fleet hovers. been on this rock too long.'));
+ $SM.set('game.spaceShip.seenShip', true);
+ }
+
+ Engine.moveStoresView(null, transition_diff);
+ },
+
+ setTitle: function() {
+ if(Engine.activeModule == this) {
+ document.title = "An Old Starship";
+ }
+ },
+
+ reinforceHull: function() {
+ if($SM.get('stores["alien alloy"]', true) < Ship.ALLOY_PER_HULL) {
+ Notifications.notify(Ship, _("not enough alien alloy"));
+ return false;
+ }
+ $SM.add('stores["alien alloy"]', -Ship.ALLOY_PER_HULL);
+ $SM.add('game.spaceShip.hull', 1);
+ if($SM.get('game.spaceShip.hull') > 0) {
+ Button.setDisabled($('#liftoffButton', Ship.panel), false);
+ }
+ $('#hullRow .row_val', Ship.panel).text($SM.get('game.spaceShip.hull'));
+ },
+
+ upgradeEngine: function() {
+ if($SM.get('stores["alien alloy"]', true) < Ship.ALLOY_PER_THRUSTER) {
+ Notifications.notify(Ship, _("not enough alien alloy"));
+ return false;
+ }
+ $SM.add('stores["alien alloy"]', -Ship.ALLOY_PER_THRUSTER);
+ $SM.add('game.spaceShip.thrusters', 1);
+ $('#engineRow .row_val', Ship.panel).text($SM.get('game.spaceShip.thrusters'));
+ },
+
+ getMaxHull: function() {
+ return $SM.get('game.spaceShip.hull');
+ },
+
+ checkLiftOff: function() {
+ if(!$SM.get('game.spaceShip.seenWarning')) {
+ Events.startEvent({
+ title: _('Ready to Leave?'),
+ scenes: {
+ 'start': {
+ text: [
+ _("time to get out of this place. won't be coming back.")
+ ],
+ buttons: {
+ 'fly': {
+ text: _('lift off'),
+ onChoose: function() {
+ $SM.set('game.spaceShip.seenWarning', true);
+ Ship.liftOff();
+ },
+ nextScene: 'end'
+ },
+ 'wait': {
+ text: _('linger'),
+ onChoose: function() {
+ Button.clearCooldown($('#liftoffButton'));
+ },
+ nextScene: 'end'
+ }
+ }
+ }
+ }
+ });
+ } else {
+ Ship.liftOff();
+ }
+ },
+
+ liftOff: function () {
+ $('#outerSlider').animate({top: '700px'}, 300);
+ Space.onArrival();
+ Engine.activeModule = Space;
+ },
+
+ handleStateUpdates: function(e){
+
+ }
};
\ No newline at end of file