var Engine = { /* TODO *** MICHAEL IS A LAZY BASTARD AND DOES NOT WANT TO REFACTOR *** * Here is what he should be doing: * - All updating values (store numbers, incomes, etc...) should be objects that can register listeners to * value-change events. These events should be fired whenever a value (or group of values, I suppose) is updated. * That would be so elegant and awesome. */ SITE_URL: encodeURIComponent("http://adarkroom.doublespeakgames.com"), VERSION: 1.3, MAX_STORE: 99999999999999, SAVE_DISPLAY: 30 * 1000, GAME_OVER: false, //object event types topics: {}, Perks: { 'boxer': { name: _('boxer'), desc: _('punches do more damage'), notify: _('learned to throw punches with purpose') }, 'martial artist': { name: _('martial artist'), desc: _('punches do even more damage.'), notify: _('learned to fight quite effectively without weapons') }, 'unarmed master': { name: _('unarmed master'), desc: _('punch twice as fast, and with even more force'), notify: _('learned to strike faster without weapons') }, 'barbarian': { name: _('barbarian'), desc: _('melee weapons deal more damage'), notify: _('learned to swing weapons with force') }, 'slow metabolism': { name: _('slow metabolism'), desc: _('go twice as far without eating'), notify: _('learned how to ignore the hunger') }, 'desert rat': { name: _('desert rat'), desc: _('go twice as far without drinking'), notify: _('learned to love the dry air') }, 'evasive': { name: _('evasive'), desc: _('dodge attacks more effectively'), notify: _("learned to be where they're not") }, 'precise': { name: _('precise'), desc: _('land blows more often'), notify: _('learned to predict their movement') }, 'scout': { name: _('scout'), desc: _('see farther'), notify: _('learned to look ahead') }, 'stealthy': { name: _('stealthy'), desc: _('better avoid conflict in the wild'), notify: _('learned how not to be seen') }, 'gastronome': { name: _('gastronome'), desc: _('restore more health when eating'), notify: _('learned to make the most of food') } }, options: { state: null, debug: false, log: false }, init: function(options) { this.options = $.extend( this.options, options ); this._debug = this.options.debug; this._log = this.options.log; // Check for HTML5 support if(!Engine.browserValid()) { window.location = 'browserWarning.html'; } // Check for mobile if(Engine.isMobile()) { window.location = 'mobileWarning.html'; } Engine.disableSelection(); if(this.options.state != null) { window.State = this.options.state; } else { Engine.loadGame(); } $('
').attr('id', 'locationSlider').appendTo('#main'); var menu = $('
') .addClass('menu') .appendTo('body'); $('