/*
Copyright 2012 Greenheart Games Pty. Ltd.
Reverse engineering or code re-use prohibited. Please support us by buying our games.

Modding only allowed in compliance with the Modding Agreement available under ./mods

www.greenheartgames.com
support@greenheartgames.com

All Rights Reserved.*/var GameFlags={ghg6:!0,TUTORIAL_DISABLED:!1,CONFERENCE_DISABLED:!1,GAME_OVER_DISABLED:!1,BUBBLE_SOUND_AT_SPAWN_TIME:!0,BUBBLE_SOUND_AT_END_OF_ANIMATION:!0,SMALL_GAME_DURATION_FACTOR:1,MEDIUM_GAME_DURATION_FACTOR:2,LARGE_GAME_DURATION_FACTOR:3,AAA_GAME_DURATION_FACTOR:6,MULTIPLATFORM_DURATION_FACTOR:1.45,MULTIPLATFORM_WEIGHTING:0.7,SMALL_GAME_POINTS_FACTOR:1,MEDIUM_GAME_POINTS_FACTOR:1.2,LARGE_GAME_POINTS_FACTOR:1.4,AAA_GAME_POINTS_FACTOR:1.8,CONSOLE_SALES_LENGTH:144,TEXT_CACHING:!1,MAIN_MISSIONS_PER_GAME:9,
RANDOMIZE_TOPICS:!0,SHOW_FPS:!0,GROUP_POINTS:!0,SKIP_FRAME:!1,ESC_MENU:!1,RCLICK_MENU:!1,ARM_VERSION:!1,LIMIT_SPAWN_SOUNDS:!1,LIMIT_SOUND_INSTANCE:!1,IS_LOW_RES:!1,ghg7:!1,SLOWDOWN_BASEIMAGE:!1,IS_STEAM:!1,G782:!1,ghg6:!1,TUTORIAL_DISABLED:!1,CONFERENCE_DISABLED:!1,GAME_OVER_DISABLED:!1,SHOW_FPS:!1,ESC_MENU:!0},GameFlags=Object.freeze(GameFlags);
(function(){(function(a){var b=(0.12).toLocaleString().charAt(1),c="."===b?",":".";"1,000.00"!==(1E3).toLocaleString()&&(Number.prototype.toLocaleString=function(){var a=Math.abs(this),f=a.toFixed(2).slice(-2),a=a.toFixed(2).slice(0,-3).replace(/(?=(?!^)(?:\d{3})+(?!\d))/g,c)+b+f;return 0>this?"-"+a:a})})(Number.prototype.toLocaleString);String.prototype.format=function(){var a=arguments;return this.replace(/{(\d+)}/g,function(b,c){return"undefined"!=typeof a[c]?a[c]:b})};String.prototype.log=function(){GameFlags.ghg6&&
console.log(this)};String.prototype.replaceAll=function(a,b){return this.split(a).join(b)};"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(a){return this.slice(0,a.length)==a});Number.prototype.clamp=function(a,b){return Math.min(Math.max(this,a),b)};Array.prototype.weakIndexOf=function(a){for(var b=0;b<this.length;b++)if(this[b]==a)return b;return-1};Array.prototype.pickRandom=function(a){a=!a&&GameManager.company?GameManager.company.getRandom():a?a.random():
Math.random();return this[Math.min(this.length-1,Math.floor(a*this.length))]};Array.prototype.shuffle=function(a){if(1>=this.length)return this.slice();for(var b=[],c=0;c<this.length;c++)b.push(c);for(var d=[],c=0;c<this.length;c++){var f=b.pickRandom(a);b.remove(f);d.push(this[f])}return d};Array.prototype.insertAt=function(a,b){this.splice(a,0,b)};Array.prototype.getPrevious=function(a){a-=1;return 0>a||a>=this.length?null:this[a]};Array.prototype.first=function(a){if(!a)return 0<this.length?this[0]:
null;for(var b=0;b<this.length;b++){var c=this[b];if(a(c))return c}return null};Array.prototype.last=function(a){if(!a)return 0<this.length?this[this.length-1]:null;for(var b=this.length-1;0<=b;b--){var c=this[b];if(a(c))return c}return null};Array.prototype.count=function(a){return a?this.filter(a).length:this.length};Array.prototype.average=function(a){return 0>=this.length?0:this.sum(a)/this.length};Array.prototype.max=function(a){for(var b=NaN,c=0;c<this.length;c++){var d=a?a(this[c]):this[c];
if(isNaN(b)||d>b)b=d}return b};Array.prototype.min=function(a){for(var b=NaN,c=0;c<this.length;c++){var d=a?a(this[c]):this[c];if(isNaN(b)||d<b)b=d}return b};Array.prototype.sum=function(a){for(var b=0,c=0;c<this.length;c++)var d=a?a(this[c]):this[c],b=b+d;return b};Array.prototype.except=function(a){return this.filter(function(b){return-1===a.indexOf(b)})};Array.prototype.skip=function(a){return this.length<a?[]:this.slice(a,this.length-a+1)};Array.prototype.addRange=function(a){this.addRangeAt(this.length,
a)};Array.prototype.addRangeAt=function(a,b){if(b&&0!=b.length){void 0===a&&(a=this.length);for(var c=b.length-1;0<=c;c--)this.splice(a,0,b[c])}};Array.prototype.remove=function(a){a=this.indexOf(a);if(0>a)throw"Can't find child in array!";this.splice(a,1)};Array.prototype.groupBy=function(a){if(!a)return this;for(var b=[],c={},d=0;d<this.length;d++){var f=this[d],g=a(f);-1===b.indexOf(g)&&(b.push(g),c[b.indexOf(g)]=[]);c[b.indexOf(g)].push(f)}a=[];for(d=0;d<b.length;d++)a.addRange(c[d]);return a};
Math.randomSign=function(){return GameManager.company?0===Math.floor(2*GameManager.company.getRandom())?-1:1:0===Math.floor(2*Math.random())?-1:1};MersenneTwister.prototype.randomSign=function(){return 0===Math.floor(2*this.random())?-1:1};Math.roundToDecimals=function(a,b){return Math.round(a*Math.pow(10,b))/Math.pow(10,b)};String.prototype.replaceAt=function(a,b){return this.substr(0,a)+b+this.substr(a+b.length)};jQuery.fn.extend({clickExcl:function(a){return $(this).unbind("click").click(a)}});
jQuery.fn.extend({clickExclOnce:function(a){return $(this).unbind("click").one("click",a)}});Date.prototype.toISOString||(Date.prototype.toISOString=function(){function a(a){return 10>a?"0"+a:a}return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z"})})();var Logger={};
(function(){var a=void 0;Logger.load=function(){DataStore.loadSlotAsync("errorLogs",function(b){if(b)try{a=JSON.parse(b)}catch(d){a=[]}else a=[]},function(b){a=[]})};var b=!1,c=!1;Logger.save=function(){if(b)c=!0;else{var d=JSON.stringify(a);b=!0;DataStore.saveToSlotAsync("errorLogs",d,function(){b=!1;c&&(c=!1,Logger.save())},function(a){b=!1})}};var d=function(b,d,c){try{a&&(c||(c={}),a.push({date:(new Date).toISOString(),level:b,msg:d,stacktrace:c.stack,number:c.number}),100<a.length&&a.splice(0,
a.length-100),Logger.save())}catch(l){}};Logger.LogModError=function(a,b,c){d("MODERROR",a,b);a=c?c:a;b?PlatformShim.alert(a+": "+b,"Error".localize()):PlatformShim.alert(a,"Error".localize())};Logger.LogError=function(a,b,c){d("ERROR",a,b);a=c?c:a;b?PlatformShim.alert(a+": "+b+"\n"+"If the issue persists please report this error to {0}".localize().format("support@greenheartgames.com"),"Error".localize()):PlatformShim.alert(a+"\n"+"If the issue persists please report this error to {0}".localize().format("support@greenheartgames.com"),
"Error".localize())};Logger.LogWarning=function(a,b,c){d("WARNING",a,b);a=c?c:a;$("#gameErrorOverlay").css("top",CanvasManager.backgroundCanvas.height-60);$("#gameErrorOverlay")[0].innerText=a;$("#gameErrorOverlay").css("opacity",0).show().transit({opacity:1},1E3,function(){$("#gameErrorOverlay").transit({opacity:1},3E3,function(){$("#gameErrorOverlay").transit({opacity:0},1E3,function(){$("#gameErrorOverlay").hide()})})})};Logger.LogInfo=function(a,b){d("INFO",a,b)}})();var PlatformShim={};
(function(){var a={};(function(){a.execUnsafeLocalFunction=function(a){a()};a.toStaticHtml=function(a){return a};a.getUserName=function(){return"Player"};a.goToReviewPage=function(){};a.xhr=function(a,b,d){b()};a.alert=function(a,b){b&&(a=b+"\n"+a);alert(a)}})();var b={};(function(){b.execUnsafeLocalFunction=function(a){MSApp.execUnsafeLocalFunction(a)};b.toStaticHtml=function(a){return toStaticHTML(a)};b.getUserName=function(){return WindowsIntegration.getUserName()};b.goToReviewPage=function(){WindowsIntegration.goToReviewPage()};
b.xhr=function(a,b,d){WinJS.xhr(a).done(b,d)};b.alert=function(a,b){(new Windows.UI.Popups.MessageDialog(a,b)).showAsync()};b.ISWIN8=!0;b.ISLOWRES=GameFlags.IS_LOW_RES;b.getVersion=function(){var a=Windows.ApplicationModel.Package.current.id.version;return[a.major,a.minor,a.build,a.revision].join(".")};b.openUrlExternal=function(a){a=new Windows.Foundation.Uri(a);Windows.System.Launcher.launchUriAsync(a).done()}})();var c=!1;try{c=void 0!=MSApp}catch(d){Logger.LogInfo("hasMSapp check failed",d)}c?
PlatformShim=b:(PlatformShim=a,window.ondragover=function(a){a.preventDefault();return!1},window.ondrop=function(a){a.preventDefault();return!1},window.onerror=function(a,b,d){PlatformShim.alert("Uncaught error. Please report this to {0}: \n{1}\n({2}:{3})\n\nPlease restart the game.".localize().format("support@greenheartgames.com",a,b,d),"Error".localize())},PlatformShim.openUrlExternal=function(a){require("nw.gui").Shell.openExternal(a)},PlatformShim.toggleFullscreen=function(){var a=require("nw.gui").Window.get();
a.toggleFullscreen();return a.isFullscreen},PlatformShim.getVersion=function(){return UpdateChecker.VERSION},PlatformShim.restartApp=function(){require("nw.gui").Window.get().reload(3)},PlatformShim.terminateApp=function(){require("nw.gui").App.closeAllWindows()},PlatformShim.getScriptFile=function(a){var b=document.currentScript?unescape(document.currentScript.src):"";if(""===b)return"";var d=require("path");(d?d.dirname(process.execPath):"").replaceAll("\\","/");b=b.replaceAll("../","").replaceAll("..\\",
"");"file:///"==b.substring(0,8)&&(b=b.substring(8));return!0===a?d?d.resolve(b):"":b},PlatformShim.getScriptPath=function(a){return(a=PlatformShim.getScriptFile(a))&&0<=a.lastIndexOf("/")?a.substr(0,a.lastIndexOf("/")):a})})();var Localization={};
(function(){var a=Localization;a.dict={};a.keys=[];String.prototype.localize=function(b){return a.localize(this.toString(),b)};a.localize=function(c,d){if(b){var f=c+"\u00b0\u00b0";d&&(f+=d);var g=a.keys.weakIndexOf(f);if(-1!=g||d&&(f=c+"\u00b0\u00b0",g=a.keys.weakIndexOf(f),-1!=g))return a.dict[g];f=a.keys.first(function(a){return a.startsWith(f)});if(void 0!=f&&(g=a.keys.weakIndexOf(f),-1!=g))return a.dict[g]}return c};a.processHtml=function(a){var b=$(a),f=b.html();for(a=0;-1!=(a=f.indexOf("ll:{",
a));){var g=f.indexOf("}",a+1),k=f.slice(a,g+1),l=k.slice(4,k.length-1),h=null,m=f.indexOf(",lc:{",g);m==g+1&&(h=f.slice(m+5,f.indexOf("}",m)),k+=",lc:{"+h+"}");f=f.replaceAll(k,PlatformShim.toStaticHtml(l.localize(h)));a++}PlatformShim.execUnsafeLocalFunction(function(){b.html(f)})};var b;a.invalidateLanguage=function(c){try{if(c&&"en"!=c){b=!0;var d=Languages[c];a.keys=[];a.dict={};if(d.values)for(c=0;c<d.values.length;c++){var f=d.values[c],g=f.value+"\u00b0\u00b0";f.comment&&(g+=f.comment);a.keys.push(g);
a.dict[a.keys.length-1]=f.translation}}else b=!1}catch(k){d=k?k.number:null,b=!1,ghg4&&ghg4.ghg5("invalidateLanguage failed",{"error-nr":d}),Logger.LogInfo("invalidateLanguage failed",k)}};a.isRTLLanguage=function(a){a||(a=GameManager.getPreferredLanguage());return"arsa"==a};a.setLanguage=function(b){a.invalidateLanguage(b);if(b)try{requireLoad(["./libs/locales/jquery.timeago."+b+".js"],function(){},function(){})}catch(d){}a.isRTLLanguage(b)&&(b=document.createElement("link"),b.setAttribute("rel",
"stylesheet"),b.setAttribute("type","text/css"),b.setAttribute("href","./css/rtl.css"),document.getElementsByTagName("head")[0].appendChild(b))}})();var GameManager={VERSION:7},State={GameStarting:"GameStarting",Idle:"Idle",CreateGame:"CreateGame",GameDefinition:"GameDefinition",PickWorkItems:"PickWorkItems",ExecuteWorkItems:"ExecuteWorkItems",ReleaseGame:"ReleaseGame"};
(function(){function a(a,d,c){try{$("#splashScreen").remove();UpdateNotifications.checkAndShowNotifications();GDT.fire(b,GDT.eventKeys.saves.loading,{data:a});Missions.getAllMissions().forEach(function(a){a.experience=0});Research.getAllItems().forEach(function(a){a.experience=0});a.version!=b.VERSION&&(a=SavegameMigrator.migrate(a));b.loadInProgress=!0;b.gameTime=a.gameTime;b.playerPause=a.playerPause;b.systemPause=!1;b._timeModifier=a.timeModifier;b._oldTimeModifier=a.oldTimeModifier;b.company=
Company.load(a.company);b.company.slot?$("#mainBackground").fadeIn():$("#mainBackground").fadeOut();b.state=a.state;b.currentMission=a.currentMission;b.currentResearches=a.currentResearches;b.currentResearches||(b.currentResearches=[]);for(var f=0;f<b.currentResearches.length;f++){var l=b.currentResearches[f];b.company.staff.filter(function(a){return a.id===l.staffId}).forEach(function(a){a.currentResearch=l})}b.currentEngineDev=a.currentEngineDev;b.currentHwProject=a.currentHwProject;b.currentRnDProject=
a.currentRnDProject;b.currentContract=a.currentContract;b.uiSettings=a.uiSettings;b.flags=a.flags;b.flags||(b.flags={});b.spawnedPoints=a.spawnedPoints;var h=a.missionXP;if(h)for(var g=Missions.getAllMissions(),f=0;f<h.length;f++){var k=h[f],m=g.first(function(a){return a.id===k.id});m&&(m.experience=k.xp,m.percentage=k.percentage)}var n=a.featureXP;n&&n.forEach(function(a){FeatureSerializer.load(a)});b.currentFeature=a.currentFeature;b.plannedFeatures=null;a.plannedFeatures&&(b.plannedFeatures=a.plannedFeatures.map(function(a){return CompanyFeatureSerializer.load(a)}));
b.gameId=Math.random();GameFlags.IS_STEAM&&Achievements.checkForAchievmentsNotCompletedOnSteam();GDT.fire(b,GDT.eventKeys.saves.loaded);d&&d()}catch(p){Logger.LogError("Could not initialize loaded game! ",p,"Could not initialize loaded game".localize()),c&&c(p)}}var b=GameManager;b.gameId=Math.random();b.company=void 0;b.init=function(){b._initKeyboardShortcuts()};b.ghg3=function(){return GameFlags.ghg6?Windows.ApplicationModel.Store.CurrentAppSimulator:Windows.ApplicationModel.Store.CurrentApp};
b.ghg0=function(){return GameFlags.ghg7};b.ghg1=function(){if(!b.ghg0())return!1;PlatformShim.ISWIN8?WinJS.xhr({url:"http://www.greenheartgames.com/utils/gamedevtycoonappuri"}).done(function(a){if(a&&a.responseText){a=a.responseText;try{new Windows.Foundation.Uri(a)}catch(b){Logger.LogInfo("Could not check latest game version",b)}var d=!1;DataStore.getValue("full-game-uri")||(d=!0);DataStore.setValue("full-game-uri",a);d&&UpdateNotifications.showFullGameIsAvailable()}},function(a){}):$.get("http://www.greenheartgames.com/utils/gamedevtycoonwinnativeeappuri",
function(a){if(a&&a.startsWith("http")){var b=!1;DataStore.getValue("full-game-uri")||(b=!0);DataStore.setValue("full-game-uri",a);b&&UpdateNotifications.showFullGameIsAvailable()}})};b.isSupporter=function(){return!b.ghg2()};b.ghg2=function(){if(!PlatformShim.ISWIN8)return b.ghg0();if(!0===GameFlags.ghg6)return!1;try{if(b.ghg0())return!0;var a=b.ghg3();return a&&a.licenseInformation.isActive?a.licenseInformation.isTrial:!0}catch(d){return ghg4.ghg5("isTrial error"),Logger.LogInfo("isTrial failed",
d),!0}};b._initKeyboardShortcuts=function(){window.onkeyup=function(a){if(!a.srcElement||"INPUT"!==a.srcElement.nodeName){if(!UI.isModalContentOpen())switch(a.which){case 37:VisualsManager.scrollToNextZone(-1);break;case 39:VisualsManager.scrollToNextZone(1)}var d=GameFlags.ghg6,c=d||GameManager.company&&GameManager.company.flags.ghg141;switch(a.which){case 192:c&&GameManager.togglePause(!0);break;case 49:c&&GameManager.setGameSpeed("slow");break;case 50:c&&GameManager.setGameSpeed("normal");break;
case 51:c&&GameManager.setGameSpeed("fast");break;case 52:d&&GameManager.setGameSpeed("super-fast");break;case 53:d&&GameManager.setGameSpeed("extra-fast");break;case 82:d&&GameManager.testSaveLoad();break;case 83:d&&b.save("auto");break;case 76:d&&b.reload("auto")}}}};b.testSaveLoad=function(){b.save("auto");b.reload("auto")};b.reload=function(a,d,c,f){f||UI.fadeInTransitionOverlay();UI.closeAllDialogs();UI.currentCloseCallback=null;b.pause(!0,!1);var l=function(){b.load(a,function(){var a=b.company.currentLevel,
c=ResourceKeys.getLevelResources.apply(ResourceKeys,[1,2,3,4].except([a]));FlippingCounter.init();GameDev.ResourceManager.removeResources(c);GameDev.ResourceManager.ensureResources(ResourceKeys.getLevelResources(a),function(){SplashScreen.removeSplashScreen()&&Sound.playBackgroundMusic();VisualsManager.reset();if(b.state===State.ExecuteWorkItems||b.state===State.PickWorkItems||b.state===State.ReleaseGame||0<b.spawnedPoints)b.state!=State.ReleaseGame&&(VisualsManager.gameStatusBar.startDevelopment(),
b.updateCurrentHypePoints()),b.currentFeature&&("preparation"===b.currentFeature.missionType?VisualsManager.gameStatusBar.updateStatusMessage("Starting ...".localize()):"BugFixing"===b.currentFeature.missionType?VisualsManager.gameStatusBar.updateStatusMessage("Finishing ...".localize()):VisualsManager.gameStatusBar.updateStatusMessage(b.currentFeature.id));if(0<b.currentResearches.length)for(var a=0;a<b.company.staff.length;a++)b.company.staff[a].state===CharacterState.Researching&&VisualsManager.getCharacterOverlay(b.company.staff[a]).startResearching();
b.currentEngineDev&&VisualsManager.startCreateEngine();b.currentContract&&"gameContract"!=b.currentContract.type&&VisualsManager.startContract();var c=function(){b.systemPause?b.pause(!0):b.resume(!0);b.playerPause?b.pause(!1):b.resume(!1);b.state==State.ReleaseGame&&b.company&&0==b.company.notifications.count(function(a){return"{ReleaseGame}"===a.header})&&b.notifyIdleState();b.state==State.ReleaseGame||b.state==State.PickWorkItems&&b.company&&b.company.activeNotifications&&b.company.activeNotifications.first(function(a){return"{FeatureList}"===
a.header})?b.showPendingNotifications():b.transitionToState(b.state);d&&d();b.loadInProgress=!1};UI.isTransitionVisible?UI.fadeOutTransitionOverlay(function(){c()}):c()})},c)};f?l():setTimeout(l,800)};b.getGameToContinue=function(){for(var a=GameManager.getSaveGames(),b=null,d=0;d<a.length;d++)if(!b||b.saveTime<a[d].saveTime)b=a[d];return b};b.continueGame=function(){var a=GameManager.getGameToContinue();a&&UI.fadeInTransitionOverlay(function(){SplashScreen.removeSplashScreen();GameManager.reload(a.slot,
function(){Sound.playBackgroundMusic();GameManager.resume(!0)},function(){GameManager.startNewGame()},!0)})};b.startNewGame=function(){GameDev.ResourceManager.removeResources(ResourceKeys.getLevelResources(2,3,4));GameDev.ResourceManager.ensureResources(ResourceKeys.getLevelResources(1),function(){SplashScreen.removeSplashScreen();Sound.playBackgroundMusic();c()})};var c=function(){UI.closeAllDialogs();UI.currentCloseCallback=null;b.useKnowledgeAnswered=void 0;$("#mainBackground").fadeOut();$("foregroundCanvas").hide();
b._setupNewGame();Media.createWelcomeNotifications();b.showPendingNotifications(function(){Tutorial.AppbarAndHelp();b.showPendingNotifications(function(){Tutorial.createdCompany();b.showPendingNotifications(function(){"Greenheart Games"==b.company.name?Achievements.activate(Achievements.admirer):Achievements.hasAchieved(Achievements.fanBoy)||-1==RealCompanyNames.indexOf(b.company.name)||Achievements.activate(Achievements.fanBoy)})})})};b._setupNewGame=function(){var a=new Company(b.companyName);a.uid=
b.getGUID();a.seed=Math.floor(65535*Math.random());a._mersenneTwister=new MersenneTwister(a.seed);a.slot=b.slot;a.cash=7E4;a.topics=General.getTopicOrder(a).slice(0,4);for(var d=Research.getAllItems(),c=0;c<d.length;c++)d[c].duration||a.features.push(d[c]);b.currentEngineDev=null;b.currentHwProject=null;b.currentRnDProject=null;b.currentContract=null;b.currentFeature=null;b.currentResearches=[];b.plannedFeatures=null;b.company=a;b.gameTime=0;b.playerPause=!1;b.systemPause=!1;b._timeModifier=1;b.uiSettings=
UI.createDefaultUISettings();b.flags={gameLengthModifier:1.16667};Missions.getAllMissions().forEach(function(a){a.experience=0});Research.getAllItems().forEach(function(a){a.experience=0});b.spawnedPoints=0;General.proceedOneWeek(b.company);b.gameId=b.company.getRandom();VisualsManager.reset();GameManager.state=State.GameStarting;GDT.fire(b,GDT.eventKeys.saves.newGame)};b.decreaseSpawnedPoints=function(){0<b.spawnedPoints&&b.spawnedPoints--};b.increaseSpawnedPoints=function(){b.spawnedPoints++};b.notifyIdleState=
function(){switch(b.state){case State.CreateGame:case State.GameDefinition:b.transitionToState(State.PickWorkItems);break;case State.PickWorkItems:b.transitionToState(State.ExecuteWorkItems);break;case State.ExecuteWorkItems:b.transitionToState(State.PickWorkItems);break;case State.ReleaseGame:b.transitionToState(State.Idle);break;case State.Idle:break;default:throw"unexpected state: "+b.state;}};b.state=void 0;b.isIdle=function(){return b.state===State.Idle};b.transitionToState=function(a){if(GameManager.state!=
State.ReleaseGame&&(b.company.calculateCurrentNofitications(),0<b.company.activeNotifications.length)){b.showPendingNotifications(function(){b.transitionToState(a)});return}a===State.CreateGame&&(b.state=a,b.flags.sequel?Tutorial.createSequel():Tutorial.createGame(),-1!=b.company.researchCompleted.indexOf(Research.TargetAudience)&&Tutorial.targetAudience(),b.company.createNewGame(),b.currentContract&&b._setContractRequirements(b.company.currentGame),b.state=State.GameDefinition,b.transitionToState(State.GameDefinition));
if(a===State.GameDefinition)b.company.activeNotifications.push(new Notification("{GameDefinition}","","",0)),b.showPendingNotifications();else{if(a===State.PickWorkItems){if(b.state===State.GameDefinition){var d=b.company.currentGame.costs;b.company.cash-=d;b.company.cashLog.push({amount:-d,label:b.company.currentGame.title});for(var d=b.company.staff.filter(function(a){return a.state===CharacterState.Idle}),c=0;c<d.length;c++)d[c].startWorking()}b.state=a;d=b.getDevFeatureLogCount();0==d?(VisualsManager.gameStatusBar.updateStatusMessage(""),
VisualsManager.gameStatusBar.startDevelopment(),VisualsManager.putConsoleToPedestal(),b.executeFeatures([],Missions.PreparationMission)):9>=d?b.showFeatureList():11>d?(b.executeFeatures([],Missions.BugFixingMission),b.company.currentGame.flags.releaseReady=!0,Tutorial.finishingPhase(0.2),VisualsManager.updateReleaseReadyButton()):(b.company.currentGame.flags.devCompleted=!0,b.transitionToState(State.ReleaseGame))}a===State.ExecuteWorkItems&&(b.state=a,b.executeWorkItems());if(a===State.ReleaseGame){d=
b.company.staff.filter(function(a){return a.state===CharacterState.Idle||a.state===CharacterState.Working});for(c=0;c<d.length;c++)d[c].endWorking();b.state=State.ReleaseGame}a===State.Idle&&(b.state=a)}};b.gameDefinitionCancelled=function(){GDT.fire(b,GDT.eventKeys.gameplay.gameDefinitionCanceled,{company:b.company});b.company.currentGame=null;b.currentContract&&b.contractCancelled();b.transitionToState(State.Idle)};b.workEnded=function(a){if(0===b.company.staff.filter(function(a){return!0===a.working&&
!a.currentResearch}).length)if(b.state===State.ReleaseGame){if(b.company.currentGame&&0===b.company.notifications.count(function(a){return"{ReleaseGame}"===a.header})&&(b.releaseGame(),b.company.calculateCurrentNofitications(),0<b.company.activeNotifications.length)){b.showPendingNotifications(function(){b.transitionToState(State.ReleaseGame)});return}}else b.currentEngineDev&&b.finishEngine();a.currentResearch&&(a.currentResearch=null,b.finishResearch(a))};b.executeWorkItems=function(){if(b.plannedFeatures&&
0<b.plannedFeatures.length){b.plannedFeatures.forEach(function(a){a.progress=0;a.duration=General.getDuration(b.company.currentGame,a)});var a=b.company.currentGame;a.featureLog||(a.featureLog=[]);b.currentFeature&&1>b.currentFeature.progress||(b.currentFeature=b.plannedFeatures.shift(),b.currentFeature.startTime=b.gameTime)}else b.currentFeature||b.notifyIdleState(State.PickWorkItems)};b.currentFeature=null;b.plannedFeatures=null;b.getCurrentDevStage=function(){var a=b.getDevFeatureLogCount();if(3>
a)return 1;if(6>a)return 2;if(9>a)return 3};b.executeFeatures=function(a,d){for(var c=b.company.staff.filter(function(a){return a.state===CharacterState.Working}),f=0;f<c.length;f++)c[f].state=CharacterState.Idle,c[f].currentFeature=null;c=[];b.plannedFeatures=[];b.company.currentGame.featureLog&&(f=b.getCurrentDevStage(),1==f?c=Missions.Stage1Missions:2==f?c=Missions.Stage2Missions:3==f&&(c=Missions.Stage3Missions));if(0!=a.length)for(f=0;f<c.length;f++)c[f].percentage=a[f].percentage,b.plannedFeatures.push({type:"focus",
id:c[f].id,missionType:"mission"});d&&b.plannedFeatures.push({type:"focus",id:d.id,missionType:d.missionType});b.transitionToState(State.ExecuteWorkItems)};b.codingContest=function(a,d,c){a={id:a.id,type:d,progress:0,duration:a.duration,isTraining:a.isTraining};b.currentResearches.push(a);b.startResearch(a)};b.research=function(a,d){g(a);var c={id:a.id,type:d,progress:0,duration:Research.getDuration(a),isTraining:a.isTraining,progressColor:a.progressColor};b.currentResearches.push(c);b.startResearch(c);
GDT.fire(b,GDT.eventKeys.gameplay.researchStarted,{company:b.company,researchItem:c})};var d;b.getPreferredLanguage=function(){void 0==d&&(d=DataStore.getValue("language"),void 0==d&&b.setPreferredLanguage("en"));return d};b.setPreferredLanguage=function(a){DataStore.setValue("language",a);try{UI&&(UI.showLocalizationCredits(a,$("#localizationCredits"),$(".localizationDiscussion")),UI.showLocalizationCredits(a,$("#localizationCreditsAudioHtml"),$(".localizationDiscussionAudioHtml")))}catch(b){}d=
a};var f;b.areHintsEnabled=function(){void 0==f&&(f=DataStore.getValue("hintsEnabled"),void 0==f?(b.setHintsEnabled(!0),f=!0):f=!0==f||"true"==f);return f};b.setHintsEnabled=function(a){DataStore.setValue("hintsEnabled",a);f=a};b.researchTopic=function(a){var d=Research.ResearchTopicItem;g(d);a={id:d.id,type:"research",topicId:a.id,progress:0,duration:Research.ResearchTopicItem.duration};b.currentResearches.push(a);b.startResearch(a);GDT.fire(b,GDT.eventKeys.gameplay.researchStarted,{company:b.company,
researchItem:a})};var g=function(a){b.company.researchPoints-=Research.getPointsCost(a);VisualsManager.updatePoints();var d=Research.getResearchCost(a);d&&b.company.adjustCash(-d,a.name)};b.startResearch=function(a){var d=b.company.staff.first(function(a){return a.id===GameManager.uiSettings.selectedChar});if(!d)throw"no worker selected for research";d.startWorking();d.state=CharacterState.Researching;a.staffId=d.id;d.currentResearch=a;d.currentFeature=null;d.resetLeftOverPoints();VisualsManager.getCharacterOverlay(d).startResearching()};
b.decreaseBugs=function(a){b.company.currentGame&&(b.company.currentGame.bugs-=a,VisualsManager.gameStatusBar.updatePoints())};b.increaseResearchProgress=function(a,d){var c=GameManager.currentResearches.first(function(b){return b.staffId===a.id});c.progress=(c.progress+d).clamp(0,1);1===c.progress&&(b.currentFeature||b.currentEngineDev?b.finishResearch(a,c):a.endWorking())};b.finishResearch=function(a){VisualsManager.levelOverlay.startWaterCooler();var d=b.currentResearches.first(function(b){return b.staffId===
a.id});VisualsManager.getCharacterOverlay(a).finishResearching();a.state=CharacterState.Idle;b.currentResearches.remove(d);a.currentResearch=null;if("training"===d.type||"specialTraining"===d.type)k(a,d);else{if("New Topic"===d.id){var c=Topics.topics.first(function(a){return a.id===d.topicId});if(1<b.company.currentLevel)VisualsManager.getCharacterOverlay(a).saySomething("Completed: ".localize("research is completed, research name is added")+c.name),1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("research",
0.3);else{var f=new Notification("Research complete".localize("heading"),"You have successfully researched a new topic: '{0}'.".localize().format(c.name));f.sound="research";f.volume=0.3;b.company.notifications.push(f)}b.company.topics.push(c)}else d=c=b.company.availableResearch.first(function(a){return a.id===d.id}),b.company.availableResearch.remove(c),b.company.researchCompleted.push(c),1==b.company.researchCompleted.length&&ghg4.ghg5("first research",{id:c.id}),1<b.company.currentLevel?(VisualsManager.getCharacterOverlay(a).saySomething("Completed: ".localize("research is completed, research name is added")+
c.name),1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("research",0.3)):(f=new Notification("Research complete".localize("heading"),"You have successfully researched '{0}'.".localize().format(c.name)),f.sound="research",f.volume=0.3,b.company.notifications.push(f)),c===Research.CustomEngine?Tutorial.researchedCustomEngine():0!=Research.getEnginePoints(c)&&Tutorial.researchedEnginePart(),c.complete&&c.complete();GDT.fire(b,GDT.eventKeys.gameplay.researchCompleted,{company:b.company,
researchItem:d});Research.checkForNewResearch();b.autoSave()}};var k=function(a,d){var c=Training.getAllTrainings().first(function(a){return a.id===d.id});a.finishTraining(c);c&&c.complete&&c.complete(a);c.isSkillTraining&&Knowledge.setTrainingKnowledge(c);GDT.fire(b,GDT.eventKeys.gameplay.trainingFinished,{staff:a,training:c});Research.checkForNewResearch();b.autoSave();b.showPendingNotifications()};b.currentEngineDev=null;b.createEngine=function(a,d){if(!b.currentEngineDev){var c=d.sum(function(a){return Research.getEngineCost(a)}),
f=d.sum(function(a){return Research.getEnginePoints(a)});Tutorial.creatingEngine();b.company.adjustCash(-c,a);b.currentEngineDev={name:a,progress:0,cost:c,technologyPoints:f,remainingPoints:f,remainingPointsDisplay:f,parts:d,currentPart:d[0]};VisualsManager.startCreateEngine();c=b.company.staff.filter(function(a){return a.state===CharacterState.Idle});for(f=0;f<c.length;f++)c[f].startWorking();GDT.fire(b,GDT.eventKeys.gameplay.engineStarted,{company:b.company})}};b.increaseEnginePoints=function(){b.currentEngineDev&&
b.currentEngineDev.remainingPoints--};b.increaseDisplayEnginePoints=function(a,d){if(b.currentEngineDev){b.currentEngineDev.remainingPointsDisplay-=d;0>b.currentEngineDev.remainingPointsDisplay&&(b.currentEngineDev.remainingPointsDisplay=0);var c=b.currentEngineDev.technologyPoints,f=Math.abs(b.currentEngineDev.remainingPointsDisplay-b.currentEngineDev.technologyPoints);b.currentEngineDev.progress=f/c;for(var l=0,c=null,h=0;h<b.currentEngineDev.parts.length&&!(c=b.currentEngineDev.parts[h],l+=Research.getEnginePoints(c),
f<=l);h++);c.techLevel&&a&&(c.efficiencyPoints||(c.efficiencyPoints=[]),f=a.getLevelF()/c.techLevel,f*=(a.efficiency+0.2).clamp(0.5,1),a.onFire&&(f+=0.1+0.2*b.company.getRandom()),c.efficiencyPoints.push(f));b.currentEngineDev.currentPart=c;VisualsManager.updateEngineStatus();if(0>=b.currentEngineDev.remainingPointsDisplay)if(b.currentFeature)b.finishEngine();else for(f=GameManager.company.staff.filter(function(a){return a.state===CharacterState.CreateEngine}),h=0;h<f.length;h++)f[h].endWorking()}};
b.finishEngine=function(){var a=b.currentEngineDev;if(!(1>a.progress)){for(var d=0;d<a.parts.length;d++){var c=a.parts[d];c.efficiencyPoints&&(c.efficiency=c.efficiencyPoints.average(),c.efficiencyPoints=void 0)}a={id:b.company.engines.length+1,name:a.name,parts:a.parts,techLevel:a.parts.filter(function(a){return void 0!=a.techLevel}).average(function(a){return a.techLevel}),costs:b.currentEngineDev.cost,releaseWeek:b.company.currentWeek};b.currentEngineDev=null;c=b.company.staff.filter(function(a){return a.state===
CharacterState.CreateEngine});for(d=0;d<c.length;d++)c[d].state=CharacterState.Idle;b.company.engines.push(a);for(d=0;d<a.parts.length;d++){for(c=0;c<b.company.engineParts.length&&a.parts[d].id!==b.company.engineParts[c].id;c++);c===b.company.engineParts.length&&(c=a.parts[d],c.experience||(c.experience=0),b.company.engineParts.push(c))}b.company.notifications.push(new Notification("Engine complete!".localize("heading"),"Your new game engine '{0}' is now complete!".localize().format(a.name)));Tutorial.firstEngine();
VisualsManager.finishEngine();GDT.fire(b,GDT.eventKeys.gameplay.engineFinished,{company:b.company,engine:a});b.autoSave()}};b.getAvailableGameFeatures=function(a){var b=[];b.addRange(Research.StartEngineParts);a&&b.addRange(a.parts.map(function(a){return General.getFeature(a.id)}).except(b));a=Research.getAllItems().filter(function(a){return 0===a.enginePoints&&-1!=GameManager.company.researchCompleted.indexOf(a)});b.addRange(a);b.addRange(GameManager.company.specialItems);return b};b.finishCurrentMission=
function(){var a=b.company.currentGame,d=b.currentFeature;if((1===d.progress||b.company.currentGame.flags.finished)&&!d.finished&&("BugFixing"===d.missionType||0===b.spawnedPoints||0<b.plannedFeatures.length)){for(var c=0;c<b.company.staff.length;c++)b.company.staff[c].currentFeature&&b.currentFeature.id===b.company.staff[c].currentFeature.id&&(b.company.staff[c].currentFeature=null,b.company.staff[c].state=CharacterState.Idle);d.finished=!0;a.featureLog.push(b.currentFeature);"feature"!==d.type&&
(c=General.getMission(d.id),a.missionLog.push(c));0<b.plannedFeatures.length?b.currentFeature=b.plannedFeatures.shift():(b.currentFeature=null,b.notifyIdleState())}GDT.fire(b,GDT.eventKeys.gameplay.featureFinished,{company:b.company,feature:d})};b.showPendingNotifications=function(a){var d=b.company;if(d){var c=b.gameId;if(a){var f=a;a=function(){c==b.gameId&&f&&f()}}d.calculateCurrentNofitications();0===d.activeNotifications.length?a&&a():UI.showNotifications(a)}};b.showBoothList=function(a,b){UI.showConferenceBoothList(a,
b)};b.releaseGame=function(){if(0===b.company.notifications.count(function(a){return"{ReleaseGame}"===a.header})){var a=(0.5+0.3*GameManager.company.getRandom())/GameManager.SECONDS_PER_WEEK;Tutorial.gameDevCompleted(a);b.company.notifications.push(new Notification("{ReleaseGame}","","",a))}};b.showFeatureList=function(){b.company.currentGame.state=GameState.development;if(0===b.company.notifications.count(function(a){return"{FeatureList}"===a.header})){var a=(0.5+0.3*GameManager.company.getRandom())/
GameManager.SECONDS_PER_WEEK;Tutorial.devPhases(a);b.company.currentGame.isStaffResponsibilityEnabled()&&Tutorial.staffResponsibility(a);var d;3>b.getDevFeatureLogCount()?d=Missions.Stage1Missions:6>b.getDevFeatureLogCount()?d=Missions.Stage2Missions:(d=Missions.Stage3Missions,Tutorial.additionalFeatures(a));!b.company.flags.missionHintsShown&&d.some(function(a){return Knowledge.getMissionWeightingHint(Missions.getMissionWithId(a.id),b.company.currentGame)})&&(b.company.flags.missionHintsShown=!0,
Tutorial.missionHints(a));a=new Notification("{FeatureList}","","",a);a.features=d;b.company.notifications.push(a);b.showPendingNotifications()}};b.getDevFeatureLogCount=function(){return b.company.currentGame.featureLog?b.company.currentGame.featureLog.count(function(a){return"mission"===a.missionType||"preparation"===a.missionType||"BugFixing"===a.missionType}):0};b.isPaused=function(a){return a?b.systemPause:b.playerPause};b.isGamePaused=function(){return 0===b._timeModifier};b.togglePause=function(a){UI.isModalContentOpen()&&
a||(b.isPaused(a)?b.resume(a):b.pause(a))};b.setGameSpeed=function(a){var d;if("slow"===a)d=0.5;else if("normal"===a)d=1;else if("fast"===a)d=2.5;else if("super-fast"===a){if(!GameFlags.ghg6)return;d=10}else if("extra-fast"===a){if(!GameFlags.ghg6)return;d=100}if(b.isPaused(!0)){if(UI.isModalContentOpen()){b._oldTimeModifier=d;return}b.resume(!0)}b._timeModifier=d};b.pause=function(a,d){a&&d&&($(document).find("#gamePausedOverlay").css("top",CanvasManager.backgroundCanvas.height/2-150),$(document).find("#gamePausedOverlay").css("opacity",
0).show().transit({opacity:1}));a?b.systemPause=!0:b.playerPause=!0;0<b._timeModifier&&(b._oldTimeModifier=b._timeModifier,b._timeModifier=0);if(!a&&PlatformShim.ISWIN8)WindowsIntegration.onPause()};b.resume=function(a,d){var c=UI.isPanelOpen();!b.playerPause&&a&&d&&!c&&$(document).find("#gamePausedOverlay").transit({opacity:0},function(){$("#gamePausedOverlay").hide()});a&&!c?b.systemPause=!1:b.playerPause=!1;UI.isModalContentOpen()||b.systemPause||b.playerPause||(b._timeModifier=b._oldTimeModifier);
if(!b.playerPause&&!a&&PlatformShim.ISWIN8)WindowsIntegration.onResume()};b.saveActualGame=function(){b.company&&($("#gameSavedOverlay").css("top",CanvasManager.backgroundCanvas.height/2-50),$("#gameSavedOverlay").css("opacity",0).show().transit({opacity:1}),b.save(b.company.slot,function(){$("#gameSavedOverlay").transit({opacity:0},600,function(){$("#gameSavedOverlay").hide()})}))};b.save=function(a,d,c){var f=GameManager.company;if(!f||$("#splashScreen").is(":visible"))d&&d();else{var l={};l.version=
b.VERSION;l.slot=f.slot;l.gameTime=b.gameTime;l.playerPause=b.playerPause;l.systemPause=b.systemPause;l.timeModifier=b._timeModifier;l.oldTimeModifier=b._oldTimeModifier;l.state=b.state;l.currentMission=b.currentMission;l.currentResearches=b.currentResearches;l.currentEngineDev=b.currentEngineDev;l.currentHwProject=b.currentHwProject;l.currentRnDProject=b.currentRnDProject;l.currentContract=b.currentContract;l.uiSettings=b.uiSettings;l.flags=b.flags;l.spawnedPoints=b.spawnedPoints;l.company=f.save();
for(var h=[],g=Missions.getAllMissions(),k=0;k<g.length;k++){var m=g[k];h.push({id:m.id,xp:m.experience,percentage:m.percentage})}l.missionXP=h;h=Research.getAllItems().filter(function(a){return 0<a.experience}).map(function(a){return FeatureSerializer.save(a)});l.featureXP=h;b.currentFeature&&(l.currentFeature=b.currentFeature);b.plannedFeatures&&(l.plannedFeatures=b.plannedFeatures.map(function(a){return CompanyFeatureSerializer.save(a)}));Knowledge.savePlayerKnowledge();GDT.fire(b,GDT.eventKeys.saves.saving,
{company:b.company,data:l});l=JSON.stringify(l);DataStore.saveToSlotAsync(a,l,function(){var b={};b.name=f.name;b.cash=f.cash;b.fans=f.fans;b.currentWeek=f.currentWeek;b.mods=f.mods;b.date=new Date;DataStore.setValue(a,JSON.stringify(b));DataStore.commit&&DataStore.commit();if(PlatformShim.ISWIN8)try{WindowsIntegration.updateImageTile()}catch(c){Logger.LogInfo("game tile update failed",c)}d&&d()},function(a){c?c():(Logger.LogError("Could not save game",a,"Could not save game".localize()),d&&d())})}};
b.load=function(b,d,c){DataStore.loadSlotAsync(b,function(b){try{var f=JSON.parse(b)}catch(l){Steam&&Steam.isAvailable&&Steam.isAvailable()?Logger.LogError("This save slot is corrupt, this could be due to a failed cloud sync. Please resync your game with the Steam cloud and try again.",l,"This save slot is corrupt, this could be due to a failed cloud sync. Please resync your game with the Steam cloud and try again.".localize()):PlatformShim.ISWIN8?Logger.LogError("This save slot is corrupt, this could be due to a failed cloud sync. Please report this issue to Microsoft Support.",
l,"This save slot is corrupt, this could be due to a failed cloud sync. Please report this issue to Microsoft Support this issue.".localize()):Logger.LogError("This save slot is corrupt, please try restarting your game.",l,"This save slot is corrupt, please try restarting your game.".localize());SplashScreen.reshow();return}if(PlatformShim.ISWIN8)a(f,d,c);else{b=f.company.mods;var h=ModSupport.currentMods;b&&h?UI.showModMismatchDialog(function(){a(f,d,c)},ModSupport.checkMissingMods(b,h),ModSupport.checkAdditionalMods(b,
h)):a(f,d,c)}},function(a){Logger.LogError("Could not load game",a,"Could not load game".localize());c&&c(a)})};b.staffCountWorkingOnFeature=function(a){for(var d=0,c=0;c<b.company.staff.length;c++)b.company.staff[c].currentFeature&&b.company.staff[c].currentFeature.id===a.id&&(d+=1);return d};b.IsAnimationSwitchAllowed=function(a){if(b.company){var d=[];b.currentEngineDev&&d.push(b.currentEngineDev.progress);a.currentResearch&&d.push(a.currentResearch.progress);b.currentFeature&&d.push(b.getCurrentGameProgress());
a=d.length;if(0===a)return!0;for(var c=0,f=0;f<a;f++)c+=d[f];if(0.8<c/a)return!1}return!0};b.autoSave=function(a){GameFlags.G782&&11<=(void 0==b.company?0:b.company.getCurrentDate().year)?a&&a():b.save("auto",a,function(a){ghg4.ghg5("auto-save failed")})};b.getSaveGames=function(){var a=[],b=DataStore.getValue("auto");if(b){if("string"==typeof b||b instanceof String)b=JSON.parse(b);b.mods||(b.mods=!1);a.push(new SaveGameData("auto",b.name,b.cash,b.fans,b.currentWeek,b.date,b.mods))}for(b=1;5>=b;b++){var d=
DataStore.getValue(b.toString());if(d){if("string"==typeof d||d instanceof String)d=JSON.parse(d);d.mods||(d.mods=!1);a.push(new SaveGameData(b.toString(),d.name,d.cash,d.fans,d.currentWeek,d.date,d.mods))}}return a};b.openSaveView=function(){b.pause(!0);UI.showSaveView(b.getSaveGames())};b.openLoadView=function(){b.pause(!0);UI.showLoadView(b.getSaveGames())};b.checkGameOver=function(){if(!(-5E3<b.company.cash)){var a="Your bank account is in the red.\nThankfully your bank has enabled you to overdraw your account up to {0} but be careful, if your account balance is below -{0} you will go bankrupt.".localize();
1===b.company.currentLevel&&-5E3>=b.company.cash?void 0===b.company.flags.lvl1BankruptWarning?(b.company.notifications.push(new Notification("Warning".localize("heading"),a.format("{0}K".localize().format(50)))),b.company.flags.lvl1BankruptWarning=1):-5E4>b.company.cash&&l():3>=b.company.currentLevel&&4E4>=b.company.cash?void 0===b.company.flags.lvl2BankruptWarning?(b.company.notifications.push(new Notification("Warning".localize("heading"),a.format("{0}K".localize().format(200)))),b.company.flags.lvl2BankruptWarning=
1):-2E5>b.company.cash&&l():15E4>=b.company.cash&&(void 0===b.company.flags.lvl3BankruptWarning?(b.company.notifications.push(new Notification("Warning".localize("heading"),a.format("{0}M".localize().format(2)))),b.company.flags.lvl3BankruptWarning=1):-2E6>b.company.cash&&l())}};var l=function(){if(!GameFlags.GAME_OVER_DISABLED){var a=b.company;if(!a.flags.ghgnogfc){if(0<a.gameLog.length&&a.gameLog.last().releaseWeek>a.currentWeek-2&&DecisionNotifications.miniBailout.canUse(a)){var d=DecisionNotifications.miniBailout.getNotification(a);
a.notifications.push(d)}else if(DecisionNotifications.bailout.canUse(a))d=DecisionNotifications.bailout.getNotification(a),a.notifications.push(d);else{if(a.currentGame&&0.6<b.getCurrentGameProgress()&&DecisionNotifications.inDevBailout.canUse(a)){d=DecisionNotifications.inDevBailout.getNotification(a);a.notifications.push(d);b.showPendingNotifications();return}a=b.company.getCurrentDate();ghg4.ghg5("game over (bankrupt)",{year:a.year});b.company.notifications.push(new Notification("Game Over".localize("heading"),
"Unfortunately you are bankrupt.".localize(),":-("));a=15>a.year?"Electronic Mass Productions":"Stynga";d="We have just got confirmation that {0}, which has been in financial trouble lately, has gone bankrupt.\nIt appears that {1}, a behemoth in the gaming industry, has purchased the remains of the company.".localize().format(b.company.name,a);0<b.company.gameLog.length&&(d+="{n}"+"A spokesperson of {0} said, 'We are very excited to have acquired the rights to all of {1} previously released titles.'\n\nHearing this news, many fans of {1} have expressed their disappointment.".localize().format(a,
b.company.name));b.company.notifications.push(new Notification("Breaking News".localize("heading"),d));b.company.notifications.push(DecisionNotifications.gameOver.getNotification(b.company))}b.showPendingNotifications()}}};window.requestAnimFrame||(window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}());createjs.Ticker.setPaused(!0);
b._timeModifier=1;b.gameTime=0;b.SECONDS_PER_WEEK=4;b.getCurrentWeekFractional=function(){return b.gameTime/(1E3*b.SECONDS_PER_WEEK)};b.updateFeatures=function(){if(b.currentFeature){b.currentFeature.lastUpdate||(b.currentFeature.lastUpdate=b.gameTime);b.company.currentGame.flags.staffContribution||(b.company.currentGame.flags.staffContribution={});var a=b.company.currentGame.flags.staffContribution;b.company.currentGame.flags.devTime||(b.company.currentGame.flags.devTime=0);var d=b.gameTime-b.currentFeature.lastUpdate;
b.currentFeature.lastUpdate=b.gameTime;if(!(0>=d)){for(var c=0,f=0,l=!1,h=0;h<b.company.staff.length;h++){var g=b.company.staff[h];g.isWorking()&&(l=!0);g.currentFeature&&b.currentFeature.id===g.currentFeature.id&&(f+=1,a[g.id]||(a[g.id]=0),a[g.id]+=d*g.efficiency,c+=g.currentFeature.progress)}l&&(b.company.currentGame.flags.devTime+=d,0<f&&(c/=f),0===b.currentFeature.progress&&("focus"===b.currentFeature.type?(a=General.getMission(b.currentFeature.id),"preparation"===a.missionType?VisualsManager.gameStatusBar.updateStatusMessage("Starting ...".localize()):
"BugFixing"===a.missionType?0<b.company.currentGame.bugs&&VisualsManager.gameStatusBar.updateStatusMessage("Finishing ...".localize()):VisualsManager.gameStatusBar.updateStatusMessage(a.name)):VisualsManager.gameStatusBar.updateStatusMessage(b.currentFeature.name)),"Graphic"==b.currentFeature.id&&1===b.company.currentLevel&&b.company.currentGame.title.toLocaleLowerCase()=="pong".toLocaleLowerCase()&&VisualsManager.getCharacterOverlay(b.company.staff.first()).playPong(),b.currentFeature.progress=c,
1==b.currentFeature.progress&&("Bugfixing"==b.currentFeature.id?0>=b.spawnedPoints&&b.finishCurrentMission():b.finishCurrentMission()),b.currentFeature&&b.updateGameProgress())}}};b.updateGameProgress=function(){var a=b.company.currentGame.missionLog.length;1>a||a/3>GameFlags.MAIN_MISSIONS_PER_GAME?VisualsManager.gameStatusBar.updateProgress(!1):(VisualsManager.gameStatusBar.updateProgress(b.getCurrentGameProgress()),b.updateCurrentHypePoints())};b.getCurrentGameProgress=function(){var a=0,d=b.company.currentGame;
if(d.featureLog){for(var a=Missions.BASE_DURATION*GameFlags.MAIN_MISSIONS_PER_GAME*General.getGameSizeDurationFactor(d.gameSize)*General.getMultiPlatformDurationFactor(d),c=0,f=1;f<d.featureLog.length;f++)d.featureLog[f].duration&&(c+=d.featureLog[f].duration*d.featureLog[f].progress);b.currentFeature&&(c+=b.currentFeature.duration*b.currentFeature.progress);a=c/a}return a};b.updateCurrentHypePoints=function(){if(!b.company.currentGame||!b.company.currentGame.hypePoints)return 0;var a=Math.floor(b.company.currentGame.hypePoints*
b.getCurrentGameProgress());1<=a&&(Tutorial.hypePoints(),VisualsManager.gameStatusBar.updateHypePoints(a))};b.updateCharacters=function(){if(b.company&&b.company.staff){for(var a=0;a<b.company.staff.length;a++)b.company.staff[a].tick();if(b.company.hwCrew)for(var a=0,d=b.company.hwCrew.length;a<d;a++)b.company.hwCrew[a].tick();if(b.company.rndCrew)for(a=0,d=b.company.rndCrew.length;a<d;a++)b.company.rndCrew[a].tick()}};b.buyPlatform=function(a){b.company.adjustCash(-a.licencePrize,a.name+" "+"dev. license".localize(" used as {platformname} dev. license"));
b.company.licencedPlatforms.push(a);b.company.availablePlatforms.remove(a);UI.updateStatusBar(b.company)};b.getNewBody=function(a,d){var c=[1,2,3,4,5,6,7,8].pickRandom();"female"===a&&(c=[9,10,11,12].pickRandom());for(var f=0;f<b.company.staff.length;f++)if(b.company.staff[f].flags.body===c&&b.company.staff[f].getOrientation()===d)return b.getNewBody(a,d);return c};b.getNewHead=function(a,d){var c=[1,2,3,4,5,6,7,8].pickRandom();"female"===a&&(c=[9,10,11,12].pickRandom());for(var f=0;f<b.company.staff.length;f++)if(b.company.staff[f].flags.head===
c&&b.company.staff[f].getOrientation()===d)return b.getNewHead(a,d);return c};b.setBodyAndHead=function(a){a.flags.body=b.getNewBody(a.sex,a.getOrientation());a.flags.head=b.getNewHead(a.sex,a.getOrientation())};b.getUniqueSalesRank=function(a,d){if(100<a)return a;var c=b.company.gameLog.filter(function(a){return a.currentSalesCash!=a.totalSalesCash}),f=null;do(f=c.first(function(b){return b.nextSalesRank==a&&b.id!=d.id}))&&a++;while(f);return a};b.getMaxRndBudget=function(){var a=b.company.staff.filter(function(a){return a.flags.designSpecialist}).count();
return Math.max(5E5,b.MAX_RND_COST-(a-1).clamp(0,7)*b.RND_DECREASE_PER_SPECIALIST)};b.getMaxHwBudget=function(){var a=b.company.staff.filter(function(a){return a.flags.technologySpecialist}).count();return Math.max(5E5,b.MAX_HW_COST-(a-1).clamp(0,7)*b.HW_DECREASE_PER_SPECIALIST)};b.checkAchievements=function(){var a=Achievements.checkForNew(b.company);0<a.length&&UI.showAchievements(a)};b.pauseAppBarShown=function(a){("string"==typeof a||a instanceof String)&&ghg4.ghg5("fragment activated",{area:a});
b.pause(!0,!0)};b.resumeAppBarShown=function(){GameManager.loadScreenOpened?(GameManager.loadScreenOpened=!1,b.resume(!1,!0)):b.resume(!0,!0)};var h=[];b.addTickListener=function(a,b){h.push({f:a,isGameTime:b})};b.addTickListener(function(a){if(b.company&&!0!=b.loadInProgress){b.gameTime+=a;a=b.getCurrentWeekFractional();var d=b.company.currentWeek;b.company.currentWeek=a;if(Math.floor(a)>Math.floor(d)){for(var c=Math.floor(a)-Math.floor(d),f=1;f<=c;f++)General.proceedOneWeek(b.company,d+f);0>b.company.cash&&
b.checkGameOver()}Math.floor(10*a)>Math.floor(10*d)&&(UI.updateStatusBar(b.company),Research.checkForNewResearch(),b.checkAchievements(),0!=b._timeModifier&&(General.updateNotifications(b.company),b.showPendingNotifications()));b.updateFeatures();b.updateCharacters();b.currentContract&&b.updateContractProgress()}},!0);var m;b.update=function(){if(m){var a=Date.now(),d=(a-m).clamp(0,500);m=a;UI&&1!=UI._achievementsActiveTimeModifier&&(d*=UI._achievementsActiveTimeModifier);if(!(UI&&UI.isTransitionVisible||
0===d)){b.company&&(b.company.timePlayed+=d);for(var a=d*b._timeModifier,c=0;c<h.length;c++){var f=h[c];f.isGameTime?0!=a&&f.f(a):f.f(d)}}}else m=Date.now()};var n=0,p=1*new Date-1;b._skipFrameCount=0;var q,s=function(){if(q){var a=Date.now(),d=(a-q).clamp(0,500);q=a;0>=d||(d*=b._timeModifier,createjs.Tween.tick(d,!1),b._skipFrameCount++,0!=b._timeModifier&&SettingsGameplay.isFrameSkipEnabled()&&1!=b._skipFrameCount||b.update(),0!==b._timeModifier&&CanvasManager?CanvasManager.update():GameFlags.IS_STEAM&&
Steam&&CanvasManager&&CanvasManager.backgroundStage&&Steam.isAvailable()&&2==b._skipFrameCount&&CanvasManager.backgroundStage.update(),2==b._skipFrameCount&&(b._skipFrameCount=0),GameFlags.SHOW_FPS&&(d=1E3/((a=new Date)-p),isNaN(n)&&(n=0),n+=(d-n)/1,p=a),2==b._skipFrameCount&&(b._skipFrameCount=0))}else q=Date.now();requestAnimFrame(s)};if(GameFlags.SHOW_FPS){var t=null;setInterval(function(){if(t)t.innerHTML=n.toFixed(1)+"fps";else if(t=document.getElementById("fps"))t.style.display=""},1E3)}b.startDrawLoop=
function(){s()};b.getGUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})}})();var Steam={};
(function(){var a=null,b=!1;if(!PlatformShim.ISWIN8&&require){try{a=require("./steamIntegration/greenworks-win")}catch(c){a=null}if(!a)try{a=require("./steamIntegration/greenworks-osx")}catch(d){a=null}if(!a)try{a=require("./steamIntegration/64/greenworks-linux64")}catch(f){a=null}if(!a)try{a=require("./steamIntegration/32/greenworks-linux32")}catch(g){a=null}}Steam.isAvailable=function(d){if(!a)return d&&d("no steam integration available"),!1;if(!b){var c;a:{if(!b){b=!0;try{if(!a.initAPI()){a=null;
d&&d("steam Init failed");c=!1;break a}}catch(f){a=null;Logger.LogWarning("Steam initialization failed",f,"Steam initialization failed".localize());f&&f("steam Init failed");c=!1;break a}}c=!0}if(!c)return!1}return!0};Steam.saveTextToFile=function(b,d,c,f){Steam.isAvailable(f)&&a.saveTextToFile(b,d,c,f)};Steam.readTextFromFile=function(b,d,c,f){Steam.isAvailable(f)&&a.readTextFromFile(b,d,c,f)};Steam.activateAchievement=function(b,d){Steam.isAvailable()&&a.activateAchievement(b,d,function(a){GameFlags.ghg6&&
PlatformShim.alert(a,"Error".localize())})};Steam.getCurrentGameLanguage=function(b){return Steam.isAvailable(b)?a.getCurrentGameLanguage():"en"};Steam.api=a})();var DataStore={};
(function(){var a={};(function(){a.setValue=function(a,b){};a.getValue=function(a){return null};a.saveToSlotAsync=function(a,b,d,c){d()};a.loadSlotAsync=function(a,b,d){};a.saveCanvasToFile=function(a,b,d,c){}})();if(PlatformShim.ISWIN8){var b={};(function(){var a=Windows.Storage.ApplicationData.current.roamingSettings,d=Windows.Storage.ApplicationData.current.roamingFolder;b.setValue=function(b,d){a.values[b]=d};b.getValue=function(b){return a.values[b]};b.saveToSlotAsync=function(a,b,f,g){d.createFileAsync(a,
Windows.Storage.CreationCollisionOption.replaceExisting).then(function(d){Windows.Storage.FileIO.writeTextAsync(d,b).then(function(){try{var d=c(b);DataStore.setValue("hash"+a,d)}catch(l){Logger.LogInfo("hash save failed",l)}DataStore.saveSettings();f&&f()},function(a){ghg4.ghg5("save-error",{method:"writeTextAsync","error-nr":a?a.number:null});g&&g(a)})},function(a){ghg4.ghg5("save-error",{method:"createFileAsync","error-nr":a?a.number:null});g&&g(a)})};var c=function(a){var b=Windows.Security.Cryptography.Core.HashAlgorithmProvider.openAlgorithm("SHA256");
a=Windows.Security.Cryptography.CryptographicBuffer.convertStringToBinary(a,Windows.Security.Cryptography.BinaryStringEncoding.utf8);b=b.hashData(a);return Windows.Security.Cryptography.CryptographicBuffer.encodeToHexString(b)};b.loadSlotAsync=function(a,b,f){d.getFileAsync(a).then(function(d){d||f();Windows.Storage.FileIO.readTextAsync(d).then(function(d){var l,g;try{(l=DataStore.getValue("hash"+a))&&(g=c(d))}catch(k){Logger.LogInfo("hash load failed",k)}l==g||DataStore.remoteSettings.ignoreHashMismatch?
b(d):(ghg4.ghg5("load game error",{reason:"hash mismatch"}),f("save file corrupt"))},f)},f)};b.saveCanvasToFile=function(a,b,d,c){Windows.Storage.ApplicationData.current.localFolder.createFileAsync(b,Windows.Storage.CreationCollisionOption.replaceExisting).then(function(b){f(a,b,d,c)})};var f=function(a,b,d,c){var f=a.msToBlob(),l=f.msDetachStream().getInputStreamAt(0);b.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function(a){return Windows.Storage.Streams.RandomAccessStream.copyAsync(l,
a).then(function(){a.flushAsync().then(function(){a.close();l.close();f.msClose();d&&d()},c)},c)},c)}})();DataStore=b}else{var c;try{c="localStorage"in window&&null!==window.localStorage}catch(d){Logger.LogInfo("local storage check failed",d),c=!1}if(c){var f={};(function(){f.setValue=function(a,b){window.localStorage.setItem(a,b)};f.getValue=function(a){return window.localStorage.getItem(a)};f.saveToSlotAsync=function(a,b,d,c){try{f.setValue("slot_"+a,b)}catch(g){Logger.LogWarning("Save failed",
g,"Save failed".localize());c(g);return}d&&d()};f.loadSlotAsync=function(a,b,d){try{b(f.getValue("slot_"+a))}catch(c){Logger.LogWarning("Load failed",c,"Load failed".localize()),d(c)}};f.saveCanvasToFile=function(a,b,d,c){c()}})();DataStore=f;if(Steam&&Steam.isAvailable&&Steam.isAvailable()){var g={};(function(){var a=f.getValue("general");a?a=JSON.parse(a):(a={version:1},f.setValue("general",JSON.stringify(a)));var b=!1,d;g.setValue=function(c,g){a[c]=g;a.version++;d&&(d[c]=g,d.version++);f&&f.setValue(c,
g);b=!0};g.getValue=function(b,c){return d&&d.version&&d.version>a.version&&d[b]?d[b]:a[b]?a[b]:f.getValue(b)};var c=function(b){!a[b]&&d[b]&&(a[b]=d[b]);!a[b+"L1"]&&d[b+"L1"]&&(a[b+"L1"]=d[b+"L1"]);!a[b+"L2"]&&d[b+"L2"]&&(a[b+"L2"]=d[b+"L2"]);!a[b+"L3"]&&d[b+"L3"]&&(a[b+"L3"]=d[b+"L3"]);!a[b+"L4"]&&d[b+"L4"]&&(a[b+"L4"]=d[b+"L4"]);!a[b+"L5"]&&d[b+"L5"]&&(a[b+"L5"]=d[b+"L5"])};g.init=function(f){Steam.readTextFromFile("general",function(g){try{(d=JSON.parse(g))&&d.version&&d.version!=a.version&&(DataStore.initSettings(),
DataStore.initRemoteSettings(),b=!1),d&&(c("auto"),c("1"),c("2"),c("3"),c("4"),c("5"))}catch(n){Logger.LogWarning("Could not load settings from steam cloud",n,"Could not load settings from steam cloud".localize())}f&&f()},function(a){f&&f();Logger.LogWarning("Could not load settings from steam cloud",a,"Could not load settings from steam cloud".localize())})};g.commit=function(d,c){if(b)try{var h=JSON.stringify(a);f.setValue("general",h);Steam.saveTextToFile("general",h,function(){b=!1;d&&d()},function(a){Logger.LogWarning("Could not save settings to steam cloud",
a,"Could not save settings to steam cloud".localize())})}catch(g){Logger.LogWarning("Could not save settings to steam cloud",g,"Could not save settings to steam cloud".localize()),c&&c(g)}else d&&d()};g.saveToSlotAsync=function(a,b,d,c){c="slot_"+a;f.saveToSlotAsync(a,b);Steam.saveTextToFile(c,b,d,function(a){Logger.LogWarning("Could not save to steam cloud",a,"Could not save to steam cloud".localize());d&&d()})};var n=function(a,b,d,c,l,h){var g=$("#loadViewContent");g.empty();g.append($("<small></small>").text("Your local save game seems to be different from the one stored in the Steam Cloud. Which one would you like to load?".localize()));
var k=new Company("x");l.date&&(l.saveTime=l.date);l.name&&(l.companyName=l.name);l.slot=a;l=UI._getElementForSaveGame(l,k);l.find(".saveGameLocation").text("Cloud".localize("savegame"));g.append(l);l.get(0).onclick=function(){Sound.click();Steam.readTextFromFile(c,b,function(c){Logger.LogWarning("Could not load from steam cloud",c,"Could not load from steam cloud".localize());f.loadSlotAsync(a,b,d)});UI.closeAllLoadSaveViews()};h.date&&(h.saveTime=h.date);h.name&&(h.companyName=h.name);h.slot=a;
h=UI._getElementForSaveGame(h,k);h.find(".saveGameLocation").text("Local".localize("savegame"));g.append(h);h.get(0).onclick=function(){Sound.click();f.loadSlotAsync(a,b,d);UI.closeAllLoadSaveViews()};g.append($("<small></small>").text("Note: Once you save the game, the new save file will be stored both locally and on the Cloud unless you disable the Steam Cloud through Steam.".localize()));UI.closeAllLoadSaveViews();GameManager.pause(!0);GameManager.loadScreenOpened=!0;$("#loadView").dialog({width:630,
draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:6800,open:function(){var a=$(UI.closeButtonTemplate);a.zIndex=6900;a.clickExclOnce(function(){Sound.click();$("#loadView").dialog("close");GameManager.resume(!0)});$(this).siblings(".ui-dialog-titlebar").remove();$(this).parents(".ui-dialog:first").addClass("tallWindow");$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content")},close:function(){$(this).dialog("destroy");this.style.cssText=
"display:none;";GameManager.resume(!0)}})};g.loadSlotAsync=function(b,c,l){var g="slot_"+b;try{if(a[b]||d&&d[b]||f.loadSlotAsync(b,c,l),a&&d&&a[b]&&d[b]&&Date.parse(JSON.parse(a[b]).date)!=Date.parse(JSON.parse(d[b]).date)){var m=JSON.parse(d[b]),u=JSON.parse(a[b]);n(b,c,l,g,m,u)}else Steam.readTextFromFile(g,c,function(a){Logger.LogWarning("Could not load from steam cloud",a,"Could not load from steam cloud".localize());f.loadSlotAsync(b,c,l)})}catch(z){Steam.readTextFromFile(g,c,function(a){Logger.LogWarning("Could not load from steam cloud",
a,"Could not load from steam cloud".localize());f.loadSlotAsync(b,c,l)})}};g.saveCanvasToFile=function(a,b,d,c){c()}})();DataStore=g}}else DataStore=a}DataStore.initSettings=function(){var a=DataStore.getValue("settings"),a=a?JSON.parse(a):{};DataStore.settings=a};DataStore.initSettings();DataStore.getAchievements=function(){DataStore.settings.achievements||(DataStore.settings.achievements={});var a=DataStore.settings.achievements;a.achieved||(a.achieved=[]);return a};DataStore.getTutorialSettings=
function(){var a=DataStore.settings.tutorialSettings;a||(a={"tutorials-shown":[]},DataStore.settings.tutorialSettings=a);return a};DataStore.saveSettings=function(){try{DataStore.setValue("settings",JSON.stringify(DataStore.settings))}catch(a){Logger.LogWarning("Could not save settings",a,"Could not save settings".localize())}};DataStore.initRemoteSettings=function(){var a=DataStore.getValue("remote-settings");if(a)try{a=JSON.parse(a)}catch(b){a=null}a||(a={id:3,supporterPacksEnabled:!1,ignoreHashMismatch:!0,
enableSteamKey:!0});void 0===a.enableSteamKey&&(a.enableSteamKey=!0);DataStore.remoteSettings=a};DataStore.initRemoteSettings();(function(){try{PlatformShim.xhr({url:"http://www.greenheartgames.com/utils/remoteSettingsId"},function(a){if(a&&a.responseText){a=a.responseText;try{parseInt(a)>DataStore.remoteSettings.id&&PlatformShim.xhr({url:"http://www.greenheartgames.com/utils/remoteSettings"},function(a){if(a&&a.responseText){a=a.responseText;try{var b=JSON.parse(a);DataStore.setValue("remote-settings",
a);DataStore.remoteSettings=b}catch(d){Logger.LogWarning("Could not load remote settings",d,"Could not load remote settings".localize())}}})}catch(b){Logger.LogWarning("Could not load remote settings",b,"Could not load remote settings".localize())}}})}catch(a){Logger.LogWarning("Could not load remote settings",a,"Could not load remote settings".localize())}})();DataStore.setScore=function(a,b,d){var c=DataStore.settings;c.highScore||(c.highScore={});if(!(c.highScore.hasOwnProperty(a)&&c.highScore[a].score>
d)){c.highScore[a]={name:b,score:d};DataStore.saveSettings();try{GameManager.save(a,null)}catch(f){Logger.LogWarning("Could not save game",f,"Could not save game".localize())}}};DataStore.getHighScoreList=function(){var a=DataStore.settings,b=[],d;for(d in a.highScore)a.highScore.hasOwnProperty(d)&&b.push(a.highScore[d]);return b}})();var LanguageMgr={};
(function(){var a=LanguageMgr;a.map={brazilian:"ptbr",bulgarian:"en",czech:"cs",danish:"en",dutch:"nl",english:"en",finnish:"en",french:"fr",german:"de",greek:"el",hungarian:"hu",italian:"it",japanese:"en",koreana:"en",norwegian:"en",polish:"pl",portuguese:"en",romanian:"en",russian:"ru",schinese:"zhcn",spanish:"es",swedish:"sv",tchinese:"zhcn",thai:"en",turkish:"tr",ukrainian:"en"};a.gameLanguage=GameManager.getPreferredLanguage();a.steamGameLanguage="english";a.storedSteamGameLanguage=DataStore.getValue("steamlanguage");
a.init=function(){GameFlags.IS_STEAM&&(Steam.isAvailable()&&(a.steamGameLanguage=Steam.getCurrentGameLanguage(),a.steamGameLanguage!=a.storedSteamGameLanguage&&(a.storedSteamGameLanguage=a.steamGameLanguage,DataStore.setValue("steamlanguage",a.storedSteamGameLanguage),a.gameLanguage!=a.map[a.storedSteamGameLanguage]&&(a.gameLanguage=a.map[a.storedSteamGameLanguage]))),GameManager.setPreferredLanguage(a.gameLanguage));Localization.setLanguage(GameManager.getPreferredLanguage())}})();LanguageMgr.init();
var ResourceKeys={};
(function(){var a=ResourceKeys,b={},c="./images/";PlatformShim.ISLOWRES&&(c="./images1366/");b.Level1=c+"level1.png";b.PreviewChair="./images/player/chair.png";b.PreviewPants1="./images/player/pants.png";b.PreviewPants9="./images/player/pants9.png";b.PreviewHands1="./images/player/hands1.png";b.PreviewHands4="./images/player/hands4.png";b.PreviewHands5="./images/player/hands5.png";b.PreviewHands9="./images/player/hands9.png";b.PreviewHands10="./images/player/hands10.png";b.PreviewHands12="./images/player/hands12.png";
b.PreviewBody1="./images/player/body1.png";b.PreviewBody2="./images/player/body2.png";b.PreviewBody3="./images/player/body3.png";b.PreviewBody4="./images/player/body4.png";b.PreviewBody5="./images/player/body5.png";b.PreviewBody6="./images/player/body6.png";b.PreviewBody7="./images/player/body7.png";b.PreviewBody8="./images/player/body8.png";b.PreviewBody9="./images/player/body9.png";b.PreviewBody10="./images/player/body10.png";b.PreviewBody11="./images/player/body11.png";b.PreviewBody12="./images/player/body12.png";
b.PreviewHead1="./images/player/head1.png";b.PreviewHead2="./images/player/head2.png";b.PreviewHead3="./images/player/head3.png";b.PreviewHead4="./images/player/head4.png";b.PreviewHead5="./images/player/head5.png";b.PreviewHead6="./images/player/head6.png";b.PreviewHead7="./images/player/head7.png";b.PreviewHead8="./images/player/head8.png";b.PreviewHead9="./images/player/head9.png";b.PreviewHead10="./images/player/head10.png";b.PreviewHead11="./images/player/head11.png";b.PreviewHead12="./images/player/head12.png";
b.PreviewDesk="./images/player/desk.png";$.extend(a,b);a.getLevelResources=function(){for(var a=[b,f,g,k],c=[],m=0;m<arguments.length;m++){var n=arguments[m];if(a.length<n)throw new "invalid level: "+n;c.addRange(d(a[n-1]))}return c};var d=function(a){var b=[],d;for(d in a)a.hasOwnProperty(d)&&b.push(a[d]);return b},f={},g={},k={};f.Level2=c+"superb/level2.png";f.Level2Desk=c+"superb/level2Desk.png";f.Level2C1=c+"superb/level2C1.png";f.Level2C2=c+"superb/level2C2.png";f.Level2C2Keyboard=c+"superb/level2C2Keyboard.png";
f.Level2C3=c+"superb/level2C3.png";f.Level2C4=c+"superb/level2C4.png";$.extend(a,f);g.Level3=c+"superb/level3.png";g.Level3Desk=c+"superb/level3Desk.png";g.Level3C1=c+"superb/level3C1.png";g.Level3C2=c+"superb/level3C2.png";g.Level3C2Keyboard=c+"superb/level3C2Keyboard.png";g.Level3C3=c+"superb/level3C3.png";g.Level3C4=c+"superb/level3C4.png";$.extend(a,g);k.Level4=c+"superb/level4.png";k.Level4LockedLeft=c+"superb/level4LockedLeft.png";k.Level4LockedRight=c+"superb/level4LockedRight.png";k.Level4Desk=
c+"superb/level4Desk.png";k.Level4C1=c+"superb/level4C1.png";k.Level4C2=c+"superb/level4C2.png";k.Level4C2Keyboard=c+"superb/level4C2Keyboard.png";k.hwDesk1=c+"superb/hwDesk1.png";k.hwDesk2=c+"superb/hwDesk2.png";k.rndDesk1=c+"superb/rndDesk1.png";k.rndDesk2=c+"superb/rndDesk2.png";$.extend(a,k)})();var CustomAlert={};
(function(a){a.init=function(){window.alert=function(b,c){console.log("-- Alert Log --");console.log("Type: "+c);console.log("Message: "+b);console.log("-- --------- --");a.show(b,c)}};a.stack=[];a.info=function(b){a.show(b,"INFO")};a.warn=function(b){a.show(b,"WARN")};a.error=function(b){a.show(b,"ERR")};a.response=function(b){a.show(b,"RESP")};a.success=function(b){a.show(b,"SUCC")};a.tutorial=function(b){a.show(b,"TUT")};a.hint=function(b){a.show(b,"HINT")};a.show=function(b,c,d,f){b=""+b;c=c?
c.toUpperCase():"ERROR";var g=$(window),k=g.width();g.height();var l=0.5*k-360,h=$(document.createElement("div")),g=$(document.createElement("div")),k=$(document.createElement("div")),m="",n=f?f:"http://forum.greenheartgames.com";h.addClass("errorMessage window");h.addClass("ul-vt-textbox");h.css({left:l,top:20});g.addClass("icon-remove-sign");g.addClass("errorMessage button close");g.attr("title","Close this update notification");k.addClass("icon-external-link");k.addClass("errorMessage button url");
d?k.attr("title",d):k.attr("title","Click here to head to the Greenheart Games Forums (http://forum.greenheartgames.com/)");switch(c){case "ERR":headerText="Error Alert";h.addClass("msg-error");m="icon-warning-sign";break;case "SUCC":headerText="Success Alert";h.addClass("msg-success");m="icon-ok-circle";break;case "HINT":headerText="Hint Alert";h.addClass("msg-hint");m="icon-eye-open";break;case "WARN":headerText="Warning Alert";h.addClass("msg-warning");m="icon-exclamation-sign";break;case "INFO":headerText=
"Information Alert";h.addClass("msg-info");m="icon-info-sign";break;case "RESP":headerText="Information Alert";h.addClass("msg-response");m="icon-envelope";break;case "TUT":headerText="Tutorial Alert";h.addClass("msg-tutorial");m="icon-comment";break;default:headerText="Error Alert",h.addClass("msg-default"),m="icon-exclamation-sign"}$("body").append(h);h.html('<h3><i class="'+m+' icon-2x">&nbsp;&nbsp;<span class="errorMessage-header">'+headerText+'</span></i></h3><p class="errorMessage">'+b+"</p>");
if("ERROR"===c||"ERR"===c)try{var p="";c="";c=GameFlags.IS_STEAM?c+"Steam":PlatformShim.ISWIN8?c+"Metro":c+"Standalone";d="";switch(process.platform){case "darwin":d+="Mac";break;case "freebsd":d+="FreeBSD";break;case "linux":d+="Linux";break;case "sunos":d+="Sunos";break;case "win32":d+="Windows";PlatformShim.ISWIN8&&(d+=" 8");break;default:d+="unknown"}PlatformShim.ISWIN8||($.grep(ModSupport.currentMods,function(a,b){ModSupport.availableMods.forEach(function(b){a==b.id&&(p+="<li>"+b.name+" by "+
b.author+"</li>")})}),1>p.length&&(p="<li>No mods activated.</li>"),p="<ul style='text-align:left;'>{0}</ul>".format(p),h.append("{0}Enabled Mods: {1}{2}".format("<p class='errorMessage left'><span>","</span> </p>",p)));h.append("{0}Game Version: {1}{2}{3}".format("<p class='errorMessage left'><span>","</span> ",PlatformShim.getVersion(),"</p>"));h.append("{0}Platform: {1}{2}{3}".format("<p class='errorMessage left'><span>","</span> ",d,"</p>"));h.append("{0}Distribution: {1}{2}{3}".format("<p class='errorMessage left'><span>",
"</span> ",c,"</p>"))}catch(q){h.append("{0}Note: {1}{2}{3}".format("<p class='errorMessage left'><span>","</span> ","Error occurred before the game finished intialising.","</p>"))}g.prependTo(h);k.prependTo(h);g.clickExcl(function(){var b=a.stack.indexOf(h);-1<b&&a.stack.splice(b,1);h.remove()});k.clickExcl(function(){PlatformShim.openUrlExternal(n);h.remove()});a.stack.push(h);a.stack&&0<a.stack.length&&h.css({left:"+="+-(5*a.stack.length),top:"+="+5*a.stack.length})};return a})(CustomAlert||{});
var SplashScreen={},Startup={};
(function(){function a(a){if(PlatformShim.ISWIN8)a();else try{var b=require("fs");if(b){var d=b.readFileSync("./eula.txt","utf8");if(d)if(DataStore.getValue("eula-accepted"))a();else{var c=$("#eulaWindow");c.find(".deleteButton").clickExclOnce(function(){window.close()});c.find(".okButton").clickExclOnce(function(){c.dialog("close");DataStore.setValue("eula-accepted",!0);a()});b=d;b=b.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/\n/g,"<br>");c.find(".eulaContainer").html(PlatformShim.toStaticHtml(b));
c.gdDialog({popout:!0,close:!1,zIndex:2E4,onClose:function(){c.find(".eulaContainer").empty()}})}}}catch(f){a&&a()}}function b(a){labelText="Tap to start game ...".localize();WindowsIntegration.isTouchCapable||(labelText="Click to start game ...".localize());a.clickExcl(function(b){if(UI.isPanelOpen())return UI.closePanels(),!1;UI.hideAboutBadge();a.off("click");k("Starting game...".localize());GameManager.startNewGame()});k(labelText)}function c(a,d){a.clickExcl(function(){if(UI.isPanelOpen())return UI.closePanels(),
!1;a.off("click");UI.hideAboutBadge();UI.fadeInTransitionOverlay(function(){SplashScreen.removeSplashScreen();GameManager.reload(d.slot,function(){Sound.playBackgroundMusic();GameManager.resume(!0)},function(){b(a)},!0)})})}function d(){try{var a=require("nw.gui").Window.get(),d=DataStore.getValue("windowed");try{!0!=d&&"true"!=d||PlatformShim.toggleFullscreen()}catch(f){}a.focus()}catch(l){}$("#commandsAppBar")[0].disabled=!1;a=$("#splashScreen");$("#splashProgress").fadeOut(400);var d=$("#gameReadyLabel"),
h=GameManager.getSaveGames();UI.showNewsletterWidget();if(0===h.length)b(a);else{h="Tap to continue ...";WindowsIntegration.isTouchCapable||(h="Click to continue ...".localize());var g=GameManager.getGameToContinue();g&&g.companyName&&$("#isAGameTycoonLabel").text("{0}".format(g.companyName)).fadeIn(600).arctext({radius:350});GameManager.pause(!0);c(a,g);k(h,d)}GameManager.startDrawLoop()}CustomAlert.init();var f,g=function(){var b=$("#splashProgress");b.hide();$("#gameReadyLabel").hide();b.fadeIn("fast");
$("#splashScreen");f=function(){var a=(window.innerWidth-2990)/2-10,b=(window.innerHeight-2990)/2-70;$("#splashPositionStyle").html(".splashDynamicClass:before { top:{0}px; left:{1}px; }".format(b,a))};Localization.processHtml(document.body);CanvasManager.init(document.getElementById("canvasContainer"));CanvasManager.initLeftScreen(document.getElementById("canvasContainerLeft"));CanvasManager.initRightScreen(document.getElementById("canvasContainerRight"));f();GameManager.ghg0()?($("#gamePreviewLabel").text(">> Lite Version <<".localize()),
GameManager.ghg1()):$("#gamePreviewLabel").hide();$("#gameSavedOverlay").css({opacity:0});$("#gamePausedOverlay").css({opacity:0});$("#gameErrorOverlay").css({opacity:0});n();Logger.load();Knowledge.loadPlayerKnowledge();Sound.init();GameManager.init();$("<img/>").attr("src","./images/sunrays.png").load(function(){$("#splashStaticBackdrop").transition({opacity:0},2E3);a(function(){DataStore.init?DataStore.init(d):d()})});l=$(window).width();h=$(window).height();ghg4.init()},k=function(a,b){b||(b=
$("#gameReadyLabel"));b&&(b.text(a),b.delay(400).effect("pulsate",{times:50},2E3))};SplashScreen.reshow=function(a){var b=GameManager;splashScreen=$("#splashScreen");splashScreen.fadeIn();a=GameManager.getGameToContinue();c(splashScreen,a);setTimeout(function(){UI.isTransitionVisible&&UI.fadeOutTransitionOverlay(function(){b.systemPause?b.pause(!0):b.resume(!0);b.playerPause?b.pause(!1):b.resume(!1);b.loadInProgress=!1});UI.showAboutBadge();UI.showNewsletterWidget()},300)};SplashScreen.removeSplashScreen=
function(){var a=$("#splashScreen");return a.is(":visible")?(a.fadeOut("slow"),UI.hideAboutBadge(),!0):!1};SplashScreen.isVisible=function(){return $("#splashScreen").is(":visible")};var l,h,m=function(){var a=$(window).width(),b=$(window).height();if(a!=l||b!=h)l=a,h=b,$("#splashScreen").is(":visible")?f&&f():(GameManager.pause(!0),GameManager.autoSave(function(){GameManager.reload("auto",void 0,void 0,!0)}))},n=function(){var a=$(window).width(),b=$(window).height();$(document.body).width(a).height(b);
CanvasManager.updateCanvasSizes(a,b);CanvasManager.update()},p;$(window).resize(function(){n();clearTimeout(p);p=setTimeout(m,100)});PlatformShim.ISWIN8||$(document).ready(function(){g();Greenworks?Greenworks.synchronize():($("#greenworksLoading").remove(),ModSupport.init())});$.prototype.slider_old=$.prototype.slider;$.prototype.slider=function(){var a=$.prototype.slider_old.apply(this,arguments);".projectBudgetSlider"!=this.selector&&".simplemodal-data .budgetSlider"!=this.selector||this.find(".ui-slider-handle").unbind("keydown");
return a};var q=require("nw.gui").Window.get();q.on("close",function(){GameManager.autoSave();q.close(!0)});document.addEventListener("DOMMouseScroll",function(a){a.axis==a.HORIZONTAL_AXIS&&(a.stopPropagation(),a.preventDefault(),a.cancelBubble=!1);return!1},!1);document.onmousedown=function(a){2==a.which&&a.preventDefault()}})();var Sound={},SOUND_DISABLED=!1;
(function(){Sound.init=function(){if(!SOUND_DISABLED){void 0==DataStore.getValue("masterVolume")&&DataStore.setValue("masterVolume",50);void 0==DataStore.getValue("muted")&&DataStore.setValue("muted",!1);void 0==DataStore.getValue("allowBackgroundMusic")&&DataStore.setValue("allowBackgroundMusic",!0);void 0==DataStore.getValue("fxAllowed")&&DataStore.setValue("fxAllowed",!0);createjs.Sound.registerPlugins([createjs.HTMLAudioPlugin]);preload=new createjs.LoadQueue;preload.installPlugin(createjs.Sound);
preload.onComplete=this.playJingle;var a=".mp3",b="./audio";GameFlags.ARM_VERSION&&(b="./audio/arm");PlatformShim.ISWIN8||(b="./audio/ogg",a=".ogg");preload.loadManifest([{id:"doing-my-best",src:b+"/doing-my-best"+a,type:"sound"},{id:"miss-management",src:b+"/miss-management"+a,type:"sound"},{id:"new-adventure",src:b+"/new-adventure"+a,type:"sound"},{id:"the-winning-strategy",src:b+"/the-winning-strategy"+a,type:"sound"},{id:"getting-to-success",src:b+"/getting-to-success"+a,type:"sound"},{id:"fly-like-a-butterfly",
src:b+"/fly-like-a-butterfly"+a,type:"sound"},{id:"startup",src:b+"/startup"+a,type:"sound"},{id:"GameDevTycoonTitle",src:b+"/GameDevTycoonTitle"+a,type:"sound"},{id:"clickSound",src:b+"/button-50"+a,type:"sound"},{id:"designSpawn",src:b+"/designSpawn"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"researchSpawn",src:b+"/researchSpawn"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"techSpawn",src:b+"/techSpawn"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"bugSpawn",
src:b+"/bugSpawn"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"designSpawnEnd",src:b+"/designSpawnEnd"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"researchSpawnEnd",src:b+"/researchSpawnEnd"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"techSpawnEnd",src:b+"/techSpawnEnd"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"bugSpawnEnd",src:b+"/bugSpawnEnd"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:4},{id:"popupOpen",src:b+"/popupOpen"+
a,type:"sound"},{id:"levelUp",src:b+"/levelUp"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?1:3},{id:"newRecord",src:b+"/newRecord"+a,type:"sound"},{id:"research",src:b+"/research"+a,type:"sound"},{id:"notificationTyping",src:b+"/notificationTyping"+a,type:"sound"},{id:"pointCount",src:b+"/pointCount"+a,type:"sound"},{id:"tack",src:b+"/tack"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?2:3},{id:"cash",src:b+"/cash"+a,type:"sound",data:1},{id:"ping",src:b+"/ping"+a,type:"sound",data:1},
{id:"pong",src:b+"/pong"+a,type:"sound",data:1},{id:"bugDecrease",src:b+"/bugDecrease"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?1:8},{id:"trainingProgress",src:b+"/trainingProgress"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?1:6},{id:"flipflap",src:b+"/flipflap"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?4:20},{id:"gameReady",src:b+"/game-ready"+a,type:"sound"},{id:"achievement1",src:b+"/achievement-1"+a,type:"sound"},{id:"reviewTack",src:b+"/reviewTack"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?
3:15},{id:"boost",src:b+"/boost"+a,type:"sound",data:GameFlags.LIMIT_SOUND_INSTANCE?1:7}]);Sound._backgroundMusic=["doing-my-best","miss-management","new-adventure","the-winning-strategy"];Sound._backgroundMusic2=["getting-to-success"];Sound._backgroundMusic3=["startup"];Sound._backgroundMusic4=["fly-like-a-butterfly"];Sound._fxTracks="clickSound designSpawn researchSpawn techSpawn bugSpawn designSpawnEnd researchSpawnEnd techSpawnEnd bugSpawnEnd popupOpen levelUp newRecord research notificationTyping pointCount tack cash ping pong bugDecrease trainingProgress flipflap reviewTack boost".split(" ")}};
Sound.playSoundLoop=function(a,b){if(!SOUND_DISABLED){var d=b;d||(d=1);Sound.getFxAllowed()&&(Sound[a]&&Sound[a].stop(),Sound[a]=createjs.Sound.play(a,createjs.Sound.INTERRUPT_LATE,0,0,100,d,0))}};Sound.pauseAllLoopingFx=function(){SOUND_DISABLED||(Sound.notificationTyping&&Sound.notificationTyping.pause(),Sound.pointCount&&Sound.pointCount.pause())};Sound.resumeAllLoopingFx=function(){SOUND_DISABLED||(Sound.notificationTyping&&Sound.notificationTyping.resume(),Sound.pointCount&&Sound.pointCount.resume())};
Sound.stopSound=function(a){SOUND_DISABLED||Sound[a]&&Sound[a].stop()};Sound.playSoundOnce=function(a,b,d){SOUND_DISABLED||(b||(b=1),Sound.getFxAllowed()&&(Sound[a]=d?createjs.Sound.play(a,createjs.Sound.INTERRUPT_LATE,d,0,!1,b,0):createjs.Sound.play(a,createjs.Sound.INTERRUPT_LATE,0,0,!1,b,0)))};var a;Sound.playSpawnSound=function(b,d){if(!SOUND_DISABLED){if(GameFlags.LIMIT_SPAWN_SOUNDS){if(a&&30>Date.now()-a)return;a=Date.now()}if(d||GameFlags.BUBBLE_SOUND_AT_SPAWN_TIME)if(!d||GameFlags.BUBBLE_SOUND_AT_END_OF_ANIMATION)"t"===
b?d?Sound.playSoundOnce("techSpawnEnd",0.5):Sound.playSoundOnce("techSpawn",0.2):"d"===b?d?Sound.playSoundOnce("designSpawnEnd",0.5):Sound.playSoundOnce("designSpawn",0.2):"r"===b?d?Sound.playSoundOnce("researchSpawnEnd",0.5):Sound.playSoundOnce("researchSpawn",0.2):"e"===b?d?Sound.playSoundOnce("techSpawnEnd",0.5):Sound.playSoundOnce("techSpawn",0.2):"b"===b&&(d?Sound.playSoundOnce("bugSpawnEnd",0.12):Sound.playSoundOnce("bugSpawn",0.6))}};Sound.click=function(){SOUND_DISABLED||Sound.getFxAllowed()&&
(Sound.clickSound=createjs.Sound.play("clickSound",createjs.Sound.INTERRUPT_LATE,0,0,!1,0.5,0))};var b=!1;Sound.playJingle=function(){b=!0;SOUND_DISABLED||Sound._backgroundMusicIsPlaying||(Sound.setMasterVolume(Sound.getMasterVolume()),$("#splashScreen").is(":visible")?(Sound.GameDevTycoonTitle=createjs.Sound.play("GameDevTycoonTitle",null,0,0,!1,0.5,0),Sound.getMusicAllowed()||Sound.GameDevTycoonTitle.setMute(!0)):Sound.playBackgroundMusic())};Sound.playBackgroundMusic=function(){!SOUND_DISABLED&&
b&&(Sound._backgroundMusicIsPlaying=!0,Sound.setMasterVolume(Sound.getMasterVolume()),Sound.playBackgroundMusicIsCalled||(Sound.GameDevTycoonTitle&&Sound.GameDevTycoonTitle.stop(),Sound.changeBackgroundMusic(!0)),Sound.playBackgroundMusicIsCalled=!0)};Sound.startBackgroundMusic=function(a,b){SOUND_DISABLED||(Sound[Sound._currentBackgroundMusic]&&Sound[Sound._currentBackgroundMusic].stop(),Sound._currentBackgroundMusic=a,Sound[Sound._currentBackgroundMusic]=createjs.Sound.play(a,null,b,0,!1,0.15,0),
Sound[Sound._currentBackgroundMusic].onComplete=function(){Sound.changeBackgroundMusic()},Sound[Sound._currentBackgroundMusic].onPlayInterrupted=function(){Sound.changeBackgroundMusic()},Sound.getMusicAllowed()||Sound[Sound._currentBackgroundMusic].setMute(!0))};Sound.changeBackgroundMusic=function(a){if(!SOUND_DISABLED){for(var b=null;!b;){var d;GameManager.company?(d=GameManager.company.currentLevel,d=1==d?Sound._backgroundMusic.pickRandom():2==d?Sound._backgroundMusic.concat(Sound._backgroundMusic2).pickRandom():
3==d?Sound._backgroundMusic.concat(Sound._backgroundMusic2.concat(Sound._backgroundMusic3)).pickRandom():Sound._backgroundMusic.concat(Sound._backgroundMusic2.concat(Sound._backgroundMusic3.concat(Sound._backgroundMusic4))).pickRandom()):d=Sound._backgroundMusic.pickRandom();d!=Sound._currentBackgroundMusic&&(b=d)}a?Sound.startBackgroundMusic(b):Sound.startBackgroundMusic(b,9E3*Math.random())}};Sound.setMasterVolume=function(a,b){SOUND_DISABLED||(createjs.Sound.setVolume(a/100),b||DataStore.setValue("masterVolume",
a))};Sound.getMasterVolume=function(){return DataStore.getValue("masterVolume")};var c;Sound.getFxAllowed=function(){if(void 0===c){var a=DataStore.getValue("fxAllowed");return!0==a||"true"==a}return c};var d;Sound.getMusicAllowed=function(){if(void 0===d){var a=DataStore.getValue("allowBackgroundMusic");return!0==a||"true"==a}return d};Sound.allowFx=function(a){if(!SOUND_DISABLED){DataStore.setValue("fxAllowed",a);c=a;for(var b=0;b<Sound._fxTracks.length;b++)Sound[Sound._fxTracks[b]]&&Sound[Sound._fxTracks[b]].setMute(!a);
ghg4.ghg5("change soundfx settings",{setting:a?"on":"off"})}};Sound.allowMusic=function(a){SOUND_DISABLED||(DataStore.setValue("allowBackgroundMusic",a),d=a,Sound._currentBackgroundMusic?Sound[Sound._currentBackgroundMusic]&&Sound[Sound._currentBackgroundMusic].setMute(!a):Sound.GameDevTycoonTitle.setMute(!a),ghg4.ghg5("change music settings",{setting:a?"on":"off"}))}})();var CanvasManager={};
(function(){var a=CanvasManager;a.init=function(d){b(a,d)};var b=function(b,c){b.backgroundCanvas=document.createElement("canvas");b.backgroundCanvas.id="backgroundCanvas";b.backgroundCanvas.width=c.clientWidth;b.backgroundCanvas.height=c.clientHeight;b.backgroundCanvas.style.position="absolute";b.backgroundContext=b.backgroundCanvas.getContext("2d");b.backgroundStage=new createjs.Stage(b.backgroundCanvas);b.backgroundOverlayCanvas=document.createElement("canvas");b.backgroundOverlayCanvas.id="backgroundOverlayCanvas";
b.backgroundOverlayCanvas.width=c.clientWidth;b.backgroundOverlayCanvas.height=c.clientHeight;b.backgroundOverlayCanvas.style.position="absolute";b.backgroundOverlayContext=b.backgroundOverlayCanvas.getContext("2d");b.backgroundOverlayStage=new createjs.Stage(b.backgroundOverlayCanvas);b.characterCanvas=document.createElement("canvas");b.characterCanvas.id="characterCanvas";b.characterCanvas.width=c.clientWidth;b.characterCanvas.height=c.clientHeight;b.characterCanvas.style.position="absolute";b.characterContext=
b.characterCanvas.getContext("2d");b.characterStage=new createjs.Stage(b.characterCanvas);a.leftScreen!=b&&a.rightScreen!=b&&(b.foregroundCanvas=document.createElement("canvas"),b.foregroundCanvas.id="foregroundCanvas",b.foregroundCanvas.width=c.clientWidth,b.foregroundCanvas.height=c.clientHeight,b.foregroundCanvas.style.position="absolute",b.foregroundContext=b.foregroundCanvas.getContext("2d"),b.foregroundStage=new createjs.Stage(b.foregroundCanvas));b.backgroundInvalid=!1;b.invalidateBackground=
function(){b.backgroundInvalid=!0};b.updateCanvasSizes=function(g,k){maxW=2560;maxH=1440;PlatformShim.ISLOWRES&&(maxW=1366,maxH=768);g=k/maxH*maxW;$(c).width(g+"px").height(k+"px");b.backgroundCanvas.width=g;b.backgroundCanvas.height=k;b.invalidateBackground();b.backgroundOverlayCanvas.width=g;b.backgroundOverlayCanvas.height=k;b.characterCanvas.width=g;b.characterCanvas.height=k;b.foregroundCanvas&&(b.foregroundCanvas.width=g,b.foregroundCanvas.height=k);b.globalScale=k/maxH;b.globalScaleIgnoringLowResBackground=
k/1440;b===a?(a.leftScreen&&a.leftScreen.updateCanvasSizes(g,k),a.rightScreen&&a.rightScreen.updateCanvasSizes(g,k),$(c).css("left",g+"px")):b==a.rightScreen&&$(c).css("left",2*g+"px");b.isSmallScreen=1024>=g};c.appendChild(b.backgroundCanvas);c.appendChild(b.backgroundOverlayCanvas);c.appendChild(b.characterCanvas);b.foregroundCanvas&&c.appendChild(b.foregroundCanvas)};a.initLeftScreen=function(d){a.leftScreen={};b(a.leftScreen,d)};a.initRightScreen=function(d){a.rightScreen={};b(a.rightScreen,d)};
var c=function(a){a.backgroundStage&&(a.backgroundInvalid&&(a.backgroundStage.update(),a.backgroundInvalid=!1),a.backgroundOverlayStage.update(),a.characterStage.update(),a.foregroundStage&&a.foregroundStage.update())};a.update=function(b){a.backgroundStage&&(a.backgroundInvalid&&(a.backgroundStage.update(),a.backgroundInvalid=!1),!1!=CanvasManager.zone1Activ&&(SettingsGameplay.isFrameSkipEnabled()&&!b&&1!=GameManager._skipFrameCount||a.backgroundOverlayStage.update(),a.foregroundStage.update(),SettingsGameplay.isFrameSkipEnabled()&&
!b&&2!=GameManager._skipFrameCount||a.characterStage.update()),!1!=CanvasManager.zone0Activ&&a.leftScreen&&c(a.leftScreen),!1!=CanvasManager.zone2Activ&&a.rightScreen&&c(a.rightScreen))}})();
(function(){var a=GameManager;a.MAX_RND_COST=3E6;a.RND_DECREASE_PER_SPECIALIST=1E5;a.MAX_HW_COST=3E6;a.HW_DECREASE_PER_SPECIALIST=1E5;a.startProject=function(b){var d=b.targetZone,f={};"custom console"===b.id&&$.extend(f,b);$.extend(f,{id:b.id,name:b.name,progress:0,startPoints:b.pointsCost,remainingPoints:b.pointsCost,iconUri:b.iconUri,targetZone:d,startTime:GameManager.gameTime});0==d?(a.currentHwProject=f,VisualsManager.putConsoleToPedestal()):2==d&&(a.currentRnDProject=f,Tutorial.rndProjectStarted())};
a.finishProject=function(b){a.currentHwProject==b?a.currentHwProject=null:a.currentRnDProject==b&&(a.currentRnDProject=null);"custom console"===b.id?(a.finishCustomConsole(b),VisualsManager.putConsoleToPedestal()):(Research.bigProjects.first(function(a){return a.id==b.id}).complete(GameManager.company),ghg4.ghg5("project complete",{id:b.id}))};a.cancelProject=function(a){GameManager.currentHwProject==a&&(GameManager.currentHwProject=null,VisualsManager.putConsoleToPedestal());GameManager.currentRnDProject==
a&&(GameManager.currentRnDProject=null);VisualsManager.updateProjectStatusCards();var b=Research.bigProjects.first(function(b){return b.id==a.id});b&&b.cancel&&b.cancel(GameManager.company)};a.canDevelopConsole=function(){if(a.currentHwProject)return!1;var b=a.company;return b?b.flags.hwLabUnlocked:!1};a.finishCustomConsole=function(b){var d=GameManager.company;if(d){d.flags["console"+b.variation+"Used"]=!0;var f=d.getDate(d.currentWeek/GameManager.flags.gameLengthModifier),g=1.1,k=d.availablePlatforms.concat(d.licencedPlatforms).max(function(a){return a.techLevel}),
l=b.techLevel>=k,h=b.techLevel-k,g=g+h/5,k=b.qF,h=10*k-b.techLevel,g=g+(h/20).clamp(-0.2,0.2),h=b.features.map(function(a){return Research.getAllItems().first(function(b){return b.id===a})}).filter(function(a){return a.category!="Graphic".localize()}).sum(function(a){return a.v})/22,g=0.7*g+0.3*h;1<g&&(g=1+0.3*(g-1));for(var m=Platforms.allPlatforms.filter(function(a){return a.techLevel<=b.techLevel}).max(function(a){return a.startAmount}),m=m*g,n=Platforms.allPlatforms.filter(function(a){return a.techLevel<=
b.techLevel}).max(function(a){return Platforms.getMarketSizeForWeek(a,d.currentWeek+144,d)}),n=n/5E6*g,f={id:a.getGUID(),isCustom:!0,iconUri:b.iconUri,name:b.name,company:d.name,published:"{0}/{1}/{2}".format(f.year,f.month,f.week),developmentCosts:0,genreWeightings:GameManager.getCalculatedPlatformGenreWeightings(),audienceWeightings:GameManager.getCalculatedPlatformAudienceWeightings(),techLevel:b.techLevel,isGoodTech:l,featureFactor:h,startAmount:m,unitsSold:n,qF:k,successFactor:g,version:b.version},
g=d.licencedPlatforms.filter(function(a){return a.isCustom&&!a.saleCancelled}),l=0;l<g.length;l++)g[l].saleCancelled=!0;d.licencedPlatforms.push(f);Media.createConsoleStartStory(f);Tutorial.consoleReleased(1.4)}};var b=function(a,b,f){b===GameGenre.Action&&(a[0]+=f);b===GameGenre.Adventure&&(a[1]+=f);b===GameGenre.RPG&&(a[2]+=f);b===GameGenre.Simulation&&(a[3]+=f);b===GameGenre.Strategy&&(a[4]+=f);b===GameGenre.Casual&&(a[5]+=f)};a.getCalculatedPlatformGenreWeightings=function(){for(var c=[0.8,0.8,
0.8,0.8,0.8,0.8],d=[0,0,0,0,0,0],f=a.company.gameLog,g=0;g<f.length;g++)b(d,f[g].genre,1),f[g].secondGenre&&b(d,f[g].secondGenre,0.5);for(var f=d.slice().sort(function(a,b){return b-a}),k=[1,1,0.9,0.8,0.8,0.7],g=f.length-1;0<=g;g--)for(var l=0;l<d.length;l++)d[l]==f[g]&&(c[l]=k[g]);return c};a.getCalculatedPlatformAudienceWeightings=function(){for(var b=[0.8,0.8,0.8],d=[0,0,0],f=a.company.gameLog,g=0;g<f.length;g++)d["young"===f[g].targetAudience?0:"mature"===f[g].targetAudience?2:1]++;for(var f=
d.max(function(a){return a}),k=d.min(function(a){return a}),g=0;g<b.length;g++)b[g]=d[g]===f?1:d[g]===k?0.8:0.9;return b};a.getLabCostPerMonth=function(b){if(!GameManager.company)return 0;var d=0,f=1;0===b&&GameManager.company.flags.hwLabUnlocked?(d=GameManager.company.flags.hwBudget,f=a.getMaxHwBudget()):2==b&&GameManager.company.flags.rndLabUnlocked&&(d=GameManager.company.flags.rndBudget,f=a.getMaxRndBudget());return b=1E4*Math.floor(f*d/1E4)};a.calculateFractionalLabCosts=function(b){if(GameManager.company&&
0!==b){if(GameManager.company.flags.hwLabUnlocked){var d=a.getLabCostPerMonth(0);0!=d&&(d/=4*GameManager.SECONDS_PER_WEEK,GameManager.company.flags.fractionalHwLabCosts+=d/1E3*b)}GameManager.company.flags.rndLabUnlocked&&(d=a.getLabCostPerMonth(2),0!=d&&(d/=4*GameManager.SECONDS_PER_WEEK,GameManager.company.flags.fractionalRndLabCosts+=d/1E3*b))}};a.addTickListener(function(b){GameManager.company&&4===GameManager.company.currentLevel&&(GameManager.company.flags.hwLabUnlocked||GameManager.company.flags.rndLabUnlocked)&&
(a.calculateFractionalLabCosts(b),VisualsManager.updateProjectStatusCards());a.currentHwProject&&0.75<=a.currentHwProject.progress&&!a.currentHwProject.announceQ&&"custom console"===a.currentHwProject.id&&(a.currentHwProject.announceQ=!0,(b=DecisionNotifications.announceConsole.getNotification(a.company))&&a.company.notifications.push(b))},!0)})();
(function(){var a=GameManager;a.enableContracts=function(){var a=GameManager.company,c=2+2*a.getRandom(),d=a.gameLog.last(),f=8<=d.score?"I love your work".localize("contractDescrFragment"):5<=d.score?"I am impressed by your talent".localize("contractDescrFragment"):"I think you have potential".localize("contractDescrFragment"),d=new Notification("Contract Work".localize("heading"),"Hi there,\nI've just finished {0} and {1}.\nI'm in the contracting business and we could use skills like yours. If you are ever short on cash just let me know and I will see if I have some work for you.\nJason".localize("{1} is contractDescrFragment").format(d.title,
f));d.weeksUntilFired=c;d.setFlag("contractsEnabled",!0);a.notifications.push(d);Tutorial.contractsUnlocked(c)};a.enableMediumContracts=function(){var a=GameManager.company;if(!a.flags.mediumContractsScheduled){a.flags.mediumContractsScheduled=!0;var c=4+3*a.getRandom(),d=new Notification("Contract Work".localize("heading"),"Hi again,\nI heard that you've been very successful in the gaming business and are starting to grow your team.\nI've updated our client list, so if you are looking for some contract work let me know.\nJason{n}Medium sized contracts have been unlocked.".localize());
d.weeksUntilFired=c;d.setFlag("mediumContractsEnabled",!0);a.notifications.push(d)}};a.enableLargeContracts=function(a){var c=GameManager.company;if(!c.flags.largeContractsScheduled){c.flags.largeContractsScheduled=!0;var d=new Notification("Contract Work".localize("heading"),"Wow, I have seen some pictures of your new office! Cutting edge stuff!\nI'm sure you are doing very well but if you need to top up your budget I've a couple of big jobs that need to be taken care of.\nJason{n}Large contracts have been unlocked.".localize());
d.weeksUntilFired=a;d.setFlag("largeContractsEnabled",!0);c.notifications.push(d)}};a.contractFinished=function(a){for(var c=GameManager.company,d=c.staff,f=0;f<d.length;f++)d[f].state==CharacterState.WorkOnContract&&(d[f].state=CharacterState.Idle);c.flags.contractFinishedShown||(c.flags.contractFinishedShown=!0,a=a?"Jason here.\nI just got word from the client that the contract was completed successfully. Excellent work!".localize()+"\n":"Jason here.\nI see that the contract was not completed in time. Be careful what contracts you accept otherwise those penalties quickly add up.{n}Don't worry too much though, I don't hold grudges. If you want to try again let me know.".localize()+
"\n",c.notifications.push(new Notification("Contract Work".localize("heading"),a+"Usually I have new contracts every six months so check back some time.".localize(),"OK".localize(),0.3)))};a.startContract=function(b){var c=ProjectContracts.getAllContracts().first(function(a){return a.id===b.id});c.accept&&c.accept(a.company);c={};$.extend(c,b);if(b.requiredD||b.requiredT)c.isGenericContract=!0,c.remainingD=b.requiredD,c.remainingT=b.requiredT,c.visualDRemaining=b.requiredD,c.visualTRemaining=b.requiredT,
c.startTime=a.gameTime;a.currentContract=c;"gameContract"===c.type?(a.company.adjustCash(c.payment,"Up-front payment".localize("heading")),UI.updateStatusBar(a.company),a.transitionToState(State.CreateGame)):VisualsManager.startContract();GDT.fire(a,GDT.eventKeys.gameplay.contractStarted,{company:a.company,contract:a.currentContract})};a.contractCancelled=function(){var b=a.currentContract;a.currentContract=null;"gameContract"===b.type&&a.company.adjustCash(-b.payment,"Contract Refund".localize("heading"))};
a._setContractRequirements=function(b){var c=a.currentContract;b.flags.lockedSettings={};c.topic&&(b.topic=Topics.topics.first(function(a){return a.id==c.topic}),b.flags.lockedSettings.topic=!0);c.genre&&(b.genre=GameGenre.getAll().first(function(a){return a.id==c.genre}),b.flags.lockedSettings.genre=!0);c.secondGenre&&(b.secondGenre=GameGenre.getAll().first(function(a){return a.id==c.secondGenre}),b.flags.lockedSettings.secondGenre=!0);c.platform&&(b.platforms=[],b.platforms.push(GameManager.company.licencedPlatforms.first(function(a){return a.id==
c.platform})),b.flags.lockedSettings.platform=!0);c.gameAudience&&(b.targetAudience=c.gameAudience,b.flags.lockedSettings.targetAudience=!0);c.gameSize&&(b.gameSize=c.gameSize,b.flags.lockedSettings.gameSize=!0);b.flags.contractId=c.refNumber;b.flags.royaltyRate=c.royaltyRate};a.finishContract=function(b){var c=a.currentContract;a.currentContract=null;c.isGenericContract&&VisualsManager.gameStatusBar.finishContract();var d=ProjectContracts.getAllContracts().first(function(a){return a.id===c.id});
d&&d.complete&&d.complete(a.company,!b,c);GDT.fire(a,GDT.eventKeys.gameplay.contractFinished,{company:a.company,contract:c})};a.updateContractProgress=function(){var b=a.currentContract;b.weeksToFinish&&!a.company.currentGame&&(0>=b.visualDRemaining&&0>=b.visualTRemaining?a.finishContract():(b=(a.gameTime-b.startTime)/(b.weeksToFinish*a.SECONDS_PER_WEEK*1E3),1<=b?a.finishContract(!0):VisualsManager.gameStatusBar.updateProgress(1-b,!0,100)))}})();var GameDev={ResourceManager:{}};
(function(){rm=GameDev.ResourceManager;rm.resources={};rm.ensureResources=function(a,b){if(0==a.length)b();else{var c=new html5Preloader,d=!1;i=0;for(length=a.length;i<length;i++){var f=a[i];f&&!rm.resources[f]&&(c.addFiles(f),d=!0)}d?(c.onerror=function(a){alert(a)},c.onfinish=function(){i=0;for(length=a.length;i<length;i++){var d=a[i];rm.resources[d]||(rm.resources[d]=c.getFile(d))}b()}):b()}};rm.removeResources=function(a){for(var b=0;b<a.length;b++){var c=a[b];rm.resources.hasOwnProperty(c)&&
(rm.resources[c]=void 0)}}})();"use strict";var Booth=function(a,b,c,d,f,g,k,l){this.id=a;this.name=b;this.standFactor=c;this.description=d;this.cost=f;this.floorImage=g;this.bgImage=k;this.fgImage=l};"use strict";
var Company=function(a){this.name=a;this.timePlayed=0;this.currentGame=void 0;this.cash=0;this.cashLog=[];this.fansChange=this.fans=0;this.gameLog=[];this.trashedGames=[];this.notifications=[];this.activeNotifications=[];this.booths=[];this.booths.push(new Booth(1,"Small Booth".localize("heading"),0.3,"This is a small pop up stand where we can show our marketing material. It isn't very impressive but a common setup at the G3.".localize(),8E4,"./images/superb/boothFloor.png","./images/superb/boothSmallBg.png"));
this.booths.push(new Booth(2,"Medium Booth".localize("heading"),0.5,"This is a larger booth in a better location. We should expect more visitors with this booth and have space to give away demos of our games.".localize(),5E5,"./images/superb/boothFloor.png","./images/superb/boothMediumBg.png"));this.booths.push(new Booth(3,"Large Booth".localize("heading"),1.3,"With this package we get our own section in the main hall of the G3. We can expect a large number of visitors.".localize(),15E5,"./images/superb/boothFloor.png",
"./images/superb/boothLargeBg.png","./images/superb/boothLargeFg.png"));this.booths.push(new Booth(4,"Custom".localize("heading, as in Custom Booth"),2,"",0,"./images/superb/boothCustomFloor.png","./images/superb/boothCustom.png"));this.genres=[];this.topics=[];this.licencedPlatforms=[];this.availablePlatforms=[];this.currentWeek=0;this.currentLevel=1;this.conferenceHype=0;this.staff=[];this.maxStaff=1;this.staff.push(new Character({id:0,name:PlatformShim.getUserName(),dF:0.6,tF:0.6,speedF:0.6,qualityF:0.2,
researchF:0.6,salary:0,slot:0,working:!1,loopCount:-1}));this.researchPoints=0;this.scheduledStoriesShown=[];this.triggerNotificationsShown=[];this.tutorialMessagesShown=[];this.conferenceStandFactor=null;this.trainingEnabled=this.researchEnabled=!1;this.availableResearch=[];this.researchCompleted=[];this.engines=[];this.engineParts=[];this.specialItems=[];this.features=[];this.lastTopScore=this.topScoreAchievements=0;this.flags={secrecy:0,good:0,evil:0,nextGameHypeBonus:0};this.knowledge={};this.eventTriggerCounts=
{};this.mods=[]};
(function(){var a=Company.prototype;a.createNewGame=function(){var a=new Game(this);a.title="Game #".localize("followed by number")+(this.gameLog.length+1);this.flags.nextGameHypeBonus&&(a.hypePoints+=this.flags.nextGameHypeBonus,this.flags.nextGameHypeBonus=0);this.currentGame=a;for(var c=0;c<this.staff.length;c++)this.staff[c].flags.workload=0;this.currentGame.flags.featureResponsibility=$.extend({},this.flags.featureResponsibility);return a};a.getCurrentDate=function(){var a=Math.floor(this.currentWeek)%4+
1,c=Math.floor(this.currentWeek)/4,d=c/12+1;return{year:Math.floor(d),month:Math.floor(c%12+1),week:Math.floor(a)}};a.getDate=function(a){var c=Math.floor(a)%4+1;a=Math.floor(a)/4;var d=a/12+1;return{year:Math.floor(d),month:Math.floor(a%12+1),week:Math.floor(c)}};Company.getDate=a.getDate;a.calculateCurrentNofitications=function(){var a=[];this.notifications.addRange(Media.getNewNotifications(this));this.notifications.addRange(DecisionNotifications.getNewNotifications(this));for(var c=0;c<this.notifications.length;c++){var d=
this.notifications[c];0>=d.weeksUntilFired&&(this.activeNotifications.addRange(d.split()),a.push(d))}for(c=0;c<a.length;c++)d=a[c],this.notifications.splice(this.notifications.indexOf(d),1)};a.hasTopicWithId=function(a){return this.topics.some(function(c){return c.id===a})};a.canDevelopEngine=function(){return-1!=this.researchCompleted.indexOf(Research.CustomEngine)};a.getRandom=function(){this.randomCalled+=1;return this._mersenneTwister.random()};a.adjustFans=function(a){var c=this.fansChange?this.fansChange:
0;this.fansChange=0>this.fans+c+a?-this.fans:c+a};a.adjustCash=function(a,c){if(isNaN(a)){if(GameFlags.ghg6)throw"value cannot be NaN";}else this.cash+=a,c&&this.cashLog.push({amount:a,label:c})};a.adjustHype=function(a){this.currentGame&&(this.currentGame.hypePoints+=a)};a.canDevelopMediumGames=function(){return-1!=this.researchCompleted.indexOf(Research.MediumSizeGames)};a.canDevelopLargeGames=function(){return-1!=this.researchCompleted.indexOf(Research.LargeSizeGames)};a.canDevelopAAAGames=function(){return-1!=
this.researchCompleted.indexOf(Research.AAA)};a.canUseMultiGenre=function(){return-1!=this.researchCompleted.indexOf(Research.MultiGenre)};a.canDevelopMultiPlatform=function(){return-1!=this.researchCompleted.indexOf(Research.MultiPlatform)};a.canDevelopMMOGames=function(){return-1!=this.researchCompleted.indexOf(Research.MMO)};a.isMMOInSale=function(){var a=this.currentWeek;return 0<this.gameLog.filter(function(c){return a>c.releaseWeek&&0<c.currentSalesCash&&!c.soldOut&&c.flags.mmo}).length};a.canSetTargetAudience=
function(){return-1!=this.researchCompleted.indexOf(Research.TargetAudience)};a.getGameById=function(a){return this.gameLog.first(function(c){return c.id===a})};a.getPossibleGamesForSequel=function(){var a=this.gameLog.filter(function(a){return null!=a.sequelTo}).map(function(a){return a.sequelTo});return this.gameLog.filter(function(c){return-1==a.indexOf(c.id)})};a.getPossibleGamesForPack=function(){return this.gameLog.filter(function(a){return!0===a.flags.mmo&&!a.soldOut})};a.isCurrentlyDevelopingGame=
function(){return null!=this.currentGame&&0!=this.currentGame.costs&&!this.currentGame.releaseWeek};a.isGameProgressBetween=function(a,c){return null!=this.currentGame&&(!c||GameManager.getCurrentGameProgress()<c)&&(!a||GameManager.getCurrentGameProgress()>a)};a.isLaterOrEqualThan=function(a,c,d){var f=this.getCurrentDate();return f.year>a||f.year===a&&f.month>c||f.year===a&&f.month===c&&f.week>=d};a.isEarlierOrEqualThan=function(a,c,d){var f=this.getCurrentDate();return f.year<a||f.year===a&&f.month<
c||f.year===a&&f.month===c&&f.week<=d};a.getBestSeller=function(){var a=this.gameLog.slice().sort(function(a,b){return b.unitsSold-a.unitsSold}).first();return a?a:null};a.getLatestCustomConsole=function(){return this.licencedPlatforms.last(function(a){return a.isCustom&&!a.saleCancelled})};Company.load=function(a){var c=new Company;c.uid=a.uid;c.uid||(c.uid=GameManager.getGUID());c.name=a.name;c.timePlayed=a.timePlayed;c.slot=a.slot;c.cash=a.cash;c.cashLog=a.cashLog;c.fans=a.fans;c.fansChange=a.fansChange;
c.flags=a.flags;c.flags||(c.flags={});c.conferenceStandFactor=a.conferenceStandFactor;c.notifications=a.notifications.map(function(a){return Notification.load(a)});c.activeNotifications=a.activeNotifications.map(function(a){return Notification.load(a)});c.genres=a.genres.map(function(a){return Genres.load(a)});c.licencedPlatforms=a.licencedPlatforms.map(function(a){return PlatformsSerializer.load(a)});c.availablePlatforms=a.availablePlatforms.map(function(a){return PlatformsSerializer.load(a)});c.staff=
a.staff.map(function(a){return Character.load(a)});c.maxStaff=a.maxStaff;c.maxStaff||(c.maxStaff=1);c.currentWeek=a.currentWeek;c.topics=a.topics.map(function(a){return TopicsSerializer.load(a)});c.tutorialMessagesShown=a.tutorialMessagesShown;c.tutorialMessagesShown||(c.tutorialMessagesShown=[]);c.triggerNotificationsShown=a.triggerNotificationsShown?a.triggerNotificationsShown:[];c.researchPoints=a.researchPoints;c.researchEnabled=a.researchEnabled;c.trainingEnabled=a.trainingEnabled;var d=Research.getAllItems();
c.availableResearch=a.availableResearch.map(function(a){return d.first(function(b){return b.id===a})}).filter(function(a){return a});c.researchCompleted=a.researchCompleted.map(function(a){return d.concat(Research.bigProjects).first(function(b){return b.id===a})}).filter(function(a){return a});c.engines=a.engines.map(function(a){return EngineSerializer.load(a)});c.engineParts=a.engineParts.map(function(a){return EnginePartsSerializer.load(a)}).filter(function(a){return a});c.specialItems=[];a.specialItems&&
(c.specialItems=a.specialItems.map(function(a){return FeatureSerializer.load(a)}).filter(function(a){return a}));c.features=a.features.map(function(a){return FeatureSerializer.load(a)}).filter(function(a){return a});c.topScoreAchievements=a.topScoreAchievements;c.lastTopScore=a.lastTopScore;a.previousTopScore&&(c.previousTopScore=a.previousTopScore);a.lastTopScoreWeek&&(c.lastTopScoreWeek=a.lastTopScoreWeek);a.lastTopScoreGameSize&&(c.lastTopScoreGameSize=a.lastTopScoreGameSize);c.lastTopScoreIncrease=
a.lastTopScoreIncrease;c.scheduledStoriesShown=a.scheduledStoriesShown;c.currentLevel=a.currentLevel;c.currentLevel||(c.currentLevel=1);c.currentGame=Game.load(a.currentGame,c);a.gameLog&&(c.gameLog=a.gameLog.map(function(a){return Game.load(a,c)}));a.trashedGames&&(c.trashedGames=a.trashedGames.map(function(a){return Game.load(a,c)}));a.rndCrew&&(c.rndCrew=a.rndCrew.map(function(a){return new ProjectWorkerVisual(a)}));a.hwCrew&&(c.hwCrew=a.hwCrew.map(function(a){return new ProjectWorkerVisual(a)}));
a.levelOverlay&&(c.levelOverlay=a.levelOverlay);c.conferenceHype=a.conferenceHype?a.conferenceHype:0;c.seed=a.seed;c.seed||(c.seed=Math.floor(65535*Math.random()));c.randomCalled=a.randomCalled;c._mersenneTwister=new MersenneTwister(c.seed);for(var f=0;f<c.randomCalled;f++)c._mersenneTwister.random();c.knowledge=a.knowledge;c.knowledge||(c.knowledge={});c.eventTriggerCounts=a.eventTriggerCounts;c.eventTriggerCounts||(c.eventTriggerCounts={});c.mods=a.mods;return c};a.save=function(){var a={};a.uid=
this.uid;a.name=this.name;a.timePlayed=this.timePlayed;a.slot=this.slot;a.cash=this.cash;a.cashLog=this.cashLog;a.fans=this.fans;a.fansChange=this.fansChange;a.flags=this.flags;a.conferenceStandFactor=this.conferenceStandFactor;a.notifications=this.notifications.map(function(a){return a.save()});a.activeNotifications=this.activeNotifications.map(function(a){return a.save()});a.genres=this.genres.map(function(a){return a.save()});a.licencedPlatforms=this.licencedPlatforms.map(function(a){return PlatformsSerializer.save(a)});
a.availablePlatforms=this.availablePlatforms.map(function(a){return PlatformsSerializer.save(a)});a.staff=this.staff.map(function(a){return a.save()});a.maxStaff=this.maxStaff;this.currentGame&&(a.currentGame=this.currentGame.save());a.currentWeek=this.currentWeek;a.gameLog=this.gameLog.map(function(a){return a.save()});a.trashedGames=this.trashedGames.map(function(a){return a.save()});a.topics=this.topics.map(function(a){return TopicsSerializer.save(a)});a.tutorialMessagesShown=this.tutorialMessagesShown;
a.scheduledStoriesShown=this.scheduledStoriesShown;a.triggerNotificationsShown=this.triggerNotificationsShown;a.researchPoints=this.researchPoints;a.researchEnabled=this.researchEnabled;a.trainingEnabled=this.trainingEnabled;a.availableResearch=this.availableResearch.map(function(a){return a.id});a.researchCompleted=this.researchCompleted.map(function(a){return a.id});a.engines=this.engines.map(function(a){return EngineSerializer.save(a)});a.engineParts=this.engineParts.map(function(a){return EnginePartsSerializer.save(a)});
a.specialItems=this.specialItems.map(function(a){return FeatureSerializer.save(a)});a.features=this.features.map(function(a){return FeatureSerializer.save(a)});a.topScoreAchievements=this.topScoreAchievements;a.lastTopScore=this.lastTopScore;a.previousTopScore=this.previousTopScore;a.lastTopScoreWeek=this.lastTopScoreWeek;a.lastTopScoreGameSize=this.lastTopScoreGameSize;a.lastTopScoreIncrease=this.lastTopScoreIncrease;this.rndCrew&&(a.rndCrew=this.rndCrew.map(function(a){return a.save()}));this.hwCrew&&
(a.hwCrew=this.hwCrew.map(function(a){return a.save()}));a.currentLevel=this.currentLevel;a.conferenceHype=this.conferenceHype;a.seed=this.seed;a.randomCalled=this.randomCalled;VisualsManager.levelOverlay&&(a.levelOverlay=VisualsManager.levelOverlay.saveState());a.knowledge=this.knowledge;a.eventTriggerCounts=this.eventTriggerCounts;a.mods=this.mods;return a}})();"use strict";
var Game=function(a){this.id=GameManager.getGUID();this.topic=this.genre=this.title=void 0;this.platforms=[];this.engine=void 0;this.state=GameState.notStarted;this.gameSize="small";this.targetAudience="everyone";this.missionLog=[];this.salesCashLog=[];this.featureLog=null;this.score=0;this.reviews=[];this.topSalesRank=this.currentSalesRank=this.initialSalesRank=this.fansChanged=this.fansChangeTarget=this.releaseWeek=this.amountSold=this.totalSalesCash=this.currentSalesCash=this.designPoints=this.freeBugCount=
this.bugs=this.technologyPoints=this.hypePoints=this.costs=0;this.researchFactor=1;this.revenue=0;this.flags={};this.soldOut=!1;a.conferenceHype&&(this.hypePoints=a.conferenceHype,a.conferenceHype=Math.floor(a.conferenceHype/3))};
(function(){var a=Game.prototype;a.isOnSale=function(){return 0<this.nextSalesCash};a._saveMissionLog=function(){return this.missionLog.map(function(a){return a.id})};a._loadMissionLog=function(a){var c=Missions.getAllMissions();this.missionLog=a.map(function(a){return c.first(function(b){return b.id===a})})};a.getSalesAnomaly=function(){this.flags.salesAnomaly||(this.flags.salesAnomaly=0);var a=SalesEvents.getSaleRecord(GameManager.company,this);if(a)return this.flags.salesAnomaly++,a;if(this.flags.interviewHyped&&
2<=this.salesCashLog.length&&!this.flags.interviewHyped.done)return this.flags.interviewHyped.done=!0,SalesEvents.getHypedGameEvent(GameManager.company,this);GameManager.company.canSetTargetAudience()&&!this.flags.audienceMismatchShown&&3<=this.salesCashLog.length&&0.8>Platforms.getAudienceWeighting(this.platforms,this.targetAudience)&&(this.flags.audienceMismatchShown=!0,Media.generateAudienceMismatchStory(GameManager.company,this));if(!(3>=this.salesCashLog.length)){if(this.flags.topScore&&(a=SalesEvents.getTopScoreSalesEvent(GameManager.company,
this)))return a;if(!(7>=this.salesCashLog.length||this.flags.salesAnomaly>(10<=this.score?3:8<=this.score?2:1)||10!=this.score||this.flags.earlySalesEvent)&&(a=SalesEvents.getEarlySalesEvents(GameManager.company,this)))return this.flags.salesAnomaly++,this.flags.earlySalesEvent=!0,a}};a.getGenreDisplayName=function(){return this.secondGenre?this.genre.name+"-"+this.secondGenre.name:this.genre.name};a.save=function(){var a={};a.title=this.title;a.id=this.id;this.genre&&(a.genre=this.genre.id);this.secondGenre&&
(a.secondGenre=this.secondGenre.id);this.topic&&(a.topic=this.topic.id);this.platforms&&(a.platforms=this.platforms.map(function(a){return{id:a.id}}));a.gameSize=this.gameSize;a.targetAudience=this.targetAudience;a.sequelTo=this.sequelTo;a.hypePoints=this.hypePoints;a.technologyPoints=this.technologyPoints;a.bugs=this.bugs;a.freeBugCount=this.freeBugCount;a.designPoints=this.designPoints;a.costs=this.costs;a.score=this.score;a.reviews=this.reviews;a.currentSales=this.currentSalesCash;a.totalSales=
this.totalSalesCash;a.amountSold=this.unitsSold;a.salesLog=this.salesCashLog;a.maintenanceLog=this.maintenanceLog;a.nextMaintenance=this.nextMaintenance;a.missionLog=this._saveMissionLog();a.currentSalesRank=this.currentSalesRank;a.fansChangeTarget=this.fansChangeTarget;a.fansChanged=this.fansChanged;a.initialSalesRank=this.initialSalesRank;a.releaseWeek=this.releaseWeek;a.state=this.state;a.topSalesRank=this.topSalesRank;a.packReleaseWeek=this.packReleaseWeek;a.researchFactor=this.researchFactor;
this.featureLog&&(a.featureLog=this.featureLog.map(function(a){return CompanyFeatureSerializer.save(a)}));this.engine&&(a.engine_id=this.engine.id);this.features&&(a.features=this.features.map(function(a){return{id:a.id}}));this.reviewMessageDisplayed&&(a.reviewMessageDisplayed=this.reviewMessageDisplayed);a.flags=this.flags;a.nextSR=this.nextSalesRank;a.nFC=this.nextfansChange;a.nS=this.nextSalesCash;a.so=this.soldOut;a.revenue=this.revenue;this.confAmount&&(a.confAmount=this.confAmount);return a};
Game.load=function(a,c){if(a){var d=new Game(c);d.title=a.title;d.id=a.id;d.id||(d.id=GameManager.getGUID());void 0!=a.genre&&(d.genre=GameGenre.getAll().first(function(d){return d.id===a.genre}));void 0!=a.secondGenre&&(d.secondGenre=GameGenre.getAll().first(function(d){return d.id===a.secondGenre}));void 0!=a.topic&&(d.topic=Topics.topics.first(function(d){return d.id===a.topic}));void 0!=a.platforms&&(d.platforms=a.platforms.map(function(a){var b=Platforms.allPlatforms.first(function(b){return b.id===
a.id});b||(b=c.licencedPlatforms.first(function(b){return b.id===a.id}));return b}));d.gameSize=a.gameSize;d.targetAudience=a.targetAudience;d.sequelTo=a.sequelTo;d.hypePoints=a.hypePoints;d.technologyPoints=a.technologyPoints;d.bugs=a.bugs;d.freeBugCount=a.freeBugCount;d.designPoints=a.designPoints;d.score=a.score;d.reviews=a.reviews;d.costs=a.costs;d.currentSalesCash=a.currentSales;d.totalSalesCash=a.totalSales;d.unitsSold=a.amountSold;void 0!=a.salesLog&&(d.salesCashLog=a.salesLog);void 0!=a.maintenanceLog&&
(d.maintenanceLog=a.maintenanceLog);a.nextMaintenance&&(d.nextMaintenance=a.nextMaintenance);a.packReleaseWeek&&(d.packReleaseWeek=a.packReleaseWeek);d._loadMissionLog(a.missionLog);d.currentSalesRank=a.currentSalesRank;d.fansChangeTarget=a.fansChangeTarget;d.fansChanged=a.fansChanged;d.initialSalesRank=a.initialSalesRank;d.releaseWeek=a.releaseWeek;d.state=a.state;d.topSalesRank=a.topSalesRank;d.unitPrice=a.unitPrice?a.unitPrice:Sales.getUnitPrice(d);d.researchFactor=a.researchFactor;d.featureLog=
null;a.featureLog&&(d.featureLog=a.featureLog.map(function(a){return CompanyFeatureSerializer.load(a)}).filter(function(a){return a}));a.engine_id&&(d.engine=c.engines.first(function(d){return d.id===a.engine_id}));a.features&&(d.features=a.features.map(function(a){return FeatureSerializer.load(a)}).filter(function(a){return a}));a.reviewMessageDisplayed&&(d.reviewMessageDisplayed=a.reviewMessageDisplayed);d.flags=a.flags;d.flags||(d.flags={});d.nextSalesRank=a.nextSR;d.nextfansChange=a.nFC;d.nextSalesCash=
a.nS;a.so?d.soldOut=a.so:d.currentSalesCash>=d.totalSalesCash&&0!=d.currentSalesCash&&(d.soldOut=!0);d.revenue=a.revenue?a.revenue:Math.floor(d.unitsSold*d.unitPrice);a.confAmount&&(d.confAmount=a.confAmount);return d}};a.getRatioWorked=function(a){a=a.id;return this.flags.devTime&&this.flags.staffContribution.hasOwnProperty(a)?this.flags.staffContribution[a]/this.flags.devTime:0};a.isStaffResponsibilityEnabled=function(){return"small"!=this.gameSize};a.canDoPostMortem=function(){var a=this.id;return!this.flags.postMortemCompleted&&
this.releaseWeek<GameManager.company.currentWeek&&GameManager.company.getDate(this.releaseWeek).year>GameManager.company.getCurrentDate().year-2&&!GameManager.company.staff.some(function(c){return c.flags.postMortemGameId==a})}})();"use strict";var GameState={notStarted:0,concept:1,development:2,publishing:3,released:4};"use strict";
var GameGenre={Action:{id:"Action",name:"Action".localize("genre")},Adventure:{id:"Adventure",name:"Adventure".localize("genre")},RPG:{id:"RPG",name:"RPG".localize("genre")},Simulation:{id:"Simulation",name:"Simulation".localize("genre")},Strategy:{id:"Strategy",name:"Strategy".localize("genre")},Casual:{id:"Casual",name:"Casual".localize("genre")},getAll:function(){return[this.Action,this.Adventure,this.RPG,this.Simulation,this.Strategy,this.Casual]},getGoldenRatio:function(a,b){if(b)return(2*GameGenre.getGoldenRatio(a)+
GameGenre.getGoldenRatio(b))/3;if(a===GameGenre.Action)return 1.8;if(a===GameGenre.Adventure)return 0.4;if(a===GameGenre.RPG)return 0.6;if(a===GameGenre.Simulation)return 1.6;if(a===GameGenre.Strategy)return 1.4;if(a===GameGenre.Casual)return 0.5;throw"unknown genre: "+a;},getGenreWeighting:function(a,b,c){if(void 0===a)return 1;if(c)return(GameGenre.getGenreWeighting(a,c)+2*GameGenre.getGenreWeighting(a,b))/3;if(b===GameGenre.Action)return a[0];if(b===GameGenre.Adventure)return a[1];if(b===GameGenre.RPG)return a[2];
if(b===GameGenre.Simulation)return a[3];if(b===GameGenre.Strategy)return a[4];if(b===GameGenre.Casual)return a[5];throw"unknown genre: "+b;},getIndexOf:function(a){var b=GameGenre.getAll().first(function(b){return b.id==a.id});return GameGenre.getAll().indexOf(b)}};"use strict";var Genre=function(a){this.name=a};(function(){Genre.load=function(a){return new Genre(a.name)};Genre.prototype.save=function(){var a={};a.name=this.name;return a}})();var GameTrends={};
(function(){var a=GameTrends;a.getCurrentTrendFactor=function(a){var d=b(GameManager.company).currentTrend;if(!d)return 1;if("genre"===d.type){if(a.genre.id==d.genre)return 1.2}else if("newTopics"===d.type){var c=a.topic.id;if(0===GameManager.company.gameLog.count(function(a){return a.topic.id===c}))return 1.2}else if("audience"===d.type){if(a.targetAudience===d.audience)return 1.2}else if("strangeCombos"===d.type)return a=GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre),1===a?0.85:0.9===
a?1.1:0.8===a?1.2:1.4;return 1};var b=function(a){a.flags.trends||(a.flags.trends={},c(a));return a.flags.trends},c=function(a){var b=a.flags.trends;b.expireBy=GameManager.gameTime+(24+12*a.getRandom())*GameManager.SECONDS_PER_WEEK*1E3;if(1!=a.currentLevel){var c=b.currentTrend;b.currentTrend=null;if(null===c&&0.5<=a.getRandom()){var l=a.getRandom();0.5>=l?(l=General.getAvailableGenres(a).pickRandom(),b.currentTrend={type:"genre",genre:l.id,label:"Popular genre: ".localize()+l.name}):0.7>=l?b.currentTrend=
{type:"newTopics",label:"Popular: New topics".localize()}:0.95>=l?a.canSetTargetAudience()&&(l=["young","everyone","mature"].pickRandom(),b.currentTrend={type:"audience",audience:l,label:"Strong audience: ".localize()+General.getAudienceLabel(l)}):0.96<=l&&(b.currentTrend={type:"strangeCombos",strength:1,label:"Trend: Strange combinations".localize()})}d(a,c,b.currentTrend)}},d=function(a,b,d){var c;if(b&&!d)c=["It seems that the market has normalized again with no particular strong trends at the moment.".localize()].pickRandom();
else if(d)switch(d.type){case "genre":b=General.getAvailableGenres(a).first(function(a){return a.id===d.genre});c=["It seems that {0} games are especially popular at the moment.".localize(),"There is a clear trend towards {0} games recently.".localize()].pickRandom().format(b.name);break;case "newTopics":c="It seems that the market responds particularly well to games with new topics at the moment.".localize();break;case "audience":c="";break;case "strangeCombos":c="Analysts have observed a strange trend lately where players around the world seem to have developed a curious taste for unusual games.{n}As one player put it: 'Sometimes you just want to play something unique. A game based on an idea that's not the usual Military/Action game or Fantasy/RPG just to name two examples.\nI really hope companies bring some unique games to market soon. I would definitely prefer them right now.'{n}This new trend promises to bring an interesting challenge to game developers as topic/genre combinations which used to work well will suddenly be less favorable while more outlandish ideas might flourish.".localize()}c&&
a.notifications.push(new Notification("Market Analysis".localize("heading"),c))};a.updateTrends=function(a){b(a).expireBy<=GameManager.gameTime&&c(a)}})();"use strict";var Notification=function(a,b,c,d){1===arguments.length&&arguments[0].constructor=={}.constructor?($.extend(this,arguments[0]),this.buttonText||(this.buttonText="OK".localize()),void 0===this.weeksUntilFired&&(this.weeksUntilFired=0)):(this.header=a,this.text=b,this.buttonText=c?c:"OK".localize(),this.weeksUntilFired=d?d:0)};
(function(){Notification.load=function(a){return new Notification(a)};var a=Notification.prototype;a.save=function(){var a={};$.extend(a,this);return a};a.split=function(){var a=[],c=this.text,c=c?c.split("{n}"):"";if(1>=c.length)return[this];if(1<c.length)for(var d=0;d<c.length;d++){var f={};$.extend(f,this);f.text=c[d];this.buttonText instanceof Array&&(f.buttonText=this.buttonText[d]);this.image&&this.image instanceof Array&&(f.image=this.image.length>d?this.image[d]:this.image.last());(f.sourceId||
f.options)&&d!=c.length-1&&(f.sourceId=null,f.options=null);f=new Notification(f);a.push(f)}return a};a.adjustCash=function(a,c){this.actions||(this.actions=[]);this.actions.push({type:"adjustCash",data:{amount:a,label:c}})};a.adjustHype=function(a){this.actions||(this.actions=[]);this.actions.push({type:"adjustHype",data:{amount:a}})};a.adjustFans=function(a){this.actions||(this.actions=[]);this.actions.push({type:"adjustFans",data:{amount:a}})};a.setFlag=function(a,c){this.actions||(this.actions=
[]);this.actions.push({type:"setFlag",data:{key:a,value:c}})};a.activateAchievement=function(a){this.actions||(this.actions=[]);this.actions.push({type:"achivement",data:{id:a.id}})};a.applyActions=function(a){if(this.actions)for(var c=0;c<this.actions.length;c++){var d=this.actions[c];switch(d.type){case "adjustCash":a.adjustCash(d.data.amount,d.data.label);break;case "adjustFans":a.adjustFans(d.data.amount);break;case "setFlag":a.flags[d.data.key]=d.data.value;break;case "adjustHype":a.adjustHype(d.data.amount);
break;case "achivement":d=Achievements.getWidthId(d.data.id);Achievements.activate(d);break;default:if(GameFlags.ghg6)throw new "unknown type: "+d.type;}}}})();"use strict";
var SaveGameData=function(a,b,c,d,f,g,k){this.slot=a;this.companyName=b;this.cash=c;this.fans=d;this.currentWeek=f;this.saveTime=g;this.mods=k},SPAWN_POINTS_DURATION=1200,ON_FIRE_DURATION=5E3,BOOST_RECHARGE_DURATION=45E3,EFFICIENCY_RECHARGE_DURATION=9E4,CharacterState={Idle:"Idle",Working:"Working",Researching:"Researching",CreateEngine:"CreateEngine",WorkOnContract:"WorkOnContract",Training:"Training",Vacation:"Vacation"},CharacterOrientation={NW:"NW",NE:"NE",SW:"SW",SE:"SE"},Character=function(a){this.state=
a.state?a.state:CharacterState.Idle;this.id=a.id;this.slot=a.slot;this.slot||(this.slot=0);this.name=a.name;this.designFactor=a.dF;this.technologyFactor=a.tF;this.workAnimations=["typing","thinking","drawNotepad"];this.idleAnimations=["sitBack"];this.working=a.working;void 0===this.working&&(this.working=!1);this.speedFactor=a.speedF;this.qualityFactor=a.qualityF;this.researchFactor=a.researchF;this.salary=a.salary;this.engineProgress=a.engineProgress;this.contractProgress=a.contractProgress;this.bugFixingDelta=
a.bugFixingDelta;this.relaxDelta=0;a.relaxDelta&&(this.relaxDelta=a.relaxDelta);this.currentFeature=this.currentResearch=null;this.experience=a.experience?a.experience:LevelCalculator.getXpForLevel(5*this.qualityFactor);this.onFire=!1;this.boostRechargeProgress=this.maxBoostLevel=0;void 0!=a.onFire&&(this.onFire=a.onFire);void 0!=a.maxBoostLevel&&(this.maxBoostLevel=a.maxBoostLevel);a.boostRechargeProgress&&(this.boostRechargeProgress=a.boostRechargeProgress);void 0!=a.boostLevel&&(this.boostLevel=
a.boostLevel);this.efficiency=1;void 0!=a.efficiency&&(this.efficiency=a.efficiency);this.flags={};a.flags&&(this.flags=a.flags);this.currentAnimation=a.currentAnimation?a.currentAnimation:null;this.nextAnimation=a.nextAnimation?a.nextAnimation:null;a.currentFeature&&(this.currentFeature=a.currentFeature);this.spawnedPoints=[];a.spawnedPoints&&(this.spawnedPoints=a.spawnedPoints.map(function(a){return SpawnedPointsSerializer.load(a)}));this.visualData=a.visual;this.sex=a.sex;this.dLeft=a.dLeft?a.dLeft:
0;this.tLeft=a.tLeft?a.tLeft:0;this.rLeft=a.rLeft?a.rLeft:0};
(function(){Character.BASE_SALARY_PER_LEVEL=1E4;Character.load=function(a){return new Character(a)};var a=Character.prototype;a.getLevelF=function(){return LevelCalculator.getLevelFractional(this.experience)};a.getLevel=function(){return LevelCalculator.getLevel(this.experience)};a.getResearchSkillPoints=function(){return Math.floor(500*this.researchFactor)};a.getDesignSkillPoints=function(){return Math.floor(500*this.designFactor)};a.getTechnologySkillPoints=function(){return Math.floor(500*this.technologyFactor)};
a.getSpeedSkillPoints=function(){return Math.floor(500*this.speedFactor)};a.getOrientation=function(){var a=GameManager.company.currentLevel;if(1===a)return CharacterOrientation.NW;if(2===a||3===a||4==a)return 0===this.slot||1===this.slot||3===this.slot||5===this.slot?CharacterOrientation.NW:CharacterOrientation.SE};a.refreshPoints=function(){for(var a=VisualsManager.getCharacterOverlay(this),c=0;c<this.spawnedPoints.length;c++){var d=this.spawnedPoints[c],f=void 0;if(f="br"===d.type?a.spawnBugRemovePoint(d.id,
d.type,d.duration):a.spawnPoint(d.id,d.type,d.duration))for(var g=0;g<f.length;g++)f[g].setPosition(GameManager.gameTime-d.gameTime)}};a.isIdle=function(){return this.state===CharacterState.Idle};a.canStartResearch=function(){return this.isIdle()};a.save=function(){var a={};a.id=this.id;a.state=this.state;a.name=this.name;a.dF=this.designFactor;a.tF=this.technologyFactor;a.speedF=this.speedFactor;a.qualityF=this.qualityFactor;a.experience=this.experience;a.researchF=this.researchFactor;a.salary=this.salary;
a.engineProgress=this.engineProgress;a.contractProgress=this.contractProgress;a.bugFixingDelta=this.bugFixingDelta;a.relaxDelta=this.relaxDelta;a.slot=this.slot;a.working=this.working;a.currentAnimation=this.currentAnimation;a.nextAnimation=this.nextAnimation;a.onFire=this.onFire;a.maxBoostLevel=this.maxBoostLevel;a.boostRechargeProgress=this.boostRechargeProgress;a.boostLevel=this.boostLevel;a.efficiency=this.efficiency;a.flags=this.flags;this.currentFeature&&(a.currentFeature=this.currentFeature);
this.spawnedPoints&&(a.spawnedPoints=this.spawnedPoints.map(function(a){return SpawnedPointsSerializer.save(a)}));a.visual=VisualsManager.getCharacterOverlay(this).saveState();a.sex=this.sex;a.dLeft=this.dLeft;a.tLeft=this.tLeft;a.rLeft=this.rLeft;return a};a.adjustBoostRechargeProgress=function(a){this.boostRechargeProgress=(this.boostRechargeProgress+a).clamp(0,1)};a.getMaxEfficiency=function(){return 1};a.adjustEfficiency=function(a){this.efficiency=(this.efficiency+a).clamp(0.001,this.getMaxEfficiency())};
a.tick=function(){this.lastUpdate||(this.lastUpdate=GameManager.gameTime);var a=GameManager.gameTime-this.lastUpdate,c=!0;0!=this.id&&!this.onFire&&this.flags.nextVacation<GameManager.gameTime&&(this.flags.needsVacation=!0,this.adjustEfficiency(-a/EFFICIENCY_RECHARGE_DURATION),Tutorial.needsAHoliday(),c=!1);1!=this.efficiency&&c&&this.adjustEfficiency(a/EFFICIENCY_RECHARGE_DURATION);this.isIdle()&&(GameManager.currentFeature&&1>GameManager.currentFeature.progress&&null===this.currentFeature?(this._resetBugFixingWork(),
this._calcFeature(),this.state=CharacterState.Working,this.working=!0):GameManager.currentFeature&&1>GameManager.currentFeature.progress?(this.state=CharacterState.Working,this.working=!0):GameManager.currentEngineDev?(this._resetEngineWork(),this.state=CharacterState.CreateEngine,this.working=!0):GameManager.currentContract&&GameManager.currentContract.isGenericContract&&(this._resetContractWork(),this.state=CharacterState.WorkOnContract,this.working=!0));this.state===CharacterState.Working?this._doWork(a):
this.state===CharacterState.Researching?this._doResearch(a):this.state===CharacterState.CreateEngine?this._doEngineWork(a):this.state===CharacterState.WorkOnContract?this._doContractWork(a):this.state===CharacterState.Vacation&&(this._doRelax(a),"sitBack"===this.currentAnimation&&(c=VisualsManager.getCharacterOverlay(this),0.5<c.sitBackAnimation.alpha&&(c.sitBackAnimation.alpha=Math.max(c.sitBackAnimation.alpha-a/3E3,0.5))));this.onFire&&"thinking"!=this.currentAnimation?(c=this.boostRechargeProgress-
a/ON_FIRE_DURATION,0>=c?void 0!=this.boostLevel&&0<this.boostLevel?(this.boostLevel--,this.boostRechargeProgress=1-c):(VisualsManager.getCharacterOverlay(this).setOnFire(!1),this.boostLevel=0,this.onFire=!1):this.boostRechargeProgress=c):this.maxBoostLevel>this.boostLevel&&1>this.boostRechargeProgress&&(c=a/BOOST_RECHARGE_DURATION,this.state===CharacterState.Idle&&(c*=0.5),c=this.boostRechargeProgress+c,1!=this.boostRechargeProgress&&1<=c&&(this.boostLevel?this.boostLevel++:this.boostLevel=1,c=0),
this.boostRechargeProgress=c.clamp(0,1));this.state!=CharacterState.Vacation&&"sitBack"===this.currentAnimation&&(c=VisualsManager.getCharacterOverlay(this),1>c.sitBackAnimation.alpha&&(c.sitBackAnimation.alpha=Math.min(c.sitBackAnimation.alpha+a/3E3,1)));this.lastUpdate=GameManager.gameTime};a.getBoostFactor=function(){if(!this.onFire)return 1;var a=this.boostLevel;a||(a=1);return 1+0.25*(a+1)};a.startAnimations=function(){var a=VisualsManager.getCharacterOverlay(this,!0);a&&(this.currentAnimation=
"sitBack",this.loopCount=1,a.startSitBackLoop())};a.startWorking=function(){this.working=!0};a.endWorking=function(){this.working=!1};a.playNextAnimation=function(){this.currentAnimation=this.nextAnimation;this.nextAnimation=void 0;var a=VisualsManager.getCharacterOverlay(this,!0);a&&("typing"===this.currentAnimation?a.startTyping():"thinking"===this.currentAnimation?a.startThinking():"drawNotepad"===this.currentAnimation&&a.startDrawNotepad())};a.playRandomIdleAnimation=function(){var a=VisualsManager.getCharacterOverlay(this,
!0);a&&(this.currentAnimation="sitBack",a.startSitBack())};a.activateBoost=function(){this.onFire=!0;VisualsManager.getCharacterOverlay(this).setOnFire(!0)};a.loopEnded=function(){if(0<VisualsManager.characterOverlays.length){var a=VisualsManager.getCharacterOverlay(this,!0);if(a)if("typing"===this.currentAnimation)if(!1===this.working)GameManager.workEnded(this),a.endTyping();else if(GameManager.IsAnimationSwitchAllowed(this)){for(;;)if(this.nextAnimation=this.workAnimations.pickRandom(),"thinking"===
this.nextAnimation&&!this.onFire){var c=0.3-(0.25*this.speedFactor).clamp(0,0.25);if(GameManager.company.getRandom()<c)break}else if("drawNotepad"===this.nextAnimation&&0.5<GameManager.company.getRandom())break;else if("typing"===this.nextAnimation){this.nextAnimation=void 0;a.continueTyping();return}a.endTyping()}else a.continueTyping();else"thinking"===this.currentAnimation?(this.nextAnimation="typing",a.endThinking()):"sitBack"===this.currentAnimation?!0===this.working?(this.nextAnimation="typing",
a.endSitBack()):(GameManager.workEnded(this),a.continueSitBack()):"drawNotepad"===this.currentAnimation&&(this.nextAnimation="typing",a.endDrawNotepad())}};a.animationEnded=function(a){this.currentAnimation===a&&(this.working?(this.nextAnimation||(this.nextAnimation="typing"),this.playNextAnimation()):(this.playRandomIdleAnimation(),GameManager.workEnded(this)))};a._doResearch=function(a){if("thinking"!=this.currentAnimation&&!(0>=a||!1===this.isWorking())){a-=a/2*(1-this.efficiency);var c=this.currentResearch,
d=a/c.duration,d=d*this.getBoostFactor();c.isTraining&&this._doTraining(c,a);GameManager.increaseResearchProgress(this,d)}};a.finishTraining=function(a){this.flags.lastTrainingTimestamp=GameManager.gameTime;this.flags.secondLastTrainingId=this.flags.lastTrainingId;this.flags.lastTrainingId=a.id};a._doTraining=function(a,c){var d=GameManager.company,f=Training.getAllTrainings().first(function(d){return d.id===a.id});if(f)if(f.tick)f.tick(this,c);else{var g=[];if(void 0===this.currentResearch.lastSpawnTick)this.currentResearch.lastSpawnTick=
0;else{var k=a.duration*a.progress;if(2E3<=k-a.lastSpawnTick){a.lastSpawnTick=k;k=this.efficiency*this.getBoostFactor();if(!this.onFire){this.flags.lastTrainingTimestamp&&this.flags.lastTrainingTimestamp>GameManager.gameTime-1E4*GameManager.SECONDS_PER_WEEK?k-=0.2:(this.flags.lastTrainingId=null,this.flags.secondLastTrainingId=null);this.flags.secondLastTrainingId===f.id&&(k-=0.1);this.flags.lastTrainingId===f.id&&(k-=0.3);var l=d.gameLog.last();d.currentWeek>l.releaseWeek+22&&(k-=0.2)}var k=Math.max(0.3,
k),h=f.basePoints*k,k=Math.floor(f.tF*h*d.getRandom()),l=Math.floor(f.dF*h*d.getRandom()),m=Math.floor(f.rF*h*d.getRandom()),h=Math.floor(f.sF*h*d.getRandom());d.getRandom();f=f.maxP/500;d=d.getRandom();k&&(this.technologyFactor+k/500<=f||0.1>d)&&g.push({p:k,t:"t"});l&&(this.designFactor+l/500<=f||0.1>d)&&g.push({p:l,t:"d"});m&&(this.researchFactor+m/500<f||0.1>d)&&(g.push({p:m,t:"r"}),"specialTraining"===a.type&&this.spawnPoints(m,"r"));h&&(this.speedFactor+h/500<f||0.1>d)&&g.push({p:h,t:"s"});VisualsManager.getCharacterOverlay(this,
!0).animateTrainingProgress(g)}}}};a.applyTrainingUpdate=function(a){var c=a.p/500;switch(a.t){case "t":this.technologyFactor+=c;break;case "d":this.designFactor+=c;break;case "s":this.speedFactor+=c;break;case "r":this.researchFactor+=c}};a._resetEngineWork=function(){this.engineProgress={points:0,research:0}};a._resetContractWork=function(){this.contractProgress={d:0,t:0,r:0}};a._resetBugFixingWork=function(){this.bugFixingDelta=0};a.getCurrentQualityFactor=function(){var a=0.3;if(0===this.id){var c=
LevelCalculator.getLevel(this.experience);1==c?a+=0.3:2==c?a+=0.2:3==c&&(a+=0.1)}a+=this.qualityFactor;return 1<a?1+0.5*(a-1):a};a._doEngineWork=function(a){if("thinking"!=this.currentAnimation&&!(0>=a||!1===this.isWorking())){a/=Missions.BASE_ENGINE_DURATION;var c=Missions.BASE_POINTS*this.getCurrentQualityFactor()*a*this.efficiency,c=c*this.getBoostFactor(),d=this.engineProgress.points;this.engineProgress.points+=c;Math.floor(this.engineProgress.points)>Math.floor(d)&&(c=Math.floor(this.engineProgress.points)-
Math.floor(d),GameManager.currentEngineDev.remainingPoints<c&&(c=GameManager.currentEngineDev.remainingPoints),0!=c?this.spawnPoints(c,"e"):0===GameManager.currentEngineDev.remainingPoints&&0>=GameManager.currentEngineDev.remainingPointsDisplay&&this.endWorking());c=this.engineProgress.research;this.engineProgress.research+=Missions.BASE_RESEARCH_POINTS/2*this.researchFactor*a*this.efficiency;Math.floor(this.engineProgress.research)>Math.floor(c)&&(c=Math.floor(this.engineProgress.research)-Math.floor(c),
0!=c&&this.spawnPoints(c,"r"))}};a._doContractWork=function(a){if("thinking"!=this.currentAnimation&&this.isWorking){var c=GameManager.currentContract,d=GameManager.company;if(c&&d){a/=Missions.BASE_ENGINE_DURATION;a=Missions.BASE_POINTS*this.getCurrentQualityFactor()*a*this.efficiency;a/=2;var f=0<c.requiredD-c.spawnedD,g=0<c.requiredT-c.spawnedT;if(f||g){f&&g||(a+=0.4*a);if(f){var k=a*this.designFactor,k=k+0.2*k*d.getRandom(),f=this.contractProgress.d;this.contractProgress.d+=k;Math.floor(this.contractProgress.d)>
Math.floor(f)&&(f=Math.floor(this.contractProgress.d)-Math.floor(f),c.remainingD<f&&(f=c.remainingD),0!=f&&(this.spawnPoints(f,"d"),c.remainingD-=f,c.spawnedD+=f))}g&&(g=a*this.technologyFactor,g+=0.2*g*d.getRandom(),f=this.contractProgress.t,this.contractProgress.t+=g,Math.floor(this.contractProgress.t)>Math.floor(f)&&(f=Math.floor(this.contractProgress.t)-Math.floor(f),c.remainingT<f&&(f=c.remainingT),0!=f&&(this.spawnPoints(f,"t"),c.remainingT-=f,c.spawnedT+=f)));d=a*this.researchFactor/6;c.rF&&
(d*=c.rF);f=this.contractProgress.r;this.contractProgress.r+=d;Math.floor(this.contractProgress.r)>Math.floor(f)&&(f=Math.floor(this.contractProgress.r)-Math.floor(f),0!=f&&this.spawnPoints(f,"r"))}else this.endWorking()}else this.endWorking()}};a.isWorking=function(){if("typing"===this.currentAnimation||"drawNotepad"===this.currentAnimation)return!0;if(this.working&&"sitBack"===this.currentAnimation){var a=VisualsManager.getCharacterOverlay(this,!0);a&&a.continueSitBack()}return!1};a._doRelax=function(a){"sitBack"===
this.currentAnimation&&(this.relaxDelta+=a,10<this.relaxDelta*this.speedFactor&&(this.relaxDelta=0,this.flags.relaxGained+=0.001,this.adjustEfficiency(0.001),this.efficiency===this.getMaxEfficiency()&&0.3<=this.flags.relaxGained&&(this.state=CharacterState.Idle)))};a._doWork=function(a){if(GameManager.currentFeature){var c=this.currentFeature;void 0===c.startTime&&(c.startTime=GameManager.gameTime,c.progress=0);var d=GameManager.company;if("thinking"===this.currentAnimation&&1===GameManager.staffCountWorkingOnFeature(this.currentFeature)||
"sitBack"===this.currentAnimation)c.startTime+=a;else if("BugFixing"===c.id)this._doFinishingWork(d,a);else{var f=this.getBoostFactor(),f=this.onFire?(f-1)/2:0,g=0.44+0.5*this.getCurrentQualityFactor().clamp(0,1),k=GameManager.gameTime-c.startTime;if(!(0>=k)&&(k/=c.duration,0!=k&&1!=this.currentFeature.progress&&(1<k&&(a-=c.duration*(k-1)),k=Math.min(k,1),c.progress=k,1>=k))){var l=this.efficiency;var h=GameManager.staffCountWorkingOnFeature(c),m=General.getOptimalTeamSize(GameManager.company.currentGame),
h=(m/h).clamp(0,1);a=a*l*(1===m?h:0.5+0.5*h);c.currentDf+=c.d/c.duration*a;c.currentTf+=c.t/c.duration*a;c.currentRf+=c.r/c.duration*a;a=Math.floor(c.currentDf);l=Math.floor(c.currentTf);m=Math.floor(c.currentRf);if(a>c.currentD&&("thinking"!=this.currentAnimation&&1>k||1===k)){for(h=0;h<a-c.currentD;h++)d.getRandom()>g?this.spawnPoints(1,"b",200*h):(this.spawnPoints(1,"d",200*h),this._chanceToSpawnRandombug(d,200*(h+1))),d.getRandom()<f&&this.spawnPoints(1,"d",250*h);this.dLeft-=a-c.currentD;c.currentD=
a}if(l>c.currentT&&("thinking"!=this.currentAnimation&&1>k||1===k)){for(h=0;h<l-c.currentT;h++)d.getRandom()>g?this.spawnPoints(1,"b",180*(h+1)):(this.spawnPoints(1,"t",180*(h+1)),this._chanceToSpawnRandombug(d,180*(h+1))),d.getRandom()<f&&this.spawnPoints(1,"t",220*(h+1));this.tLeft-=l-c.currentT;c.currentT=l}if(m>c.currentR&&("thinking"!=this.currentAnimation&&1>k||1===k)){for(h=0;h<m-c.currentR;h++)this.spawnPoints(1,"r",160*h),d.getRandom()<f&&this.spawnPoints(1,"r",190*h);this.rLeft-=m-c.currentR;
c.currentR=m}}}}};a._doFinishingWork=function(a,c){var d=a.currentGame,f=1/(this.technologyFactor+this.designFactor)*this.designFactor;if(!(0>=c||!1===this.isWorking()))if(a.currentGame.flags.finished)0>=GameManager.spawnedPoints&&GameManager.finishCurrentMission();else if(this.bugFixingDelta+=c,!(500>this.bugFixingDelta*this.speedFactor)){this.bugFixingDelta=0;var g=1*this.efficiency;0!==d.bugs||d.flags.bugsFixedTimestamp||(d.flags.bugsFixedTimestamp=GameManager.gameTime);if(0<d.bugs&&0.9>a.getRandom()){if(a.currentGame.bugs-
GameManager.spawnedPoints<=g&&(g=a.currentGame.bugs-GameManager.spawnedPoints),0<g)for(var k=0;k<g;k++){this.spawnPoints(1,"br");var l=d.bugs-d.freeBugCount;0<d.freeBugCount&&(0>=l||0.5<a.getRandom())?d.freeBugCount--:(0.3>a.getRandom()||this.onFire)&&a.getRandom()<this.getCurrentQualityFactor().clamp(0,1)&&(a.getRandom()<f?this.spawnPoints(1,"d"):this.spawnPoints(1,"t"))}}else if(g=0.44+0.5*this.getCurrentQualityFactor().clamp(0,1),k=(0.5*this.getCurrentQualityFactor()*this.getBoostFactor()).clamp(0,
1)/2,a.getRandom()<k)if(a.getRandom()>g)this.spawnPoints(1,"b"),d.freeBugCount++;else if(d.flags.bugsFixedTimestamp?(g=GameManager.gameTime-d.flags.bugsFixedTimestamp,k=1E4*General.getGameSizePointsFactor(d),k=g<k/2?1:Math.max(0,k-g)/(k/2)):k/=8,0===k)0<d.hypePoints&&d.hypePoints--;else if(1===k||a.getRandom()<k)a.getRandom()<f?this.spawnPoints(1,"d"):this.spawnPoints(1,"t")}};a._chanceToSpawnRandombug=function(a,c){var d=0.05+0.6*Math.max(0,(General.getEffectiveWorkload(this,a.currentGame)-100)/
100);a.getRandom()<d&&(this.spawnPoints(1,"b",c),a.currentGame.freeBugCount++)};a.spawnPoints=function(a,c,d){for(var f=VisualsManager.getCharacterOverlay(this),g=0;g<a;g++){"e"===c&&GameManager.increaseEnginePoints();var k={gameTime:GameManager.gameTime,type:c,duration:SPAWN_POINTS_DURATION,delay:d};k.id=Math.floor(65535*Math.random());for(var l=[],h=0;h<this.spawnedPoints.length;h++)this.spawnedPoints[h].gameTime+this.spawnedPoints[h].duration<=GameManager.gameTime&&l.push(this.spawnedPoints[h]);
for(h=0;h<l.length;h++)this.spawnedPoints.remove(l[h]);this.spawnedPoints.push(k);"br"===k.type?f.spawnBugRemovePoint(k.id,k.type,k.duration,d):f.spawnPoint(k.id,k.type,k.duration,d)}};a.removeSpawnedPoint=function(a){var c=this.spawnedPoints.first(function(d){return d.id===a});c&&this.spawnedPoints.remove(c)};a.resetLeftOverPoints=function(){this.rLeft=this.tLeft=this.dLeft=0};a._calcFeature=function(){var a=GameManager,c=a.currentFeature,d=General.getD(a.company.currentGame,c)*this.designFactor*
this.getCurrentQualityFactor(),d=d+this.dLeft;0!==this.id&&1>d&&0.6<d&&(d=1);var f=General.getT(a.company.currentGame,c)*this.technologyFactor*this.getCurrentQualityFactor(),f=f+this.tLeft;0!==this.id&&1>f&&0.6<f&&(f=1);a=General.getR(a.company.currentGame,c)*this.researchFactor;a+=this.rLeft;console.log("feature:{0}, d:{1} t:{2}".format(c.id,d,f));this.dLeft=d-Math.floor(d*c.progress);this.tLeft=f-Math.floor(f*c.progress);this.rLeft=a-Math.floor(a*c.progress);this.currentFeature={id:c.id,type:c.type,
d:d,t:f,r:a,currentD:Math.floor(d*c.progress),currentT:Math.floor(f*c.progress),currentR:Math.floor(a*c.progress),currentDf:0,currentTf:0,currentRf:0,duration:c.duration,progress:c.progress}};a.goOnVacation=function(){this.relaxDelta=0;this.state=CharacterState.Vacation;this.working=!1;this.currentFeature=this.currentResearch=null;this.resetLeftOverPoints();var a=54;GameFlags.G782&&15<=GameManager.company.getCurrentDate().year&&(a=20);this.flags.nextVacation=GameManager.gameTime+a*GameManager.SECONDS_PER_WEEK*
1E3;this.flags.relaxGained=0;this.flags.needsVacation=!1};a.fire=function(){var a=GameManager.company;a.staff.remove(this);a.flags.usedNames||(a.flags.usedNames=[]);a.flags.usedNames.push(this.name);VisualsManager.removeStaff(this)}})();var LOGWEEKSALES=!1,General={};
(function(){General.updateNotifications=function(a){for(var b=0;b<a.notifications.length;b++)a.notifications[b].weeksUntilFired-=0.1};General.proceedOneWeek=function(a,b){var d=a.currentWeek;b&&(d=b);if(0<d){var c=a.getDate(d);4<c.year&&GameManager.ghg2()?a.notifications.push(new Notification("{TrialEnd}")):c.year>30*GameManager.flags.gameLengthModifier&&!a.flags.endGameShown&&(Media.createFinishGameStories(),a.flags.endGameShown=!0);Sales.processSales(a);1===c.week&&(General.payMonthlyCosts(a),Sales.sellSDKs(a),
Sales.applyGridSales(a));GameTrends.updateTrends(a);1<a.currentLevel&&5===c.month&&1===c.week&&7<c.year?GameFlags.CONFERENCE_DISABLED||(a.flags.customConference?(c=a.booths.first(function(a){return 4===a.id}),a.conferenceStandFactor=c.standFactor,a.flags.customConference=!1,a.notifications.push(new Notification("News".localize("heading"),"Our own game convention is taking place in 4 weeks!".localize())),a.flags.isCustomConference=!0,a.flags.customConference=!1):a.notifications.push(new Notification("{BoothPicker}"))):
6===c.month&&2===c.week&&a.conferenceStandFactor&&!GameFlags.CONFERENCE_DISABLED&&General.runConference(a);GDT.fire(GameManager,GDT.eventKeys.gameplay.weekProceeded,{company:a})}for(c=0;c<Platforms.allPlatforms.length;c++){var h=Platforms.allPlatforms[c];Platforms.getPublishDate(h)===Math.floor(d)&&(0===h.licencePrize?a.licencedPlatforms.push(h):a.availablePlatforms.push(h),0<Math.floor(d)&&(a.activeNotifications.push(new Notification("{PlatformReleaseNews}",h.id,"OK".localize())),a.flags.contractspublisher&&
(a.flags.contractspublisher.expireBy=GameManager.gameTime-1)))}General.checkAndRemoveRetiredPlatforms(a,a.licencedPlatforms,d);General.checkAndRemoveRetiredPlatforms(a,a.availablePlatforms,d);LOGWEEKSALES&&General.logMaxSalesForWeek(d)};General.getWeekFromDateString=function(a,b){var d=a.split("/");if(3!=d.length)return 0;d=48*(d[0]-1)+4*(d[1]-1)+(d[2]-1);if(!b){var c=GameManager.flags.gameLengthModifier;c&&1!=c&&(d=Math.round(d*c))}return d};General.logMaxSalesForWeek=function(a){GameManager.pause(!0);
var b=new Company("SalesLogCompany");b.currentWeek=a;var d=new Game(b);d.topic=Topics.topics[0];d.genre=GameGenre.Action;for(var c=GameManager.company.availablePlatforms.concat(GameManager.company.licencedPlatforms),h=0;h<c.length;h++)0<Platforms.getMarketSizeForWeek(c[h],a,b)&&(d.platforms=[],d.platforms.push(c[h]));"Sales week {0}".format(a).log();for(h=1;11>h;h++)d.score=h,Sales.calculateSales(b,d),"score {0}, income {2}".format(d.score,d.unitsSold,d.totalSalesCash).log();GameManager.resume(!0)};
General.checkAndRemoveRetiredPlatforms=function(a,b,d){for(var c=0;c<b.length;c++){var h=b[c];Platforms.getRetireDate(h)===Math.floor(d)+8&&a.activeNotifications.push(new Notification("News".localize("heading"),"In two months the {0} will be taken off the market!".localize().format(h.name)));if(Platforms.getRetireDate(h)===Math.floor(d)){for(var m=0,n=0,p=0;p<a.gameLog.length;p++){var q=a.gameLog[p];!q.flags.isExtensionPack&&0<q.platforms.filter(function(a){return a.id===h.id}).length&&(m++,n+=q.revenue)}0<
m?1==m?a.activeNotifications.push(new Notification("News".localize("heading"),"{0} is no longer supported.\nYou've released {1} game for the platform and earned a total of {2}!".localize().format(h.name,m,UI.getShortNumberString(n)))):a.activeNotifications.push(new Notification("News".localize("heading"),"{0} is no longer supported.\nYou've released {1} games for the platform and earned a total of {2}!".localize().format(h.name,m,UI.getShortNumberString(n)))):a.activeNotifications.push(new Notification("News".localize("heading"),
"{0} is no longer supported.".localize().format(h.name)))}}};General.runConference=function(a){var b=a.fans,d=a.getCurrentDate().year,c=Math.floor(49876+47500*d),h=Math.floor(0.005*c),d=h,b=(b/5E5).clamp(0,1),m=Math.floor(c*b*0.7),n=Math.floor(c*a.conferenceStandFactor*0.3),d=d+m+n,d=Math.floor(d.clamp(0,c)),p=d/c,b=Math.floor(Math.abs(200*p-199));"conference. attendees: {0}, booth visitors: {1}({2}min+{3}fans+{4}stand), booth-rank: {5}".format(c,d,h,m,n,b).log();c=Math.floor(10+20*a.getRandom()+
100*p);a.currentGame&&(a.currentGame.hypePoints+=c,"hype points generated for current game: {0}".format(c).log());c="We had {0} people visiting our booth this year.".localize().format(UI.getLongNumberString(d));c=100<b?c+("\n"+"We didn't make it in the top 100 booths this year. Once we gain more fans I'm sure we will!".localize()):1===b||0===b?c+("\n"+"We were voted the number one booth this year! Congratulations!".localize()):c+("\n"+"We made it into the top 100 conference attractions this year at place {0}.".localize().format(b));
a.notifications.push(new Notification("{GameConferenceAnimation}","",d,0));a.flags.isCustomConference&&(c="Our convention had {0} visitors this year!".localize().format(UI.getLongNumberString(d)),a.flags.isCustomConference=!1);a.notifications.push(new Notification("Game Conference".localize("heading"),c,"OK".localize(),0))};General.getMonthlyCosts=function(a){var b=8E3;2===a.currentLevel||3===a.currentLevel?b*=4:4===a.currentLevel&&(b*=8);a.flags.solarPowerInstalled&&(b*=0.8);for(var d=0;d<a.staff.length;d++)a.staff[d].salary&&
(b+=a.staff[d].salary);return b};General.payMonthlyCosts=function(a){var b=General.getMonthlyCosts(a);a.cash-=b;a.cashLog.push({amount:-b,label:"monthly costs".localize("heading")});a.currentGame&&(a.currentGame.costs+=b);a.flags.creditCardStolen&&!a.flags.creditCardSwitched&&a.adjustCash(-Math.floor(a.flags.creditCardDamages/3),"MSCDPN_88");4<=a.currentLevel&&(a.flags.fractionalHwLabCosts&&(a.adjustCash(-a.flags.fractionalHwLabCosts,"Hardware lab".localize()),a.flags.fractionalHwLabCosts=0),a.flags.fractionalRndLabCosts&&
(a.adjustCash(-a.flags.fractionalRndLabCosts,"R&D lab".localize()),a.flags.fractionalRndLabCosts=0))};General.releaseGame=function(a){var b=a.currentGame;GDT.fire(GameManager,GDT.eventKeys.gameplay.beforeReleaseGame,{company:a,game:b});b.state=GameState.released;b.releaseWeek=Math.floor(a.currentWeek)+1;for(var d=0;d<a.staff.length;d++){var c=a.staff[d];b.flags.staffContribution.hasOwnProperty(c.id)&&(c.flags.gamesContributed||(c.flags.gamesContributed=0),c.flags.gamesContributed+=b.getRatioWorked(c))}Tutorial.gameReleased();
Reviews.reviewGame(a);Sales.calculateSales(a,b);0===a.gameLog.length&&(a.researchEnabled=!0,a.availableResearch.addRange(Research.BasicItems),Tutorial.firstGameFinished(b.releaseWeek-a.currentWeek+0.4));a.gameLog.push(b);a.flags.contractsEnabled||3<=a.gameLog.length&&GameManager.enableContracts();a.flags.featureResponsibility=$.extend({},b.flags.featureResponsibility);a.currentGame=null;GameManager.currentContract&&"gameContract"==GameManager.currentContract.type&&GameManager.finishContract(!(b.score>=
GameManager.currentContract.minScore));b.flags.miniBailoutAmount&&DecisionNotifications.inDevBailout.triggerPayBack(b,b.releaseWeek-a.currentWeek);"ghg141kph"==b.title&&(a.flags.ghg141=!0);"ghgnogfc"==b.title&&(a.flags.ghgnogfc=!0);GDT.fire(GameManager,GDT.eventKeys.gameplay.afterReleaseGame,{company:a,game:b})};General.trashGame=function(a){var b=a.currentGame;a.trashedGames.push(a.currentGame);a.flags.featureResponsibility=$.extend({},b.flags.featureResponsibility);a.currentGame=null;GameManager.currentContract&&
"gameContract"==GameManager.currentContract.type&&GameManager.finishContract(!0);b.flags.miniBailoutAmount&&DecisionNotifications.inDevBailout.triggerPayBack(b,0)};General.getAvailableEngineParts=function(a){return a.canDevelopEngine()?[Research.TwoDGraphicsV2,Research.linearStory,Research.saveGame].concat(Research.getAllItems().except(Research.StartEngineParts.concat(Research.BasicItems)).filter(function(b){return 0!=Research.getEnginePoints(b)&&0!=Research.getEngineCost(b)&&-1!=a.researchCompleted.indexOf(b)})):
[]};General.hasEnginePart=function(a,b){return a.parts.some(function(a){return a.id===b.id})};General.getResponsibleStaffFactor=function(a,b,d){var c=1,h=a.currentGame;if(h.flags.featureResponsibility&&h.flags.featureResponsibility.hasOwnProperty(b.id)){var m=h.flags.featureResponsibility[b.id];a=a.staff.first(function(a){return a.id===m});if(!a)return 0.7;h=General.getEffectiveWorkload(a,h);d="d"===d?a.designFactor:a.technologyFactor;c=0.5+0.5*d.clamp(0,1)+0.1*d;a.flags.expert===b.id&&(c+=0.15*d);
b=(h/100-1).clamp(-1,1);c=0<b?c-0.75*c*b:c-0.25*c*-b}return c};General.getEffectiveWorkload=function(a,b){var d=a.flags.workload;return 100/(300/General.getOptimalTeamSize(b))*d};var a=function(a,d,c){var l=GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre),h=General.getMission(d.id),m=0;if("focus"!=d.type){if(GameFlags.ghg6)throw"separate features in workLog not implemented";return 0}if("preparation"===h.missionType||"BugFixing"===h.missionType)m=Missions.BASE_POINTS/2;else{m=
Missions.BASE_POINTS*Missions.getGeneralFactor(GameManager.company,h);m+=General.getGameBasePoints(a)/9;m*="d"==c?h.designFactor:h.technologyFactor;m*=h.percentage/(100/3);d=0;for(var n=a.features.filter(function(a){return a.category===h.id}),p=0;p<n.length;p++){var q=b(n[p],a,h);q&&!isNaN(q)&&(d+=q)}if(isNaN(d))throw"invalid featureBonus value";d*=General.getFeatureEfficiencyFromMissionFocus(a,n,h.percentage)/100;m=(m+d)*General.getResponsibleStaffFactor(GameManager.company,h,c)}return m*l},b=function(a,
b,d){d=1;a.getEfficiency&&(d=a.getEfficiency(b));return a.v*LevelCalculator.getLevelBonusFactor(a.experience)*d*0.8};General.getFeatureEfficiencyFromMissionFocus=function(a,b,d){var c=100;0<b.length&&(c=(100/(5*b.sum(function(a){return a.v})*("aaa"==a.gameSize?0.4:"large"==a.gameSize?0.7:1))*d).clamp(0,100));return c};General.getD=function(b,d){return a(b,d,"d")};General.getT=function(b,d){return a(b,d,"t")};General.getR=function(a,b){if("focus"===b.type){var d=General.getMission(b.id),c=0;if("preparation"===
d.missionType||"BugFixing"===d.missionType)return 0;c=Missions.BASE_RESEARCH_POINTS*GameManager.company.currentGame.researchFactor;c+=c*GameManager.company.getRandom()*0.1;d.percentage&&(c*=d.percentage/(100/3));c*=this.getGameSizePointsFactor(a);for(d=1;d<GameManager.company.staff.length;d++)c*=0.95;for(d=0;d<GameManager.company.researchPoints/200;d++)c*=0.95;return c}if("feature"===b.type)return General.getFeature(b.id),0};General.getDuration=function(a,b){var d=0;"focus"===b.type?(d=General.getMission(b.id),
d="preparation"===d.missionType?Missions.PREP_DURATION:"BugFixing"===d.missionType?Missions.FINISH_DURATION:void 0!=d.percentage?3*Missions.BASE_DURATION/100*d.percentage:Missions.BASE_DURATION):"feature"===b.type&&(d=General.getFeature(b.id),d=Research.getDuration(d));return d*this.getGameSizeDurationFactor(a.gameSize)*General.getMultiPlatformDurationFactor(a)};General.getGameSizeDurationFactor=function(a){return"small"===a?GameFlags.SMALL_GAME_DURATION_FACTOR:"medium"===a?GameFlags.MEDIUM_GAME_DURATION_FACTOR:
"large"===a?GameFlags.LARGE_GAME_DURATION_FACTOR:"aaa"===a?GameFlags.AAA_GAME_DURATION_FACTOR:1};General.getMultiPlatformDurationFactor=function(a,b){var d=a.platforms,c=1,h=1;a.engine&&void 0==b&&a.engine.parts.first(function(a){return"MultiPlatformOptimized"==a.id})&&(h=0.5);for(var m=1;m<d.length;m++)c*=1+(GameFlags.MULTIPLATFORM_DURATION_FACTOR-1)*h;return c};General.getMultiPlatformCostFactor=function(a){if(1>=a.platforms.length)return 1;var b=1;a.engine&&a.engine.parts.first(function(a){return"MultiPlatformOptimized"==
a.id})&&(b=0.5);return General.getMultiPlatformDurationFactor(a,!0)*b};General.getGameSizePointsFactor=function(a){return"small"===a.gameSize?GameFlags.SMALL_GAME_POINTS_FACTOR:"medium"===a.gameSize?GameFlags.MEDIUM_GAME_POINTS_FACTOR:"large"===a.gameSize?GameFlags.LARGE_GAME_POINTS_FACTOR:"aaa"===a.gameSize?GameFlags.AAA_GAME_POINTS_FACTOR:1};General.getFeature=function(a){return Research.getAllItems().first(function(b){return b.id===a})};General.getMission=function(a){return Missions.getAllMissions().first(function(b){return b.id===
a})};General.notificationShown=function(a,b){a.applyActions(GameManager.company);void 0!=b&&General.broadCastNofificationComplete(a,b)};var c=[];General.registerAsNotificationSource=function(a){c.push(a)};General.broadCastNofificationComplete=function(a,b){if(a.sourceId)for(var d=0;d<c.length;d++){var l=c[d].getAllNotificationsObjects().first(function(b){return b.id===a.sourceId});if(l){l.complete&&l.complete(b);break}}};General.getAvailableFeaturesForConsole=function(){return General.getAvailableEngineParts(GameManager.company).filter(function(a){return a.consolePart})};
General.getAvailableProjects=function(a,b){return Research.bigProjects.filter(function(d){return d.targetZone==b&&d.canResearch(a)})};General.getTopicOrder=function(a){if(!GameFlags.RANDOMIZE_TOPICS)return Topics.topics;var b=Topics.topics,d=b.slice(0,0),b=b.slice(0);for(a=new MersenneTwister(a.seed);0<b.length;){var c=Math.floor(a.random()*b.length);d.push(b[c]);b.splice(c,1)}return d};General.getTopicsAvailableForResearch=function(a){for(var b=[],d=General.getTopicOrder(a),c=0;c<d.length;c++){var h=
d[c],m=-1!=a.topics.indexOf(h),n=0<GameManager.currentResearches.filter(function(a){return a.topicId===h.id}).length;m||n||b.length<Research.TOPICS_VISIBLE&&b.push(h)}return b};General.getAudienceWeightinIndex=function(a){return"young"===a?0:"everyone"===a?1:"mature"===a?2:-1};General.getAudienceWeighting=function(a,b){if(void 0===b||void 0===a)return 1;if("young"===b)return a[0];if("everyone"===b)return a[1];if("mature"===b)return a[2];throw"unknown audience: "+genre;};General.getAvailableGenres=
function(a){var b=GameGenre.getAll();-1==a.researchCompleted.indexOf(Research.CasualGames)&&(b=b.filter(function(a){return"Casual"!=a.id}));return b};General.getGameSizeLabel=function(a){switch(a){case "aaa":return"AAA".localize();case "large":return"Large".localize().toLowerCase();case "medium":return"Medium".localize().toLowerCase();default:return"Small".localize().toLowerCase()}};General.getAudienceLabel=function(a){switch(a){case "young":return"Young".localize("audience category");case "mature":return"Mature".localize("audience category");
default:case "everyone":return"Everyone".localize("audience category")}};General.getShortAudienceLabel=function(a){switch(a){case "young":return"Y".localize("target audience button content, Y as in young");case "mature":return"M".localize("target audience button content, M as in mature");default:case "everyone":return"E".localize("target audience button content, E as in everyone")}};General.getOptimalTeamSize=function(a){switch(a.gameSize){case "aaa":a=6;break;case "large":a=5;break;case "medium":a=
3;break;default:a=1}return a};var d=[2,5,7,10,15,20,30,40];General.getGameBasePoints=function(a){var b=a.flags.techLevel;b||(b=0);a=Math.floor(b);var b=b-Math.floor(b),c=d[a];0!=b&&a+1<d.length&&(c+=(d[a+1]-c)*b);return c};General.getApproxWeeksToCompletion=function(a){var b=GameManager.getCurrentGameProgress();return Missions.BASE_DURATION*GameFlags.MAIN_MISSIONS_PER_GAME*General.getGameSizeDurationFactor(a.gameSize)*General.getMultiPlatformDurationFactor(a)*b/(1E3*GameManager.SECONDS_PER_WEEK)}})();
"use strict";var Media={};
(function(){var a=Media;Media.getNewNotifications=function(a){for(var b=[],d=Media.TriggerNotifications.filter(function(b){return-1===a.triggerNotificationsShown.indexOf(b.id)&&b.trigger(a)}),c=0;c<d.length;c++){var l=d[c];a.triggerNotificationsShown.push(l.id);l.getNotification?b.push(l.getNotification(a)):b.push(l.notification)}a.triggerNotificationsShown.addRange(b.map(function(a){return a.id}));b.addRange(Media.getScheduledNotifications(a));return b};Media.getScheduledNotifications=function(a){for(var b=
[],d=Math.floor(a.currentWeek),c=Media.allScheduledStories.filter(function(b){return-1===a.scheduledStoriesShown.indexOf(b.id)}),l=0;l<c.length;l++){var h=c[l];d==General.getWeekFromDateString(h.date,h.ignoreGameLengthModifier)&&b.push(h)}a.scheduledStoriesShown.addRange(b.map(function(a){return a.id}));return b.map(function(b){return b.notification?b.notification:b.getNotification(a)})};var b=function(a,b){var d=GameManager.company.getDate(General.getWeekFromDateString(a)),c=GameManager.company.getDate(General.getWeekFromDateString(b));
if(d.year!=c.year)return 1<Math.abs(c.year-d.year)?"in the coming years".localize("date referral sentence fragment"):3>=c.month?"early next year".localize("date referral sentence fragment"):8<=c.month?"late next year".localize("date referral sentence fragment"):"later next year".localize("date referral sentence fragment");d=c.month-d.month;return 0===d?"later this month".localize("date referral sentence fragment"):1===d?"next month".localize("date referral sentence fragment"):2===d?"in two months".localize("date referral sentence fragment"):
4>=d?"in the coming months".localize("date referral sentence fragment"):12==c.month?"at the end of this year".localize("date referral sentence fragment"):"later this year".localize("date referral sentence fragment")};General.getETADescription=b;var c="Industry News".localize("heading"),d={id:"riseOf64",date:"1/6/3",notification:new Notification(c,"Recent market studies suggest that the Govodore G64 is steadily outselling competitors in the PC sector. Consumers prefer the lower price, greater availability and the flexible hardware configuration over other home computers.{n}Experts say that this might spell the end of competing hardware manufacturers.".localize())};
d.notification.image="./images/platforms/G64.png";var f={id:"PCTakesOver",date:"3/6/2",notification:new Notification(c,"Recent market data shows that the Govodore G64 seems to be slowly losing market share against other PC manufacturers.{n}In an unofficial statement a G64 employee said that the company has been unsuccessful in introducing higher priced computers to compete against newer and more advanced PCs.".localize())};f.notification.image="./images/platforms/G64.png";var g={id:"TESRumour",date:"1/8/2",
notification:new Notification(c,"According to rumours the Japanese company Ninvento is planning to launch its very own home gaming console. Ninvento is known for the widely successful arcade game 'Dinkey King'.{n}Many industry experts doubt that home gaming consoles will take off but we are eager to see what Ninvento will deliver.".localize())},k={id:"TargetAudiences",date:"2/9/3",notification:new Notification("Industry Report".localize(),"Recent studies suggest that the increasing variety of gaming devices also creates a market for more specialized games.\nSome platforms become more popular with younger gamers while others cater for the more mature age groups.{n}As more and more developers enter the market we expect developers to focus their games on specific age groups to really make an impact.".localize())},
l={id:"TESSuccess",date:"2/6/4",notification:new Notification(c,"The recently released TES home console by Ninvento has proven to be a massive success. Sales numbers have exceeded expectations by far.{n}As one customer says: 'I love the games that come with the TES and playing with a controller is so much more fun than on a keyboard.'".localize())};l.notification.image="./images/platforms/TES.png";var h={id:"MasterVRumour",date:"2/10/3",notification:new Notification(c,"Following the massive success of the TES console there are now rumours circulating that Vena, another Japanese company, is planning to release a home gaming console on their own.".localize())},
m={id:"MasterVSuccess",date:"3/3/2",notification:new Notification(c,"The recently released gaming console, Master V by Vena, has stirred up the market worldwide.\nIndustry experts say that the console is not very well marketed in North America but that it will flourish in other parts of the world.".localize())};m.notification.image="./images/platforms/Master V.png";var n={id:"MarketingStory",date:"4/5/2",ignoreGameLengthModifier:!0,notification:new Notification("Industry Report".localize(),"With the growing interest in video games there is also a growing audience for video game magazines. These magazines offer a great new way for game developers to market their upcoming games.".localize())},
p={id:"SuperTES",date:"5/10/4",notification:new Notification(c,"Today, Ninvento announced the much anticipated successor to the popular TES console. 'This is the greatest console we have ever built. It comes with state of the art 16-bit graphics and sound. It is simply super and that's why we decided to call it the Super TES!'.{n}Fans around the world have been waiting for this moment and it seems that they will not be disappointed.".localize())};p.notification.image="./images/platforms/superb/Super TES.png";
var q={id:"VonnyNinventoAnnouncement1",date:"6/3/4",notification:new Notification(c,"The media is abuzz with the latest news from this year's Entertainment Conference. In a surprise announcement Vonny, a company known for general electronics has presented a prototype console called the Play System.{n}Apparently Vonny has collaborated with Ninvento, creators of the beloved and successful TES and Super TES consoles to develop what is basically a Super TES with a CD drive.{n}This would be the world's first console using a CD drive.".localize())};
q.notification.image="./images/platforms/superb/PlaysystemA.png";var s={id:"VonnyNinventoAnnouncement2",date:"6/3/4",notification:new Notification(c,"Journalists around the world are baffled as only one day after Vonny and Ninvento jointly announced the Play System at the Entertainment Conference things have turned sour.{n}Ninvento announced today that they will cancel the project and instead seek to develop a new console with a different partner.{n}Rumour has it that the distribution deal the companies had worked out was unfavorable to Ninvento handing over much of the control to Vonny.{n}This seems to be the end of the Play System.".localize(),
"OK".localize(),0.1)};s.notification.image="./images/platforms/superb/PlaysystemA.png";var t={id:"PlaySystem2Announcement",date:"11/3/2",notification:new Notification(c,"Today, Vonny has announced the much anticipated successor to their popular Playsystem console. The Playsystem 2 will have upgraded hardware to compete with newer generation consoles such as the DreamVast.{n}Unlike the DreamVast the Playsystem 2 does not focus much on online play but instead seems to focus on the strengths of the previous Playsystem. A solid upgraded controller including vibration function, upgraded graphics, support for DVD titles and even backwards compatibility with Playsystem 1 games.".localize())};
t.notification.image="./images/platforms/superb/Playsystem 2.png";var r={id:"DreamVastSlowing",date:"11/4/2",notification:new Notification(c,"Since release, the DreamVast from Vena has been one of the fastest selling consoles in history but lately it seems that the anticipation of the upcoming Playsystem 2 release is slowing down sales.{n}If the Playsystem 2 can hold up to the hype when it is released then Vena could be in deep trouble.".localize())};r.notification.image="./images/platforms/superb/DreamVast.png";
var u={id:"Playsystem2Launch",date:"11/6/1",notification:new Notification(c,"The launch of the Playsystem 2 has been a phenomenal success. Stores everywhere are out of stock as manufacturing can barely keep up. Fans have resorted to buying the console on internet auction sites for as much as five times the normal price.{n}While Vonny has managed to have the most successful launch in history, sales of Vena's DreamVast have plummeted.".localize())};u.notification.image="./images/platforms/superb/Playsystem 2.png";
var z={id:"DreamVastDiscontinued",date:"12/7/3",notification:new Notification(c,"In a sobering announcement, Vena has today confirmed the discontinuation of the DreamVast. Vena's president said that while many companies will still deliver games for the platform, the company will no longer produce new units in the future.{n}Vena fans worldwide are disappointed, as a beloved part of gaming console history is coming to an end.".localize())};z.notification.image="./images/platforms/superb/DreamVast.png";
var w={id:"GSRumour",date:"13/2/1",notification:new Notification(c,"Rumours are spreading that Ninvento is working on a new game console. Most of the rumours state that it is not a successor to the somewhat disappointing Game Sphere but instead a new console in the mobile market.{n}Ninvento's Gameling has been leading the mobile market thanks to numerous updates and a large list of very popular games available on the platform, but the hardware is aging quickly and many players wonder what will be next.".localize())},
y={id:"Gen7Rumours",date:"15/10/3",notification:new Notification(c,"Industry experts predict that we will see the next generation of video game consoles as early as next year. 'The hardware advancements in the PC industry have not been reflected in gaming consoles yet and we can expect the next generation to be a truly exciting leap forward.'{n}According to rumours, both Mirconoft and Vonny are in a race to introduce the next-generation console, with Mirconoft apparently already collaborating with partners to prepare titles for what is called the 'mBox 360.'".localize())},
B={id:"mBox360",date:"16/5/3",notification:new Notification(c,"Today, Mirconoft presented their new console called the mBox 360. It is the first in the next generation of expected consoles, and features hardware rivaling mid-end PC counterparts. With a relatively cheap purchase price, Mirconoft will be selling the device at a loss as part of a long-term strategy to gain market share.{n}Gamers around the world are excited by the new console and it is predicted that the mBox 360 will have a massive impact on the console market.".localize())};
B.notification.image="./images/platforms/superb/mBox 360.png";var v={id:"Nuu",date:"16/12/4",notification:new Notification(c,"Today, Ninvento has announced their bid in the next-generation console market by announcing the Nuu. Instead of trying to compete with Mirconoft and Vonny on hardware strength and graphical power, Ninvento has decided to deliver a truly unique gaming experience.{n}The Nuu features a controller with a built-in motion sensor, which allows players to stand front of their TV and use the controller as a counterpart to virtual objects such as a tennis racquet.{n}First playtesters were seen with huge grins on their faces. It seems to be a lot of fun.".localize())};
v.notification.image="./images/platforms/superb/Nuu.png";var x={id:"grPad",date:"19/6/2",notification:new Notification(c,"Today, Grapple, the company responsible for the massively successful grPhone has announced their plans to release a tablet device called the grPad. Tablet devices are not a new idea in the computing industry but earlier attempts never seemed to take off. Many expect the grPad to do very well.".localize())};x.notification.image="./images/platforms/superb/grPad.png";var E={id:"mPadReport",
date:"20/11/2",notification:new Notification(c,"The mPad has received mixed reviews at launch, with many of them highlighting the fact that the mPad is indeed not the same as the grPad from Grapple. We will see what the future holds for this platform.".localize())};E.notification.image="./images/platforms/superb/mPad.png";Media.allScheduledStories=[d,f,{id:"EndOFG64",date:"4/5/4",getNotification:function(){return new Notification({header:c,text:"Hardware manufacturers around the world were surprised today as Govodore, the creator of the popular G64, has filed for bankruptcy.{n}Govodore failed to introduce a higher priced alternative and was forced to shut down production of the G64. The platform will retire from the market {0}.".localize("{0} is date referral sentence fragment").format(b("4/5/4",
"4/6/2")),image:"./images/platforms/G64.png"})}},g,{id:"TESRumour2",date:"1/10/2",getNotification:function(){return new Notification({header:c,text:"Today, Ninvento has confirmed recent rumours and announced their plans to release a new home gaming console called 'TES' {0}.\nThe console features cartridge based games and a uniquely designed controller.".localize("{0} is date referral sentence fragment").format(b("1/10/2","2/1/2")),image:"./images/platforms/TES.png"})}},l,h,{id:"MasterVPreAnnouncement",
date:"2/12/1",getNotification:function(){return new Notification({header:c,text:"Today, Vena has confirmed recent rumours about a new gaming console and announced the Master V.\nThe company claims that the Master V is technically superior to the massively successful TES by Ninvento and plans to release it {0}.".localize("{0} is date referral sentence fragment").format(b("2/12/1","3/2/3")),image:"./images/platforms/Master V.png"})}},m,k,n,{id:"Gameling",date:"3/7/4",getNotification:function(){return new Notification({header:c,
text:"Today, Ninvento has announced that they will introduce a portable gaming device called Gameling. The device comes with changeable game cartridges, a monochrome screen on a green background, built-in speakers and even multiplayer support via a connection cable.{n}Compared to PCs and other gaming consoles the Gameling is underpowered but given the lower cost and excellent portability it might find a huge following.{n}The Gameling is said to hit shelves {0}.".localize("{0} is date referral sentence fragment").format(b("3/7/4",
"3/9/2")),image:"./images/platforms/Gameling.png"})}}];Media.allScheduledStories.addRange([{id:"VenaGear",date:"4/1/2",getNotification:function(){return new Notification({header:c,text:"Vena, creator of the Master V console, has announced the Vena Gear, a portable console to directly compete against the Gameling from Ninvento.{n}A spokesperson for the company said, 'Unlike similar devices on the market which don't come close to gaming consoles the Vena Gear has basically the full power of the Master V, except that you can take it with you. The Vena Gear also has a full color screen'.{n}Will this device topple the Gameling? We will see. The Vena Gear will debut {0}.".localize("{0} is date referral sentence fragment").format(b("4/1/2",
"4/2/4")),image:"./images/platforms/superb/Vena Gear.png"})}},{id:"Oasis",date:"5/1/1",getNotification:function(){return new Notification({header:c,text:"Vena has announced that they will release a new gaming console {0}. The Vena Oasis comes with 16-bit graphics and sound which promises a new kind of gaming experience.{n}Vena said at the announcement, 'The Oasis is a new start, it will be the genesis of a new generation of gaming consoles and we believe it will do very well in the market'. Some of the games already announced for the console suggest that it will appeal to more mature audiences.".localize("{0} is date referral sentence fragment").format(b("5/1/1",
"5/2/4")),image:"./images/platforms/superb/Vena Oasis.png"})}},p,q,s,{id:"PlaySystemAnnouncement",date:"7/6/1",getNotification:function(){return new Notification({header:c,text:"Today, Vonny has announced their very own console called the Playsystem. Apparently the company has completely reworked their earlier Play System prototype after Ninvento cancelled the project.{n}The new Playsystem comes with a CD-ROM drive and 32-bit processors and is wholly owned by Vonny. Industry professionals say that this might be the beginning of a new generation of consoles. Ninvento declined to comment. The Playsystem will enter the market {0}.".localize("{0} is date referral sentence fragment").format(b("7/6/1",
"7/7/1")),image:"./images/platforms/superb/Playsystem.png"})}},{id:"TES64Announcement",date:"8/12/1",getNotification:function(){return new Notification({header:c,text:"Ninvento announced their next generation console called TES 64 today. Expected {0} it is the world's first gaming console to sport 64-bit processors for graphics and audio. Ninvento said this will allow never-before-seen 3D realism.{n}In recent years the Super TES has lost a lot of market share to more modern consoles. Market experts said that the hardware of the TES 64 is surely impressive, but expressed their surprise that it still uses ROM cartridges instead of the much cheaper and higher capacity CD-ROM format.{n}Nevertheless, the TES 64 seems like an impressive console and Ninvento has said that it plans to aggressively price it against Vonny's Playsystem.".localize("{0} is date referral sentence fragment").format(b("8/12/1",
"9/2/1")),image:"./images/platforms/superb/TES 64.png"})}},{id:"DreamVast",date:"10/1/2",getNotification:function(){return new Notification({header:c,text:"The day Vena fans have waited a long time for has arrived, as Vena has announced their next generation console, the DreamVast. A company spokesperson said, 'The DreamVast is a dream come true. This console is the most advanced gaming console in history!'.{n}The new console sports powerful graphics hardware promising graphic quality rivaling those on high-end PCs. The DreamVast is also the first console to ship with a modem out-of-the-box, making it ready for online play. The console will be available {0}.".localize("{0} is date referral sentence fragment").format(b("10/1/2",
"10/8/3")),image:"./images/platforms/superb/DreamVast.png"})}},t,r,{id:"mBoxAnnouncement",date:"11/5/1",getNotification:function(){return new Notification({header:c,text:"PC software juggernaut Mirconoft has announced today that they will enter the game console market with their very own gaming console called the mBox.{n}First demonstrations have been impressive, but we will have to wait and see how it fares against the popular DreamVast, as well as against the recently announced and much anticipated Playsystem 2. The new console is said to debut {0}.".localize("{0} is date referral sentence fragment").format(b("11/5/1",
"11/7/1")),image:"./images/platforms/superb/mBox.png"})}},{id:"mBoxDelayed",date:"11/6/2",getNotification:function(){return new Notification({header:c,text:"Mirconoft has announced the delay of their new gaming console, mBox. The new release date is '{0}'. Rumour has it that the incredible success of the Playsystem 2 launch has prompted Mirconoft to delay their own debut.".localize("{0} is date referral sentence fragment").format(b("11/6/2","11/12/4")),image:"./images/platforms/superb/mBox.png"})}},
u,z,{id:"gameSphere",date:"12/10/4",getNotification:function(){return new Notification({header:c,text:"Today, Ninvento announced the new Ninvento Game Sphere, with which it will try to compete with Vonny's market leading Playsystem 2 and Mirconoft's strong alternative, the mBox. The curiously shaped console has similar hardware specifications as other consoles.{n}The Game Sphere is Ninvento's first console to have an optical disc drive instead of cartridges. However, instead of using full sized CD and DVDs, like its competitors, the console features a mini-DVD drive. Game Spheres will start rolling into stores {0}.".localize("{0} is date referral sentence fragment").format(b("12/10/4",
"12/12/1")),image:"./images/platforms/superb/GameSphere.png"})}},w,{id:"NinventoGS",date:"13/8/1",getNotification:function(){return new Notification({header:c,text:"Today, Ninvento has announced a new mobile console called the Ninvento GS. It features two screens, one of them touch sensitive, and promises unique gameplay. While Ninvento has been struggling to regain their market lead ever since the TES 64 they still have a very strong position on the mobile market.{n}The Ninvento GS promises to strengthen this position and aims to breath life into a stagnating mobile market. The console will be in stores {0}.".localize("{0} is date referral sentence fragment").format(b("13/8/1",
"13/8/4")),image:"./images/platforms/superb/GS.png"})}},{id:"PPSAnnouncement",date:"13/8/2",getNotification:function(){return new Notification({header:c,text:"Today, Vonny announced that they are launching a new mobile gaming console called Portable Playsystem, or PPS for short, {0}. Media analysts speculate that this announcement is meant to distract users from Ninvento's launch of the Ninvento GS.{n}While the Ninvento GS utilizes an innovative dual screen, the PPS instead makes use of a single screen and will focus on giving developers access to much more powerful hardware.".localize("{0} is date referral sentence fragment").format(b("13/8/2",
"14/3/4")),image:"./images/platforms/superb/PPS.png"})}},y,B,{id:"mPad",date:"20/6/4",getNotification:function(){return new Notification({header:c,text:"Today, Mirconoft has announced their very own tablet device to combat the massive marketshare of Grapple's grPad device. The mPad features a sophisticated cover that comes with a integrated, ultra-thin keyboard. The tablet itself has a widescreen display and a integrated stand.{n}The mPad seems to be a combination of a traditional notebook and a tablet, and promises to shake up the market. The new product will be on the market {0}.".localize("{0} is date referral sentence fragment").format(b("20/6/4",
"20/10/4")),image:"./images/platforms/superb/mPad.png"})}},E,v,{id:"PS3",date:"17/8/4",getNotification:function(){return new Notification({header:c,text:"Today, Vonny has announced the successor to the massively successful Playsystem 2. The new console is predictably called 'Playsystem 3' and comes with an impressive hardware configuration, making it the most powerful console in gaming history.{n}The console also doubles as a player for BlueRay, which Vonny hopes will be the successor to the DVD format. All this power comes with a hefty price tag, also making the Playsystem 3 the most expensive console ever.{n}We will see how consumers will react to this given the lower-cost alternatives; however, considering the massive success of the Playsystem 2, Vonny can be hopeful.\nThe console is expected to ship {0}.".localize("{0} is date referral sentence fragment").format(b("17/8/4",
"17/12/4")),image:"./images/platforms/superb/Playsystem 3.png"})}},{id:"grPhone",date:"18/6/1",getNotification:function(){return new Notification({header:c,text:"Today, Grapple, a company well known for their role in the early PC industry and, more recently, for their portable music player, grPod, have announced that they will soon release a powerful new mobile phone. The phone has a touch screen and sports a surprisingly powerful CPU.{n}The integrated graphics chipset should also allow the phone to run games and, since the phone comes with its own application delivery platform, it could become a great device for mobile games. The grPhone will be available {0}.".localize("{0} is date referral sentence fragment").format(b("18/6/1",
"18/9/1")),image:"./images/platforms/superb/grPhone.png"})}},x,{id:"PS3Hype",date:"17/12/2",getNotification:function(){return new Notification({header:c,text:"In what some call a bizarre show of arrogance Vonny representatives have been trash-talking Mirconoft's successful mBox 360 while praising their own upcoming Playsystem 3 in the lead-up to their launch {0}.{n}Asked about the unusually high price of the Playsystem 3, a high-ranking company official replied, 'People will work more hours to buy one. We want people to feel that they want it more than anything else.'.{n}We are not sure that players will really want it so badly, as, so far, no major game titles have been announced for the Playsystem 3. It might be a while before developers are able to take full advantage of the powerful new console.".localize("{0} is date referral sentence fragment").format(b("17/12/2",
"17/12/4")),image:"./images/platforms/superb/Playsystem 3.png"})}},{id:"wuu",date:"20/8/4",getNotification:function(a){a="Ninvento has revealed that their bid in the next generation of consoles will be called the Wuu. The new console features a controller with a integrated display.{n}This is said to make local multiplayer games much more interesting by giving each player a unique screen. Ninvento has always been at the forefront of innovation and this console seems, once again, to be a brave move.\nThe Wuu is said to be available {0}.".localize("{0} is date referral sentence fragment").format(b("20/8/4",
"20/12/4"));return new Notification({header:c,text:a,image:"./images/platforms/superb/Wuu.png"})}},{id:"mboxOne",date:"23/4/4",getNotification:function(a){var d=a.getLatestCustomConsole(),l="For fans of the mBox, the long wait for an update to the console will soon be over as Mirconoft has announced that the mBox One will be available {0}.".localize("{0} is date referral sentence fragment").format(b("23/4/4","23/8/4"));d&&(l+=" Mirconoft has lost a substantial share of the market since {0} released their {1} console.{n}".localize().format(a.name,
d.name));l+=" "+"The new console is marketed as a unified entertainment platform and comes with voice control and a camera which is always watching to enable gesture control. A camera which is always on is not the only controversial feature as the new console also seems to require internet access at least once a day to function properly, does not support previous mBox games and seems to place restrictions on how games can be shared or resold.{n}Clearly, Mirconoft wants to push the current status quo and deliver a console for a new future of gaming but we are not sure if players will share Micronoft's vision.".localize();
return new Notification({header:c,text:l,image:"./images/platforms/superb/mBox One.png"})}},{id:"ps4",date:"23/5/1",getNotification:function(a){a=a.getLatestCustomConsole();var d="Just after Mirconoft have announced their new bet in the upcoming console generation, Vonny has announced that they will release their new, long-awaited console, the Playsystem 4, {0}. The console seems to do everything that the Playsystem 3 did, only better.{n}Unlike the mBox One, the Playsystem 4 doesn't have an always-online requirement and seems much more player friendly. We think that there is hardly a risk of Vonny fans being disappointed".localize("{0} is date referral sentence fragment, sentence itself is a fragment and continues with 'but ...'").format(b("23/5/1",
"23/10/4")),d=a?d+" but we will see how well the new console competes with the popular {0} console.".localize().format(a.name):d+" but we will see how the new console will fare against its competitors.".localize();return new Notification({header:c,text:d,image:"./images/platforms/superb/Playsystem 4.png"})}},{id:"mboxOnePs4",date:"23/6/2",getNotification:function(a){a=a.getLatestCustomConsole()?"Vonny and {0}".localize().format(a.name):"Vonny";a="After a massive public backlash to the controversial features announced for the upcoming mBox One, Mirconoft has today published a letter outlining their change of plans. The mBox One will no longer require a constant internet connection and will not place restrictions on how games are sold or shared.{n}Clearly the different and much more popular strategies of companies like {0}, as well as vocal players themselves, have forced this change of direction.".localize().format(a);
return new Notification({header:c,text:a,image:"./images/platforms/superb/mBox One.png"})}},{id:"gameEndNotification",date:"30/5/4",getNotification:function(a){a="Dear {0}, we, the worldwide game developers guild, would like to invite you to a special award ceremony at our main meeting at the end of the year. Please come.\n\n(Hint: The game will end at the end of this year.)".localize().format(a.staff[0].name);return new Notification("Invitation".localize("heading"),a)}},{id:"visorius",date:"25/9/2",
getNotification:function(a){a="A company by the name of RiseVR has developed a virtual reality headset which promises to finally start the path towards true 3D immersion. The new headset called Visorius looks like a pair of giant ski-goggles and provides a large field of vision as well as near-perfect motion tracking.".localize();a+="{n}"+"A first test left some players feeling a little motion-sick but with the right game this technology can surely deliver a new level of immersion.".localize();a=
new Notification({header:c,text:a,image:["./images/platforms/superb/visorius.png"]});a.setFlag("visoriusAnnounced",!0);return a}},{id:"growingPC",date:"22/10/2",getNotification:function(a){a="Just as the industry seems to have silently accepted the slow demise of PC gaming as more and more games are primarily developed for consoles, there seems to be a resurgence of the PC market.{n}New powerful and affordable hardware, a growing indie-developer scene and the rise of crowd-funded financing has meant a slew of new exciting projects hitting the PC market.\nIt seems that the PC market will only grow stronger in the coming years.{n}For console lovers, this isn't bad news either as many PC games are also ported to the most successful consoles.".localize();
return new Notification({header:c,text:a,image:["./images/platforms/superb/PC-3.png"]})}},{id:"oya",date:"22/1/4",getNotification:function(a){a="Out of nowhere, a new company called KickIT has kicked up a media storm by successfully crowd-funding the development of a new gaming console in just under eight hours.{n}The console, dubbed 'OYA', uses similar technology as modern phones and tablets and delivers games exclusively via its own online store.\nThe OYA is a cubed-shape console and much smaller than most gamepads but the shape isn't the only thing that is small as the developer states that the price tag of the OYA will be under 100cr.{n} KickIT also stated that every game on the OYA will offer a free DEMO. The OYA will be available {0}.".localize().format(b("22/1/4",
"22/10/4"));return new Notification({header:c,text:a,image:"./images/platforms/superb/OYA.png"})}},{id:"mboxNext",date:"27/3/4",getNotification:function(a){a=a.getLatestCustomConsole();var d="Mirconoft has announced their plans to release a completely revamped version of the mBox {0} called mBox Next. The new console seems to cleverly integrate Mirconoft's own motion sensor add-on for the mBox One into one small package.{n}Visually, the mBox Next is reminiscent of the earlier mBox 360 with a much lighter tone marking a departure from the bulky and dark style of the mBox One. The technology of the mBox Next seems promising  ".localize("{0} is date referral sentence fragment, sentence itself is a fragment and continues with 'but ...'").format(b("27/3/4",
"27/8/4")),d=a?d+" but we will see how well the new console competes with the popular {0} console.".localize().format(a.name):d+" but we will see how the new console will fare against its competitors.".localize();return new Notification({header:c,text:d,image:"./images/platforms/superb/mBox Next.png"})}},{id:"ps5",date:"27/6/4",getNotification:function(a){a=a.getLatestCustomConsole();var d="Many have expected that Vonny will announce a new platform before Mirconoft's mBox Next will hit the market and, today, Vonny did just that. Keeping with company tradition, and in contrast to competitor Mirconoft's naming practices, the newly announced console is aptly named Playsystem 5.{n}The Playsystem 5 seems an incremental update, coming out {0} with a form-factor that reminds of the early Playsystem 3. The new system promises to be a solid update".localize("{0} is date referral sentence fragment, sentence itself is a fragment and continues with 'but ...'").format(b("27/6/4",
"27/10/4")),d=a?d+" but we will see how well the new console competes with the popular {0} console.".localize().format(a.name):d+" but we will see how the new console will fare against its competitors.".localize();return new Notification({header:c,text:d,image:"./images/platforms/superb/Playsystem 5.png"})}}]);Media.createFirstGameStory=function(a){var b=a.currentGame,d="{0}, a newcomer in the game industry, has just released their first game '{1}'.\nThe game ".localize("fragment, continue with firstGameStoryRatingFragments").format(a.name,
b.title);return d=3>=b.score?d+"got generally low scores from reviewers but with a bit of experience we are sure that we will see better games from {0} in the future.".localize("firstGameStoryRatingFragments").format(a.name):5.6>=b.score?d+"had a moderate response from reviewers. We are curious what {0} will deliver in the future.".localize("firstGameStoryRatingFragments").format(a.name):d+"received favorable reviews. \nWith such a good start {0} are sure to gain fans quickly.".localize("firstGameStoryRatingFragments").format(a.name)};
Media.createSequelStory=function(a,b){var d=a.getGameById(b.sequelTo),c=9<b.score?"outstanding".localize():7<b.score?"great".localize():5<b.score?"moderate".localize():3<b.score?"below average".localize():"pretty bad".localize(),c="{0} has recently released a sequel to their game {1}. The newest game in the series titled {2} was met with {3} responses.".localize().format(a.name,d.title,b.title,c);6<b.score&&b.flags.hasBetterEngineThanSequel&&(c+=" "+"Critics praised that {0} had a newer engine than the original, really driving technical innovation.".localize().format(b.title));
b.flags.sequelsTooClose&&(d=Math.floor(b.releaseWeek-d.releaseWeek),c+="{n}"+"A major negative reaction came from fans who felt that with the original coming out just {0} weeks before, the company is trying to milk the franchise for more money without delivering much new for players to enjoy.".localize().format(d));a.notifications.push(new Notification("Sequel".localize(),c,"OK".localize(),2+2*a.getRandom()))};Media.createExtensionPackStory=function(a,b){var d=a.getGameById(b.sequelTo),c=9<b.score?
"outstanding".localize():7<b.score?"great".localize():5<b.score?"moderate".localize():3<b.score?"below average".localize():"pretty bad".localize(),c="{0} has recently released an expansion pack to their game {1}. The expansion pack titled {2} was met with {3} responses.".localize().format(a.name,d.title,b.title,c);b.flags.sequelsTooClose&&(d=Math.floor(b.releaseWeek-d.releaseWeek),c+="{n}A major negative reaction came from fans who felt that with the main game coming out just {0} weeks before, the company is trying to milk the franchise for more money without delivering much new for players to enjoy.".localize().format(d));
a.notifications.push(new Notification("Expansion Pack".localize(),c,"OK".localize(),2+2*a.getRandom()))};a.createWelcomeNotifications=function(){var a=GameManager.company;if(GameManager.ghg2()){var b=GameManager.ghg0()?"lite".localize("as in lite edition of the game"):"trial".localize();a.notifications.push(new Notification({header:"{0} version".localize("could either be lite version or trial version").format(b),text:"This is the {0} version of Game Dev Tycoon in which you can play until year five.".localize("{0} is either lite or trial").format(b)}))}b=
"Welcome to Game Dev Tycoon!\nIn this business simulation you have been transported back in time to start your very own game development company right at the beginning of the PC revolution. In the next {0} years you can build your dream company, create best selling games, gain fans and become the leader of the market.{n}Before you can start your adventure you have to give your upcoming company a name.".localize().format(35);a.notifications.push(new Notification("Welcome".localize("heading to greet the player"),
b));a.notifications.push(new Notification("{enterCompanyName}"))};a.generateAudienceMismatchStory=function(a,b){var d=8<b.score?"outstanding".localize():6<b.score?"good".localize():"moderate".localize(),c="It seems that the initial sales for {0} have fallen way below expected numbers. The game received {1} reviews but it seems that the chosen platform isn't very popular with the target audience.".localize("{1} is adjective like good, moderate, outstanding");a.notifications.push(new Notification("Sales Report".localize(),
c.format(b.title,d)))};a.createSameGenreTopicStory=function(a,b){if(7>b.score){var d="The latest game by {0} has had reviewers scratching their heads. Rather than bringing a new and innovative game to market the company delivered another {1}/{2} game which is more or less the same setting as their previous game.{n}One reviewer commented:'I think {3} was simply developed too soon after the previous game with not enough innovations in technology and design.'".localize();return new Notification("Media Report".localize(),
d.format(a.name,b.topic.name,b.genre.name,b.title))}};a.createLevel2Notifications=function(){var a=GameManager.company,b="Welcome to your new office!\nNow that you have a bigger office you can also hire staff and forge a world-class development team to make even better games.".localize();a.notifications.push(new Notification("New Office".localize(),b,"OK".localize(),0.3))};a.createLevel2OfficeStory=function(){var a=0.5+1.5*Math.random(),b=GameManager.company,d="It seems that {0} has recently moved into an office in a well known technology park and is now searching for employees.{n}The company, which is known for games such as {1}, has reportedly operated out of a garage until now.{n}One of the many fans of {2} commented: 'I can't believe that they didn't even have a proper office until now and that those games were created by only one person!\nI am really looking forward to their future games!".localize(),
c=b.gameLog.slice().sort(function(a,b){return b.fansChanged-a.fansChanged}),l=c[0].title,h=l;2<=c.length&&(h=h+" "+"and".localize()+" "+c[1].title);d=d.format(b.name,h,l);b.notifications.push(new Notification("News".localize("heading"),d,"OK".localize(),a))};a.createLevel4Notifications=function(){var a=GameManager.company,b="Welcome to the new headquarters of {0}!\nWe now have more space so you can increase the team further. The new office is also close to some renowned universities which gives us great access to new talent.".localize().format(a.name);
a.notifications.push(new Notification("New Office".localize(),b));var d=2,c=a.staff.slice(1).sort(function(a,b){return b.designFactor-a.designFactor})[0],b="Wow, this new office is amazing and the location is perfect too. I took a walk around the building earlier and had this radical idea.\nWhy don't we open up our own research and development department?{n}This could really speed up our research and would allow us to attack bigger projects and innovations.\nIt wouldn't be cheap but I think it would allow us to be the leading innovator in the gaming industry.{n}Anyway, I have done some research and I think we should open a lab and hire a whole team of researchers. Before we can do this however, we should have at least one design specialist in our team.".localize(),
b=new Notification(c.name,b,"OK".localize(),d);b.setFlag("dTSpecialistTrainingEnabled",!0);a.notifications.push(b);Tutorial.designSpecialist(d);d="Greenheart"==a.name?"Lone Tree":"Greenheart";b=new Notification("Training","Hello {0},\nWe have just learned that you have opened your new headquarters not too far away from our university! We are just about to start a special course about game development and could really use your help.{n}Unfortunately we cannot offer any pay but I think you will find that teaching students about game development will be a great exercise to refine your own skills.\n{1} University{n}New training options available.".localize().format(a.name,
d));b.weeksUntilFired=0.5;b.setFlag("trainingV3Enabled",!0);a.notifications.push(b);d=4+3*a.getRandom();GameManager.enableLargeContracts(d)};a.enterRndLab=function(a){if(!a.flags.enterRndLab){a.flags.enterRndLab=!0;var b="Welcome to our very own research and development lab! At the moment it is empty but we have a number of skilled people eager to start working.{n}You don't have to hire them individually, instead you can simply decide on the budget for the R&D lab. The higher the budget, the more researchers will work and the higher the research progress will be.{n}Running your own R&D lab can be very expensive so be careful that you don't overspend. I suggest you start with smaller projects and don't be afraid to cut down the budget if necessary.{n}If there is no active project researchers will generate research points slowly, which you can use to train your main staff and unlock more game options.".localize();
a.notifications.push(new Notification("R&D lab".localize(),b,"OK".localize(),0.35));Tutorial.rndLab(0.35)}};a.enterHwLab=function(a){if(!a.flags.enterHwLab){a.flags.enterHwLab=!0;var b="Welcome to our very own hardware lab! This is the place where we will create our own game console. Before you start, make sure you have a lot of cash saved up. Building a console isn't cheap. When you are ready to start simply {0} on the screen to access the action menu.".localize().format(Tutorial.getClickVerb());
a.notifications.push(new Notification("Hardware lab".localize(),b,"OK".localize(),0.35))}};a.createMMOEndStory=function(a){var b=Math.roundToDecimals((GameManager.company.currentWeek-a.releaseWeek)/4,1),d=GameManager.company,c="We just got word that {0} is retiring its MMO game {1} from the market. The game has been on the market for {2} months and racked up over {3} in sales.".localize(),c=a.flags.isProfitable?c+(" "+"We are not quite sure why {0} has decided to take {1} off the market as the game likely still generated income for the company.".localize()):
c+(" "+"{1} was likely not profitable anymore as the maintenance costs were likely larger than the income.".localize()),l=0,h=GameManager.company.gameLog.first(function(b){return b.id!=a.id&&b.flags.mmo&&b.isOnSale()});h?c+="{n}"+"While fans of {0} weren't happy about the news many of them also play {1} which is still on the market.".localize().format(d.name,h.title):(c+="{n}"+"Fans of {1} have voiced complaints with one fan saying: 'I love {0} and played {1} a lot but now that they took it off the market I don't know what MMO I should play. If only {0} had released a new MMO I wouldn't be so upset.'".localize(),
l=Math.floor(0.1*a.fansChanged*d.getRandom()));b=new Notification("Industry News".localize("heading"),c.format(d.name,a.title,b,UI.getLongNumberString(a.unitsSold)));b.weeksUntilFired=0.7;l&&b.adjustFans(-l);d.notifications.push(b)};a.createConsoleStartStory=function(a){var b=GameManager.company,d=a.isGoodTech,l=a.featureFactor,h=a.successFactor,f=a.qF,g="{0} has released their game console {1} today.".localize().format(b.name,a.name),g=d?g+(" "+"The console seems to really push the limits of technology and is the most modern console ever to hit shelves.".localize()):
g+(" "+"The console does not seem quite on par with the high tech competitors but we will see what players think.".localize()),g=g+" Looking at the features of {0}, it seems that the ".localize().format(a.name),g=0.8<=l?g+"list is extensive which is a good sign and could lead to a wide variety of games becoming available.".localize():g+(" "+"list is a bit slim. Don't expect too many gadgets and controllers to be available for this console.".localize()),g=g+("{n}"+"First tests indicate that {0}".localize().format(a.name)),
g=0.8<=f?g+"'s build quality is excellent and will likely run for decades without issues.".localize():0.5<=f?g+(" "+"is of average build quality. Don't expect it to last forever but in general you should not see many issues.".localize()):g+(" "+"is a bit fragile. We wouldn't be surprised if you need to make use of the warranty sooner or later.".localize()),g=g+("\n"+"All in all ".localize("fragment continues with 'we think that the console...'")),g=1<=h?g+(" "+"we think that the console will stir up the market and prove to be very successful.".localize("fragment, started with 'All in all'").format(a.name)):
0.8<=h?g+(" "+"we think that the console will do reasonably well in the market and it is a welcome addition.".localize("fragment, started with 'All in all'").format(a.name)):g+(" "+"it's hard to say whether the console will do well as there are so many other good products on the market.".localize("fragment, started with 'All in all'").format(a.name));b.notifications.push(new Notification({header:c,text:g,weeksUntilFired:0.4,image:a.iconUri}))};a.createConsoleEndStory=function(a){var b=GameManager.company,
d=1===a.version?"first".localize():2===a.version?"second".localize():3===a.version?"third".localize():a.version,d="{0} has taken their game console {1} off the market.\n{1} was the {2} console created by the company.".localize().format(b.name,a.name,d);b.notifications.push(new Notification({header:c,text:d,weeksUntilFired:0.4,image:a.iconUri}))};a.createFinishGameStories=function(){var a=GameManager.company,b=a.getBestSeller()?a.getBestSeller():{title:"nothing"},b="The worldwide game developers guild has awarded {0}, CEO of {1} the lifetime achievement award for contributions to the game industry. {0} has, during a stunning {3} year career at {1} delivered many ground breaking games.{n}The company is most recently known for {2}.".localize().format(a.staff[0].name,
a.name,b.title,Math.floor(30*GameManager.flags.gameLengthModifier)),d=a.getLatestCustomConsole();d&&(b+=" They are also known for their console {0} which has done very well on the market.".localize().format(d.name));a.notifications.push(new Notification(c,b));a.notifications.push(new Notification("Game finished".localize(),"Congratulations. You have finished Game Dev Tycoon. We will now calculate your final score and show you some statistics. You may continue playing after that.".localize()));a.notifications.push(new Notification("{GameEnd}"))};
a.createEndOfGameStories=function(){PlatformShim.ISWIN8?GameManager.company.notifications.push(DecisionNotifications.endOfGame1.getNotification(GameManager.company)):GameManager.company.notifications.push(DecisionNotifications.endOfGameNative.getNotification(GameManager.company))}})();"use strict";var Missions={BASE_POINTS:5,BASE_RESEARCH_POINTS:1.5,BASE_DURATION:1800,BASE_ENGINE_DURATION:1500,PREP_DURATION:1E3,FINISH_DURATION:1E3};
(function(){Missions.getGeneralFactor=function(a,b){var c=General.getMission(b.id);if("preparation"===c.type||"BugFixing"===c.type)return 1;var d=LevelCalculator.getLevelBonusFactor(c.experience);return Missions.getGenreWeighting(c,a.currentGame,a.currentGame)*d};Missions.getRepeatMissionModifier=function(a,b){var c=1,d=0,d=a.currentGame;d.featureLog&&(d=d.featureLog.count(function(a){return a.id===b.id}),1===d?c=0.7:2<=d&&(c=0.3));return c};Missions.executePublishingMission=function(a,b){var c=a.currentGame,
d=General.getMission(b.id),f=1,g=Missions.getRepeatMissionModifier(a,b),f=f*g,g=GameManager.getCurrentGameProgress(),g=Math.abs(g-0.7),f=f-g/2;c.featureLog.count(function(a){return"marketing"===a.type});g=LevelCalculator.getMissionLevel(d);f*=d.marketingFactor/5*g;g=100*f*GameGenre.getGenreWeighting(c.topic.genreWeightings,c.genre,c.secondGenre);g=Math.floor(0.9*g+0.1*g*a.getRandom());if(c.sequelTo){var k=0.2*g;c.flags.sequelsTooClose&&(k*=-1);c.flags.usesSameEngineAsSequel?k=0>k?2*k:k/2:c.flags.hasBetterEngineThanSequel&&
(k=0>k?-1*k:1.2*k);g+=k}c.hypePoints+=g;c.costs+=d.cost;a.adjustCash(-d.cost,d.name);"game hype: {0}. delta: {1}. factor contribution of mission: {2}".format(c.hypePoints,g,f).log();c.featureLog.push(d)};Missions.getTopicMissionOverrides=function(a,b){if(b.missionOverrides){var c=a;c.genreWeightings||(c=Missions.getAllMissions().first(function(a){return a.id===c.id}));var d=[],f=Missions.DevMissions.indexOf(c);if(-1!=f)for(var g=game.topic.missionOverrides,k=0;k<g.length;k++)d.push(g[k][f]);return d}};
Missions.getGenreWeighting=function(a,b){var c=b.genre,d=b.secondGenre,f=a;f.genreWeightings||(f=Missions.getAllMissions().first(function(a){return a.id===f.id}));var g=f.genreWeightings.slice();if(b.topic.missionOverrides){var k=Missions.DevMissions.indexOf(f);if(-1!=k)for(var l=b.topic.missionOverrides,h=0;h<l.length;h++){var m=l[h][k];m&&(g[h]=m)}}return GameGenre.getGenreWeighting(g,c,d)};Missions.getMissionWithId=function(a){return Missions.getAllMissions().first(function(b){return b.id===a})};
Missions.Stage1Missions=[{id:"Engine",name:"Engine".localize(),description:"Improves the game engine.",technologyFactor:0.8,designFactor:0.2,genreWeightings:[1,0.7,0.7,0.9,0.9,0.6],percentage:100/3},{id:"Gameplay",name:"Gameplay".localize(),description:"Improves the gameplay.",technologyFactor:0.2,designFactor:0.8,genreWeightings:[0.9,0.8,0.9,1,1,1],percentage:100/3},{id:"Story/Quests",name:"Story/Quests".localize(),description:"Work on the story and quests.",technologyFactor:0.2,designFactor:0.8,
genreWeightings:[0.7,1,1,0.8,0.8,0.7],percentage:100/3}];Missions.Stage2Missions=[{id:"Dialogs",name:"Dialogues".localize(),description:"Work on the dialogues.",technologyFactor:0.1,designFactor:0.9,genreWeightings:[0.6,1,1,0.7,0.7,0.7],percentage:100/3},{id:"Level Design",name:"Level Design".localize(),description:"Improves the level design.",technologyFactor:0.6,designFactor:0.4,genreWeightings:[0.9,0.8,0.9,0.9,1,1],percentage:100/3},{id:"AI",name:"Artificial Intelligence".localize(),description:"Improves the AI.",
technologyFactor:0.8,designFactor:0.2,genreWeightings:[1,0.7,0.8,1,0.9,0.6],percentage:100/3}];Missions.Stage3Missions=[{id:"World Design",name:"World Design".localize(),description:"Work on the world design.",technologyFactor:0.4,designFactor:0.6,genreWeightings:[0.8,1,1,0.8,1,0.7],percentage:100/3},{id:"Graphic",name:"Graphic".localize(),description:"Improves the graphics.",technologyFactor:0.5,designFactor:0.5,genreWeightings:[1,0.9,0.9,1,0.8,1],percentage:100/3},{id:"Sound",name:"Sound".localize(),
description:"Improves the sound.",technologyFactor:0.4,designFactor:0.6,genreWeightings:[0.9,0.8,0.8,0.9,0.9,0.9],percentage:100/3}];Missions.DevMissions=Missions.Stage1Missions.concat(Missions.Stage2Missions.concat(Missions.Stage3Missions));Missions.MarketingMissions=[{id:"MagazineMarketing",name:"Advertise in magazines".localize(),shortName:"Magazines".localize("short name"),description:"Advertise in gaming magazines to get the game well known before it hits the shelves.".localize(),marketingFactor:0.5,
cost:5E4},{id:"DemosMarketing",name:"Magazines & Demos".localize(),shortName:"Magazines & Demos".localize("short name"),description:"Advertise in gaming magazines and distribute demos of the game to give players an opportunity to try the game.".localize(),marketingFactor:1,cost:15E4},{id:"Marketing Campaign",name:"Small Marketing Campaign".localize(),shortName:"Small Campaign".localize("short name"),description:"Start a global marketing campaign including magazine ads, demos and interviews.".localize(),
marketingFactor:1.5,cost:5E5},{id:"Marketing CampaignXL",name:"Large Marketing Campaign".localize(),shortName:"Large Campaign".localize("short name"),description:"Start a global marketing campaign to promote the game far and wide. Organize exclusive reviews, behind the scenes reports, TV trailers and more.".localize(),marketingFactor:2,cost:2E6}];Missions.PreparationMission={id:"preparation",missionType:"preparation"};Missions.BugFixingMission={id:"BugFixing",missionType:"BugFixing"};Missions.Stage1Missions.forEach(function(a){a.missionType=
"dev";a.level=1;a.experience=0});Missions.Stage2Missions.forEach(function(a){a.missionType="dev";a.level=1;a.experience=0});Missions.Stage3Missions.forEach(function(a){a.missionType="dev";a.level=1;a.experience=0});Missions.MarketingMissions.forEach(function(a){a.missionType="marketing";a.level=1;a.experience=0});Missions.getAllMissions=function(){return Missions.Stage1Missions.concat(Missions.Stage2Missions.concat(Missions.Stage3Missions.concat(Missions.MarketingMissions).concat([Missions.PreparationMission,
Missions.BugFixingMission])))}})();"use strict";var Platforms={};
(function(){Platforms.getNormalizedAudienceWeighting=function(a){return 0.8<=a?a+0.2:0.7<=a?a+0.1:a+0.05};Platforms.getNormalizedGenreWeighting=function(a){return 1==a?1.1:0.9==a?1.05:0.8==a?1:0.7==a?0.95:0.6==a?0.9:1};Platforms.getNormGenreWeighting=function(a,c,d){if(void 0===a)return 1;if(d)return(Platforms.getNormGenreWeighting(a,d)+2*Platforms.getNormGenreWeighting(a,c))/3;if(c===GameGenre.Action)return Platforms.getNormalizedGenreWeighting(a[0]);if(c===GameGenre.Adventure)return Platforms.getNormalizedGenreWeighting(a[1]);
if(c===GameGenre.RPG)return Platforms.getNormalizedGenreWeighting(a[2]);if(c===GameGenre.Simulation)return Platforms.getNormalizedGenreWeighting(a[3]);if(c===GameGenre.Strategy)return Platforms.getNormalizedGenreWeighting(a[4]);if(c===GameGenre.Casual)return Platforms.getNormalizedGenreWeighting(a[5]);throw"unknown genre: "+c;};var a=[{id:"PC",name:"PC",imageDates:["1/1/1","4/9/1","16/3/1"],startAmount:0.22,marketKeyPoints:[{date:"2/1/1",amount:0.24},{date:"4/1/1",amount:0.41},{date:"4/10/2",amount:0.48},
{date:"11/5/2",amount:1.1},{date:"16/12/1",amount:2.1},{date:"20/7/1",amount:2.4},{date:"22/9/2",amount:2.6},{date:"23/4/1",amount:4},{date:"26/12/4",amount:5.7}],unitsSold:5.7,licencePrize:0,published:"1/1/1",platformRetireDate:"260/12/4",developmentCosts:5E3,genreWeightings:[0.9,1,0.9,1,1,0.6],audienceWeightings:[0.8,0.9,1]},{id:"G64",name:"G64",company:"Govodore",startAmount:0.28,marketKeyPoints:[{date:"2/5/1",amount:0.36},{date:"3/1/1",amount:0.38},{date:"4/1/1",amount:0.386}],unitsSold:0.388,
licencePrize:0,published:"1/1/1",platformRetireDate:"4/6/2",developmentCosts:2E4,genreWeightings:[0.9,1,0.9,0.9,1,0.7],audienceWeightings:[0.8,0.9,1],techLevel:1},{id:"TES",name:"TES",company:"Ninvento",startAmount:0.356,marketKeyPoints:[{date:"2/5/1",amount:0.41},{date:"3/1/1",amount:0.444},{date:"4/1/1",amount:0.46}],unitsSold:0.42,licencePrize:8E4,published:"2/1/2",platformRetireDate:"6/6/2",developmentCosts:3E4,genreWeightings:[0.8,0.7,0.8,0.8,0.7,1],audienceWeightings:[1,0.9,0.6],techLevel:2},
{id:"Master V",name:"Master V",company:"Vena",startAmount:0.43,marketKeyPoints:[{date:"4/1/1",amount:0.456},{date:"6/6/2",amount:0.466}],unitsSold:0.7,licencePrize:8E4,published:"3/2/3",platformRetireDate:"11/3/4",developmentCosts:3E4,genreWeightings:[0.9,0.7,0.8,0.8,0.7,1],audienceWeightings:[0.9,1,0.7],techLevel:2},{id:"Gameling",name:"Gameling",company:"Ninvento",startAmount:0.8,unitsSold:1,licencePrize:5E4,published:"3/9/2",platformRetireDate:"14/4/2",developmentCosts:3E4,genreWeightings:[0.8,
0.7,0.9,0.9,0.6,1],audienceWeightings:[1,0.9,0.6],techLevel:2}];Platforms.allPlatforms=[];Platforms.allPlatforms.addRange(a);Platforms.allPlatforms.addRange([{id:"Vena Gear",name:"Vena Gear",company:"Vena",startAmount:0.6,unitsSold:0.84,licencePrize:5E4,published:"4/2/4",platformRetireDate:"8/4/1",developmentCosts:3E4,genreWeightings:[0.9,0.8,0.8,0.9,0.6,1],audienceWeightings:[0.9,1,0.8],techLevel:3},{id:"Vena Oasis",name:"Vena Oasis",company:"Vena",startAmount:0.62,unitsSold:0.65,licencePrize:1E5,
published:"5/2/4",platformRetireDate:"10/11/1",developmentCosts:5E4,genreWeightings:[1,0.8,0.8,0.9,0.6,0.7],audienceWeightings:[0.8,1,0.9],techLevel:3},{id:"Super TES",name:"Super TES",company:"Ninvento",startAmount:0.65,marketKeyPoints:[{date:"6/6/1",amount:0.7},{date:"8/10/1",amount:0.73}],unitsSold:0.8,licencePrize:5E4,published:"5/12/4",platformRetireDate:"9/8/1",developmentCosts:6E4,genreWeightings:[0.9,0.9,0.9,1,0.7,0.9],audienceWeightings:[1,0.9,0.7],techLevel:3},{id:"Playsystem",name:"Playsystem",
company:"Vonny",startAmount:0.85,unitsSold:1.22,licencePrize:2E5,published:"7/7/1",platformRetireDate:"12/11/3",developmentCosts:6E4,genreWeightings:[1,0.8,1,0.9,0.7,0.6],audienceWeightings:[0.8,1,0.9],techLevel:3},{id:"TES 64",name:"TES 64",company:"Ninvento",startAmount:0.7,marketKeyPoints:[{date:"9/7/1",amount:0.85}],unitsSold:1.25,licencePrize:2E5,published:"9/2/1",platformRetireDate:"13/5/4",developmentCosts:6E4,genreWeightings:[0.9,0.8,0.7,0.8,0.7,0.9],audienceWeightings:[1,0.9,0.9],techLevel:3},
{id:"DreamVast",name:"DreamVast",company:"Vena",startAmount:1.1,marketKeyPoints:[{date:"11/4/2",amount:1.2}],unitsSold:0.9,licencePrize:25E4,published:"10/8/3",platformRetireDate:"14/1/4",developmentCosts:6E4,genreWeightings:[1,0.7,0.8,1,0.7,0.7],audienceWeightings:[0.7,1,1],techLevel:4},{id:"Playsystem 2",name:"Playsystem 2",company:"Vonny",startAmount:1.3,unitsSold:2.4,licencePrize:35E4,published:"11/5/2",platformRetireDate:"18/6/3",developmentCosts:7E4,genreWeightings:[1,0.8,1,0.9,0.7,0.9],audienceWeightings:[0.9,
1,0.8],techLevel:4},{id:"mBox",name:"mBox",company:"Mirconoft",startAmount:1.35,marketKeyPoints:[{date:"12/10/1",amount:1.6},{date:"14/4/1",amount:1.7}],unitsSold:2.1,licencePrize:35E4,published:"11/12/4",platformRetireDate:"17/2/3",developmentCosts:7E4,genreWeightings:[1,0.8,0.9,0.9,0.7,0.7],audienceWeightings:[0.8,1,0.9],techLevel:4},{id:"gameSphere",name:"Game Sphere",iconUri:"./images/platforms/superb/GameSphere.png",company:"Ninvento",startAmount:1,unitsSold:1.7,licencePrize:45E4,published:"12/12/1",
platformRetireDate:"17/2/3",developmentCosts:9E4,genreWeightings:[0.8,0.8,0.7,0.8,0.7,1],audienceWeightings:[0.9,0.9,0.8],techLevel:3},{id:"GS",name:"GS",company:"Ninvento",startAmount:1.5,unitsSold:3.8,licencePrize:35E4,published:"13/8/4",marketKeyPoints:[{date:"26/12/4",amount:3.8}],platformRetireDate:"260/12/4",developmentCosts:5E4,genreWeightings:[0.9,0.9,1,0.9,0.9,1],audienceWeightings:[1,0.9,0.8],techLevel:3},{id:"PPS",name:"PPS",company:"Vonny",startAmount:1.44,unitsSold:3.1,licencePrize:35E4,
published:"14/3/4",marketKeyPoints:[{date:"26/12/4",amount:3.1}],platformRetireDate:"260/12/4",developmentCosts:5E4,genreWeightings:[1,0.7,1,0.8,0.8,0.8],audienceWeightings:[0.8,0.9,1],techLevel:4},{id:"mBox 360",name:"mBox 360",company:"Mirconoft",startAmount:2.4,unitsSold:3.7,licencePrize:5E5,published:"16/8/4",platformRetireDate:"24/2/3",developmentCosts:8E4,genreWeightings:[1,0.9,1,0.9,0.7,0.9],audienceWeightings:[0.8,0.9,1],techLevel:5},{id:"Nuu",name:"Nuu",company:"Ninvento",startAmount:2,unitsSold:2.8,
licencePrize:5E5,published:"17/4/4",platformRetireDate:"21/6/3",developmentCosts:8E4,genreWeightings:[0.8,0.6,0.7,1,0.7,1],audienceWeightings:[1,1,0.7],techLevel:4},{id:"Playsystem 3",name:"Playsystem 3",company:"Vonny",startAmount:2.5,unitsSold:3.7,licencePrize:5E5,published:"17/12/4",platformRetireDate:"24/9/3",developmentCosts:8E4,genreWeightings:[1,0.9,0.9,1,0.7,0.8],audienceWeightings:[0.8,1,0.9],techLevel:5},{id:"grPhone",name:"grPhone",company:"Grapple",startAmount:2.3,unitsSold:3.7,licencePrize:5E5,
published:"18/9/1",marketKeyPoints:[{date:"26/12/4",amount:3.7}],platformRetireDate:"260/12/4",developmentCosts:8E4,genreWeightings:[0.8,0.8,0.7,0.9,0.7,1],audienceWeightings:[0.9,1,0.6],techLevel:4},{id:"grPad",name:"grPad",company:"Grapple",startAmount:2.3,unitsSold:3.8,licencePrize:5E5,published:"19/7/4",marketKeyPoints:[{date:"26/12/4",amount:3.8}],platformRetireDate:"260/12/4",developmentCosts:8E4,genreWeightings:[0.8,0.9,0.7,0.9,0.9,1],audienceWeightings:[0.9,1,0.6],techLevel:4},{id:"mPad",
name:"mPad",company:"Mirconoft",startAmount:2.2,unitsSold:3.4,licencePrize:5E5,published:"20/10/4",marketKeyPoints:[{date:"26/12/4",amount:3.4}],platformRetireDate:"260/12/4",developmentCosts:8E4,genreWeightings:[0.7,0.9,0.8,0.9,0.7,0.9],audienceWeightings:[0.7,0.9,0.8],techLevel:4},{id:"Wuu",name:"Wuu",company:"Ninvento",startAmount:3,unitsSold:5,licencePrize:1E6,published:"20/12/4",marketKeyPoints:[{date:"29/12/4",amount:5}],platformRetireDate:"260/12/4",developmentCosts:8E4,genreWeightings:[0.9,
0.7,0.8,1,0.7,1],audienceWeightings:[0.9,1,0.7],techLevel:5},{id:"OYA",name:"OYA",company:"KickIT",startAmount:2.5,unitsSold:4,licencePrize:1E4,published:"22/10/4",marketKeyPoints:[{date:"29/12/4",amount:4}],platformRetireDate:"260/12/4",developmentCosts:4E4,genreWeightings:[0.9,0.7,0.8,0.9,0.8,1],audienceWeightings:[0.8,1,0.9],techLevel:4},{id:"mBox One",name:"mBox One",company:"Mirconoft",startAmount:3.6,marketKeyPoints:[{date:"23/9/1",amount:4.1},{date:"28/12/4",amount:5.5}],unitsSold:5.5,licencePrize:1E6,
published:"23/8/4",platformRetireDate:"29/12/4",developmentCosts:1E5,genreWeightings:[1,0.8,0.9,0.9,0.7,0.9],audienceWeightings:[0.7,1,0.8],techLevel:6},{id:"Playsystem 4",name:"Playsystem 4",company:"Vonny",startAmount:3.7,unitsSold:6,licencePrize:1E6,published:"23/10/4",marketKeyPoints:[{date:"28/4/4",amount:6}],platformRetireDate:"29/4/4",developmentCosts:1E5,genreWeightings:[1,0.8,1,0.9,0.7,0.9],audienceWeightings:[0.8,1,0.9],techLevel:6},{id:"mBox Next",name:"mBox Next",company:"Mirconoft",startAmount:5.6,
marketKeyPoints:[{date:"28/9/1",amount:5.8},{date:"29/12/4",amount:6.6}],unitsSold:6.6,licencePrize:15E5,published:"27/8/4",platformRetireDate:"260/12/4",developmentCosts:2E5,genreWeightings:[0.9,0.9,0.9,0.8,0.7,1],audienceWeightings:[0.9,1,0.8],techLevel:7},{id:"Playsystem 5",name:"Playsystem 5",company:"Vonny",startAmount:5.2,unitsSold:6.4,licencePrize:15E5,published:"27/10/4",marketKeyPoints:[{date:"29/12/4",amount:6.4}],platformRetireDate:"260/12/4",developmentCosts:2E5,genreWeightings:[1,0.7,
0.9,1,0.7,0.9],audienceWeightings:[0.8,1,0.9],techLevel:7}]);Platforms.getPlatformImage=function(b,c){if(b.iconUri)return b.iconUri;var d=-1!=a.indexOf(b)?"./images/platforms":"./images/platforms/superb",f=null;if(c&&b.imageDates)for(var g=0;g<b.imageDates.length;g++)General.getWeekFromDateString(b.imageDates[g])<=c&&(0===g?f="{0}/{1}.png".format(d,b.id):("PC"===b.id&&(d="./images/platforms/superb"),f="{0}/{1}{2}.png".format(d,b.id,"-"+(g+1))));return null===f?"{0}/{1}.png".format(d,b.id):f};Platforms._getMarketShareDataForExelGraph=
function(){for(var a="",c=0;c<Platforms.allPlatforms.length;c++){for(var d=Platforms.allPlatforms[c],a=a+(d.id+","),f=0;2E3>f;f+=4)Platforms.getRetireDate(d)>f&&(a=Platforms.getPublishDate(d)<=f?a+(Math.floor(Platforms.getMarketSizeForWeek(d,f)/5)+","):a+",");a+="\n"}};Platforms._getSalesGraph=function(){for(var a=1;11>a;a++)for(var c=0;144>c;c+=1){var d=new Company("SalesLogCompany");d.currentWeek=c;var f=new Game(d);f.topic=Topics.topics[0];f.genre=GameGenre.Action;for(var g=0;g<Platforms.allPlatforms.length;g++)Platforms.getRetireDate(Platforms.allPlatforms[g])>
c&&Platforms.getPublishDate(Platforms.allPlatforms[g])<=c&&0<Platforms.getMarketSizeForWeek(Platforms.allPlatforms[g],c,d)&&(f.platform=Platforms.allPlatforms[g]);f.score=a;Sales.calculateSales(d,f)}};Platforms.getRetireDate=function(a){return a.isCustom?GameManager.company.currentWeek+GameFlags.CONSOLE_SALES_LENGTH:"260/12/4"===a.platformRetireDate?GameManager.company.currentWeek+1E3:General.getWeekFromDateString(a.platformRetireDate)};Platforms.getPublishDate=function(a){return General.getWeekFromDateString(a.published)};
Platforms.getMarketSize=function(a,c){return Platforms.getMarketSizeForWeek(a,c.currentWeek,c)};Platforms.isStrongestPlatform=function(a,c,d){for(var f=Platforms.getPlatformsOnMarket(d),g=Platforms.getMarketSizeForWeek(f.first(function(a){return"PC"===a.id}),c,d,!0),f=f.filter(function(a){return a.isCustom}),k=0;k<f.length;k++)g=Math.max(g,Platforms.getMarketSizeForWeek(f[k],c,d,!0));return Platforms.getMarketSizeForWeek(a,c,d,!0)===g?!0:!1};Platforms.getMarketSizeForWeek=function(a,c,d,f){if(a.isCustom){if(a.currentSalesCash){var g=
1;d.flags.grid&&!f&&Platforms.isStrongestPlatform(a,c,d)&&(g=1.05);return Math.max(5*Math.floor(a.currentSalesCash/Sales.consoleUnitPrice*g),5E6*a.startAmount)}return 5E6*a.startAmount}var k=c-Platforms.getPublishDate(a);if(0>k)return 0;var l=a.startAmount,h=a.unitsSold,m=Platforms.getRetireDate(a)-Platforms.getPublishDate(a);if(a.marketKeyPoints){for(var g=Platforms.getPublishDate(a),m=Platforms.getRetireDate(a),n=0;n<a.marketKeyPoints.length;n++){var p=General.getWeekFromDateString(a.marketKeyPoints[n].date);
c>=p&&(k=c-p,l=a.marketKeyPoints[n].amount,g=p)}for(n=a.marketKeyPoints.length-1;0<=n;n--)p=General.getWeekFromDateString(a.marketKeyPoints[n].date),c<=p&&(m=p,h=a.marketKeyPoints[n].amount);m-=g}g=1;d.flags.grid&&!f&&"PC"===a.id&&Platforms.isStrongestPlatform(a,c,d)&&(g=1.05);if(0===m)return 5E6*l;k>m&&(k=m);return 5E6*(k/m*(h-l)+l)*g};Platforms.getTotalMarketSizePercent=function(a,c){for(var d=0,f=Platforms.getPlatformsOnMarket(GameManager.company),g=0;g<f.length;g++)d+=Platforms.getMarketSize(f[g],
c);return 100/d*Platforms.getMarketSize(a,c)};Platforms.getGenreWeighting=function(a,c,d){for(var f=1,g=1,k=0,l=0;l<a.length;l++){var h=Platforms.getNormGenreWeighting(a[l].genreWeightings,c,d);l<a.length-1?(f*=GameFlags.MULTIPLATFORM_WEIGHTING,k+=h*f,g-=f):k+=h*g}return k};Platforms.getAudienceWeighting=function(a,c,d){if(void 0===c)return 1;for(var f=1,g=1,k=0,l=0;l<a.length;l++){var h=Platforms.getPlatformsAudienceWeighting(a[l].audienceWeightings,c,d);l<a.length-1?(f*=GameFlags.MULTIPLATFORM_WEIGHTING,
k+=h*f,g-=f):k+=h*g}return k};Platforms.getPlatformsAudienceWeighting=function(a,c,d){if(void 0===c||void 0===a)return d?0.8:1;if("young"===c)return d?a[0]:Platforms.getNormalizedAudienceWeighting(a[0]);if("everyone"===c)return d?a[1]:Platforms.getNormalizedAudienceWeighting(a[1]);if("mature"===c)return d?a[2]:Platforms.getNormalizedAudienceWeighting(a[2]);throw"unknown audience: "+genre;};Platforms.doesPlatformSupportGameSize=function(a,c){return"small"!=c&&"medium"!=c?"Gameling"!=a.id&&"Vena Gear"!=
a.id&&"grPhone"!=a.id&&"PPS"!=a.id&&"GS"!=a.id:!0};Platforms.getPlatformsOnMarket=function(a){return Platforms.getPlatforms(a).filter(function(a){return Platforms.getRetireDate(a)>Math.floor(GameManager.company.currentWeek)&&!a.isCustom||!0===a.isCustom&&GameManager.company.currentWeek>General.getWeekFromDateString(a.published)&&!a.soldOut})};Platforms.getPlatforms=function(a,c){return c?Platforms.allPlatforms.concat(a.licencedPlatforms):a.availablePlatforms.concat(a.licencedPlatforms)}})();"use strict";
var Topics={};
Topics.topics=[{id:"Sports",name:"Sports".localize("game topic"),genreWeightings:[1,0.6,0.6,1,0.7,1],audienceWeightings:[1,1,0.8],missionOverrides:[[0.9,1,0,0.7,0.8,1,0.6,0,0],[0,0.9,0,0,0.9,0,0,0,0],[0,1,0.9,0,0,0,0.7,1,0.9],[0,0,0,0.8,0,0,0.7,0,0],[0.8,1,0.9,0,0,0,0.8,1,0.9],[0,0,0,0,0,0,0,0,0]]},{id:"Military",name:"Military".localize("game topic"),genreWeightings:[1,0.6,0.8,1,1,0.6],audienceWeightings:[0.7,0.9,1]},{id:"Medieval",name:"Medieval".localize("game topic"),genreWeightings:[1,1,1,0.8,
1,0.7],audienceWeightings:[1,1,0.9]},{id:"Space",name:"Space".localize("game topic"),genreWeightings:[1,0.8,0.6,1,1,0.7],audienceWeightings:[0.8,1,1]},{id:"Racing",name:"Racing".localize("game topic"),genreWeightings:[0.9,0.6,0.8,1,0.7,1],audienceWeightings:[1,1,0.9],missionOverrides:[[0,0,0,0,0,0,0.7,0.9,1],[0,0.9,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0.7,0.9,1],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]]},{id:"Fantasy",name:"Fantasy".localize("game topic"),genreWeightings:[1,1,1,0.8,1,0.6],
audienceWeightings:[1,1,1]},{id:"Pirate",name:"Pirate".localize("game topic"),genreWeightings:[0.8,1,0.9,0.9,0.7,0.8],audienceWeightings:[1,1,0.8]},{id:"Sci-Fi",name:"Sci-Fi".localize("game topic"),genreWeightings:[1,1,1,1,1,0.8],audienceWeightings:[0.8,1,1]},{id:"Airplane",name:"Airplane".localize("game topic"),genreWeightings:[1,0.6,0.8,1,1,1],audienceWeightings:[1,1,0.9]},{id:"Dungeon",name:"Dungeon".localize("game topic"),genreWeightings:[1,0.8,1,1,1,0.6],audienceWeightings:[0.8,1,1]},{id:"Mystery",
name:"Mystery".localize("game topic"),genreWeightings:[0.6,1,1,0.8,0.6,0.8],audienceWeightings:[0.8,0.9,1],missionOverrides:[[0.9,0.8,1,0.9,1,0.8,1,0.8,0.9],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0.8,1,0.9,0.8,1,0.9,1,0.8,0.9],[0.8,1,0.9,0.8,1,0.9,1,0.8,0.9],[0,0,0,0,0,0,0,0,0]]},{id:"Martial Arts",name:"Martial Arts".localize("game topic"),genreWeightings:[1,0.8,1,1,0.7,1],audienceWeightings:[0.7,0.9,1]},{id:"History",name:"History".localize("game topic"),genreWeightings:[0.8,0.8,0.8,1,1,0.9],
audienceWeightings:[0.8,1,0.9]},{id:"Horror",name:"Horror".localize("game topic"),genreWeightings:[1,1,0.8,0.6,0.7,0.8],audienceWeightings:[0.6,0.9,1]},{id:"Business",name:"Business".localize("game topic"),genreWeightings:[0.6,0.8,0.8,1,1,0.6],audienceWeightings:[0.9,1,0.7]},{id:"Transport",name:"Transport".localize("game topic"),genreWeightings:[0.6,0.6,0.6,1,1,0.6],audienceWeightings:[0.9,1,0.7]},{id:"Comedy",name:"Comedy".localize("game topic"),genreWeightings:[0.6,1,0.8,0.6,0.6,1],audienceWeightings:[0.8,
0.9,1]},{id:"Ninja",name:"Ninja".localize("game topic"),genreWeightings:[1,0.8,0.8,0.6,0.8,0.9],audienceWeightings:[1,0.9,0.9]},{id:"Romance",name:"Romance".localize("game topic"),genreWeightings:[0.6,1,0.8,0.9,0.6,0.9],audienceWeightings:[0.8,1,1]},{id:"Movies",name:"Movies".localize("game topic"),genreWeightings:[0.8,0.8,0.6,1,0.6,1],audienceWeightings:[0.9,1,0.9]},{id:"Spy",name:"Spy".localize("game topic"),genreWeightings:[1,1,1,0.8,0.7,0.8],audienceWeightings:[0.8,0.9,1]},{id:"Detective",name:"Detective".localize("game topic"),
genreWeightings:[0.6,1,1,0.8,0.6,0.9],audienceWeightings:[0.9,1,0.8],missionOverrides:[[0.9,0.8,1,0.9,1,0.8,1,0.8,0.9],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0.8,1,0.9,0.8,1,0.9,1,0.8,0.9],[0.8,1,0.9,0.8,1,0.9,1,0.8,0.9],[0,0,0,0,0,0,0,0,0]]},{id:"Cyberpunk",name:"Cyberpunk".localize("game topic"),genreWeightings:[1,0.8,1,0.8,0.7,0.6],audienceWeightings:[0.7,0.9,1],missionOverrides:[[1,0.8,0.9,0.8,1,0.9,1,0.9,0.8],[0,0,0,0,0,0,1,0.9,0.8],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,1,0,0],[0,0,0,0,0,0,1,0,
0],[0,0,0,0,0,0,1,0,0]]},{id:"UFO",name:"UFO".localize("game topic"),genreWeightings:[1,0.8,0.6,0.8,1,0.8],audienceWeightings:[0.8,1,0.9]},{id:"Hospital",name:"Hospital".localize("game topic"),genreWeightings:[0.6,0.6,0.8,1,0.8,0.7],audienceWeightings:[0.7,1,0.8]},{id:"Evolution",name:"Evolution".localize("game topic"),genreWeightings:[0.7,0.6,0.6,1,1,0.6],audienceWeightings:[0.8,1,0.7]},{id:"Time Travel",name:"Time Travel".localize("game topic"),genreWeightings:[0.9,1,1,0.7,0.6,0.7],audienceWeightings:[0.9,
1,0.8]},{id:"Life",name:"Life".localize("game topic"),genreWeightings:[0.6,1,0.9,1,0.6,0.8],audienceWeightings:[1,1,0.8]},{id:"Virtual Pet",name:"Virtual Pet".localize("game topic"),genreWeightings:[0.6,0.8,0.9,1,0.9,1],audienceWeightings:[1,0.8,0.7]},{id:"Vocabulary",name:"Vocabulary".localize("game topic"),genreWeightings:[0.6,0.6,0.6,1,1,1],audienceWeightings:[0.9,1,0.6]},{id:"Hunting",name:"Hunting".localize("game topic"),genreWeightings:[1,0.9,0.9,1,0.7,0.9],audienceWeightings:[0.9,1,0.9]},{id:"Law",
name:"Law".localize("game topic"),genreWeightings:[0.6,1,0.9,0.9,0.9,0.6],audienceWeightings:[0.8,1,0.7],missionOverrides:[[0,0,0,1,0.8,0.9,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0.8,0.9,1,1,0.8,0.9,1,0.9,0.8],[0,0,0,0,0,0,0,0,0],[0,0,0,1,0.9,0,0,0,0]]},{id:"Game Dev",name:"Game Dev".localize("game topic"),genreWeightings:[0.6,0.7,0.6,1,0.6,0.8],audienceWeightings:[0.9,1,0.7]},{id:"City",name:"City".localize("game topic"),genreWeightings:[0.7,0.6,0.7,1,1,0.7],audienceWeightings:[0.9,1,0.8]},
{id:"School",name:"School".localize("game topic"),genreWeightings:[0.8,1,1,1,1,0.8],audienceWeightings:[1,0.9,0.7]},{id:"Fashion",name:"Fashion".localize("game topic"),genreWeightings:[0.6,0.8,1,1,0.6,1],audienceWeightings:[1,0.8,0.6]},{id:"Zombies",name:"Zombies".localize("game topic"),genreWeightings:[1,0.7,0.9,0.7,0.9,1],audienceWeightings:[0.9,0.8,1]},{id:"Hacking",name:"Hacking".localize("game topic"),genreWeightings:[0.7,0.8,0.7,1,1,0.6],audienceWeightings:[0.7,0.9,1]},{id:"Government",name:"Government".localize("game topic"),
genreWeightings:[0.6,0.6,0.6,1,1,0.7],audienceWeightings:[0.6,1,0.8]},{id:"Prison",name:"Prison".localize("game topic"),genreWeightings:[1,1,0.8,1,0.8,0.6],audienceWeightings:[0.7,0.9,1]},{id:"Surgery",name:"Surgery".localize("game topic"),genreWeightings:[0.8,0.7,0.6,1,0.7,0.6],audienceWeightings:[0.8,1,0.9]},{id:"Music",name:"Music".localize("game topic"),genreWeightings:[1,0.9,0.6,1,0.6,1],audienceWeightings:[1,0.9,0.8],missionOverrides:[[0,0,0,0,0,0,0.8,0.9,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,
0,0,0.9,0.8,1],[0,0,0,0,0,0,0.8,0.9,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,0,0,0.7,0.9,1]]},{id:"Rythm",name:"Rhythm".localize("game topic"),genreWeightings:[1,0.7,0.7,1,0.6,1],audienceWeightings:[1,0.9,0.8],missionOverrides:[[0,0,0,0,0,0,0.8,0.9,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,0,0,0.8,0.9,1],[0,0,0,0,0,0,0.9,0.8,1],[0,0,0,0,0,0,0.7,0.9,1]]},{id:"Superheroes",name:"Superheroes".localize("game topic"),genreWeightings:[1,0.6,0.9,0.6,0.6,0.7],audienceWeightings:[1,1,1]},{id:"Post Apocalyptic",
name:"Post Apocalyptic".localize("game topic"),genreWeightings:[1,0.8,1,0.6,0.9,0.6],audienceWeightings:[0.6,0.9,1]},{id:"Alternate History",name:"Alternate History".localize("game topic"),genreWeightings:[1,0.8,1,0.8,0.9,0.6],audienceWeightings:[0.6,1,1]},{id:"Vampire",name:"Vampire".localize("game topic"),genreWeightings:[1,0.8,1,0.6,0.6,0.7],audienceWeightings:[0.7,1,1]},{id:"Werewolf",name:"Werewolf".localize("game topic"),genreWeightings:[1,0.8,1,0.6,0.6,0.7],audienceWeightings:[0.7,0.9,1]},
{id:"Aliens",name:"Aliens".localize("game topic"),genreWeightings:[1,0.8,1,0.6,0.9,0.7],audienceWeightings:[0.9,1,1]},{id:"Wild West",name:"Wild West".localize("game topic"),genreWeightings:[0.9,0.7,1,0.6,0.6,0.7],audienceWeightings:[1,0.9,1]},{id:"Dance",name:"Dance".localize("game topic"),genreWeightings:[0.7,0.6,0.6,1,0.6,1],audienceWeightings:[1,0.9,0.8]}];
if(GameFlags.ghg6&&Topics.topics.some(function(a){return 6!=a.genreWeightings.length||a.genreWeightings.some(function(a){return 0.6>a||1<a})}))throw"invalid topic data";"use strict";var Reviews={};
(function(){var a=function(a){if(a.lastTopScore){var b=6>=a.getCurrentDate().year?1.15:23<a.getCurrentDate().year?1.1:1.2,d=a.previousTopScore?a.previousTopScore:20,b=Math.floor(a.lastTopScore+a.lastTopScoreIncrease*b),c=6+9*General.getGameSizeDurationFactor(a.lastTopScoreGameSize);return!a.lastTopScoreWeek||a.currentWeek>=a.lastTopScoreWeek+c?b:Math.floor(d+(b-d)*(a.currentWeek-a.lastTopScoreWeek)/c)}return 20},b=function(b,d){if(!b.lastTopScore||b.lastTopScore<d){var c=a(b);b.lastTopScore?(b.lastTopScoreIncrease=
Math.max(d-b.lastTopScore,0.1*c),2<=b.currentLevel&&b.lastTopScoreIncrease>0.2*b.lastTopScore&&(b.lastTopScoreIncrease=0.2*b.lastTopScore)):b.lastTopScoreIncrease=Math.max(d-c,0.1*c);var l=20<b.lastTopScore?b.lastTopScore:20;b.previousTopScore=l>c?c:l;b.previousTopScore+=Math.abs((d-b.previousTopScore)/3);b.previousTopScore>d&&(b.previousTopScore=d);b.lastTopScore=d;b.lastTopScoreWeek=b.currentWeek;b.lastTopScoreGameSize=b.currentGame.gameSize}},c=function(a,d){a.topScoreAchievements++;a.currentGame.flags.topScore=
!0;b(a,d)};Reviews.reviewGame=function(a){var b=a.currentGame,d=Reviews.rateGame(a),c=b.releaseWeek-a.currentWeek;a.currentGame.reviews=d;d="The first reviews for our newly released game, {0}, came in!".localize().format(a.currentGame.title);a.notifications.push(new Notification("Game review".localize("heading"),d,"OK".localize(),c+0.3));a.notifications.push(new Notification("{Reviews}",null,null,c+0.3));0===a.gameLog.length&&a.notifications.push(new Notification("News".localize("heading"),Media.createFirstGameStory(a),
"OK".localize(),c+0.7));b.flags.sameGenreTopic&&(b=Media.createSameGenreTopicStory(a,b))&&(b.weeksUntilFired=c+1,a.notifications.push(b))};var d=function(a,b){var d=Missions.getAllMissions().filter(function(a){return"dev"===a.missionType&&0.9<=Missions.getGenreWeighting(a,b)}).count(function(d){if(b.flags.featureResponsibility.hasOwnProperty(d.id)){var c=b.flags.featureResponsibility[d.id],l=a.staff.first(function(a){return a.id===c});if(l&&l.flags.expert===d.id)return!0}return!1});2<=d&&(b.flags.psEnabled=
!0);if("small"===b.gameSize&&2<=a.currentLevel||"medium"===b.gameSize&&1E5>=a.fans)return 9;var c=b.flags.techLevel;return"large"===b.gameSize?(c=(3-c).clamp(0,3),10-c):"aaa"===b.gameSize?(c=(5-c).clamp(0,3),d=(3-d).clamp(0,3),10-(c+0.6*d)):10};Reviews.rateGame=function(f){var g=[],k=[],l=1,h=f.currentGame;GDT.fire(GameManager,GDT.eventKeys.gameplay.beforeGameReview,{company:f,game:h});h.flags.mmo&&(l=2);var m=null;h.sequelTo&&(m=f.getGameById(h.sequelTo),m.releaseWeek>f.currentWeek-40&&(h.flags.sequelsTooClose=
!0));var n=h.technologyPoints,p=h.designPoints,q=0,s=0,t=0;if(30<=p+n){var r=GameGenre.getGoldenRatio(h.genre,h.secondGenre),r=p*r-n,u=0,u=n>p?Math.abs(r/n*100):Math.abs(r/p*100);"goldenRatio percentDifference: {0}".format(u).log();25>=Math.abs(u)?(q+=0.1,s+=1,k.push("They achieved a great balance between technology and design.".localize())):50<Math.abs(u)&&(q-=0.1,0>r?g.push("They should focus more on design.".localize()):g.push("They should focus more on technology.".localize()))}r=h.featureLog.filter(function(a){return"mission"===
a.missionType});u=r.filter(function(a){var b=a.duration/General.getGameSizeDurationFactor(h.gameSize)/General.getMultiPlatformDurationFactor(h)/(3*Missions.BASE_DURATION);return 0.9<=Missions.getGenreWeighting(a,h)&&0.4<=b});2<=u.length?(q+=0.2,s+=u.length,k.push("Their focus on {0} served this game very well.".localize().format(u.map(function(a){return Missions.getMissionWithId(a.id)}).pickRandom().name))):1===u.length?(q+=0.1,s+=1):q-=0.15*l;var z=r.filter(function(a){var b=a.duration/General.getGameSizeDurationFactor(h.gameSize)/
General.getMultiPlatformDurationFactor(h)/(3*Missions.BASE_DURATION);return 0.8>Missions.getGenreWeighting(a,h)&&0.4<=b});2===z.length?(u=Missions.getMissionWithId(z.pickRandom().id),q-=0.2*l,t+=z.length,g.push("Their focus on {0} is a bit odd.".localize().format(u.name))):1===z.length&&(q-=0.1*l,t+=1);z=r.filter(function(a){var b=a.duration/General.getGameSizeDurationFactor(h.gameSize)/General.getMultiPlatformDurationFactor(h)/(3*Missions.BASE_DURATION);return 0.9<=Missions.getGenreWeighting(a,h)&&
0.2>=b});for(r=0;r<z.length;r++)u=Missions.getMissionWithId(z[r].id),q-=0.15*l,t+=1,g.push("They shouldn't forget about {0}.".localize().format(u.name));l=(p+n)/2/General.getGameSizePointsFactor(h);p=GameGenre.getGenreWeighting(h.topic.genreWeightings,h.genre,h.secondGenre);0.6>=p?g.push("{0} and {1} is a terrible combination.".localize().format(h.topic.name,h.getGenreDisplayName())):1===p&&k.push("{0} and {1} is a great combination.".localize().format(h.topic.name,h.getGenreDisplayName()));u=h.genre.name;
h.secondGenre&&(u+="-"+h.secondGenre.name);(n=f.gameLog.last())&&!h.flags.isExtensionPack&&n.genre===h.genre&&n.secondGenre===h.secondGenre&&n.topic===h.topic&&(t+=1,n="Another {0}/{1} game?".localize().format(u,h.topic.name),g.push(n),h.flags.sameGenreTopic=!0,"repeat genre/topic penalty: {0}:".format(-0.4).log(),q+=-0.4);n=Platforms.getGenreWeighting(h.platforms,h.genre,h.secondGenre);if(0.6>=n){for(var w=Platforms.getNormGenreWeighting(h.platforms[0].genreWeightings,h.genre,h.secondGenre),y=0,
r=1;r<h.platforms.length;r++)z=Platforms.getNormGenreWeighting(h.platforms[r].genreWeightings,h.genre,h.secondGenre),z<w&&(y=r);g.push("{0} games don't work well on {1}.".localize().format(u,h.platforms[y].name))}else if(1<n){w=Platforms.getNormGenreWeighting(h.platforms[0].genreWeightings,h.genre,h.secondGenre);y=0;for(r=1;r<h.platforms.length;r++)z=Platforms.getNormGenreWeighting(h.platforms[r].genreWeightings,h.genre,h.secondGenre),z>w&&(y=r);k.push("{0} games work well on {1}.".localize().format(u,
h.platforms[y].name))}u=General.getAudienceWeighting(h.topic.audienceWeightings,h.targetAudience);0.6>=u&&g.push("{0} is a horrible topic for {1} audiences.".localize().format(h.topic.name,General.getAudienceLabel(h.targetAudience)));h.flags.sequelsTooClose&&(q-=0.4,t+=1,h.flags.isExtensionPack?g.push("Already a expansion pack?".localize()):g.push("Didn't we just play {0} recently?".localize().format(m.title)));h.flags.usesSameEngineAsSequel&&!h.flags.isExtensionPack?(q-=0.1,t+=1):h.flags.hasBetterEngineThanSequel&&
(q+=0.2,s+=1);h.flags.mmo&&1>GameGenre.getGenreWeighting(h.topic.genreWeightings,h.genre,h.secondGenre)&&(q-=0.15);z=1;0<h.bugs&&(z=1-0.8*((100/(h.technologyPoints+h.designPoints)*h.bugs).clamp(0,100)/100),0.6>=z?g.push("Riddled with bugs.".localize()):0.9>z&&g.push("Too many bugs.".localize()));r=1;if(1<h.platforms.length){y=h.platforms[0].techLevel;"PC"==h.platforms[0].id&&(y=h.platforms[1].techLevel);for(var B=y,v=1;v<h.platforms.length;v++)"PC"!=h.platforms[v].id&&(y=Math.max(y,h.platforms[v].techLevel),
B=Math.min(B,h.platforms[v].techLevel));r-=(y-B)/20}l=(l+l*q)*n;l*=u;l*=z;l*=r;r=GameTrends.getCurrentTrendFactor(h);h.flags.trendModifier=r;l*=r;y=a(f);w=l/y;0.6<=w&&(0.7>=u||0.7>=p)&&(w=0.6+(w-0.6)/2);if(0.7<w)for(r=0;r<h.platforms.length;r++)if(0.8>=Platforms.getPlatformsAudienceWeighting(h.platforms[r].audienceWeightings,h.targetAudience)){l*=Platforms.getPlatformsAudienceWeighting(h.platforms[r].audienceWeightings,h.targetAudience,!0);w=l/y;break}"achieved {0} / top game {1} = {2}".format(l,
Reviews.topScore,w).log();p=!1;w=(10*w).clamp(1,10);h.flags.teamContribution=0;f.staff.forEach(function(a){h.flags.teamContribution=1>a.flags.gamesContributed?h.flags.teamContribution+1:h.flags.teamContribution+h.getRatioWorked(a)});h.flags.teamContribution/=f.staff.length;if(0<f.lastTopScore&&w<=5.2-0.2*h.platforms.length&&0<s&&s>t&&0.8<=h.flags.teamContribution){var r=6,y=0,x;for(x in h.flags.staffContribution)h.flags.staffContribution.hasOwnProperty(x)&&y++;x=General.getOptimalTeamSize(h);x=Math.abs(x-
y);1<x&&(r-=x-1);(x=Reviews.getNewStaff(h))&&0<x.length&&(r-=x.length/2);r+=s/2-t/2;0.9>z?r-=0.5:0.6>=z&&(r-=1);0.8>=n&&(r-=1-n);0.8>=u&&(r-=1-u);if(1<h.platforms.length){y=h.platforms[0].techLevel;"PC"==h.platforms[0].id&&(y=h.platforms[1].techLevel);B=y;for(v=1;v<h.platforms.length;v++)"PC"!=h.platforms[v].id&&(y=Math.max(y,h.platforms[v].techLevel),B=Math.min(B,h.platforms[v].techLevel));r-=(y-B)/0.5}r-=f.getRandom();r=Math.min(r,7.7);w<r&&(h.flags.scoreWithoutBrackets=w,w=r);if(3<f.gameLog.length){s=
!0;for(r=1;3>=r;r++)if(t=f.gameLog[f.gameLog.length-r],t.score>5.2-0.2*t.platforms.length&&!t.flags.scoreWithoutBrackets){s=!1;break}s&&(f.lastTopScore=l,h.flags.topScoreDecreased=!0)}}s=d(f,h)/10;"medium"!=h.gameSize&&"small"!=h.gameSize&&1>s&&g.push("Technology is not state of the art.".localize());w*=s;9<=w&&(0.1>q&&0.8>f.getRandom()?p=!0:(x=Reviews.getNewStaff(h),0<x.length&&(p=!0,h.flags.newStaffIds=x.map(function(a){return a.id}))),p&&(w=h.flags.newStaffIds&&0<h.flags.newStaffIds.length?8.15+
0.95/h.flags.newStaffIds.length*f.getRandom():8.45+0.65*f.getRandom(),0.1>f.getRandom()&&(w=9+0.25*f.getRandom()),b(f,l)));m&&(4>=w?h.flags.isExtensionPack?g.push("What a horrible expansion pack!".localize()):g.push("What a horrible sequel!".localize()):7>=w?h.flags.isExtensionPack?g.push("Average expansion pack.".localize()):g.push("Average sequel.".localize()):h.flags.isExtensionPack?g.push("Great expansion pack.".localize()):k.push("Great sequel!".localize()));2>f.topScoreAchievements&&4>f.getCurrentDate().year&&
(10==w?(w-=1.05+0.45*f.getRandom(),c(f,l)):9<=w?(w-=1.05+0.2*f.getRandom(),c(f,l)):8.5<w&&(w-=0.4+0.2*f.getRandom()));9<=w&&c(f,l);10!=w&&h.flags.topScore&&3===f.topScoreAchievements&&(w=10);h.score=w;"final score: {0}".format(w).log();m&&(0.5>=f.getRandom()||!f.gameLog.some(function(a){return null!=a.sequelTo}))&&(h.flags.isExtensionPack?Media.createExtensionPackStory(f,h):Media.createSequelStory(f,h));g=Reviews.getReviews(h,w,k,g);GDT.fire(GameManager,GDT.eventKeys.gameplay.afterGameReview,{company:f,
game:h,reviews:g});return g};Reviews.getNewStaff=function(a){for(var b=GameManager.company,d=[],c=1;c<b.staff.length;c++){var h=b.staff[c];if(a.flags.staffContribution&&a.flags.staffContribution.hasOwnProperty(h.id)){var m=h.flags.gamesContributed;0.2<=m&&2>=m&&d.push(h)}}return d};Reviews.getReviews=function(a,b,d,c){var h=Math.floor(b).clamp(1,10);9.5<=b&&(h=10);for(var m=["Star Games","Informed Gamer","Game Hero","All Games"],n=[],p=[],q=[],s=1,t=0;4>t;t++){if(5===h||6===h)s=0.05>GameManager.company.getRandom()?
2:1;var r=1==Math.randomSign()?0:s*Math.randomSign(),u=(h+r).clamp(1,10);10===u&&3===q.length&&10===q.average()&&(a.flags.psEnabled?10==Math.floor(b)&&0.4>GameManager.company.getRandom()&&u++:(10>Math.floor(b)||0.8>GameManager.company.getRandom())&&u--);var z=void 0;do 0.2>=GameManager.company.getRandom()?0<=r&&2<u&&0!=d.length?z=d.pickRandom():0>r&&6>u&&0!=c&&(z=c.pickRandom()):z=void 0,z||(z=Reviews.getGenericReviewMessage(a,u));while(-1!=p.weakIndexOf(z));p.push(z);q.push(u);n.push({score:u,message:z,
reviewerName:m[t]})}return n};Reviews.getGenericReviewMessage=function(a,b){b=Math.floor(b);if(3<b&&7>b&&!a.flags.hasCustomName&&0.1>=GameManager.company.getRandom())return["As {0} as the name.".localize("{0} adjective").format(["boring".localize(),"generic".localize("used as adjective"),"blunt".localize(),"uninspired".localize(),"dull".localize()].pickRandom()),"The name says it all.".localize(),"They put as much thought into the game as into the game's name.".localize(),"Our review inspired by the game's name: bad review #{0}.".localize().format([1,
2,3,4,5,6].pickRandom())].pickRandom();if(7<=b&&!a.flags.hasCustomName&&0.1>=GameManager.company.getRandom())return["Good, despite the name.".localize(),"It's better than the name.".localize()].pickRandom();if(1===b)return["N/A not worth a statement.".localize(),"One of the worst!".localize(),"Makes you cry.".localize(),"Don't buy!".localize(),"Horrible.".localize(),"I still have nightmares!".localize(),"A disaster!".localize(),"Really bad.".localize()].pickRandom();if(2===b)return["Utterly uninspiring.".localize(),
"Not fun.".localize(),"Boring.".localize(),"Disappointing.".localize(),"Bin material.".localize(),"Bad.".localize(),"Abysmal.".localize()].pickRandom();if(3===b)return["Disappointing.".localize(),"Waste of money.".localize(),"Waste of time.".localize(),"Not much fun.".localize(),"Pretty bad.".localize()].pickRandom();if(4===b)return["Not bad. Not good.".localize(),"Meh!".localize(),"OK.".localize(),"Uninspiring.".localize()].pickRandom();if(5===b)return["Falls a bit short.".localize(),"Fun at stages.".localize(),
"Has its moments.".localize(),"Have seen better.".localize()].pickRandom();if(6===b)return["Shows potential.".localize(),"Could have been better.".localize(),"Quirky but good.".localize(),"I like it.".localize()].pickRandom();if(7===b)return["Good game.".localize(),"Enjoyable.".localize(),"Nice experience.".localize(),"Beautiful.".localize()].pickRandom();if(8===b)return["Very good.".localize(),"Very enjoyable.".localize(),"Love it!".localize(),"Played it for days.".localize()].pickRandom();if(9===
b)return["Great!".localize(),"Almost perfect.".localize(),"One of the best.".localize(),"More please.".localize(),"Great game.".localize(),"Outstanding game.".localize(),"Can't wait for the sequel.".localize()].pickRandom();if(10===b)return["A masterpiece.".localize(),"Best of its kind.".localize(),"Truly great.".localize(),"Everyone loves it!".localize(),"Must have!".localize(),"Outstanding achievement.".localize(),"Awesome!".localize(),"My new favorite!".localize()].pickRandom();if(11===b)return["11 out of 10. Game of the year, any year!".localize(),
"11 out of 10. Nuff said.".localize(),"11 out of 10. A exceptional score for an exceptional game.".localize(),"11 out of 10. Rules don't apply to this outstanding game.".localize()].pickRandom();throw"score cannot be "+b;}})();"use strict";var Sales={};
(function(){Sales.smallUnitPrice=7;Sales.mediumUnitPrice=11;Sales.largeUnitPrice=14;Sales.aaaUnitPrice=18;Sales.consoleUnitPrice=50;var a=function(a,b){var f=0;switch(b.gameSize){case "medium":f=1;break;case "large":f=1.2;break;case "aaa":f=1.5;break;default:return 1}return 1+f};Sales.MediumTargetFans=1E5;Sales.LargeTargetFans=25E4;Sales.AAATargetFans=1E6;Sales.getTargetFans=function(a,b){switch(b.gameSize){case "medium":return Sales.MediumTargetFans;case "large":return Sales.LargeTargetFans;case "aaa":return Sales.AAATargetFans;
default:return 1}};Sales.calculateSales=function(b,d){d.flags.fansAtLaunch=b.fans;var f=b.getCurrentDate().year,g=d.score.clamp(1,10);GameFlags.G782&&12<=f&&0.75>=b.getRandom()&&(g=1,b.notifications.push(new Notification("Sales Report","Boss, it seems that while many players play our new game, they steal it by downloading a cracked version rather than buying it legally.\nIf players don't buy the games they like, we will sooner or later go bankrupt.",":-(",3.3+2.8*b.getRandom())),d.flags.noSalesEvents=
!0);for(var k=g/10,l=Math.min(15E5,b.fans)+Math.max(0,b.fans-15E5)/10,h=[0,0,0],m=8,n=0;n<d.platforms.length;n++)"PC"!=d.platforms[n].id&&(m=Math.min(m,d.platforms[n].techLevel));for(n=0;n<d.platforms.length;n++){var p=d.platforms[n].techLevel;"PC"==d.platforms[n].id&&(p=m);var q=1;0==n&&1<d.platforms.length?q=0.7:1==n?q=2==d.platforms.length?0.55:0.4:2==n&&(q=0.3);h[n]+=Platforms.getMarketSize(d.platforms[n],b)*q*(1/p)*m*a(b,d)}m=[0,0,0];p=0;n=1;9>=g?(p=Math.pow(g,3)/100*0.2,4===b.currentLevel&&
(n=1.25)):(p=Math.pow(g,3)/(100-35*(g-9)),n=6>f?0.65:4===b.currentLevel?0.35:0.5);p=p*n/15*0.2+0.008;p=[p,p,p];for(n=0;n<d.platforms.length;n++)p[n]*=Platforms.getAudienceWeighting([d.platforms[n]],d.targetAudience),m[n]+=Math.floor(h[n]*p[n]);if(d.hypePoints)if(f=Math.min(500,d.hypePoints)/500,n=5<=g,d.flags.interviewHyped&&d.flags.interviewHyped.decision&&(n=8<=g),n)for(n=0;n<d.platforms.length;n++)m[n]+=Math.floor((g-5)/5*h[n]*f*0.05);else for(n=0;n<d.platforms.length;n++)m[n]-=Math.floor(g/5*
p[n]*0.25*f*h[n]);for(n=0;n<d.platforms.length;n++)m[n]=Math.floor(Math.min(m[n],h[n]));if(d.flags.royaltyRate)for(m[0]+=Math.max(0,Sales.getTargetFans(b,d)-l)*k,n=0;n<d.platforms.length;n++)m[n]*=10;else m[0]+=l*k;LOGWEEKSALES||"market size {0}. total reach {1}. existing fans {2}".format(h.sum(function(a){return a}),m.sum(function(a){return a}),l).log();h=Math.floor(0.8*m.sum(function(a){return a})*k+0.2*m.sum(function(a){return a})*b.getRandom());f=0;7<=g&&!d.flags.sequelsTooClose&&(f+=0.05*l+0.05*
l*b.getRandom());f=5<=g&&!d.flags.sequelsTooClose?d.flags.royaltyRate&&0>=Sales.getTargetFans(b,d)-l?f+Math.floor((0.005*h*k+0.005*h*b.getRandom())/10):f+Math.floor(0.005*h*k+0.005*h*b.getRandom()):-b.fans*(1-k)*0.25*b.getRandom();d.unitPrice=Sales.getUnitPrice(d);d.flags.mmo&&"aaa"===d.gameSize&&(h*=1.45);g=h*d.unitPrice;LOGWEEKSALES||"units sold: {0}, sales: {1}$, fanMod{2}".format(h,g,f).log();d.totalSalesCash||(d.totalSalesCash=0);d.totalSalesCash+=g;d.fansChangeTarget=f;d.initialSalesRank=Sales.getInitialSalesRank(b,
d);d.topSalesRank=d.initialSalesRank;GDT.fire(GameManager,GDT.eventKeys.gameplay.salesCalculated,{company:b,game:d})};Sales.getInitialSalesRank=function(a,b){var f=Math.floor(b.score);GameGenre.getGenreWeighting(b.topic.genreWeightings,b.genre,b.secondGenre);var g=-1;if(10===f)g=1;else if(9===f)g=5;else if(8===f)g=10;else if(7===f)g=20;else if(6===f)g=40;else if(5===f)g=60;else return-1;var f=g*a.getRandom(),f=f+0.5*g*a.getRandom()*Math.randomSign(),k=Math.floor(g+f);if(100<k)return-1;0>=k&&(k=1);
LOGWEEKSALES||"rank = {0} ({1}(initial)+{2}(variation))".format(k,g,Math.floor(f)).log();return k};Sales.getSalesLengthInWeek=function(a){if("small"===a.gameSize)return 10;if("medium"===a.gameSize)return 15;if("large"===a.gameSize)return 20;if("aaa"===a.gameSize)return 25};Sales.getUnitPrice=function(a){return"medium"===a.gameSize?Sales.mediumUnitPrice:"large"===a.gameSize?Sales.largeUnitPrice:"aaa"===a.gameSize?Sales.aaaUnitPrice:Sales.smallUnitPrice};Sales.getMMOIncome=function(a,b){var f=b.totalSalesCash-
b.currentSalesCash,f=1;"medium"===b.gameSize?f=0.75:"large"===b.gameSize?f=0.65:"aaa"===b.gameSize&&(f=0.5);f=(b.totalSalesCash-b.currentSalesCash)*(0.05*a.getRandom()*f+0.05*f);b.totalSalesCash+=f/2;1E4>f&&(f=1E4,b.totalSalesCash+=f);return f};Sales.getIncome=function(a,b){var f=b.totalSalesCash-b.currentSalesCash,g=1;"medium"===b.gameSize?g=0.75:"large"===b.gameSize?g=0.65:"aaa"===b.gameSize&&(g=0.5);(b.totalSalesCash-b.currentSalesCash)/b.totalSalesCash<0.1*g?(b.totalSalesCash-b.currentSalesCash)/
b.totalSalesCash>0.01*g&&(f=(b.totalSalesCash-b.currentSalesCash)*(0.4*a.getRandom()*g+0.4*g)):f=(b.totalSalesCash-b.currentSalesCash)*(0.2*a.getRandom()*g+0.2*g);return f};Sales.getGamesToSell=function(a){var b=Math.floor(a.currentWeek);return a.gameLog.filter(function(a){return b>a.releaseWeek&&!a.soldOut&&!a.flags.isExtensionPack})};Sales.getConsolesToSell=function(a){var b=Math.floor(a.currentWeek);return a.licencedPlatforms.filter(function(a){return!0===a.isCustom&&b>General.getWeekFromDateString(a.published)&&
!a.soldOut})};Sales.processSales=function(a){for(var b=Math.floor(a.currentWeek),f=a.gameLog.filter(function(a){return b>a.releaseWeek&&!a.soldOut&&!0===a.flags.isExtensionPack}),g=0,k=f.length;g<k;g++){var l=f[g],h=a.getGameById(l.sequelTo);h?(h.fansChangeTarget+=l.fansChangeTarget,h.initialSalesRank=l.initialSalesRank,h.packReleaseWeek=l.releaseWeek,h.totalSalesCash+=Math.floor(0.1*h.totalSalesCash+l.totalSalesCash),h.confAmount=l.totalSalesCash,l.soldOut=!0):l.flags.isExtensionPack=!1}f=Sales.getGamesToSell(a);
g=0;for(k=f.length;g<k;g++)Sales.sellGame(a,f[g],b);f=Sales.getConsolesToSell(a);g=0;for(k=f.length;g<k;g++)Sales.sellConsole(a,f[g],b)};Sales.sellGame=function(a,b,f){b.unitsSold||(b.unitsSold=0);b.revenue||(b.revenue=0);b.flags.saleCancelled&&(b.totalSalesCash=b.currentSalesCash);var g=Sales.getSalesLengthInWeek(b);if(b.nextSalesCash){b.currentSalesRank=b.nextSalesRank;b.fansChanged+=b.nextfansChange;b.flags.royaltyRate?(b.currentSalesCash+=b.nextSalesCash/b.flags.royaltyRate,b.unitsSold+=Math.floor(b.nextSalesCash/
b.flags.royaltyRate/b.unitPrice)):(b.currentSalesCash+=b.nextSalesCash,b.unitsSold+=Math.floor(b.nextSalesCash/b.unitPrice));0!=b.nextSalesCash&&(a.adjustCash(b.nextSalesCash,"{0} sales".localize().format(b.title)),b.revenue+=Math.floor(b.nextSalesCash));b.nextMaintenance&&0!=b.nextMaintenance&&(a.adjustCash(-b.nextMaintenance,"{0} maintenance".localize().format(b.title)),b.costs+=Math.floor(b.nextMaintenance));b.flags.mmo&&(b.flags.isProfitable=b.nextSalesCash>=b.nextMaintenance);if(0!=b.nextfansChange){var k=
Math.floor(b.nextfansChange);if(0===a.fans){if(0>=k)return;var l="{0} was so successful that we now have {1} fans!".localize().format(b.title,UI.getLongNumberString(k));a.notifications.push(new Notification("Fans".localize("heading"),l,"OK".localize(),0.2))}a.adjustFans(k)}if(b.firstSales){if(2>a.gameLog.length||10<=b.rank)l="{0} sold {1} units in its first week on the market.".localize().format(b.title,UI.getLongNumberString(b.unitsSold)),k=b.currentSalesRank,0<k&&(l+="\n"+"We made it in the charts at #{0}!".localize().format(k)),
a.notifications.push(new Notification("First week of sales!".localize(),l,"OK".localize())),Tutorial.firstSales();b.flags.mmo&&Tutorial.mmoOnSale()}b.nextfansChange=void 0;b.nextSalesCash=void 0}if(b.totalSalesCash>b.currentSalesCash||b.flags.mmo&&!b.flags.saleCancelled){l=0===b.currentSalesCash;k=0;if(!b.flags.mmo){var h=b.getSalesAnomaly();0<h?k=Math.floor(b.totalSalesCash*h*0.3):0>h&&(k=Math.floor(b.totalSalesCash*h*0.3))}h=0;h=b.flags.mmo?Sales.getMMOIncome(a,b):Sales.getIncome(a,b);b.nextfansChange=
Math.floor(h/b.totalSalesCash*b.fansChangeTarget);b.nextSalesCash=Math.floor(h+k/2);b.flags.royaltyRate&&(b.nextSalesCash=Math.floor(b.nextSalesCash*b.flags.royaltyRate),k=Math.floor(k*b.flags.royaltyRate));b.flags.mmo&&(b.maintenanceLog||(b.maintenanceLog=[]),b.nextMaintenance=Math.floor((b.currentSalesCash+b.nextSalesCash)/100),b.nextMaintenance+=Math.floor(b.nextSalesCash/(Math.pow(b.maintenanceLog.length,3)+3)));0>=b.nextSalesCash?(b.nextSalesCash=void 0,b.nextMaintenance=void 0,b.totalSalesCash=
b.currentSalesCash):(b.flags.mmo&&b.maintenanceLog.push(b.nextMaintenance),b.salesCashLog.push(b.nextSalesCash),b.totalSalesCash+=Math.floor(k));-1!=b.initialSalesRank&&(a=(f-b.releaseWeek)/g,b.packReleaseWeek&&(a=(f-b.packReleaseWeek)/g),f=Math.max(b.initialSalesRank,Math.floor(b.initialSalesRank+2*b.initialSalesRank*(a-0.1))),f=GameManager.getUniqueSalesRank(f,b),b.nextSalesRank=100<f?-1:f);l?(b.firstSales=!0,UI.addSalesCard(b.id,b.title,b.currentSalesCash,b.totalSalesCash,b.unitsSold,b.currentSalesRank,
b.salesCashLog,b.nextSalesCash,b.unitPrice,b.nextMaintenance,b.maintenanceLog,b.flags.royaltyRate)):(b.firstSales=!1,UI.updateSalesCard(b.id,b.unitsSold,b.nextSalesCash,b.salesCashLog,b.unitPrice,b.currentSalesRank,b.nextMaintenance,b.maintenanceLog,b.flags.royaltyRate))}else b.soldOut=!0,b.currentSalesRank=-1,UI.removeSalesCard(b.id,!0),l="{0} is now off the market. It sold {1} units generating {2} in sales.".localize().format(b.title,UI.getLongNumberString(b.unitsSold),UI.getLongNumberString(b.revenue)),
a.notifications.push(new Notification("Game off the market.".localize("heading"),l,"OK".localize()))};Sales.getConsoleIncome=function(a,b){var f=1E6*b.unitsSold*Sales.consoleUnitPrice,g=f-b.currentSalesCash,g=0.1;General.getWeekFromDateString(b.published)+10>a.currentWeek?g=0.2:General.getWeekFromDateString(b.published)+20>a.currentWeek&&(g=0.13);g=(f-b.currentSalesCash)*(a.getRandom()*g*0.15+0.15*g);1E4>g&&(g=5E3+5E3*a.getRandom(),b.unitsSold=(f+g)/1E6/Sales.consoleUnitPrice);return g};Sales.getSalesAnomalyForConsole=
function(a,b){for(var f=Math.floor(a.currentWeek),g=0,k=a.gameLog.filter(function(a){return f>a.releaseWeek&&!a.soldOut&&0<a.platforms.filter(function(a){return a.id===b.id}).length&&100>=a.currentSalesRank&&0<a.currentSalesRank}),l=0,h=k.length;l<h;l++)g=Math.max(g,(101-k[l].currentSalesRank)/100);0>b.satisFaction-1&&(g+=(b.satisFaction-1).clamp(-0.5,0));return g};Sales.sellConsole=function(a,b,f){b.saleCancelled&&(b.unitsSold=b.currentSalesCash/Sales.consoleUnitPrice/1E6,b.soldOut=!0);var g=1E6*
b.unitsSold*Sales.consoleUnitPrice;b.currentSalesCash||(b.currentSalesCash=0);b.currentUnitsSold||(b.currentUnitsSold=0);b.salesCashLog||(b.salesCashLog=[]);b.nextSalesCash&&(b.currentSalesCash+=b.nextSalesCash,b.currentUnitsSold+=Math.floor(b.nextSalesCash/Sales.consoleUnitPrice),0!=b.nextSalesCash&&a.adjustCash(b.nextSalesCash,"{0} sales".localize().format(b.name)),b.nextSalesCash=void 0);if(Math.floor(g)>b.currentSalesCash){f>General.getWeekFromDateString(b.published)+1&&Sales.generateMaintenancePoints(a,
b,f);f=0===b.currentSalesCash;General.getWeekFromDateString(b.published);var k=Sales.getConsoleIncome(a,b);a=Sales.getSalesAnomalyForConsole(a,b);var l=0;0!=a&&(l=Math.floor(k*a),b.unitsSold+=l/Sales.consoleUnitPrice/1E6);b.nextSalesCash=Math.floor(k+l);0>=b.nextSalesCash?(b.nextSalesCash=void 0,b.currentUnitsSold=b.currentSalesCash/Sales.consoleUnitPrice):b.salesCashLog.push(b.nextSalesCash);f?(b.firstSales=!0,UI.addSalesCard(b.id,b.name,b.currentSalesCash,g,b.currentUnitsSold,-1,b.salesCashLog,
b.nextSalesCash,Sales.consoleUnitPrice)):(b.firstSales=!1,UI.updateSalesCard(b.id,b.currentUnitsSold,b.nextSalesCash,b.salesCashLog,Sales.consoleUnitPrice,-1))}else UI.removeSalesCard(b.id,!0),UI.removeMaintenanceCard(b,!1),"{0} is now off the market. It sold {1} units generating {2} in sales.".localize().format(b.name,UI.getLongNumberString(b.currentUnitsSold),UI.getLongNumberString(b.currentSalesCash))};var b=function(a){for(var b=a.salesCashLog.length,f=0,g=b-1;g>Math.max(b-5,0);g--)f+=a.salesCashLog[g];
return Math.floor(f/Sales.consoleUnitPrice)};Sales.generateMaintenancePoints=function(a,d,f){void 0===d.maintenancePoints&&(d.repairPoints=0,d.maintenancePoints=0,d.maintenanceLog=[]);f=1E6*d.unitsSold;f=Math.min(32.5*b(d)/f*10,45);a=Math.max(5,Math.floor(f-f*(0.4*a.getRandom()+0.6*d.qF)));d.maintenancePoints+=a;d.maintenanceLog.push(d.maintenancePoints);UI.updateMaintenanceCard(d)};Sales.sellSDKs=function(a){var b=a.engines.filter(function(a){return-1!=a.parts.indexOf(Research.sdk)});if(0<b.length)for(var b=
b.sort(function(a,b){return a.techLevel-b.techLevel}),f=0;f<b.length;f++)if(b[f].releaseWeek+96>a.currentWeek){var g=b[f].costs/12,k=Platforms.getPlatformsOnMarket(a).filter(function(a){return!a.isCustom}).max(function(a){return a.techLevel});k&&(g*=b[f].techLevel/k);a.adjustCash(g,b[f].name+" SDK".localize("short for Software Development Kit"));break}};Sales.applyGridSales=function(a){if(a.flags.grid){for(var b=Platforms.getPlatformsOnMarket(a),f=Platforms.getMarketSizeForWeek(b.first(function(a){return"PC"===
a.id}),a.currentWeek,a,!0),g="PC",k=b.filter(function(a){return a.isCustom}),l=0;l<k.length;l++){var h=Platforms.getMarketSizeForWeek(k[l],a.currentWeek,a,!0);h>f&&(f=h,g=k[l].id)}b=b.first(function(a){return a.id===g});a.adjustCash(Platforms.getTotalMarketSizePercent(b,GameManager.company)/100*2E6,"Grid income".localize("heading"))}}})();var SalesEvents={};
(function(){var a=SalesEvents;a.getAllNotificationsObjects=function(){var b=[],d;for(d in a)if(a.hasOwnProperty(d)){var c=a[d];void 0!=c.id&&b.push(c)}return b};General.registerAsNotificationSource(a);a.getSaleRecord=function(a,b){if(!b.flags.royaltyRate&&!b.flags.noSalesEvents){var d=[1E4,5E4,1E5].reverse(),c=[0.1,0.2,0.3].reverse();if(!a.flags.game100Ksales)for(var f=0;f<d.length;f++){var g=d[f];if(b.unitsSold>g&&!a.flags["game"+UI.getShortNumberString(g)+"sales"])return d.slice(f).forEach(function(b){a.flags["game"+
UI.getShortNumberString(b)+"sales"]=!0}),a.notifications.push(new Notification({header:"Sales Record".localize("heading"),text:"{0} has achieved a company sales record with over {1} units sold!\nThis is an important milestone in the history of {2}!".localize().format(b.title,UI.getShortNumberString(g),a.name)})),c[f]}for(var k=[5E5,1E6,5E6,1E7,5E7,1E8].reverse(),c=[0.4,0.5,0.6,0.7,0.8,0.9].reverse(),t="We just got word that {0} which was recently released by {1} has racked up over {2} in sales.".localize()+
"\n",d=["Gold","Platinum",void 0,"Diamond",void 0,void 0].reverse(),f=0;f<k.length;f++)if(g=k[f],!(b.unitsSold<=g)){if(b.flags["game"+UI.getShortNumberString(g)+"sales"])break;k=t.format(b.title,a.name,UI.getShortNumberString(g));d.length>f&&void 0!=d[f]&&0.5<a.getRandom()&&(k+="If the game were a music record it would have {0} status.{n}".localize("{0} gold, platinum etc.").format(d[f]));k=2==f?k+["An incredible achievement".localize(),"This is an unbelievably high number.".localize(),"This game truly deserves to be called AAA.".localize()].pickRandom():
1==f?k+"Only a true master of the industry could achieve such a milestone. {0} will forever be remembered in gaming history for this.".localize().format(a.staff[0].name):k+["The excitement around the game seems to have no end.".localize(),"We wonder how many more it will sell.".localize(),"Competitors have been observed muttering jealous remarks.".localize(),"Go {0}! Well done!".localize().format(a.name)].pickRandom();a.notifications.push(new Notification({header:"Industry News".localize("heading"),
text:k}));c=c[f];b.flags["game"+UI.getShortNumberString(g)+"sales"]=!0;return c/(b.flags.salesAnomaly+1)}}};a.getTopScoreSalesEvent=function(a,d){if(!d.flags.topScoreAchievementShown){var c="",f;switch(a.topScoreAchievements){case 1:c="According to our market research the recently published game '{0}' is a surprise hit with players.".localize().format(d.title);c+="\n\n "+"The developer {0} is fairly new to the gaming industry but we cannot wait for what they will develop next!".localize().format(a.name);
f=0.2;break;case 2:var g=d.reviews.max(function(a){return a.score}),c=d.reviews.first(function(a){return a.score==g}),c="The latest game by {0} has received very positive reviews overall!\n{1} gave it a '{2}' saying '{3}'.".localize().format(a.name,c.reviewerName,c.score,c.message),c=c+("\n"+"If {0} continues to innovate like this they might become a new fan favorite!".localize().format(a.name));f=0.3;break;case 3:c="{0}, the newest game by {1} has caused a storm of good reviews and excited customers.".localize().format(d.title,
a.name),c+="\n\n"+"Industry professionals say that {0} is one of these rare games that will set a new quality standard for future games.{n}".localize().format(d.title),c+="It seems that {0} really has made gaming history with {1}!\nWell done!".localize().format(a.name,d.title),f=0.5}!c&&9<=d.score&&(c=b(a,d))&&(f=0.4*a.getRandom());c&&(d.flags.topScoreAchievementShown=!0,a.notifications.push(new Notification("News",c,"OK")));return f}};var b=function(a,b){var d=b.featureLog.filter(function(a){return"mission"===
a.missionType}).filter(function(a){var d=a.duration/General.getGameSizeDurationFactor(b.gameSize)/General.getMultiPlatformDurationFactor(b)/(3*Missions.BASE_DURATION);return 0.9<=Missions.getGenreWeighting(a,b)&&0.4<=d});if(0!=d.length){var f=d.pickRandom(),d=["If you are not a fan of {0} now then chances are you will be after playing their latest hit {1}.".localize(),"Ladies and gentlemen, the surprise hit of the year is {1} by {0}.".localize(),"When I started playing {1} I had no idea what I was in for.".localize(),
"There are a lot of good surprises waiting for you in {1}.".localize(),"Another memorable game by {0} has been released.".localize(),"I have been playing {1} and have tremendously enjoyed the experience.".localize(),"{0} surprises us again with a very enjoyable game.".localize()],f=c(f),g=["Rarely will a game captivate you as much as {1}.".localize(),"{1} really deserves the top spots in the charts.".localize(),"Simply one of the best games I've played.".localize(),"Well, what can I say? Stop reading. Start playing.".localize(),
"A stellar effort by {0}.".localize(),"To {0}: Keep the hits coming please :)".localize(),"Only a game with unicorns, rainbows, pirates and ninjas could possibly be better.".localize(),"Summary: best. game. ever.".localize()],q=k(a).pickRandom();return(d.pickRandom()+" "+f+" "+g.pickRandom()).format(a.name,b.title)+"\n{0}, {1}".format(q.author,q.name)}},c=function(a){var b={Engine:["There is a rare technical polish in this game which really comes through in the overall experience.".localize(),"The game shines of technical excellence. Clearly the developers know what they are doing.".localize(),
"I was positively surprised to see the level of polish that went into the underlying game engine. The effort really paid off.".localize()],Gameplay:["In this type of game the core gameplay mechanics are really important and the developer has nailed it.".localize(),"I have rarely seen such responsive game controls. A true joy to play.".localize(),"The attention to detail to the core gameplay has really paid off.".localize()],"Story/Quests":["This game doesn't just tell a story, no, it manages to draw you in so that you truly feel part of an adventure.".localize(),
"A true achievement in interactive story telling, the characters and the captivating scenarios just stick in your mind.".localize(),"Whoever wrote the story of {1} will likely win a prize for it.".localize()],Dialogs:["The character dialogues in this game are just oustanding. Rarely will you be so captivated in a conversation.".localize(),"The term dialogue tree really doesn't do {1} justice. This game has a dialogue forest... in a good way.".localize(),"A perfect example on how dialogues in a game can be so much more thrilling than in a movie or book. At every stage I felt like I really had choices and was driving the story.".localize()],
"Level Design":["The progression in this story is just perfect. Just when you start to think things settle down something surprising will happen.".localize(),"The level design is both sophisticated and surprisingly intuitive. I never felt like I was guided through a level but I never ever got lost either. A true achievement.".localize(),"Simply iconic level designs, from start to finish.".localize()],AI:["The computer-controlled entities in this game are so incredibly convincing that I caught myself talking at them at times.".localize(),
"Rarely manages a game to blend the A.I. so well into the game world that you just feel completely immersed.".localize(),"The game responds to the player in such a realistic fashion that it makes you sometimes forget that this is just a game.".localize()],"World Design":["A wonderfully imaginative gameworld makes {1} a joy to discover. You will spend hours travelling through this world.".localize(),"This is world design at its best. Brave, imaginative and unapologetically following its incredible artistic vision.".localize(),
"The attention to detail in the world design really sets this game apart from others in the genre.".localize()],Graphic:["Visually pleasing is an understatement. This game looks incredibly good.".localize(),"The art style in {1} blends so well with the general feeling of the game. A perfect match.".localize(),"Truly oustanding visual design is only one of the many reasons why {1} deserves your attention.".localize()],Sound:["I rarely highlight the sound of a game instead of the many other noteworthy features but in {1} the sound design was truly awe-inspiring.".localize(),
"The sound in this game gives you goose bumps. Very well designed.".localize(),"The game doesn't just look good it sounds incredibly good too. A true feast for players who appreciate high quality sound.".localize()]};return b.hasOwnProperty(a.id)?b[a.id].pickRandom():""};a.getEarlySalesEvents=function(a,b){};a.getPossibleEvents=function(b){return a.getAllNotificationsObjects().filter(function(a){return a&&a.trigger(GameManager.company,b)})};a.getHypedGameEvent=function(a,b){var d=0,c=b.flags.interviewHyped.decision,
f=b.flags.interviewHyped.source,g="In an exclusive interview a while ago, {0} from {1}".localize("followed by sentence fragment (hypgfr1 or hypgfr2)").format(a.staff[0].name,a.name),g=c?g+" made very bold remarks about their then-in-development game {0} predicting that it will be \u00fcber successful.".localize("fragment: hypgfr1").format(b.title):g+" was holding back when discussing their expections for {0}.".localize("fragment: hypgfr2").format(b.title),k;8<b.score?c?(d=0.5,k="was spot on as the game has received very positive reviews.".localize("fragment")):
(d=0.2,k="was just humble as the game received critical acclaim.".localize("fragment")):6<b.score?c?(d=-0.2,k="should've been more careful as the final product doesn't match the hyped expectations.".localize("fragment")):(d=0.4,k="was right to stay realistic as the game is good but nothing too our of the ordinary.".localize("fragment")):c&&(d=-0.5,k="needs a lesson in how to be humble as the game received mediocre reviews.".localize("fragment"));g+="{n}"+"Now, that the game is out on the market the consensus is that {0} {1}".localize("{0} is player name, {1} is description").format(a.staff[0].name,
k);g=0<d?g+("\n\n"+"Overall, this had a positive effect on sales.".localize()):g+("\n\n"+"Overall, this had a negative effect on sales.".localize());0!=d&&a.notifications.push(new Notification({header:f.name,text:g}));return d};var d=[{name:"Gaming World",author:"Jason Green"},{name:"SMASH",author:"Roland Kean"},{name:"Electric Games",author:"Arnie Kunkel"},{name:"GamerPro",author:"Julian Rickstall"},{name:"Game Informant",author:"Andrew McNara"},{name:"GameNova",author:"J\u00f6rg Longer"},{name:"Gamers",
author:"Gary White"},{name:"Gamers",author:"Kirton Gillen"},{name:"Center",author:"Tom Mott"},{name:"eGaming Check",author:"Christopher Rignall"}];d.forEach(function(a){a.type="magazine"});var f=[{name:"Planet GG",author:"Steve O'Connell"},{name:"Planet GG",author:"Jason Ray"},{name:"Planet GG",author:"Steph Benhexen"},{name:"Don't Cheat!",author:"Nicole Kolt"},{name:"Y-Play",author:"Adam Hessler"},{name:"Y-Play",author:"Morgan Net"},{name:"Y-Play",author:"Jessie Nobot"},{name:"Game Red",author:"Geoff Keyley"}];
f.forEach(function(a){a.type="TV show"});var g=[{name:"Rock, Paper, Shogun",author:"Alex Seer"},{name:"Rock, Paper, Shogun",author:"James Rosenol"},{name:"Gamedroid",author:"Vanier Gonza"},{name:"Kottago",author:"Stephen Tort"},{name:"GameRye",author:"Patrick Toint"}];g.forEach(function(a){a.type="blog"});var k=function(a){a=a.getCurrentDate();10<=a.year&&d.concat(f);16<=a.year&&d.concat(g);return d};a.getPossibleSources=k})();var DecisionNotifications={};
(function(){var a=DecisionNotifications;a.modNotifications=[];var b=function(a){if(a.date&&Math.floor(GameManager.company.currentWeek)<General.getWeekFromDateString(a.date,a.ignoreGameLengthModifier))return!1;if(a.maxTriggers||a.date){var b=GameManager.company.eventTriggerCounts[a.id],d=a.date?1:a.maxTriggers;if(b&&b>=d)return!1}return a.date||a.trigger&&a.trigger(GameManager.company)},c=function(a){var b=GameManager.company;b.eventTriggerCounts[a.id]?b.eventTriggerCounts[a.id]++:b.eventTriggerCounts[a.id]=
1};a.getNewNotifications=function(d){d=GameManager.company;var h=a.getAllNotificationsObjects().filter(function(a){return!a.isRandomEvent&&b(a)}).map(function(a){c(a);return a.notification?a.notification:a.getNotification(d)});0==h.length&&(h=a.getRandomEvents(d));return h};a.getRandomEvents=function(d){var h=d.flags.nextRandomEvent&&d.flags.nextRandomEvent<=GameManager.gameTime;d.flags.nextRandomEvent||(d.flags.nextRandomEvent=(48+24*d.getRandom())*GameManager.SECONDS_PER_WEEK*1E3);if(h){h=36+48*
d.getRandom();d.flags.nextRandomEvent=GameManager.gameTime+h*GameManager.SECONDS_PER_WEEK*1E3;h=a.getAllNotificationsObjects().filter(function(a){return a.isRandomEvent&&d.flags.lastRandomEventId!=a.id&&b(a)}).pickRandom();if(!h)return[];d.flags.lastRandomEventId=h.id;c(h);return[h.getNotification(d)]}return[]};a.getAllNotificationsObjects=function(){var b=[],d;for(d in a)if(a.hasOwnProperty(d)){var c=a[d];void 0!=c.id&&b.push(c)}b.addRange(a.modNotifications);return b};General.registerAsNotificationSource(a);
a.hobbyComputerClub={id:"hobbyComputerClub",isRandomEvent:!0,trigger:function(a){return!a.flags.hobbyComputerClub&&1===a.currentLevel&&1<a.gameLog.length&&a.isEarlierOrEqualThan(2)},getNotification:function(a){a.flags.hobbyComputerClub=!0;return new Notification({header:"Invitation".localize("heading"),text:"Hi, I'm Gordon Hench the host of the local hobby computer club. I just discovered that your company is close-by. I'm a huge fan of {0} and would love for you to join our meetup this week!\nEagerly awaiting your reply.\nGordon".localize().format(a.gameLog.pickRandom().title),
sourceId:"hobbyComputerClub",options:["Sure".localize("decision action button"),"No time".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a?(b.activeNotifications.addRangeAt(0,new Notification("Invitation".localize("heading"),"Thank you very much! I'm sure our members will love what you have to say.\nGordon".localize())),b.notifications.push(new Notification({header:"Computer Club".localize("heading"),text:"Hi I'm Frank More. We met at the Hobby Computer Club a week ago. Just wanted to say thanks for talking about your projects. I love your games and have told all my friends about them.".localize(),
weeksUntilFired:2})),a=8+5*b.getRandom(),b.currentGame?b.currentGame.hypePoints+=a:b.flags.nextGameHypeBonus+=a):(b.flags.secrecy++,b.activeNotifications.insertAt(0,new Notification("Invitation".localize("heading"),"Sorry to hear that you are busy.\nGordon".localize())))}};a.localNewsPaper={id:"localNewsPaper",isRandomEvent:!0,trigger:function(a){return!a.flags.localNewsPaper&&1===a.currentLevel&&1<=a.gameLog.length&&a.isEarlierOrEqualThan(2,7)&&a.isGameProgressBetween(0.4,0.9)},getNotification:function(a){a.flags.localNewsPaper=
!0;return new Notification({header:"Local News".localize("heading"),text:"Hi, I'm Caroline Richards from the local news. I've heard rumours that you are already working on your next game and would love to do an interview about this. Do you have some time?".localize(),options:["Sure".localize("decision action button"),"No time".localize("decision action button")],sourceId:"localNewsPaper"})},complete:function(a){var b=GameManager.company;if(0===a){b.activeNotifications.addRangeAt(0,(new Notification("Local News".localize("heading"),
"Great!\n\n\n ... Thank you for your time.{n}The interview should be published soon.".localize())).split());b.flags.interviewHypePointsBonus=5+8*b.getRandom();a=b.name;var d=b.staff[0].name,c=b.currentGame.flags.isNewCombination?"not done".localize("localNewsPaperFragment"):"done".localize("localNewsPaperFragment");a="{0}, a local start-up, is trying to make it big in the gaming industry. The company has already published {1} games and is working hard on their next.{n}In an interview founder {2} said that the next game is going to be a {3}/{4} game, something the company has {5} before. It's great to see small local companies enter exciting new industries. All the best of luck to {0}.".localize("{0} is company name, {1} nr. of games, {2} player name, {3} topic name, {4} genre name, {5} either not done/done (localNewsPaperFragment)").format(a,
b.gameLog.length,d,b.currentGame.topic.name,b.currentGame.genre.name,c);b.notifications.push(new Notification({header:"Local News".localize("heading"),text:a,weeksUntilFired:0.5,sourceId:"localNewsActiveCallback"}))}else b.flags.secrecy++,b.activeNotifications.insertAt(0,new Notification("Local News".localize("heading"),"Sorry to bother you".localize()))}};a.localNewsActiveCallback={id:"localNewsActiveCallback",trigger:function(){return!1},complete:function(){GameManager.company.currentGame&&GameManager.company.flags.interviewHypePointsBonus&&
(GameManager.company.currentGame.hypePoints+=GameManager.company.flags.interviewHypePointsBonus);GameManager.company.flags.interviewHypePointsBonus=0}};a.firstMatureGame={id:"firstAdultGame",trigger:function(a){return a.isGameProgressBetween(0.35,0.9)&&"mature"===a.currentGame.targetAudience&&!a.flags.firstMatureGame?a.flags.firstMatureGame=!0:!1},getNotification:function(){var a="Media Enquiry".localize("heading"),b="Hi, I'm Steve O'Connell, a reporter for Planet GG.\nWe've heard a rumour that your company is developing a game for mature audiences.\nWould you be willing to give an interview about this?".localize();
return new Notification({sourceId:"firstAdultGame",header:a,text:b,options:["Give interview".localize("decision action button"),"No comment".localize("decision action button")],weeksUntilFired:2})},complete:function(a){var b=GameManager.company,d="Many industry experts say that sooner or later games with mature themes will become more common. We are curious to see how the market will react to these games.".localize();void 0==b.flags.secrecy&&(b.flags.secrecy=0);0===a?(b.staff[0].adjustBoostRechargeProgress(0.3),
b.staff[0].adjustEfficiency(0.3),b.flags.interviewHypePointsBonus=5+12*b.getRandom(),b.notifications.push(new Notification({header:"Industry News".localize("heading"),text:"Planet GG has recently published an interview with {0}. According to the interview the company is working on its first game targeted at mature players. {1}, owner and CEO of {0} said, 'We think that players are looking for more mature content in games and we are willing to take a risk to give it to them.'{n}".localize("{0} company name, {1} staff name").format(b.name,
b.staff[0].name)+d,weeksUntilFired:1,sourceId:"firstMatureGameInterviewActiveCallback"})),b.activeNotifications.addRangeAt(0,(new Notification("Media Enquiry".localize("heading"),"Great!\n\n\n ... Thank you for your time.{n}We will publish the interview next week.".localize())).split())):(b.flags.secrecy++,b.flags.interviewHypePointsBonus=2+4*b.getRandom(),b.notifications.push(new Notification({header:"Industry News".localize("heading"),text:"There have been rumours circulating in the industry that {0} might be working on a game for mature audiences.".localize("{0} company name").format(b.name)+
d,weeksUntilFired:3,sourceId:"firstMatureGameInterviewActiveCallback"})),b.activeNotifications.insertAt(0,new Notification("Media Enquiry".localize("heading"),"Okay. Thank you for your time.".localize())))}};a.firstMatureGameInterviewActiveCallback={id:"firstMatureGameInterviewActiveCallback",trigger:function(){return!1},complete:function(){GameManager.company.currentGame&&GameManager.company.flags.interviewHypePointsBonus&&(GameManager.company.currentGame.hypePoints+=GameManager.company.flags.interviewHypePointsBonus);
GameManager.company.flags.interviewHypePointsBonus=0}};a.moveToLevel2={id:"moveToLevel2",trigger:function(a){var b=GameManager.isIdle()&&1===a.currentLevel&&0<a.gameLog.length&&1E6<=a.cash&&(!a.flags.lastMoveUpLevelQ||a.flags.lastMoveUpLevelQ<=GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK);return b&&GameManager.ghg0()?(a.flags.shownLvl2Move||(a.notifications.push(new Notification("Lite version","You have amassed over {0} in cash!\nUsually I would suggest that you should grow your company by moving into a larger office but unfortunately there don't seem to be any larger offices available in the lite version.{n}You can still continue your game until year 4 to see how much cash you will end up with and how many fans you will gain.".localize("{0} cash amount").format(UI.getShortNumberString(a.cash)))),
a.flags.shownLvl2Move=!0),!1):b},getNotification:function(a){a.flags.lastMoveUpLevelQ=GameManager.gameTime;a="Congratulations! You have made quite a name for yourself and have saved up a lot of capital. If you want to grow the company further then moving into a new office is the next step. I've found the perfect office, situated in a technology park. Would you like to move your company to the next level?".localize();return new Notification({sourceId:"moveToLevel2",header:"New Office?".localize("heading"),
text:a,options:["Move (pay {0})".localize("decision action button; move as in move to new office").format(UI.getShortNumberString(15E4)),"Not yet".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a&&(b.currentLevel=2,b.adjustCash(-15E4,"New Office".localize()),VisualsManager.nextLevel(),Media.createLevel2Notifications(),Tutorial.level2(),GameManager.save(GameManager.company.slot+"L2"));ghg4.ghg5("move to level 2?",{decision:0===a})}};a.bailout={id:"bailout",
isRandomEvent:!1,trigger:function(a){return!1},canUse:function(a){return a.flags.bailoutAmount?!1:!a.flags.bailoutPaybackTime||a.flags.bailoutPaybackTime<GameManager.gameTime-24E3*GameManager.SECONDS_PER_WEEK},getNotification:function(a){var b=Math.abs(a.cash),b=b*[1.5,2,3.2,2.5][a.currentLevel-1],b=1E3*Math.floor(b/1E3);a.flags.bailoutAmount=b;a.flags.bailoutPaybackAmount=1.8*b;var d=UI.getLongNumberString(b),c="It seems that you have some serious financial difficulties and your company is about to go bankrupt. After careful consideration we have decided to offer you a deal.".localize(),
c=c+("\n"+"We will give you {0} which should move you out of the danger zone but in return you have to commit to pay us {1} in a year's time.".localize());return new Notification({sourceId:"bailout",header:"Bank offer".localize("heading"),text:c.format(d,UI.getLongNumberString(a.flags.bailoutPaybackAmount)),options:["Agree (receive {0})".localize("decision action button").format(UI.getShortNumberString(b)),"No (go bankrupt)".localize("decision action button")]})},complete:function(a){var b=GameManager.company;
if(0===a){var d=1.8*b.flags.bailoutAmount;b.adjustCash(b.flags.bailoutAmount,"Bailout".localize("heading"));b.flags.bailoutPaybackTime=GameManager.gameTime+48E3*GameManager.SECONDS_PER_WEEK;b.flags.bailouts=isNaN(b.flags.bailouts)?1:b.flags.bailouts+1;var c=new Notification("Bank".localize("heading"),"This is a reminder that we require you to pay back the agreed amount of {0} in three months' time.".localize().format(UI.getLongNumberString(d)));c.weeksUntilFired=36;b.notifications.push(c);c=new Notification("Bank".localize("heading"),
"The amount of {0} has been deducted from your account.".localize().format(UI.getLongNumberString(d)));c.adjustCash(-d,"Bailout payback".localize("heading"));c.setFlag("bailoutAmount",0);c.setFlag("bailoutOffered",!1);c.weeksUntilFired=48;b.notifications.push(c)}b.flags.bailoutOffered=!0;ghg4.ghg5("bailout?",{decision:0===a,year:b.getCurrentDate().year});0!==a&&GameManager.checkGameOver()}};a.miniBailout={id:"miniBailout",canUse:function(a){return 0<a.gameLog.length&&!a.gameLog.last().flags.miniBailoutUsed},
getNotification:function(a){a.gameLog.last().flags.miniBailoutUsed=!0;var b=Math.abs(a.cash)+2*General.getMonthlyCosts(a);a.flags.miniBailoutAmount=b;a="We see that you are in financial difficulties. Since you've just released your latest game {0}, we are willing to offer you a mini-credit to get you over this months' payments.\n\nWe will give you {1} to cover your costs and expect to be paid back the full amount, plus a small adminstration fee of {2} in two months time.".localize().format(a.gameLog.last().title,
UI.getLongNumberString(b),UI.getShortNumberString(25E3));return new Notification({header:"Bank".localize("heading"),text:a,sourceId:"miniBailout",options:["Agree (receive {0})".localize("decision action button").format(UI.getShortNumberString(b)),"No (go bankrupt)".localize("decision action button")]})},complete:function(a){if(0===a){a=GameManager.company;var b=a.flags.miniBailoutAmount;a.adjustCash(b,"Bailout".localize("heading"));var d=new Notification("Bank".localize("heading"),"The amount of {0} has been deducted from your account.".localize().format(UI.getLongNumberString(-b-
25E3)));d.weeksUntilFired=8;d.adjustCash(-b-25E3,"Bailout payback".localize("heading"));a.notifications.push(d)}else GameManager.checkGameOver()}};a.inDevBailout={id:"inDevBailout",canUse:function(a){return!a.currentGame.flags.miniBailoutAmount},getNotification:function(a){var b=Math.abs(a.cash)+General.getMonthlyCosts(a)*(General.getApproxWeeksToCompletion(a.currentGame)+6);a.currentGame.flags.miniBailoutAmount=b;a="We see that you are, again, in serious financial difficulties. We are willing to offer you a mini-credit to tie you over until your current game is on the market.\n\nWe will give you {1} to cover your costs and expect to be paid back the full amount, plus a fee of {2}, one month after the game is released.".localize().format(a.currentGame.title,
UI.getLongNumberString(b),UI.getShortNumberString(0.05*b));return new Notification({header:"Bank".localize("heading"),text:a,sourceId:"inDevBailout",options:["Agree (receive {0})".localize("decision action button").format(UI.getShortNumberString(b)),"No (go bankrupt)".localize("decision action button")]})},complete:function(a){0===a?(a=GameManager.company,a.adjustCash(a.currentGame.flags.miniBailoutAmount,"Bailout".localize("heading"))):GameManager.checkGameOver()},triggerPayBack:function(a,b){var d=
GameManager.company,c=a.flags.miniBailoutAmount,f=new Notification("Bank".localize("heading"),"The amount of {0} has been deducted from your account.".localize().format(UI.getLongNumberString(-c-25E3)));f.adjustCash(-c-0.05*c,"Bailout payback".localize("heading"));f.weeksUntilFired=b+5;d.notifications.push(f)}};a.gameOver={id:"gameOver",trigger:function(a){return!1},getNotification:function(a){return new Notification({sourceId:"gameOver",header:"Game Over".localize("heading"),text:"This is the end of your journey.\n\nYou can either load a saved game, restart this level or start a new game.".localize(),
options:["Restart level".localize("decision action button"),"Start over".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a?GameManager.reload(b.slot+"L"+b.currentLevel):GameManager.startNewGame();ghg4.ghg5("Restart level?",{decision:0===a})}};a.moveToLevel3={id:"moveToLevel3",trigger:function(a){return GameManager.isIdle()&&2===a.currentLevel&&1<a.staff.length&&5E5<=a.cash&&a.currentWeek>=General.getWeekFromDateString("11/6/2",!0)&&(!a.flags.lastMoveUpLevelQ||
a.flags.lastMoveUpLevelQ<=GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK)},getNotification:function(a){a.flags.lastMoveUpLevelQ=GameManager.gameTime;a=a.staff.skip(1).pickRandom();var b="Boss, our office could really do with some renovation work and our computer systems are also out of date. Investing a little bit in a more modern office and upgraded computers would be a great.\nDo you want to renovate the office?".localize();return new Notification({sourceId:"moveToLevel3",header:a.name,text:b,
options:["Invest (pay {0})".localize("decision action button").format(UI.getShortNumberString(15E4)),"Not yet".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){b.currentLevel=3;b.adjustCash(-15E4,"New equipment".localize());VisualsManager.nextLevel();var d=new Notification("G3 Training","Dear {0}!\nSince G3 has become the biggest meetup of game developers every year we have decided to use our name for the greater good. Starting today we offer different game development challenges throughout the year where game devs from around the world can compete with each other.{n}This will be a great way for game developers to learn something new. You are welcome to join in at any time. There are no prizes but it should be a great way to increase everyone's skills.\nThe G3 committee.".localize("{0} company name").format(b.name));
d.weeksUntilFired=2;d.setFlag("trainingV2Enabled",!0);b.notifications.push(d);GameManager.save(GameManager.company.slot+"L3")}ghg4.ghg5("move to level 3?",{decision:0===a})}};a.moveToLevel4={id:"moveToLevel4",trigger:function(a){return GameManager.isIdle()&&3===a.currentLevel&&3<a.staff.length&&16E6<=a.cash&&a.currentWeek>=General.getWeekFromDateString("13/9/2",!0)&&(!a.flags.lastMoveUpLevelQ||a.flags.lastMoveUpLevelQ<=GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK)},getNotification:function(a){a.flags.lastMoveUpLevelQ=
GameManager.gameTime;var b=a.staff[1];a="Boss, {0} has grown well under your management. I think it is time to move the company out of this technology park and into a building worthy of our success.{n}I've seen the perfect building for our new headquarters.\nIt's not cheap but will allow us to grow even further. The new office also has space for additional expansions.\nDo you want to move?".localize("{0} company name").format(a.name);return new Notification({sourceId:"moveToLevel4",header:b.name,
text:a,options:["Move (pay {0})".localize("decision action button; move as in move to new office").format(UI.getShortNumberString(8E6)),"Not yet".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a&&(b.currentLevel=4,b.maxStaff=7,b.adjustCash(-8E6,"New office".localize()),VisualsManager.nextLevel(),Media.createLevel4Notifications(),GameManager.save(GameManager.company.slot+"L4"));ghg4.ghg5("move to level 4?",{decision:0===a})}};a.unlockHwLab={id:"unlockHwLab",
trigger:function(a){return 4===a.currentLevel&&a.flags.customHardwareResearched&&!a.flags.hwLabUnlocked&&a.staff.some(function(a){return a.flags.technologySpecialist})&&(!a.flags.lastHwQuestion||a.flags.lastHwQuestion<=GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK)},getNotification:function(a){a.flags.lastHwQuestion=GameManager.gameTime;var b="We can open our own hardware lab now.".localize(),d=a.staff.first(function(a){return a.flags.technologySpecialist});a.flags.selectedStaffName=d.name;
return new Notification({header:d.name,text:b,sourceId:"unlockHwLab",options:["Let's do it! (pay {0})".localize("decision action button").format(UI.getShortNumberString(5E6)),"Not yet".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a&&(b.adjustCash(-5E6,"Hardware lab".localize()),b.flags.hwLabUnlocked=!0,GameManager.company.flags.hwBudget=0,GameManager.company.flags.fractionalHwLabCosts=0,b.notifications.push(new Notification("Hardware lab".localize(),"Our hardware lab is ready.".localize())),
Tutorial.hwLabReady(),GameManager.pause(!0),UI.fadeInTransitionOverlay(function(){VisualsManager.loadStage(!0);VisualsManager.refreshLabCrew();VisualsManager.updateProjectStatusCards();UI.fadeOutTransitionOverlay(function(){GameManager.resume(!0)})}));ghg4.ghg5("unlocked hardware lab?",{decision:0===a})}};a.unlockrnDLab={id:"unlockRnDLab",trigger:function(a){return 4===a.currentLevel&&!a.flags.rndLabUnlocked&&a.staff.some(function(a){return a.flags.designSpecialist})&&(!a.flags.lastRnDQuestion||a.flags.lastRnDQuestion<=
GameManager.gameTime-2E4*GameManager.SECONDS_PER_WEEK)},getNotification:function(a){a.flags.lastRnDQuestion=GameManager.gameTime;var b="We can open our own research and development lab now.".localize(),d=a.staff.first(function(a){return a.flags.designSpecialist});a.flags.selectedStaffName=d.name;return new Notification({header:d.name,text:b,sourceId:"unlockRnDLab",options:["Let's do it! (pay {0})".localize("decision action button").format(UI.getShortNumberString(25E5)),"Not yet".localize("decision action button")]})},
complete:function(a){var b=GameManager.company;0===a&&(b.adjustCash(-25E5,"R&D lab".localize()),b.flags.rndLabUnlocked=!0,GameManager.company.flags.rndBudget=0,GameManager.company.flags.fractionalRndLabCosts=0,b.notifications.push(new Notification("R&D lab".localize(),"Our R&D  lab is ready.".localize())),Tutorial.rndLabReady(),GameManager.pause(!0),UI.fadeInTransitionOverlay(function(){VisualsManager.loadStage(!0);VisualsManager.refreshLabCrew();VisualsManager.updateProjectStatusCards();UI.fadeOutTransitionOverlay(function(){GameManager.resume(!0)})}));
ghg4.ghg5("unlocked r&d lab?",{decision:0===a})}};a.fireEmployee={id:"fireEmployee",trigger:function(){return!1},getNotification:function(a,b){if(b)return a.flags.fireEmployeeId=b.id,new Notification({sourceId:"fireEmployee",header:"Fire employee?".localize("heading"),text:"Are you sure you want to fire {0}?".localize("{0} staff name").format(b.name),options:["Yes".localize(),"No".localize()]})},complete:function(a){0===a&&(a=GameManager.company.staff.first(function(a){return a.id===GameManager.company.flags.fireEmployeeId}))&&
(a.currentResearch&&GameManager.currentResearches.remove(a.currentResearch),a.fire(),GDT.fire(GameManager,GDT.eventKeys.gameplay.staffFired,{character:a}),ghg4.ghg5("fired staff"))}};a.securityUpgrade={id:"securityUpgrade1",isRandomEvent:!0,trigger:function(a){return 2<=a.staff.length&&!a.flags.securityUpgrades},getNotification:function(a){var b=a.staff.skip(1).pickRandom();a.flags.securityUpgradeStaffRef=b.id;return new Notification({sourceId:"securityUpgrade1",header:b.name,text:"Hi Boss! I have a knack for security and I think we could really do with some security upgrades in our office.\nI have done some research and I think with an investment of {0} we would be a lot safer than we are now.\nWhat do you say?".localize("{0} amount").format(UI.getShortNumberString(5E4)),
options:["Yes (invest {0})".localize("decision action button").format(UI.getShortNumberString(5E4)),"No".localize()]})},complete:function(a){var b=GameManager.company,d="",c=b.staff.first(function(a){return a.id===b.flags.securityUpgradeStaffRef}),f=0.3;1==a&&(f*=-1);c&&(c.adjustEfficiency(f),d=c.name);0===a?(a="Thanks Boss!\nI will get right to it.".localize(),b.flags.securityUpgrades=1,b.cash-=5E4,b.cashLog.push({amount:-5E4,label:"security upgrades"})):a="Okay, sorry that I bothered you.".localize();
GameManager.company.activeNotifications.insertAt(0,new Notification({header:d,text:a}))}};var d=function(){var a=GameManager.company;return 0.3<a.getRandom()?a.name:f(a.name)},f=function(a){if(3<a.length){var b=a[3];a=a.replaceAt(3,a[2]);a=a.replaceAt(2,b)}7<a.length&&(b=a[6],a=a.replaceAt(6,a[5]),a=a.replaceAt(5,b));return a};a.scam1={id:"scam1",isRandomEvent:!0,trigger:function(a){return a.isLaterOrEqualThan(10)&&!a.flags.scam1},getNotification:function(a){a.flags.scam1=!0;a=f(a.name);return new Notification({sourceId:"scam1",
header:"Investment".localize("heading"),text:"Dear esteemed sir/madame.\nI'm financial advisor to CEO at WOMOBA OIL LIMITED in Nigeria. I'm writing because I know of your high repute and trustworthiness. Our CEO has authorzied me to invest {0} in {1}.{n}We have deposited the amount at a safe bank and will transfer this money to you but the bank requires confirmation from you. If you wish to receive the funds you must transfer a one-time verification payment of {2}. I trust in you.".localize("Note: this is a scam msg in game. immitate scammers language such as odd choice of words,  typos etc. {0} investAmount, {1} company name, {2} payment amount").format(UI.getShortNumberString(25E5),
a,UI.getShortNumberString(12E4)),options:["Pay ({0})".localize("decision action button").format(UI.getShortNumberString(12E4)),"Decline".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a&&(b.adjustCash(-12E4,"Gullibility Tax".localize("name of expense when player falls into the scam trap.")),b.staff.skip(1).forEach(function(a){a.adjustEfficiency(-0.3)}));ghg4.ghg5("scam",{decision:0===a});b.notifications.push(new Notification("News".localize("heading"),"It appears that recently a few companies have fallen victim to Nigerian scammers.\nThe scammers often claimed to invest large sums of money into companies but required a sizable up-front payment to make the deal.{n}Those who were unwise enough to pay will not see their money again.\nPolice are investigating but seem helpless to stop these international scammers.".localize(),
"OK".localize(),5+4*b.getRandom()))}};a.patchRequired={id:"patchRequired",isRandomEvent:!0,trigger:function(a){return 1<a.currentLevel&&2<a.gameLog.length&&100<a.fans&&a.gameLog.last().releaseWeek+2<a.currentWeek&&a.isGameProgressBetween(0.1)&&a.gameLog.last().releaseWeek+30>a.currentWeek&&(!a.flags.patchData||a.flags.patchData.lastPatchEvent+6E4*GameManager.SECONDS_PER_WEEK<GameManager.gameTime)},getNotification:function(a){a.flags.patchData||(a.flags.patchData={});a.flags.patchData.lastPatchEvent=
GameManager.gameTime;var b=a.gameLog.last(),d=Math.floor((0.05*b.costs+0.15*b.costs*a.getRandom())/1E4);a.flags.patchData.gameName=b.title;a.flags.patchData.canEarnBonus=5>b.bugs;a.flags.patchData.patchCost=1E4*d+1E4;a.flags.patchData.patchAvailableUntil=GameManager.gameTime+3E3*GameManager.SECONDS_PER_WEEK;d=Math.abs(Math.floor(0.1*b.fansChanged+0.2*b.fansChanged*a.getRandom()));a.adjustFans(-d);a.flags.patchData.fansChange=d;d=new Notification({flags:{isPatchNotification:!0},header:"News".localize("heading"),
text:"The recent pleas for a patch for {0} seem to have been unanswered by {1}.\nMany fans have voiced their disappointment.".localize("{0} game title, {1} company name").format(b.title,a.name),weeksUntilFired:7});a.notifications.push(d);return new Notification({header:"Bugs!".localize("heading"),text:"Oh no! It seems that {0} had quite a few undiscovered bugs when we released it.\nSome of our customers are having a bad time with this and they demand that we patch the game.{n}We could either spend the money and time to patch it or ignore their pleas. If you want to patch the game then {1} on a character and use the action menu to develop a patch but make sure that you don't wait for too long.".localize("{0} game title, {1} click/touch verb").format(b.title,
Tutorial.getClickVerb())})}};var g="Administrative Expenses".localize("label of expense for illegal activity");a.industrialSpyTopic={id:"industrialSpyTopic",isRandomEvent:!0,trigger:function(a){return 0<a.cash&&a.isLaterOrEqualThan(4)&&a.researchEnabled&&3<Topics.topics.except(a.topics).length&&(!a.flags.industrialSpyTopic||2>a.flags.industrialSpyTopic)},getNotification:function(a){var b=Topics.topics.except(a.topics).pickRandom();a.flags.industrialSpyTopicRef=b.id;void 0==a.flags.industrialSpyTopic?
a.flags.industrialSpyTopic=1:a.flags.industrialSpyTopic++;b=5+60*a.getRandom();b=1E3*Math.floor(b);a.flags.industrialSpyTopicAmount=b;a="HgqNHQobJHLKypvBXJPe6+Eg1Z0Dccx Ra585nXkuRPR9AWS QZoIqQkcTm+qO7ahqZXq YL1P5qU39WUpJDrUgj 4jsQdncebVlj3oQhkAvC7z0ZH jz4yCn0h/dLlNzspebs6B7 C9QwqCY2KIizX3DRvA4 RIb1D99e6mC1mPLNlQ j9WenbAbWXGw8yK/AQeBO2G=="+"{n}This is a very special offer. Our agents have recently managed to 'borrow' some research information which might be of interest to you.\nIf you are interested then transfer {0} to the enclosed uplink location.\nWe'll contact you, Agent Blowfish".localize("use writing style of secret agent msg (in game it was decrypted). keep words 'blowfish' and 'uplink' in the message.").format(UI.getShortNumberString(b));
return new Notification({sourceId:"industrialSpyTopic",header:"Proposition".localize("heading"),text:a,buttonText:"Decrypt Message".localize("decision action button"),options:["Transfer ({0})".localize("decision action button; as in Transfer amount of money").format(UI.getShortNumberString(b)),"Decline".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){var d=b.flags.industrialSpyTopicAmount,c=Topics.topics.first(function(a){return a.id===b.flags.industrialSpyTopicRef});
b.adjustCash(-d,g);b.topics.push(c);d="OLvsz3uLP6QeZEeL0XuUDw===={n}"+"Thank you for your business.".localize()+"\n\n"+"You have successfully researched {0}.".localize("{0} topic name").format(c.name);b.activeNotifications.addRangeAt(0,(new Notification({header:"Transaction complete".localize("heading"),text:d,buttonText:["Decrypt Message".localize("decision action button"),"OK".localize()]})).split());b.flags.evil++;ghg4.ghg5("evil")}else b.flags.secrecy&&b.flags.secrecy++,b.flags.good++,ghg4.ghg5("good");
ghg4.ghg5("accepted spy?",{decision:0===a})}};a.industrialSabotage={id:"industrialSabotage",isRandomEvent:!0,trigger:function(a){return 0<a.cash&&a.isLaterOrEqualThan(6)&&(!a.flags.industrialSabotage||2>a.flags.industrialSabotage)},getNotification:function(a){void 0==a.flags.industrialSabotage?a.flags.industrialSabotage=1:a.flags.industrialSabotage++;var b=50+120*a.getRandom(),b=1E3*Math.floor(b);a.flags.industrialSabotageAmount=b;a="A9zbngUAfnu5aIo7ot2J LouBaOVUlVftN22gJaP2V3gS+N7 7vaRCtIb2TpaVPsh651s3sT6n gp21VgO2KCiFRtKhp/he OixN+XSB00RBXZhMrb1rYNWsZ+xRNBTZCljm/U QrUmzYrArkPNeusa65R+y TNXSWMZmWSSMv+mAokr0==={n}"+
"This is a very special offer. Our agents have recently managed to gain access to some critical systems of one of your competitors.\nIf you want to play war games then transfer {0} to the enclosed location and we'll initiate sabotage.,\nAgent Blowfish".localize("use writing style of secret agent msg (in game it was decrypted). keep words 'war games' and 'blowfish' in the message.").format(UI.getShortNumberString(b));return new Notification({sourceId:"industrialSabotage",header:"Proposition".localize("heading"),
text:a,buttonText:"Decrypt Message".localize("decision action button"),options:["Sabotage ({0})".localize("decision action button").format(UI.getShortNumberString(b)),"Decline".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){b.adjustCash(-b.flags.industrialSabotageAmount,g);var d="0DeAZWaEfhmiEuRgn7WWdw===={n}"+"Thank you for your business.".localize();b.activeNotifications.addRangeAt(0,(new Notification({header:"Transaction complete".localize("heading"),
text:d,buttonText:["Decrypt Message".localize("decision action button"),"OK".localize()]})).split());b.flags.evil++;ghg4.ghg5("evil");b.getRandom();b.notifications.push(new Notification({header:"News".localize("heading"),text:"In a statement the game development company {0} has said that they have been the victim of industrial sabotage. Unfortunately development on their current project has been severely affected.\nPolice are investigating.".localize("{0} is random company name").format(CompanyNames.pickRandom()),
weeksUntilFired:3+4*b.getRandom()}))}else b.flags.good++,ghg4.ghg5("good");ghg4.ghg5("sabotaged?",{decision:0===a})}};a.womenInTech={id:"womenInTech",isRandomEvent:!0,trigger:function(a){return!a.flags.womenInTech&&0<a.cash&&a.isLaterOrEqualThan(9)&&1<a.staff.length},getNotification:function(a){var b=a.staff.skip(1).pickRandom(),d=4+7*a.getRandom(),d=1E4*Math.floor(d);a.flags.womenInTechAmount=d;a.flags.womenInTech=!0;a="Hi Boss! A friend of mine is greatly involved in an organization which aims to get more women into technology. They are looking for a sponsor and I thought that this would be a perfect opportunity for us.\nWould you like to help out?".localize();
return new Notification({sourceId:"womenInTech",header:b.name,text:a,options:["Sponsor (pay {0})".localize("decision action button").format(UI.getShortNumberString(d)),"Decline".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){b.adjustCash(-b.flags.womenInTechAmount,"Sponsorship".localize("heading"));b.staff.forEach(function(a){a.adjustBoostRechargeProgress(0.3);a.adjustEfficiency(0.3)});var d="We have got word that {0} has recently sponsored a highly praised move to get more women into technology roles.\n{1}, the CEO at {0} said, 'We would love to see more women in the game industry.'".localize("{0} company name, {1} staff name").format(b.name,
b.staff[0].name);b.notifications.push(new Notification({header:"News".localize("heading"),text:d,weeksUntilFired:2+6*b.getRandom()}));b.flags.good++;ghg4.ghg5("good")}else b.staff.skip(1).forEach(function(a){a.adjustEfficiency(-0.3)});ghg4.ghg5("womenInTech?",{decision:0===a})}};a.piracy1={id:"piracy1",isRandomEvent:!0,trigger:function(a){return 1<a.staff.length&&a.isLaterOrEqualThan(5)&&!a.flags.piracy1},getNotification:function(a){var b=a.staff.skip(1).pickRandom(),d=a.gameLog.last();a.flags.piracy1=
d.title;a.flags.selectedStaffName=b.name;return new Notification({sourceId:"piracy1",header:b.name,text:"Boss, it seems that quite a few players use illegal copies of {0}.\nI've managed to identify some of them.\nWe could either sue them to defend our copyright or send them warnings to ask them to stop.\nWhat do you want to do?".localize("{0} game title").format(d.title),options:["Sue them".localize("decision action button"),"Warn them".localize("decision action button")]})},complete:function(a){var b=
GameManager.company;b.activeNotifications.insertAt(0,new Notification({header:b.flags.selectedStaffName,text:"Right away!".localize()}));var d=b.flags.piracy1,c="{n}"+"Piracy is an increasingly big problem in the industry. Some companies invest a lot of money and effort to fight piracy while others argue that it's better to take a more relaxed approach and invest in better games instead.".localize(),f=0===a?Math.floor(-(1E3+1300*b.getRandom())):Math.floor(100+300*b.getRandom());if(0===a){b.flags.evil++;
ghg4.ghg5("evil");var g=1E4*Math.floor(2+7*b.getRandom()),c=c+("{n}"+"We have lost {0} fans but won {1} in legal claims.".localize("{0} nr of fans, {1} cash amount").format(UI.getLongNumberString(f),UI.getShortNumberString(g))),d=new Notification({header:"News".localize("heading"),text:"In what some have called a drastic move, {0} has recently taken legal action against illegal players of their game {1}.".localize("{0} company name, {1} game name").format(b.name,d)+c,weeksUntilFired:2+3*b.getRandom()});
d.adjustCash(g,"legal claims".localize("expense label"))}else b.flags.good++,ghg4.ghg5("good"),c+="{n}"+"We have gained {0} fans!".localize().format(UI.getLongNumberString(f)),d=new Notification({header:"News".localize("heading"),text:"{0} has recently sent warnings to several players using illegal copies of their game {1}.".localize("{0} company name, {1} game title").format(b.name,d)+c,weeksUntilFired:2+3*b.getRandom()});d.adjustFans(f);b.notifications.push(d);ghg4.ghg5("piracy?",{decision:0===
a})}};a.infringment={id:"infringment",isRandomEvent:!0,trigger:function(a){return void 0===a.flags.infringment&&a.gameLog.some(function(a){return 6<a.score})&&1<a.staff.length},getNotification:function(a){a.flags.infringment=!0;var b=a.staff.skip(1).pickRandom(),d=a.gameLog.filter(function(a){return 6<a.score}).pickRandom();a.flags.selectedStaffName=b.name;a.flags.infringmentGameName=d.title;return new Notification({sourceId:"infringment",header:b.name,text:"Boss, I've discovered that some really dedicated fans of {0} have created a fan game using a lot of the material from our game.\nThey don't make any money with it and just seem to do it for fellow fans. Our legal advisors strongly suggest that we shouldn't allow this to go on. What do you want to do?".localize("{0} game title").format(d.title),
options:["Stop them".localize("decision action button"),"Let them be".localize("decision action button")]})},complete:function(a){var b=GameManager.company;0===a?(b.flags.infringment=!0,b.activeNotifications.insertAt(0,new Notification({header:b.flags.selectedStaffName,text:"Right away!".localize()})),b.flags.evil++,ghg4.ghg5("evil"),b.notifications.push(new Notification({sourceId:"infringmentCallback",header:"Project disbanded".localize("heading"),text:"Hi, I'm Denise Ried the main developer of the {0} fan game. I just want to tell you that upon your recent 'request' from your legal department my project has shut down.{n}I poured a lot of effort into this and have always loved your company but I guarantee you that I shall not 'bother' nor support you ever again.".localize("{0} game name").format(b.flags.infringmentGameName),
weeksUntilFired:2+3*b.getRandom()}))):(b.flags.infringment=!1,b.flags.good++,ghg4.ghg5("good"),b.notifications.push(new Notification({sourceId:"infringmentCallback",header:"Thank you".localize("heading"),text:"Hi, I'm Denise Ried the main developer of the {0} fan game. I've recently been informed that your legal department has advised you to stop us and I just wanted to say that I'm very grateful that you didn't.{n}{1} is the best company in the world and I'm glad I can be part of the fan community.".localize("{0} game name, {1} company name").format(b.flags.infringmentGameName,
b.name),weeksUntilFired:2+3*b.getRandom()})));ghg4.ghg5("infringement?",{decision:0===a})}};a.infringmentCallback={id:"infringmentCallback",complete:function(){var a=GameManager.company,b=a.flags.infringment,d=a.fans,d=Math.floor(0.05*d+0.05*d*a.getRandom());b&&(d*=-1);a.adjustFans(d);0<d?a.activeNotifications.insertAt(0,new Notification("Fans".localize("heading"),"We have gained {0} fans!".localize().format(UI.getLongNumberString(d)),":-)")):0>d&&a.activeNotifications.insertAt(0,new Notification("Fans".localize("heading"),
"We have lost {0} fans!".localize().format(UI.getLongNumberString(d)),":-("))}};a.codingContest={id:"codingContest",isRandomEvent:!0,trigger:function(a){return 2>a.currentLevel||a.flags.codingContest||4>=a.staff.length||15E4>=a.cash||null!=a.currentGame||a.staff.some(function(a){return a.state===CharacterState.Researching||a.state===CharacterState.Training||a.state===CharacterState.Vacation})?!1:!0},getNotification:function(a){var b=a.staff.skip(1).pickRandom();a.flags.selectedStaffName=b.name;return new Notification({sourceId:"codingContest",
header:b.name,text:"Boss, we would like to stage an internal coding contest! I think we could all learn a lot by doing this. As an incentive we would need a prize for the winner ({0}). We agreed that the prize will go to charity. Should we do it?".localize().format(UI.getShortNumberString(9E4)),options:["Yes".localize(),"No".localize()]})},complete:function(a){var b=GameManager.company;if(0===a)b.flags.codingContest=!0,b.activeNotifications.insertAt(0,new Notification({header:b.flags.selectedStaffName,
text:"Great! We will start right away!".localize()})),b.staff.forEach(function(a){GameManager.uiSettings.selectedChar=a.id;GameManager.codingContest(Training.codingContest,"training",a)});else{for(a=0;a<b.staff.length;a++)b.staff[a].name===b.flags.selectedStaffName&&b.staff[a].adjustEfficiency(-0.4);b.activeNotifications.insertAt(0,new Notification({header:b.flags.selectedStaffName,text:"Okay, maybe another time...".localize(),buttonText:":-("}))}}};a.codingContestParticipationFinished=function(){for(var a=
0;a<GameManager.company.staff.length;a++)if(GameManager.company.staff[a].currentResearch&&"codingContest"===GameManager.company.staff[a].currentResearch.id)return!1;a=GameManager.company.staff.slice().sort(function(a,b){return a.flags.codingContestDone-b.flags.codingContestDone}).first();GameManager.company.notifications.push(new Notification({header:"Coding Contest".localize("heading"),text:"Thanks for agreeing to the coding contest. It was a big success! {0} won the contest and is lucky to distribute the prize of {1} to charity. We have also learned a lot in the process.".localize().format(a.name,
UI.getShortNumberString(9E4)),weeksUntilFired:0.6}))};a.creditCard={id:"creditCard",isRandomEvent:!0,trigger:function(a){return 5E4<a.cash&&!a.flags.creditCardStolen&&1<a.staff.length&&2<=a.flags.evil},getNotification:function(a){a.flags.creditCardStolen=!0;a.flags.creditCardDamages=0.007*a.cash;var b=a.staff.skip(1).pickRandom();return new Notification({sourceId:"creditCard",header:b.name,text:"Boss, someone seems to have stolen our credit card information and used it to buy a lot of things in the past three months. Unfortunately we have lost {0}!".localize().format(UI.getLongNumberString(a.flags.creditCardDamages)),
buttonText:":-(",weeksUntilFired:12})},complete:function(a){GameManager.company.flags.creditCardSwitched=!0}};var k="EPA".localize("heading for 'Environmental Protection Agency' story");a.solarPower={id:"solarPower",isRandomEvent:!0,trigger:function(a){return!a.flags.solarPowerInstalled&&2<a.currentLevel&&a.isLaterOrEqualThan(12)&&4E5<a.cash},getNotification:function(a){return new Notification({sourceId:"solarPower",header:k,text:"I am an employee of the Environmental Protection Agency and have an offer for you. Your company has a high electrical footprint right now. If you would install solar panels you could decrease your footprint and save money in the long run. We would sponsor 50% of the costs which brings your investment to {0}!\nWould you like to install it?".localize("headings for this story need to use acronym consistent with the Environmental Protection Agency translation. look for 'heading for 'Environmental Protection Agency' story'").format(UI.getShortNumberString(2E5)),
options:["Install (pay {0})".localize("decision action button").format(UI.getShortNumberString(2E5)),"Ignore offer".localize("decision action button")]})},complete:function(a){0===a?(a=GameManager.company,a.flags.good++,ghg4.ghg5("good"),a.flags.solarPowerInstalled=!0,a.adjustCash(-2E5,"solar panels".localize("heading")),a.activeNotifications.insertAt(0,new Notification(k,"Great, it was a wise decision installing a solar collector!".localize(),":-)")),a.notifications.push(new Notification("Industry News".localize("heading"),
"{0} has recently installed solar panels in their offices. While the video game and software industries are one of the cleanest industries on earth they do eat up a lot of electricity so installing solar panels can really make an impact.".localize("{0} company name").format(a.name),"OK".localize(),4))):(a=GameManager.company,a.flags.evil++,ghg4.ghg5("evil"),a.activeNotifications.insertAt(0,new Notification(k,"Sorry to hear that you are declining our offer".localize(),"OK".localize())))}};a.airCon=
{id:"airCon1",isRandomEvent:!0,trigger:function(a){return(2===a.currentLevel||3===a.currentLevel)&&3<a.staff.length&&!a.flags.airCon1&&2E5<=a.cash},getNotification:function(a){a.flags.airCon1=!0;a=a.staff.skip(1).pickRandom();return new Notification({sourceId:"airCon1",header:a.name,text:"Boss, it's way too hot in our office and the heat is starting to impact on our work. I've researched and found an air conditioner which would be perfect for us. It costs {0}.\nShould we order it?".localize().format(UI.getShortNumberString(9E4)),
options:["Yes (pay {0})".localize("decision action button").format(UI.getShortNumberString(9E4)),"No".localize()]})},complete:function(a){var b=GameManager.company;0===a?(b.adjustCash(-9E4,"air conditioner".localize("heading")),b.flags.airConInstalled=!0,VisualsManager.installAirCon()):(b.staff.forEach(function(a){a.adjustEfficiency(-0.3)}),b.flags.airCon1Declined=15+15*b.getRandom()+b.currentWeek);ghg4.ghg5("aircon1?",{decision:0===a})}};a.airCon1Callback={id:"airCon1Callback",isRandomEvent:!1,trigger:function(a){return!a.flags.airConInstalled&&
(2===a.currentLevel||3===a.currentLevel)&&3<a.staff.length&&!a.flags.airCon2&&2E5<=a.cash&&void 0!=a.flags.airCon1Declined&&a.flags.airCon1Declined<a.currentWeek},getNotification:function(a){a=a.staff.skip(1).pickRandom();return new Notification({sourceId:"airCon1Callback",header:a.name,text:"Boss, the heat is becoming a serious problem. Just yesterday my mouse melted and my keyboard is covered in sweat. Not a good environment to work in. We really need an air conditioner.{n}Unfortunately the previous offer has expired and we would need to pay {0}.\nShould we order it?".localize("try to make the reason lightweight and fun").format(UI.getShortNumberString(18E4)),
options:["Yes (pay {0})".localize("decision action button").format(UI.getShortNumberString(18E4)),"No".localize()],weeksUntilFired:0})},complete:function(a){var b=GameManager.company;0===a?(b.adjustCash(-18E4,"air conditioner".localize("heading")),b.flags.airConInstalled=!0,VisualsManager.installAirCon()):(b.staff.forEach(function(a){a.adjustEfficiency(-0.4)}),b.flags.airCon2=!0,b.flags.airCon2Declined=15+15*b.getRandom()+b.currentWeek);ghg4.ghg5("aircon2?",{decision:0===a})}};a.airCon2Callback={id:"airCon2Callback",
isRandomEvent:!1,trigger:function(a){return!a.flags.airConInstalled&&(2===a.currentLevel||3===a.currentLevel)&&3<a.staff.length&&2E5<=a.cash&&void 0!=a.flags.airCon2Declined&&a.flags.airCon2Declined<a.currentWeek},getNotification:function(a){a=a.staff.skip(1).pickRandom();return new Notification({sourceId:"airCon2Callback",header:a.name,text:"Boss, We've had enough and ordered the air conditioner ourselves. Thanks for nothing.".localize(),weeksUntilFired:0})},complete:function(a){a=GameManager.company;
a.flags.evil-=2;ghg4.ghg5("evil");a.flags.airConInstalled=!0;VisualsManager.installAirCon();ghg4.ghg5("aircon3")}};a.productPlacement={id:"productPlacement1",isRandomEvent:!0,trigger:function(a){return 3<a.currentLevel&&!a.flags.productPlacement1},getNotification:function(a){a.flags.productPlacement1=!0;a="Dave Johnson here, CEO of Departure Science. Some of our test subjects were recently exposed to some of your games and, surprisingly, they didn't go totally insane. They seemed to quite enjoy the experience in fact. Anyway, I have some products that need advertising and could do with some product placement.{n}My marketing boys tell me that making you this offer is a bad idea but that's exactly why I want it. I'll pay you {0} to place some of our fine red painted exploding barrels in one of your games. What'd ya say?".localize("see Portal 2 reference hint").format(UI.getShortNumberString(2E5));
return new Notification({sourceId:"productPlacement1",header:"Product Placement".localize("heading"),text:a,options:["Sure!".localize("decision action button"),"No".localize()]})},complete:function(a){var b=GameManager.company;0===a&&(b.adjustCash(2E5,"Departure Science".localize("see Portal 2 reference hint")),b.activeNotifications.push(new Notification("Message".localize("heading"),"Excellent! Good to hear you have some spirit in you. One more thing: Don't feel like you have to go and rush those barrels into your next game. I'd rather have you place them in a game where they fit well.\nJohnson out.".localize("see Portal 2 reference hint"))),
b.flags.productPlacement1Active=!0,b.specialItems.push(Research.ProductPlacement1));ghg4.ghg5("productPlacement?",{decision:0===a})}};a.productPlacement1Finished={trigger:function(a){return a.flags.productPlacement1Active&&!a.flags.productPlacement1Finished&&0<a.gameLog.length&&-1!=a.gameLog.last().features.indexOf(Research.ProductPlacement1)},id:"productPlacement1Finished",getNotification:function(a){a.flags.productPlacement1Finished=!0;a.specialItems.remove(Research.ProductPlacement1);var b=a.gameLog.last().genre===
GameGenre.Action,d="Dave Johnson here! Listen! You did well placing our beloved barrels in {0} - my marketing eggheads say profits are increasing which means more science for us. Well done. Here, have this cake.".localize("see Portal 2 reference hint");b?a.flags.hadCake=!0:d="Dave Johnson here! Listen! Those red exploding barrels I'd asked you to place in your game. Well, seems that folks didn't really enjoy them as much in {0}. Oh well, was worth a try.".localize("see Portal 2 reference hint");d=
d.format(a.gameLog.last().title);a=new Notification("Message".localize("heading"),d,"OK".localize(),4);b&&(a.image="./images/misc/cake.png",a.activateAchievement(Achievements.cake));ghg4.ghg5("product placement finished",{success:b});return a}};a.announceConsole={id:"announceConsole",trigger:function(a){return!1},getNotification:function(a){a=GameManager.currentHwProject;a="Boss, I think it's time to announce the {0} to the world. Should we go ahead and make a press release?".localize("{0} custom console name").format(a.name);
return new Notification({sourceId:"announceConsole",header:"Hardware lab".localize(),text:a,options:["Announce".localize("decision action button"),"Don't announce".localize("decision action button")]})},complete:function(a){var b=GameManager.company;if(0===a){var d=GameManager.currentHwProject,c;if(1===GameManager.currentHwProject.version)c="In a surprise announcement {0}, a company known for games such as {1} has revealed that they have been working on their very own game console. The console which is called {2} is said to compete with the high end consoles from companies like Mirconoft and Vonny.{n}We are eager to see how much of an impact this new console will have.".localize().format(b.name,
b.getBestSeller().title,d.name);else{c=b.licencedPlatforms.last(function(a){return a.isCustom});var f=0.7>c.successFactor?" which had only limited commercial success.".localize("consoleAnnouncementPastSuccessFragment"):1>=c.successFactor?"which had moderate commercial success.".localize("consoleAnnouncementPastSuccessFragment"):"which had a sizeable following and really made an impact in the market.".localize("consoleAnnouncementPastSuccessFragment");c="{0} has announced that they are working on a new game console. The console named {1} is planned as a successor to their earlier contender, the {2} ".localize("{2} is consoleAnnouncementPastSuccessFragment").format(b.name,
d.name,c.name)+f}b.activeNotifications.insertAt(0,new Notification("Hardware lab".localize(),"I will get right to it.".localize()));c=new Notification({header:"Industry News".localize("heading"),text:c,image:GameManager.currentHwProject.iconUri,weeksUntilFired:0.7});d.announced=!0;b.notifications.push(c)}else b.activeNotifications.insertAt(0,new Notification("Hardware lab".localize(),"Okay, you are the boss.".localize()));ghg4.ghg5("announce console?",{decision:0===a})}};a.endOfGame1={id:"endOfGame1",
trigger:function(){return!1},isRandom:!1,getNotification:function(a){a=DataStore.remoteSettings.supporterPacksEnabled;var b="Congratulations on finishing Game Dev Tycoon and thank you for playing! If you enjoyed our little game then please consider rating the game on the Store. You can also send us some feedback".localize("gameFinishMsg, either stops with a . or continues with fragment"),b=a?b+" and, if you really loved the game, you can (if you wish) vote with your wallet to support us even further.".localize("fragment of gameFinishMsg"):
b+".";return new Notification({sourceId:"endOfGame1",header:"Thank you".localize("heading"),text:b,image:"images/greenheart.png",options:["See options...".localize("decision action button"),"No, thanks".localize("decision action button")]})},complete:function(a){var b=GameManager.company,d=new Notification("Continue game".localize("heading"),"If you wish you can continue playing but please note that there will be no more platform releases or other story elements.".localize());0===a&&b.notifications.push(new Notification("{SupportGreenheartGames}"));
b.notifications.push(d);ghg4.ghg5("show support options?",{decision:0===a})}};a.endOfGameNative={id:"endOfGameNative",trigger:function(){return!1},isRandom:!1,getNotification:function(a){a="Congratulations on finishing Game Dev Tycoon and thank you for playing! If you enjoyed our little game then please consider telling your friends about it.".localize()+"{n}"+"If you wish you can continue playing but please note that there will be no more platform releases or other story elements.".localize();return new Notification({header:"Thank you".localize("heading"),
text:a,image:"images/greenheart.png"})}};a.gameinterview={id:"gameinterview",trigger:function(a){return a.isGameProgressBetween(0.2,0.9)&&1E4<a.fans&&(!a.flags.lastInterviewEvent||a.flags.lastInterviewEvent<GameManager.gameTime-8E4*GameManager.SECONDS_PER_WEEK)},isRandom:!0,getNotification:function(a){if(a.currentGame){var b=SalesEvents.getPossibleSources(a).pickRandom();a.flags.lastInterviewEvent=GameManager.gameTime;a.flags.interviewSource=b;a="Hi, this is {0} from {1}. I got word that {2} is working on a new game.\nWould you be willing to share some information on your current game project and do an interview about it?".localize().format(b.author,
b.name,a.name);return new Notification({sourceId:"gameinterview",header:"Media Enquiry".localize("heading"),text:a,options:["Agree".localize("decision action button"),"Decline".localize("decision action button")]})}},complete:function(b){var d=GameManager.company,c=d.flags.interviewSource,f=d.currentGame;if(0===b)d.flags.secrecy--,d.activeNotifications.addRangeAt(0,a.gameInterviewQuestions.getNotification(d,f).split());else if(d.flags.secrecy++,0.5<=d.getRandom()){var g=d.gameLog.slice(-1)[0],k="{0} has declined a request for an interview about their current project.\n".localize().format(d.name);
b=0;7<=g.score?(k+="Given that their most recent game {0} enjoyed universal success we simply cannot wait for them to unveil their new project!".localize().format(g.title),b+=20+20*d.getRandom()):5<g.score?(k+="With {0} only receiving a lukewarm reception, fans are sure to be expecting better from them and we are curious about their next title.".localize().format(g.title),b+=10+10*d.getRandom()):(k+="Hopefully the company can do better than last time. We don't need another {0}.".localize().format(g.title),
b+=5+5*d.getRandom());b*=General.getGameSizePointsFactor(f);2<d.flags.secrecy&&(b*=2);b=Math.round(b);c=new Notification({header:c.name,text:k,weeksUntilFired:0.2+0.2*d.getRandom()});c.adjustHype(b);d.notifications.push(c)}}};a.gameInterviewQuestions={id:"gameInterviewQuestions",getNotification:function(b,d){return[a.gameInterviewQ1,a.gameInterviewQ2].pickRandom().getNotification(b,d)}};a.gameInterviewQ1={id:"gameInterviewQ1",getNotification:function(a,b){var d=a.flags.interviewSource;return new Notification({sourceId:"gameInterviewQ1",
header:d.name,text:"{0}:\nWhat is your expectation regarding the success of {1}? Do you think that the game will be well received?".localize().format(d.author,b.title),options:["Hype game!".localize(),"Be modest.".localize()]})},complete:function(a){var b=GameManager.company,d=b.currentGame;0===a?(d.flags.interviewHyped={decision:!0,source:$.extend({},b.flags.interviewSource)},d.hypePoints+=Math.round(60+40*b.getRandom())):d.hypePoints+=Math.round(20+20*b.getRandom());b.notifications.push(new Notification(b.flags.interviewSource.name,
"Thank you for your time.".localize()))}};a.gameInterviewQ2={id:"gameInterviewQ2",getNotification:function(a,b){var d=a.flags.interviewSource,c=Missions.DevMissions.filter(function(a){return 0.9<=Missions.getGenreWeighting(a,b)}).pickRandom(),f=Missions.DevMissions.filter(function(a){return 0.9>Missions.getGenreWeighting(a,b)}).pickRandom(),g=0.5<a.getRandom(),k;g?(k=c.name,c=f.name):(k=f.name,c=c.name);f="{0}:\nMany of our readers are curious about what decisions go into making a video game and how companies prioritize development areas.\nYour new game is a {1}/{2} game, can you tell us whether such a game would usually receive more focus on {3} or on {4}?".localize().format(d.author,
b.topic.name,b.getGenreDisplayName(),k,c);b.flags.gameInterviewQ2={option1:k,option2:c,correctOption:g?0:1,gameName:b.title,gameDescr:b.topic.name+"/"+b.getGenreDisplayName()};return new Notification({sourceId:"gameInterviewQ2",header:d.name,text:f,options:["More on {0}".localize().format(k),"More on {0}".localize().format(c),"I don't know".localize()]})},complete:function(a){var b=GameManager.company,c=b.currentGame,f=b.flags.interviewSource,g=c.flags.gameInterviewQ2,k="In a recent interview with {0} we discussed their upcoming {1} game and asked company founder {2} how different development areas are prioritized.\nIn the interview {2} said that {3} is of particular importance for such a game ".localize("continues with fragment").format(d(),
g.gameDescr,b.staff[0].name,2==a?"they are still experimenting what area".localize("sentence fragment"):0===a?g.option1:g.option2),k=(c=a===c.flags.gameInterviewQ2.correctOption)?k+"and it seems that other industry professionals agree with this. Every game development project has limited resources so it's very important to use the time most effectively.".localize("sentence fragment"):k+"but it seems that other industry professionals disagree with that point of view saying that {0} is usually more important for this type of game.".localize("sentence fragment").format(0===
g.correctOption?g.option1:g.option2),g=new Notification({header:f.name,text:k,weeksUntilFired:0.6+0.2*b.getRandom()});2!=a&&(c&&g.adjustFans(Math.floor(200+1E3*b.getRandom())),g.adjustHype(Math.round(5+20*b.getRandom()*c?2:0)));b.notifications.push(new Notification(f.name,"Thank you for your time.".localize()));b.notifications.push(g)}};a.OldEngine={id:"oldEngine",isRandomEvent:!0,trigger:function(a){return a.engines&&a.engines.some(function(a){return!a.isSold&&a.releaseWeek+240<GameManager.company.currentWeek})&&
a.isLaterOrEqualThan(10,3,4)},getNotification:function(a){var b=a.engines.filter(function(a){return!a.isSold&&a.releaseWeek+240<GameManager.company.currentWeek}).pickRandom();a.flags.engineEventId=b.id;a="Boss, a small number of dedicated fans have asked that we release the source code to one of our older game engines '{0}'. Doing so would surely satisfy these fans but given that we worked hard on the engine, we could also sell licenses for it and make some money. Alternatively, we could simply refuse their request completely.\nWhat would you like to do?".localize().format(b.name);
return new Notification({sourceId:"oldEngine",header:"Old Engine".localize(),text:a,options:["Give it away".localize(),"Sell it".localize(),"Refuse".localize()]})},complete:function(a){var b=GameManager.company,d=b.engines.first(function(a){return a.id==b.flags.engineEventId});if(d){d.isSold=2!=a;var c=(0.02*b.fans+0.05*b.fans*b.getRandom()).clamp(1E3,2E4),f=-2E3+-3E3*b.getRandom(),g,k;switch(a){case 0:g="give away".localize();k="positive".localize();0.5<b.getRandom()&&(c*=2,k="outstanding".localize());
break;case 1:g="sell".localize();f=2*c+1.5*c*b.getRandom();c/=5;k="mixed".localize();0.5<b.getRandom()&&(k="negative".localize(),c*=-1);0.5<b.getRandom()&&(f*=3);break;case 2:0.3>b.getRandom()&&(-1*c,a=new Notification({header:"Old Engine".localize(),text:"Boss, it seems the fans who requested that we open source {0} were particularly upset with our decision and have caused quite a negative stirr. We've lost {1} fans.".localize().format(d.name,UI.getShortNumberString(c)),weeksUntilFired:0.2+0.3*b.getRandom()}),
a.adjustFans(Math.round(c)),b.notifications.push(a));return}c=Math.round(c);f=Math.round(f);msg="Boss, our recent decision to {0} our engine {1} was met with {2} responses from fans. Overall we {3} fans and {4}.".localize().format(g,d.name,k,(0<c?"gained".localize():"lost".localize())+" "+UI.getShortNumberString(c),(0>f?"it cost us {0}".localize():"we made {0}".localize("{0} is amount of money")).format(UI.getShortNumberString(f)));a=new Notification({header:"Old Engine".localize(),text:msg,weeksUntilFired:0.3+
0.9*b.getRandom()});a.adjustCash(f);a.adjustFans(c);b.notifications.push(a)}}};a.patentTroll={id:"patentTroll",isRandomEvent:!0,trigger:function(a){return 2E6<=a.cash&&a.isLaterOrEqualThan(10)&&a.engines&&3<=a.engines.length&&a.engines.last().releaseWeek>a.currentWeek-20&&a.engines.last().releaseWeek<a.currentWeek-1&&(!a.flags.lastPatentTroll||!a.flags.lastPatentTroll.disabled&&a.flags.lastPatentTroll.week+192<a.currentWeek)},getNotification:function(a){a.flags.lastPatentTroll={week:a.currentWeek,
count:0};var b=a.engines.last(),d=a.cash/8,c=1E5+2E5*a.getRandom();d<c&&(d=c);d=Math.floor(d);a.flags.lastPatentTroll.cost=d;c=30+10*Math.floor(6*(a.fans/15E4).clamp(0,1));a.flags.lastPatentTroll.fanChance=c;a="We've just received a letter from a company called 'All Your IP Belongs To US' and they say that our engine {0} is infringing on one of their patents.{n}They 'graciously' offer a license to their patent for {1} and are willing to give us a 50% discount if we just pay them without fighting them in court. We could pay this and hope that they won't bother us again or we could refuse and try to resolve this in front of the courts. Alternatively we might be able to rally our fans and publicly fight them.\nHow would you like to proceed?".localize().format(b.name,
UI.getShortNumberString(d));return new Notification({sourceId:"patentTroll",header:"Legal Department".localize(),text:a,options:["Pay for license ({0})".localize().format(UI.getShortNumberString(Math.floor(d/2))),"Go to court. [~{0}% chance]".localize().format(50),"Rally fans! [~{0}% chance]".localize().format(c)]})},complete:function(a){var b=GameManager.company;if(0===a)b.adjustCash(-Math.floor(b.flags.lastPatentTroll.cost/2));else{var d=0,c=0,f=!1,g=Math.round(b.flags.lastPatentTroll.cost/20);
if(1===a){var k=0.5<b.getRandom();a=k?"The court dismissed the patent infringement claims made against us stating that the claim was ridiculous. All costs were paid by the suing party.".localize():"Unfortunately, it seems that the patent infringement case was decided against us. We have to pay the full amount of {0} as well as the court costs of {1}. This is ridiculous.".localize().format(UI.getShortNumberString(b.flags.lastPatentTroll.cost),UI.getShortNumberString(g));k||(d-=b.flags.lastPatentTroll.cost+
g)}else k=b.flags.lastPatentTroll.fanChance,a="We rallied our fans to publicly fight against All Your IP Belongs To US".localize("continues with fragment"),b.getRandom()<k/100?(c=Math.floor(1E4+1E4*b.getRandom()),a+=" and fight we did! We not only caused them to retract their claims but we also won {0} fans and the public's admiration. I doubt we will hear from those patent trolls again.".localize("sentence fragment").format(UI.getLongNumberString(c)),f=!0):(a+=" but it seems that our efforts were fruitless. Seems we still have to pay {0} and the court costs of {1}. Maybe next time we'll have more luck.".localize("sentence fragment").format(UI.getShortNumberString(b.flags.lastPatentTroll.cost),
UI.getShortNumberString(g)),d=-b.flags.lastPatentTroll.cost-g);g=new Notification({header:"Legal Department".localize(),text:a,weeksUntilFired:2+2*b.getRandom()});d&&g.adjustCash(d,"All Your IP Belongs To US".localize());c&&g.adjustFans(c);b.notifications.push(g)}b.flags.lastPatentTroll.count?b.flags.lastPatentTroll.count++:b.flags.lastPatentTroll.count=1;if(3==b.flags.lastPatentTroll||f)b.flags.lastPatentTroll.disabled=!0}}})();var ProjectContracts={};
(function(){var a=ProjectContracts;a.getAvailable=function(b,d){for(var c=[],f=a.getAllContracts().filter(function(a){return(!a.type||a.type==d)&&a.isAvailable&&a.isAvailable(b)}),g=0;g<f.length;g++){var h=f[g].getContract(b);h instanceof Array?c.addRange(h):c.push(h)}return c};a.getAllContracts=function(){var b=[],d;for(d in a)if(a.hasOwnProperty(d)){var c=a[d];void 0!=c.id&&b.push(c)}return b};var b=[{name:"Logo Animation".localize("heading"),description:"Create an animation for an existing logo.".localize(),
tF:1,dF:2.5,rF:1.5},{name:"Character Design".localize("heading"),description:"Design some game characters.".localize(),tF:1,dF:4.5,rF:1.5},{name:"Playtest".localize("heading"),description:"Help to playtest a game.".localize(),tF:1,dF:1,rF:1.5},{name:"Game Backdrops".localize("heading"),description:"Design some simple background graphics for a game.".localize(),tF:1,dF:2,rF:1.5},{name:"Setup Computers".localize("heading"),description:"Install Mirconoft BOSS on computers".localize(),tF:2,dF:0.4},{name:"Debug program".localize("heading"),
description:"Help debugging a convoluted BASE program.".localize(),tF:2,dF:0.2},{name:"Spritesheet Software".localize("heading"),description:"Our staff needs to be taught how to use these modern technologies.".localize(),tF:3,dF:2},{name:"Library Software".localize("heading"),description:"Develop a simple library management system".localize(),tF:5,dF:1}],c=[{name:"Usability Study".localize("heading"),description:"Perform a detailed usability study.".localize(),tF:5,dF:6.5},{name:"Review Game Concept".localize("heading"),
description:"Review a game concept using your expertise.".localize(),tF:3,dF:8,rF:1.5},{name:"Game Art".localize("heading"),description:"Help out on a project with some game art".localize(),tF:5,dF:6,rF:1.5},{name:"Clean up database".localize("heading"),description:"Should one table really have 200 columns? Probably not.".localize(),tF:5,dF:1},{name:"Accounting Software".localize("heading"),description:"Develop a simple accounting software. Are those ever simple?".localize(),tF:5,dF:1},{name:"Time Tracking".localize("heading"),
description:"Design and develop a time tracking system.".localize(),tF:3,dF:1},{name:"Design a board game".localize("heading"),description:"Let's see how your skills translate to traditional games.".localize(),dF:5,tF:0.2,rF:2},{name:"Horoscope Generator".localize("heading"),description:"Making up horoscopes is hard work. We want it automated.".localize(),dF:5,tF:1},{name:"Character Dialogues".localize("heading"),description:"Improve our character dialogues.".localize(),dF:5,tF:1,rF:1.4},{name:"Futuristic Application".localize("heading"),
description:"We need an application that looks futuristic for a movie.".localize(),dF:3,tF:2,rF:1.5},{name:"Vacuum Robot".localize("heading"),description:"Create a revolutionary AI for a vacuum robot".localize(),tF:2,dF:1.4},{name:"Website".localize("heading"),description:"We just heard of this thing called internet. We want to have one.".localize(),tF:2,dF:1.3}],d=[{name:"Game Port".localize("heading"),description:"Port a game to a different platform.".localize(),tF:3.2,dF:1.7,rF:1.2},{name:"Cut Scenes".localize("heading"),
description:"Deliver professional cut scenes for a game.".localize(),tF:1,dF:1,rF:1.5},{name:"Space Shuttle".localize("heading"),description:"Deliver part of the space shuttle control software.".localize(),tF:3,dF:2},{name:"Alien Search".localize("heading"),description:"Optimize our search for alien life forms using advanced AI techniques.".localize(),tF:3,dF:1.8,rF:1.3},{name:"Movies".localize("heading"),description:"We need your skills in our latest blockbuster production.".localize(),tF:1,dF:1,
rF:1.5}];a.genericContracts={id:"genericContracts",type:"generic",isAvailable:function(a){return!0},getContract:function(a){var f=m(a,"small"),h=g(f),h=new MersenneTwister(h),f=k(f,b,"small",4);a.flags.mediumContractsEnabled&&f.addRange(k(m(a,"medium"),c,"medium",3));a.flags.largeContractsEnabled&&f.addRange(k(m(a,"large"),d,"large",2));return f.shuffle(h).filter(function(a){return!a.skip})},complete:function(a,b,d){m(a,d.size).contractsDone.push(d.index);b?a.notifications.push(l(d)):a.notifications.push(h(d));
GameManager.contractFinished(b)}};var f=function(a){a.seed=Math.floor(65535*Math.random());a.expireBy=GameManager.gameTime+24E3*GameManager.SECONDS_PER_WEEK;a.contractsDone=[]},g=function(a){a.seed?a.expireBy<=GameManager.gameTime&&(f(a),a.initialSettings=!1):(f(a),a.initialSettings=!0);return a.seed},k=function(a,b,d,c){var f=g(a),f=new MersenneTwister(f),h=[];b=b.slice();c=n(f,c);a.initialSettings&&(c=Math.max(1,c));for(var k=0;k<c&&0<b.length;k++){var l=b.pickRandom(f);b.remove(l);var m=d,p=f,
q=p.random();0.8<p.random()&&(q+=p.random());var A=11;"medium"==m?A=30:"large"==m&&(A=100);12==A&&2<GameManager.company.staff.length&&(A+=6);var H=GameManager.company.getCurrentDate().year/25,A=A+A*H,H=A+A*q,A=H/(l.dF+l.tF),q=A*l.dF,A=A*l.tF,q=q+0.2*q*p.random()*p.randomSign(),A=A+0.2*A*p.random()*p.randomSign(),q=Math.floor(q),A=Math.floor(A),H=1E3*H,H=H/1E3,H=1E3*Math.floor(H),F=Math.floor(3+7*p.random());"small"===m&&(F=Math.floor(3+3*p.random()));p=0.2*H+0.3*H*p.random();p/=1E3;p=1E3*Math.floor(p);
l=contract={name:l.name,description:l.description,requiredD:q,requiredT:A,spawnedD:0,spawnedT:0,payment:H,penalty:-p,weeksToFinish:F,rF:l.rF,isGeneric:!0,size:m};l.id="genericContracts";l.index=k;a.contractsDone&&-1!=a.contractsDone.indexOf(k)&&(l.skip=!0);h.push(l)}return h},l=function(a){var b=["Thank you for taking care of this for us.".localize(),"Well done.".localize(),"Just what we wanted.".localize(),"Excellent work.".localize(),"Thank you for the quick work.".localize(),"Would hire again.".localize(),
"Nice job.".localize(),"Success!".localize()],b=new Notification({header:"Contract Successful".localize("heading"),text:b.pickRandom()+"\n"+"We will transfer {0} to your account.".localize().format(UI.getShortNumberString(a.payment)),weeksUntilFired:0.2});b.adjustCash(a.payment,"contract payment".localize("heading"));return b},h=function(a){var b=["This is very disappointing.".localize(),"You didn't complete the contract on time".localize(),"Hope you can make it next time.".localize(),"Seems like this was too big of a job for you.".localize(),
"Unfortunately the deadline is here.".localize()];a=a.penalty;b=new Notification({header:"Contract Failed".localize("heading"),text:b.pickRandom()+"\n"+"A penalty of {0} will be applied to your account.".localize().format(UI.getShortNumberString(a)),weeksUntilFired:0.2});b.adjustCash(a,"contract penalty".localize("heading"));return b},m=function(a,b){var d="contracts"+b,c=a.flags[d];c||(c={id:d},a.flags[d]=c);return c};a.publisherContracts={id:"publisherContracts",type:"gameContract",isAvailable:function(a){return!0},
getContract:function(a){var b=m(a,"publisher");return q(a,b,5).filter(function(a){return!a.skip})},complete:function(a,b,d){var c;c=b?["The game meets the required ratings. We are looking forward to future business.".localize()].pickRandom():["The game doesn't live up to expectations.\nAs per contract a penalty will be applied to your account.".localize()].pickRandom();c=new Notification({header:"Publisher".localize("heading"),text:d.publisher+": "+c,weeksUntilFired:2+2*a.getRandom()});b||c.adjustCash(-d.penalty,
"contract penalty".localize("heading"));a.notifications.push(c)}};var n=function(a,b){var d=a.random();return Math.max(b-1,Math.floor(d*b))},p=[{id:"ActiveVisionaries",name:"Active Visionaries"},{id:"ea",name:"Electronic Mass Productions"},{id:"RockvilleSoftworks",name:"Rockville Softworks"},{id:"BlueBitGames",name:"Blue Bit Games"},{id:"CapeCom",name:"CapeCom"},{id:"Codemeisters",name:"Codemeisters"},{id:"DeepPlatinum",name:"Deep Platinum"},{id:"InfroGames",name:"InfroGames"},{id:"LoWoodProductions",
name:"LoWood Productions"},{id:"TGQ",name:"TGQ"},{id:"\u00dcberSoft",name:"\u00dcberSoft"}],q=function(a,b,d){var c=[],f=b.seed,h=new MersenneTwister(g(b));b.seed!=f&&(b.topics=void 0,b.researchedTopics=void 0,b.excludes=void 0,b.platforms=void 0);var k,l;if(b.topics&&b.researchedTopics&&b.platforms){f=b.topics.map(function(a){return Topics.topics.first(function(b){return b.id===a})});k=b.researchedTopics.map(function(a){return Topics.topics.first(function(b){return b.id===a})});var m=Platforms.getPlatforms(a,
!0);l=b.platforms.map(function(a){return m.first(function(b){return b.id===a})})}else{f=a.topics.slice();f.addRange(General.getTopicsAvailableForResearch(a));b.topics=f.map(function(a){return a.id});k=a.topics.map(function(a){return a.id});b.researchedTopics=k;l=Platforms.getPlatformsOnMarket(a).filter(function(a){return!a.isCustom&&Platforms.doesPlatformSupportGameSize(a,"medium")});b.platforms=l.map(function(a){return a.id});b.excludes=[];var q=a.gameLog.last();q&&b.excludes.push({genre:q.genre.id,
topic:q.topic.id})}q=b.excludes.slice();d=n(h,d);b.initialSettings&&(d=Math.max(1,d));b=["medium"];a.canDevelopLargeGames()&&b.addRange(["large","large","large"]);for(var E=["young","everyone","mature"],A={medium:15E4,large:75E4},H=0;H<d;H++){var F=0,C=void 0,G=void 0;0.7>=h.random()&&(C=General.getAvailableGenres(a).pickRandom(h),F+=0.1);if(0.7>=h.random()){do if(G=0.7>=h.random()?f.except(k).pickRandom(h):f.pickRandom(h),void 0===G)break;while(q.some(function(a){return(void 0===C||a.genre===C.id)&&
a.topic===G.id}));void 0!=G&&(F+=0.1)}(C||G)&&q.push({genre:C?C.id:void 0,topic:G?G.id:void 0});var D=void 0;0.7>=h.random()&&(D=l.pickRandom(h));var I=void 0;a.canSetTargetAudience()&&0.2>=h.random()&&(I=E.pickRandom(h));var F=F+0.8*h.random(),M=4+Math.floor(5*F),L;do L=b.pickRandom(h);while(void 0!=D&&!Platforms.doesPlatformSupportGameSize(D,L));var J=M/10*A[L],J=J/5E3,J=5E3*Math.max(1,Math.floor(J)),K=1.2*J+1.8*J*h.random(),K=K/5E3,K=5E3*Math.floor(K),P;P=D&&D.company&&0.2>=h.random()?D.company:
p.pickRandom(h).name;var F=Math.floor(7+8*F)/100,O=G?G.name:"Any Topic".localize(),O=O+(" / "+(C?C.name:"Any Genre".localize()));!D||Platforms.getPlatformsOnMarket(a).first(function(a){return a.id===D.id})?c.push({id:"publisherContracts",refNumber:Math.floor(65535*Math.random()),type:"gameContract",name:O,description:"Publisher: {0}".localize().format(P),publisher:P,topic:G?G.id:G,genre:C?C.id:C,platform:D?D.id:void 0,gameSize:L,gameAudience:I,minScore:M,payment:J,penalty:K,royaltyRate:F}):d++}return c}})();
var FlippingCounter={};
(function(){var a=FlippingCounter;a.panel;a.img0=new Image;a.img1=new Image;a.img2=new Image;a.img3=new Image;a.img4=new Image;a.img5=new Image;a.img6=new Image;a.img7=new Image;a.img8=new Image;a.img9=new Image;a.img10=new Image;a._activeUITweens;a.loaderImageAmount=10;a.numberBitmapsArr=[];a.rectUp=new createjs.Rectangle(0,0,104,91);a.rectDown=new createjs.Rectangle(0,91,104,91);a.getAllImages=function(){return"./images/superb/counter/0.png ./images/superb/counter/1.png ./images/superb/counter/2.png ./images/superb/counter/3.png ./images/superb/counter/4.png ./images/superb/counter/5.png ./images/superb/counter/6.png ./images/superb/counter/7.png ./images/superb/counter/8.png ./images/superb/counter/9.png ./images/superb/counter/panel.png".split(" ")};var b;
a.init=function(){b||(b=!0,this.img0.onload=this.handleImageLoad,this.img1.onload=this.handleImageLoad,this.img2.onload=this.handleImageLoad,this.img3.onload=this.handleImageLoad,this.img4.onload=this.handleImageLoad,this.img5.onload=this.handleImageLoad,this.img6.onload=this.handleImageLoad,this.img7.onload=this.handleImageLoad,this.img8.onload=this.handleImageLoad,this.img9.onload=this.handleImageLoad,this.img10.onload=this.handleImageLoad,this.img0.onerror=d,this.img1.onerror=d,this.img2.onerror=
d,this.img3.onerror=d,this.img4.onerror=d,this.img5.onerror=d,this.img6.onerror=d,this.img7.onerror=d,this.img8.onerror=d,this.img9.onerror=d,this.img10.onerror=d,this.img0.src="./images/superb/counter/0.png",this.img1.src="./images/superb/counter/1.png",this.img2.src="./images/superb/counter/2.png",this.img3.src="./images/superb/counter/3.png",this.img4.src="./images/superb/counter/4.png",this.img5.src="./images/superb/counter/5.png",this.img6.src="./images/superb/counter/6.png",this.img7.src="./images/superb/counter/7.png",
this.img8.src="./images/superb/counter/8.png",this.img9.src="./images/superb/counter/9.png",this.img10.src="./images/superb/counter/panel.png")};var c=!1,d=function(a){c||(Logger.LogError("A 'Flipping Counter' image has incorrectly loaded, please restart or reinstall the game."),c=!0)};a.handleImageLoad=function(b){a.loaderImageAmount--;if(0==a.loaderImageAmount){for(b=0;10>b;b++)a.numberBitmapsArr[b]=[],a.numberBitmapsArr[b].up=new createjs.Bitmap(a["img"+b]),a.numberBitmapsArr[b].down=new createjs.Bitmap(a["img"+
b]);a.panel=new createjs.Bitmap(a.img10)}};a.FlippingBox=function(b,d){this.container=new createjs.Container;var c=[];this.init=function(){for(var l=0;l<b;l++){var h=new a.FlippingNumber(0);h.init();h.container.x=l*(a.rectUp.width+d);this.container.addChild(h.container);c.push(h)}};this.fill=function(d){d=String(d).split("").splice(0,b);var g=b-d.length;if(0<g)for(var m=0;m<g;m++)d.splice(0,0,"0");for(m=0;m<c.length;m++)c[m].setNumber(!1==a.is_int(d[m])?0:d[m])}};a.is_int=function(a){return parseFloat(a)!=
parseInt(a)||isNaN(a)?!1:!0};a.FlippingNumber=function(b){function d(){n=a.numberBitmapsArr[p].down.clone();n.sourceRect=a.rectDown;n.scaleY=0;n.y=91;this.container.addChild(n);Sound.playSoundOnce("flipflap",0.5);0==s.length&&0==t.length?a._activeUITweens.push(createjs.Tween.get(n).to({scaleX:1,scaleY:1},this.speedUltimateDown,createjs.Ease.backOut).call(c,null,this)):a._activeUITweens.push(createjs.Tween.get(n).to({scaleX:1,scaleY:1},this.speedDown,createjs.Ease.lineer).call(c,null,this))}function c(){this.container.removeChild(l);
this.container.removeChild(h);l=m;h=n;this.currentLetter=p;0<s.length?(this.shiftAt(s[0]),s.splice(0,1)):(q=!1,0<t.length&&(console.log(t[t.length-1],t),this.setNumber(t[t.length-1]),t=[]))}this.container=new createjs.Container;this.currentLetter=b;this.speedDown=this.speedUp=100;this.speedUltimateUp=250;this.speedUltimateDown=500;var l=a.numberBitmapsArr[this.currentLetter].up.clone(),h=a.numberBitmapsArr[this.currentLetter].down.clone(),m,n,p,q=!1,s=[],t=[];this.init=function(){l.sourceRect=a.rectUp;
l.regY=l.y=91;h.sourceRect=a.rectDown;h.y=91;this.container.addChild(l);this.container.addChild(h)};this.setNumber=function(a){if(!1==q){if(a!=this.currentLetter){q=!0;if(a>this.currentLetter)var b=this.currentLetter+1;else{for(b=this.currentLetter+1;9>=b;b++)s.push(b);b=0}for(;b<=a;b++)s.push(b);this.shiftAt(s[0]);s.splice(0,1)}}else t.push(a)};this.shiftAt=function(b){p=b;m=a.numberBitmapsArr[p].up.clone();m.sourceRect=a.rectUp;m.regY=m.y=91;this.container.addChild(m);this.container.swapChildren(m,
l);speed=0==s.length?this.speedUltimateUp:this.speedUp;a._activeUITweens.push(createjs.Tween.get(l).to({scaleX:1,scaleY:0},speed,createjs.Ease.lineer).call(d,null,this))}}})();var Knowledge={};
(function(){Knowledge.hasComboKnowledge=function(a,b,d){d||(d=a.knowledge);return d.combos?d.combos.first(function(a){return a.topicId==b.topic.id&&a.genreId==b.genre.id&&(!b.secondGenre||b.secondGenre.id==a.secondGenreId)}):!1};Knowledge.setComboKnowledge=function(b,d){a(b,d,b.knowledge);a(b,d,g)};var a=function(a,b,d){d.combos||(d.combos=[]);Knowledge.hasComboKnowledge(a,b,d)||(a={topicId:b.topic.id,genreId:b.genre.id},b.secondGenre&&(a.secondGenreId=b.secondGenre.id),d.combos.push(a))};Knowledge.getComboHintText=
function(a){a=GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre);return Knowledge.getFactorAdj(a,!0)};Knowledge.getFactorAdj=function(a,b){a=Math.round(10*a)/10;return 1<=a?b?"great".localize():"+++":0.9<=a?b?"good".localize():"++":0.8<=a?b?"okay".localize():"+":0.7<=a?b?"bad".localize():"--":b?"terrible".localize():"---"};Knowledge.getPlatformAudienceHintHtml=function(a,b){if(!a.canSetTargetAudience())return"";var d=Knowledge.getPlatformAudienceWeightingKnowledge(a,b);return Knowledge.getAudienceHintHtml(d,
!0)};Knowledge.getAudienceHintHtml=function(a,b){var d="";b&&(d='<span style="font-weight:bold">{0}</span>'.format("Audience match:".localize()));if(!a||0===a.sum())return d+' <span style="font-style:italic">{0}</span>'.format("unknown".localize());var c=function(a,b){if(!b||0==b)return'<span style="opacity=0.5;font-style:italic">{0}</span>'.format("{0}?").format(General.getShortAudienceLabel(a));var d=Knowledge.getFactorAdj(b),c=d.startsWith("+")?"green":"red";return'<span class="{0}" style="font-weight:bold">{1}</span>'.format(c,
"{0}".format(General.getShortAudienceLabel(a)+d))},d=d+(" "+c("young",a[0])),d=d+(" "+c("everyone",a[1]));return d+=" "+c("mature",a[2])};Knowledge.getPlatformGenreHintHtml=function(a,b){var d='<span style="font-weight:bold">{0}</span>'.format("Genre match:".localize()),c=General.getAvailableGenres(a),f=Knowledge.getPlatformGenreWeightingKnowledge(a,b);if(!f||0===f.sum())return d+' <span style="font-style:italic">{0}</span>'.format("unknown".localize());for(var g=0,q=0;q<c.length;q++){g++;d+=" ";
2==g&&(d+="<br/>");var s;s=c[q];var t=f[q];if(t&&0!=t){var t=Knowledge.getFactorAdj(t),r=t.startsWith("+")?"green":"red";s='<span class="{0}" style="font-weight:bold">{1}</span>'.format(r,"{0}".format(s.name+t))}else s='<span style="opacity=0.5;font-style:italic">{0}</span>'.format("{0}?").format(s.name);d+=s}return d};Knowledge.hasMissionWeightingKnowledge=function(a,b,d,c,f){f||(f=a.knowledge);if(f.missionWeightings)return void 0!=f.missionWeightings.first(function(a){return a.missionId==b.id&&
(c||a.topicId==d.topic.id)&&a.genreId==d.genre.id&&(!d.secondGenre||d.secondGenre.id==a.secondGenreId)})};Knowledge.setMissionWeightingKnowledge=function(a,d,c){b(a,d,c,a.knowledge);b(a,d,c,g)};var b=function(a,b,d,c){c.missionWeightings||(c.missionWeightings=[]);Knowledge.hasMissionWeightingKnowledge(a,b,d,!1,c)||(a={missionId:b.id,genreId:d.genre.id,topicId:d.topic.id},d.secondGenre&&(a.secondGenreId=d.secondGenre.id),c.missionWeightings.push(a))};Knowledge.getMissionWeightingDisplayText=function(a,
b){a=Math.round(10*a)/10;var d;if(b)switch(a){case 0.6:d="not at all important".localize();break;case 0.7:d="not important".localize();break;case 0.8:d="not very important".localize();break;case 0.9:d="quite important".localize();break;case 1:d="very important".localize()}else switch(a){case 0.6:d="---";break;case 0.7:d="--";break;case 0.8:d="-";break;case 0.9:d="++";break;case 1:d="+++"}return d};Knowledge.getMissionWeightingHint=function(a,b){var d,c=!1;Knowledge.hasMissionWeightingKnowledge(GameManager.company,
a,b,!1)?(c=!0,d=Missions.getGenreWeighting(a,b)):Knowledge.hasMissionWeightingKnowledge(GameManager.company,a,b,!0)&&(d=GameGenre.getGenreWeighting(a.genreWeightings,b.genre,b.secondGenre));if(d)return{hint:Knowledge.getMissionWeightingDisplayText(d),exactMatch:c}};Knowledge.hasPlatformGenreWeightingKnowledge=function(a,b,d){return(a=Knowledge.getPlatformGenreWeightingKnowledge(a,b))?0!=a[GameGenre.getIndexOf(d)]:!1};Knowledge.getPlatformGenreWeightingKnowledge=function(a,b){var d=a.knowledge.platformKnowledge;
d||(d=a.knowledge.platformKnowledge=[]);if(d=d.first(function(a){return a.id==b.id}))return d.genreWeightings};Knowledge.setPlatformGenreWeightingKnowledge=function(a,b,d){c(a,b,d,a.knowledge);c(a,b,d,g)};var c=function(a,b,d,c){a=c.platformKnowledge;a||(a=c.platformKnowledge=[]);c=a.first(function(a){return a.id==b.id});c||(c={id:b.id},a.push(c));c.genreWeightings||(c.genreWeightings=[0,0,0,0,0,0]);a=GameGenre.getIndexOf(d);GameGenre.getGenreWeighting(b.genreWeightings,d);c.genreWeightings[a]=b.genreWeightings[a]};
Knowledge.hasPlatformAudienceWeightingKnowledge=function(a,b,d){return(a=Knowledge.getPlatformAudienceWeightingKnowledge(a,b))?0!=a[General.getAudienceWeightinIndex(d)]:!1};Knowledge.getPlatformAudienceWeightingKnowledge=function(a,b){var d=a.knowledge.platformKnowledge;d||(d=a.knowledge.platformKnowledge=[]);if(d=d.first(function(a){return a.id==b.id}))return d.audienceWeightings};Knowledge.setPlatformAudienceWeightingKnowledge=function(a,b,c){d(a,b,c,a.knowledge);d(a,b,c,g)};var d=function(a,b,
d,c){a=c.platformKnowledge;a||(a=c.platformKnowledge=[]);c=a.first(function(a){return a.id==b.id});c||(c={id:b.id},a.push(c));c.audienceWeightings||(c.audienceWeightings=[0,0,0]);a=Platforms.getAudienceWeighting([b],d,!0);c.audienceWeightings[General.getAudienceWeightinIndex(d)]=a};Knowledge.hasTopicAudienceWeightingKnowledge=function(a,b,d){return(a=Knowledge.getTopicAudienceWeightingKnowledge(a,b))?d?0!=a[General.getAudienceWeightinIndex(d)]:0!=a.sum():!1};Knowledge.getTopicAudienceHtml=function(a,
b){return Knowledge.getAudienceHintHtml(Knowledge.getTopicAudienceWeightingKnowledge(a,b),!1)};Knowledge.getTopicAudienceWeightingKnowledge=function(a,b){var d=a.knowledge.topicKnowledge;d||(d=a.knowledge.topicKnowledge=[]);if(d=d.first(function(a){return a.id==b.id}))return d.audienceWeightings};Knowledge.setTopicAudienceWeightingKnowledge=function(a,b,d){f(a,b,d,a.knowledge);f(a,b,d,g)};var f=function(a,b,d,c){a=c.topicKnowledge;a||(a=c.topicKnowledge=[]);c=a.first(function(a){return a.id==b.id});
c||(c={id:b.id},a.push(c));c.audienceWeightings||(c.audienceWeightings=[0,0,0]);a=General.getAudienceWeighting(b.audienceWeightings,d);c.audienceWeightings[General.getAudienceWeightinIndex(d)]=a};Knowledge.setTrainingKnowledge=function(a){var b=GameManager.company,d=b.knowledge.trainingKnowledge;d||(d=b.knowledge.trainingKnowledge=[]);b=d.first(function(b){return b.id==a.id});b||(b={id:a.id},d.push(b))};Knowledge.hasTrainingKnowledge=function(a){var b=GameManager.company,d=b.knowledge.trainingKnowledge;
d||(d=b.knowledge.trainingKnowledge=[]);return d.first(function(b){return b.id==a.id})};Knowledge.getTrainingKnowledgeHtml=function(a){if(!Knowledge.hasTrainingKnowledge(a))return'<span style="font-style:italic;opacity:0.5">{0}</span>'.format("unknown".localize());var b=[{key:"tF",name:"Technology".localize()},{key:"dF",name:"Design".localize()},{key:"rF",name:"Research".localize()},{key:"sF",name:"Speed".localize()}],d="";b.sort(function(b,d){return a[d.key]-a[b.key]});for(var c=0;c<b.length;c++){var f=
b[c];0!=a[f.key]&&(d+=' <span class="green">{0}{1}</span>'.format(f.name,1<=a[f.key]?"+++":0.5<=a[f.key]?"++":"+"))}return d};var g={};Knowledge.loadPlayerKnowledge=function(){DataStore.loadSlotAsync("knowledge",function(a){if(a)try{g=JSON.parse(a)}catch(b){Logger.LogInfo("Could not load already gained knowledge",b)}},function(a){})};Knowledge.savePlayerKnowledge=function(){var a=JSON.stringify(g);DataStore.saveToSlotAsync("knowledge",a,function(){DataStore.commit&&DataStore.commit()},function(a){})};
Knowledge.usePlayerKnowledge=function(a){a.knowledge=g};Knowledge.isPlayerKnowledgeAvailable=function(){return[g.combos,g.missionWeightings,g.platformKnowledge,g.topicKnowledge].some(function(a){return a&&0<a.length})}})();
var CompanyNames="Original Anvil;Macroprose;Bulldog Entertainment;Red Isles Studios;Obscure Entertainment;Lionfeet Studios;Rockville Softworks;Bungy;Comclap;Epoch Games;Namoni;NGSoftware".split(";"),RealCompanyNames="Origin;Origin Systems;Obsidian;Obsidian Ent.;Blizzard;Valve;Introversion;Cloud Imperium;Broderbund;Bethesda;JoWood;Infrogrames;Black Isle;Sierra;Sierra Entertainment;Sierra On-line;Westwood Studios;MicroProse;0verflow;1st Playable Productions;2K Czech;2XL Games;343 Studios;3DO;38 Studios;3G Studios;42 Entertainment;4A Games;5pb. Inc.;5th Cell;989 Studios;Acclaim Entertainment;Accolade;Access Games;ACE Team;Acheron Design;Acquire;Active Gaming Media;Activision;Activision Blizzard;Adventure Soft;Akella;Aki Corporation;Alfa System;Ancient;Anino Games;Appmania;AQ Interactive;Arc System Works;Arkane Studios;Arkedo Studio;ArenaNet;Arika;Artdink;ArtePiazza;Artificial Mind and Movement;A2M;Artificial Studios;Artoon;Asobo Studio;Ascaron;Aspect;Aspyr Media;Atari;Atlus;Atomic Planet Entertainment;Attic Entertainment Software;Avalanche Studios;Avalanche Software;Aventurine SA;Babaroga;Backbone Entertainment;BattleGoat Studios;Banpresto;Bauhaus Entertainment;Beenox;Behemoth, The;Bethesda Softworks;Big Blue Bubble;Big Huge Games;Binary Hammer;BioWare;Bioware;The Bitmap Brothers;Bizarre Creations;Black Rock Studio;Blitz Games Studios;Blizzard Entertainment;Blue Byte Software;Blue Fang Games;Bohemia Interactive;BreakAway Games;Br\u00f8derbund;Brownie Brown;BSure Interactive;Bullfrog Productions;Bullfrog;Buka Entertainment;Bugbear Entertainment;Bungie Studios;Capcom;Cave;Cavia;Cazap;CCP Games;CD Projekt RED;Centuri;Chunsoft;Cinemaware;Cing;Clap Hanz;Climax Entertainment;Climax Studios;Coded Illusions;Codemasters;Coktel Vision;ColdWood Interactive;Compile Heart;Core Design;Crafts & Meister;Creat Studios;Creative Assembly;Criterion Games;Cryptic Studios;Crystal Dynamics;Crytek;Cyberlore Studios;Cyanide;CyberConnect2;Day 1 Studios;Deadline Games;Deck13;Deep Silver;Demiurge Studios;Digital Illusions;Dimps;Disney Interactive Studios;Double Fine Productions;Double Helix Games;Dynamite Idea;Egosoft;Eidos Interactive;Electronic Arts;EA Games;Engine Software;Epic Games;Epicenter Studios;Epyx;Etranges Libellules;Eugen Systems;Eurocom;Evolution Studios;F4;FarSight Studios;Fatshark;feelplus;Firaxis Games;Firaxis;Firefly Studios;First Star Software;Flagship Games;Flying Lab Software;Foundation 9 Entertainment;Free Radical Design;Frictional Games;From Software;Frozenbyte;Frontier Developments;FUN Labs;Funcom;Futuremark;Game Arts;GameHouse;Gameloft;Games2win;Game Freak;Gearbox Software;Genki;Giants Software;Gogii Games;Good-Feel;Grasshopper Manufacture;Gravity;Griptonite Games;GSC Game World;Guerrilla Games;GungHo Online Entertainment;Gust Corporation;Haemimont Games;HAL Laboratory;Hanaho;Harmonix Music Systems;Hasbro Interactive;HB Studios;HeroCraft;High Moon Studios;High Voltage Software;Hoplon Infotainment;Hothead Games;Housemarque;Hudson Soft;Human Head Studios;Humongous Entertainment;Hyperion Entertainment;id Software;Idea Factory;Ignition Entertainment;IguanaBee;Imageepoch;Infinity Ward;Introversion Software;Incredible Technologies;indieszero;Infogrames;Insomniac Games;Intelligent Systems;Interplay Entertainment;Interplay;IO Interactive;Irem;Irrational Games;Transmission Games;Jadestone Group;Jagex;Jaleco;Javaground;Juice Games;Jupiter;JV Games;Klei Entertainment;Koei;Konami;Krome Studios;Kuju Entertainment;Kush Games;Kuma Reality Games;Ludia;Larian Studios;Legacy Interactive;Legendo Entertainment;Level-5;Lionhead Studios;Llamasoft;Looking Glass Studios;LucasArts;Lucas Arts;Luma Arcade;Luxoflux;Majesco Entertainment;Marvelous Entertainment;Massive Entertainment;Masthead Studios;Mattel;Maxis Software;Mean Hamster Software;Media Molecule;Media.Vision;Mercury Steam;Microsoft Game Studios;Milestone;Milestone S.r.l.;M-Inverse;Mistwalker;Mitchell Corporation;Mojang AB;Monolith Productions;Monolith Soft;Monumental Games;Mythic Entertainment;Namco Bandai;Natsume;Naughty Dog;NCsoft;Ndoors;Neowiz;Nerve Software;NetDevil;Neverland;Neversoft;Nexon;Next Level Games;NGD Studios;Nihon Bussan;Nihon Falcom;Ninjabee;Nintendo;Nippon Ichi Software;Nokia;NHN;Novalogic;Novarama;n-Space;Oddworld Inhabitants;Obsidian Entertainment;Oxygen Studios;Page 44 Studios;Paon;Papaya Studio;Paradox Interactive;Pandemic Studios;Pax Softnica;Pendulo Studios;Penguin Software;People Can Fly;Petroglyph;Phantagram;Piranha Bytes;Pi Studios;Pivotal Games;Playdead;Playdom;Playfish;Playlogic Entertainment;PlayFirst;Platinum Games;Polyphony Digital;PopCap Games;Punch Entertainment;Pyro Studios;Q Entertainment;Q-Games;Quantic Dream;Radical Entertainment;Rainbow Studios;Rare Limited;Raven Software;Reality Pump Studios;Realtime Associates;Realtime Worlds;RedLynx;Red Storm Entertainment;Redtribe;Reflexive Entertainment;Relic Entertainment;Remedy Entertainment;Retro Studios;Revolution Software;Rising Star Games;Rockstar North;Rockstar Games;Rocksteady Studios;Ruffian Games;Runic Games;Running with Scissors;Sarbakan;Sega;SCE Studio Liverpool;Sidhe;Silicon Knights;Silicon Sisters;Silicon Studio;SNK Playmore;Sobee Studios;Snowblind Studios;Software 2000;Sonic Team;Sony Computer Entertainment;Sony Computer Entertainment America;Sony Computer Entertainment Europe;Sora Ltd.;Spectrum HoloByte;Spellborn International;Splash Damage;Square Enix;Starbreeze Studios;Stardock;Star Vault;Strawdog Studios;Sting Entertainment;Straylight Studios;Streamline Studios;Sucker Punch Productions;Sumo Digital;Sunflowers;SuperVillain Studios;Swingin' Ape Studios;Taito Corporation;Tag Games;Take-Two Interactive;Tale of Tales;TaleWorlds;Tamsoft;Tantrumedia;Tantalus Media;Team17;Techland;Tecmo Koei;Telltale Games;Terminal Reality;THQ;Three Rings Design;TimeGate Studios;Torpex Games;Torus Games;Tose;Trapdoor;Traveller's Tales;Treyarch;Tri-Ace;Tripwire Interactive;Triumph Studios;Turn 10 Studios;Two Tribes;Tygron;Ubisoft;Ultimate Play The Game;United Front Games;Universomo;Vivendi Games;Valve Corporation;Vanillaware;Venan Entertainment;Vertigo Games;Vicarious Visions;Viwawa;Virtual Playground;Visceral Games;W!Games;Wahoo Studios;Wanako Games;Wangame Studios;WB Games;Webfoot Technologies;Wideload Games;Wildfire Studios;Wolfire Games;World Forge;Xseed Games;YoYo Games;Yuke's;ZapSpot;ZeniMax;Zipper Interactive;Zylom;Zynga;2.0 Studios;2D Boy;3G Studios;4D Rulers Software;ACE Team;Aldorlea Games;Alec Holowka;Almost Human;Amanita Design;Amaranth Games;Ambrosia Software;Artix Entertainment;Babaroga;Basilisk Games;The Behemoth;Benjamin Rivers;Big Finish Games;Bit Blot;Blitz Games Studios;Blossomsoft;Blue Fang Games;Bohemia Interactive Studio;Boomzap Entertainment;Bplus;Bubble Gum Interactive;Broken Rules;Capybara Games;Caravel Games;Castle Thorn;Chedburn Networks Limited;Christopher Howard Wolf;Chronic Logic;Cing;Cit\u00e9r\u00e9mis;ClockStone Software;cly5m;Coffee Stain Studios;ColdWood Interactive;Crytek Black Sea;Dark Water Studios;Daniel Benmergui;Dejobaan Games;Derek Yu;Digital Eel;Dovogame;Dreadlocks Ltd;Edmund McMillen;Elite Gudz;Elixir Studios;Erik Sved\u00e4ng;Ethereal Darkness Interactive;Eurocom;Evony;Exotypos;Facepunch Studios;Ferry Halim;Firefly Studios;Flashbang Studios;Flying Lab Software;Freebird Games;Frictional Games;Frogwares;Frontier Developments;GameLab;Gaijin Games;GarageGames;Gogii Games;Grasshopper Manufacture;Grey Alien Games;Guild Software;Haemimont Games;Hanako Games;Hemisphere Games;Himalaya Studios;IguanaBee;Insomniac Games;Introversion Software;InvisibleInkStudios;Iron Tower Studio;Irrgheist;Jagex;Jason Rohrer;Jonas Kyratzes;Jph Wacheski;KatGames;Klei Entertainment;Kloonigames;Krillbite;Laminar Research;Level-5;Lexaloffle;Little Green Men Games;Llamasoft;Longbow Digital Arts;M-Inverse;Mad Genius Software;Mangled Eye Studios;Metanet Software;mif2000;Mind Control Software;Mojang;Moonpod;Mousechief;New Star Games;Nicalis;Nifflas;Nival Interactive;Number None;The Odd Gentlemen;OmniSystems;OTS Software;Paladin Studios;Parallax Studio;Pieces Interactive;PixelJAM Games;Playdead;Playtechtonics;Pocketwatch Games;Positech Games;Private Moon Studios;Pronto Games;Prorattafactor;Provox games;PST Team;Psyonix Studios;Punch Entertainment;Q-Games;Queasy Games;Re-logic;realtech VR;Reflexive Entertainment;Relentless Software;Renegade Kid;Reverge Labs;Ronimo Games;Rovio Entertainment;S2 Games;Saber Interactive;Sandlot Games;Santa Cruz Games;Santa Cruz Games;Scientifically Proven;Secret Exit;Seed Studios;Silver Creek Entertainment;Ska Studios;Snowstep Development;Soldak Entertainment;Source Studio;Spiderweb Software;Stoic Studio;Star Vault;Storm Impact;Studio Pixel;Subatomic Studios;Supergiant Games;SuperVillain Studios;Swedish Game Development;Swing Swing Submarine;Tale of Tales;TaleWorlds;Team Shanghai Alice;TeamTNT;thatgamecompany;TheorySpark;Three Rings Design;Torpex Games;Trade Games International;Trendy Entertainment;Tribetoy;Tyler Glaiel;uCool;Unreal Software;Ville M\u00f6nkk\u00f6nen;Vlambeer;WayForward Technologies;Wolfire Games;XMG Studio;Zachary Barth;Zoetrope Interactive;Zoonami;ZootFly;Tale of Tales;TaleWorlds;Tamsoft;Tantrumedia;Tantalus Media;Team17;Techland;Tecmo Koei;Telltale Games;Terminal Reality;THQ;Three Rings Design;TimeGate Studios;Torpex Games;Torus Games;Tose;Trapdoor;Traveller's Tales;Treyarch;Tri-Ace;Tripwire Interactive;Triumph Studios;Turn 10 Studios;Two Tribes;Tygron;Ubisoft;Ultimate Play The Game;United Front Games;Universomo;Vivendi Games;Valve Corporation;Vanillaware;Venan Entertainment;Vertigo Games;Vicarious Visions;Viwawa;Virtual Heroes;Virtual Playground;Visceral Games;Volition;W!Games;Wahoo Studios;Wanako Games;Wangame Studios;WB Games;Webfoot Technologies;Wideload Games;Wildfire Studios;Wolfire Games;World Forge;Xseed Games;YoYo Games;Yuke's;ZapSpot;Zipper Interactive;Zylom".split(";"),SettingsGameplay=
{};
(function(){var a=SettingsGameplay;a.tutorialMode=DataStore.settings.tutorialMode?DataStore.settings.tutorialMode:"onlyNew";a.animationMode=DataStore.settings.animationMode?DataStore.settings.animationMode:"quality";a.getTutorialMode=function(){return DataStore.settings.tutorialMode};a.alwaysShowTutorials=function(){return"always"==a.getTutorialMode()};a.isTutorialOff=function(){return"never"==a.getTutorialMode()};a.getAnimationMode=function(){return DataStore.settings.animationMode};a.updateValuesOnPanel=function(b){var c=
DataStore.settings.tutorialMode?DataStore.settings.tutorialMode:"onlyNew",d=DataStore.settings.animationMode?DataStore.settings.animationMode:"quality",f=$(b).find(".tutorialSelection");b=$(b).find(".animationSelection");0<f.length&&f.val(c).change(function(b,d){var c=$(this).val();a.tutorialMode=c;DataStore.settings.tutorialMode=c;DataStore.saveSettings()});0<b.length&&b.val(d).change(function(b,d){var c=$(this).val();a.animationMode=c;DataStore.settings.animationMode=c;DataStore.saveSettings()})};
a.isTextCacheEnabled=function(){return GameFlags.TEXT_CACHING||"performance"==a.getAnimationMode()};a.isFrameSkipEnabled=function(){return GameFlags.SKIP_FRAME||"performance"==a.getAnimationMode()}})();var UI={};
(function(){UI.closeButtonTemplate=PlatformShim.ISWIN8?'<div class="closeDialogButtonWin8 metroCharacterButton">\ue10a</div>':'<div class="closeDialogButton fontCharacterButton icon-remove"></div>';UI._resetCallbacks=[];UI.reset=function(){UI.resetStatusBar();for(var a=0;a<UI._resetCallbacks.length;a++)UI._resetCallbacks[a]()};UI.isTransitionVisible;UI.fadeInTransitionOverlay=function(a){UI.closeNewsletterWidget();UI.isTransitionVisible=!0;$("#transitionOverlay").show().css({opacity:0}).transition({opacity:1},
800).delay(800).queue(function(){a&&a();$(this).dequeue()})};UI.fadeOutTransitionOverlay=function(a){UI.isTransitionVisible=!1;$("#transitionOverlay").transition({opacity:0},400).delay(400).queue(function(){$(this).hide();a&&a();$(this).dequeue()})};UI.createDefaultUISettings=function(){return{stage1SliderValues:[50,50,50],stage2SliderValues:[50,50,50],stage3SliderValues:[50,50,50],selectedGameFeatures:["Text Based","Basic Sound"],selectedConsoleFeatures:[]}};UI.getShortNumberString=function(a){var b;
1E6<=Math.abs(a)?b="{0}M".localize().format(UI.getLongNumberString(Math.roundToDecimals(a/1E6,1))):1E3<=Math.abs(a)&&(b="{0}K".localize().format(UI.getLongNumberString(Math.roundToDecimals(a/1E3,1))));b||(b=Math.roundToDecimals(a,1));return b};UI.getPercentNumberString=function(a){return"{0} %".localize().format(Math.roundToDecimals(a,1))};UI.getLongNumberString=function(a){if(Math.floor(a)==a)return a=Math.floor(a).toLocaleString(),a.substr(0,a.length-3);for(a=a.toLocaleString();"0"==a[a.length-
1];)a=a.substr(0,a.length-1);return a};UI.getHtmlText=function(a){a=a.replace(/\n/g,"<br />");return window.PlatformShim.toStaticHtml(a)};UI._showFeatureList=function(a,b){PlatformShim.execUnsafeLocalFunction(function(){$.modal.close()});UI.showFeatureList(a.features,{onClose:function(){GameManager.company&&0<GameManager.company.activeNotifications.length&&GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),1);b&&b()}})};UI.getCharUnderCursor=function(){var a=
CanvasManager.characterStage;if(a.mouseInBounds)for(var b=a.mouseX,a=a.mouseY,c=0;c<VisualsManager.characterOverlays.length;c++){var k=VisualsManager.characterOverlays[c],l=k.x+VisualsManager.toScreenCoordinates(47,CanvasManager.globalScale),h=k.y+VisualsManager.toScreenCoordinates(37,CanvasManager.globalScale),m=187*CanvasManager.globalScale,n=271*CanvasManager.globalScale;if(b>=l&&b<=l+m&&a>=h&&a<=h+n)return k.character}return null};UI.salesContainerClick=function(b,c){if(a()){var g=b.screenX,k=
b.screenY,l=[],h=function(a){var b=$("#takeOffMarketDialog");b.find(".confirmActionButton").clickExclOnce(function(){Sound.click();a();b.dialog("close")});b.find(".cancelActionButton").clickExclOnce(function(){Sound.click();b.dialog("close")});b.gdDialog({close:!0,popout:!0,onClose:function(){GameManager.resume(!0)}})},m=GameManager.company.gameLog.first(function(a){return a.id===c});if(!m||!m.flags.mmo||GameManager.company.currentGame&&!1!==GameManager.company.currentGame.flags.isExtensionPack&&
GameManager.company.currentGame.sequelTo==m.id){var n=GameManager.company.licencedPlatforms.first(function(a){return a.id===c});n&&l.push({label:"Take off market".localize("menu item"),action:function(){Sound.click();h(function(){n.saleCancelled=!0;Media.createConsoleEndStory(n)})}})}else l.push({label:"Take off market".localize("menu item"),action:function(){Sound.click();h(function(){m.flags.saleCancelled=!0;Media.createMMOEndStory(m)})}});1<=l.length&&UI._showContextMenu("salesContainer",l,g,k)}};
UI._showContextMenu=function(b,c,g,k){a()&&(GDT.fire(this,GDT.eventKeys.ui.contextMenuShowing,{type:b,items:c}),0<c.length&&(GameManager.pause(!0),Sound.click(),UI.showContextMenu(c,{x:g,y:k})))};var a=function(){return UI.isMenuOpen()?(Sound.click(),GameManager.resume(!0),UI.closeContextMenu(),!1):VisualsManager.isAnimatingScroll?!1:!0};UI.overrideClick;UI.containerClick=function(d){if(UI.overrideClick)UI.overrideClick(d);else if(a()){var f=d.x;d=d.y;var g=GameManager.company,k=[],l="primary";void 0===
g.flags.currentZone||1===g.flags.currentZone?b(g,k):(c(g,k),l="secondary");UI._showContextMenu(l,k,f,d)}};var b=function(a,b){var c=1<a.currentLevel?UI.getCharUnderCursor():a.staff[0];c&&1!=a.currentLevel||(GameManager.company.isCurrentlyDevelopingGame()&&-1!=GameManager.company.researchCompleted.indexOf(Research.Marketing)&&b.push({label:"Marketing...".localize("menu item"),action:function(){Sound.click();Tutorial.marketing();GameManager.company.notifications.push(new Notification("{MarketingList}"));
GameManager.showPendingNotifications()}}),GameManager.isIdle()&&!GameManager.currentEngineDev&&0<a.staff.filter(function(a){return a.state===CharacterState.Idle}).length&&(b.push({label:"Develop New Game...".localize("menu item"),action:function(){Sound.click();GameManager.flags.selectGameActive=!1;GameManager.flags.createPack=!1;GameManager.transitionToState(State.CreateGame)}}),-1!=a.researchCompleted.indexOf(Research.Sequels)&&0<a.getPossibleGamesForSequel().length&&b.push({label:"Develop Sequel...".localize("menu item"),
action:function(){Sound.click();GameManager.flags.selectGameActive=!0;GameManager.flags.createPack=!1;GameManager.transitionToState(State.CreateGame)}}),-1!=a.researchCompleted.indexOf(Research.expansionPack)&&0<a.getPossibleGamesForPack().length&&b.push({label:"Develop Expansion Pack...".localize("menu item"),action:function(){Sound.click();GameManager.flags.selectGameActive=!0;GameManager.flags.createPack=!0;GameManager.transitionToState(State.CreateGame)}}),a.canDevelopEngine()&&b.push({label:"Create Custom Engine...".localize("menu item"),
action:function(){Sound.click();a.notifications.push(new Notification("{CreateEngine}","","",0));GameManager.showPendingNotifications()}}),a.flags.contractsEnabled&&b.push({label:"Find Contract Work...".localize("menu item"),action:function(){Sound.click();Tutorial.contracts();GameManager.uiSettings.selectedContractType="generic";a.notifications.push(new Notification("{FindContractWork}"));GameManager.showPendingNotifications()}}),a.flags.publishersEnabled&&b.push({label:"Find Publishing Deal...".localize("menu item"),
action:function(){Sound.click();GameManager.uiSettings.selectedContractType="gameContract";Tutorial.publishers();a.notifications.push(new Notification("{FindContractWork}"));GameManager.showPendingNotifications()}})),1<a.currentLevel&&b.push({label:"Staff List...".localize("menu item"),action:function(){Sound.click();UI.showStaffList()}}),a&&a.gameLog&&0<a.gameLog.length&&b.push({label:"Game History...".localize("menu item"),action:function(){Sound.click();UI.showGameHistory()}}));c&&(c.state!=CharacterState.Researching&&
c.state!=CharacterState.Training&&c.state!=CharacterState.Vacation&&(a.flags.patchData&&a.flags.patchData.patchAvailableUntil>GameManager.gameTime&&b.push({label:"Develop patch ({0})".localize("menu item").format(UI.getShortNumberString(a.flags.patchData.patchCost)),action:function(){GameManager.uiSettings.selectedChar=c.id;Sound.click();var b=Training.patchGame;b.cost=a.flags.patchData.patchCost;a.flags.patchData.patchAvailableUntil=0;GameManager.research(b,"training");GameManager.resume(!0)}}),
a.researchEnabled&&c.canStartResearch()&&b.push({label:"Research...".localize("menu item"),action:function(){Sound.click();Tutorial.researchMenu();GameManager.uiSettings.selectedChar=c.id;GameManager.company.notifications.push(new Notification("{Research}"));GameManager.showPendingNotifications()}}),0<a.gameLog.length&&a.gameLog.some(function(a){return a.canDoPostMortem()})&&b.push({label:"Generate game report...".localize("menu item"),action:function(){Sound.click();GameManager.flags.selectGameActive=
!0;GameManager.flags.createPack=!1;var a=GameManager.gameId;UI.showGameHistory(function(){if(a==GameManager.gameId){GameManager.flags.selectGameActive=!1;var b=GameManager.flags.selectedGameId;if(b){var d=GameManager.company.getGameById(b);d&&(GameManager.uiSettings.selectedChar=c.id,c.flags.postMortemGameId=b,b=Training.postMortem,b.duration=b.baseDuration*General.getGameSizeDurationFactor(d.gameSize),GameManager.research(b,"training"),GameManager.resume(!0))}}},!1,!0)}}),1<a.currentLevel&&(b.push({label:"Train...".localize("menu item"),
action:function(){Sound.click();GameManager.uiSettings.selectedChar=c.id;(0!=c.id||1<GameManager.company.maxStaff)&&(0===c.id||c.flags.didWelcomeTraining)&&Tutorial.training();GameManager.company.notifications.push(new Notification("{Training}"));GameManager.showPendingNotifications()}}),c.flags.needsVacation&&b.push({label:"Send on Vacation".localize("menu item"),action:function(){Sound.click();c.goOnVacation();GameManager.resume(!0)}}))),0!=c.id&&b.push({label:"Fire...".localize("menu item"),action:function(){Sound.click();
UI.showFireStaffPrompt(c);GameManager.resume(!0)}}))},c=function(a,b){var c=a.flags.currentZone,k=0===c?GameManager.currentHwProject:GameManager.currentRnDProject;null!=k?b.push({label:"Cancel Project...".localize("menu item"),action:function(){Sound.click();var a=$("#cancelProjectDialog");a.find(".confirmActionButton").clickExclOnce(function(){Sound.click();GameManager.cancelProject(k);a.dialog("close")});a.find(".cancelActionButton").clickExclOnce(function(){Sound.click();a.dialog("close")});a.gdDialog({close:!0,
popout:!0,onClose:function(){GameManager.resume(!0)}})}}):(0<General.getAvailableProjects(a,c).length&&b.push({label:"Start Project...".localize("menu item"),action:function(){Sound.click();UI.showGenericProjectWindow(c)}}),0===c&&GameManager.canDevelopConsole()&&b.push({label:"Develop Console...".localize("menu item"),action:function(){Sound.click();Tutorial.devConsole();a.notifications.push(new Notification("{DevelopConsole}","","",0));GameManager.showPendingNotifications()}}))};UI.setVisible=function(a){a=
$(a);a.get(0)&&(a.removeClass("collapsed"),a.addClass("visible"))};UI.setInVisible=function(a){a=$(a);a.get(0)&&(a.removeClass("visible"),a.addClass("collapsed"))};UI.showSnappedView=function(){this.setVisible("#snappedScreen")};UI.hideSnappedView=function(){this.setInVisible("#snappedScreen")};UI.toggleHelpPanel=function(){var a=$("#helpPanel");UI.populateHelpPage(a);GameManager.pause(!0,!0);a.gdDialog({popout:!0,zIndex:8E3,close:!0,onClose:function(){GameManager.resume(!0,!0)}})};$.fn.gdSlider=
function(a){var b={autoHeight:!1,autoWidth:!1,arrowsNav:!0,fadeinLoadedSlide:!1,controlNavigationSpacing:5,controlNavigation:"thumbnails",imageScaleMode:"none",imageAlignCenter:!1,loop:!1,loopRewind:!1,keyboardNavEnabled:!0,navigateByClick:!1,addActiveClass:!0};$.extend(b,a);this.royalSlider(b)};UI.populateHelpPage=function(a){$(a).find("#devStages").accordion({icons:!1,autoHeight:!1,active:!1,collapsible:!0});a=$(a).find("#helpMessagesContainer");a.empty();var b="Previously shown tutorial messages for the active game are shown here. To see tutorial messages here, please continue an existing game or start a new one. You can start a new game via the app bar.".localize();
if(GameManager.company){var c=$("<div></div>"),k=Tutorial.getAllShownMessages(GameManager.company);if(0==k.length)a.append(b);else{k=k.reverse();for(b=0;b<k.length;b++){var l=k[b];c.append($("<h3></h3>").text(l.heading));c.append($("<p></p>").html(l.msg.replaceAll("{n}","<br/>")))}a.append(c);c.accordion({icons:!1,autoHeight:!1,collapsible:!0})}}else a.append($("<span></span>").text(b))};UI.toggleSettingsPanel=function(){var a=$("#settingsPanel");UI.populateSettingsPanel(a);GameManager.pause(!0,!0);
a.gdDialog({popout:!0,zIndex:8E3,close:!0,onClose:function(){DataStore.commit&&DataStore.commit();GameManager.resume(!0,!0)}});a=a.find("#toggleFullscreenButton");UI.maxFont(void 0,a,34);UI.showLocalizationCredits(GameManager.getPreferredLanguage(),$("#localizationCredits"),$(".localizationDiscussion"))};UI.toggleModsPanel=function(){UI.populateModsPanel();GameManager.pause(!0,!0);UI._prepareGreenworks&&UI._prepareGreenworks();$("#modsPanel").dialog({width:800,draggable:!1,modal:!0,resizable:!1,show:"fade",
zIndex:8E3,open:function(){var a=$(UI.closeButtonTemplate);a.zIndex=8E3;a.clickExclOnce(function(){Sound.click();$("#modsPanel").dialog("close");GameManager.resume(!0)});$(this).parents(".ui-dialog:first").append(a);$(this).siblings(".ui-dialog-titlebar").remove();$(this).parents(".ui-dialog:first").addClass("tallWindow");$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content");UI.maxFont(void 0,$("#modsPanelButtonMods"),18);
UI.maxFont(void 0,$("#modsPanelButtonWorkshop"),18);UI.maxFont(void 0,$("#modsPanelButtonUpload"),18);UI.maxFont(void 0,$("#modsPanelButtonUpdate"),18)},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;";DataStore.commit&&DataStore.commit();GameManager.resume(!0,!0)}})};UI._getElementForMod=function(a){var b=$("#modsButtonTemplate").clone();b.find(".modName").text(a.name);b.find(".author").text(a.author);b.find(".description").addClass("modDescription").text(a.description);
a.url?(b.find(".website").append('<a href="{0}">{1}</a>'.format(a.url,"Mod Website".localize())),b.find(".website").clickExcl(function(b){PlatformShim.openUrlExternal(a.url)})):b.find(".website").append("No Website".localize());a.active&&b.addClass("activeMod");a.unresolvedDependency&&b.addClass("dependencyWrong");b.find(".modVersion").text("v"+a.version);""!==a.image&&b.find(".modImage").css({backgroundImage:"url('"+a.image+"')"});if(!0===a.isWorkshop){var c=$(document.createElement("img")).addClass("unsubscribe-"+
a.id).attr({src:"./images/greenworks/steam-16x64.png"});b.find(".modopts").append(c)}b.on("mousedown mouseup mouseleave",function(a){b.toggleClass("active","mousedown"===a.type)});return b};UI.populateModsPanel=function(){var a=$("#modsPanelContent");a.empty();ModSupport.sortMods();for(var b=0;b<ModSupport.availableMods.length;b++){var c=ModSupport.availableMods[b],k=UI._getElementForMod(c);a.append(k);k=k.get(0);k.mod=c;k.onclick=function(){Sound.click();this.mod.active?ModSupport.disableMod(this.mod):
this.mod.unresolvedDependency||ModSupport.enableMod(this.mod);UI.populateModsPanel()}}};UI.populateSettingsPanel=function(a){SettingsGameplay.updateValuesOnPanel(a);a.find(".languageSelection").val(GameManager.getPreferredLanguage()).change(function(a,b){var d=$(this).val();GameManager.setPreferredLanguage(d)});a.find(".hintsToggle").val(GameManager.areHintsEnabled()?"on":"off").change(function(a,b){var d=$(this).val();GameManager.setHintsEnabled("on"===d)});a.find(".musicToggle").val(Sound.getMusicAllowed()?
"on":"off").change(function(a,b){var d=$(this).val();Sound.allowMusic("on"===d)});a.find(".fxToggle").val(Sound.getFxAllowed()?"on":"off").change(function(a,b){var d=$(this).val();Sound.allowFx("on"===d)});a.find(".volumeSlider").slider({min:0,max:100,range:"min",value:Sound.getMasterVolume(),animate:!1,slide:function(a,b){var d=b.value;isNaN(d)||Sound.setMasterVolume(d)}});var b=a.find("#toggleFullscreenButton");PlatformShim.ISWIN8?a.find("#windowSettings").hide():b.clickExclOnce(function(){var b=
PlatformShim.toggleFullscreen();DataStore.setValue("windowed",!b);a.dialog("close")})};UI.showAboutBadge=function(){var a=$("#aboutBadge");0<a.length&&(a.css("opacity",0).show(),a.transit({opacity:1},400))};UI.hideAboutBadge=function(){var a=$("#aboutBadge");0<a.length&&a.transit({opacity:0},400,null,function(){a.hide()})};UI.showLocalizationCredits=function(a,b,c){if(b&&1!=!b.length&&(c&&1==c.length&&c.empty(),b.empty(),"en"!=a)){var k=!1;Languages[a+"_moderators"]&&(b.append($("<h3></h3>").text("Moderators".localize("localization"))),
b.append($("<small></small>").text(Languages[a+"_moderators"])),k=!0);Languages[a+"_topContributors"]&&(b.append($("<h3></h3>").text("Top Contributors".localize("localization"))),b.append($("<small></small>").text(Languages[a+"_topContributors"])),k=!0);Languages[a+"_qualityAssurance"]&&(b.append($("<h3></h3>").text("Quality Assurance".localize("localization"))),b.append($("<small></small>").text(Languages[a+"_qualityAssurance"])));Languages[a+"_html"]&&b.append($(Languages[a+"_html"]));c&&1==c.length&&
Languages[a+"_discussionLink"]&&(c.append($('<a href="{0}"></a>'.format(Languages[a+"_discussionLink"])).text("Discuss translation".localize())),k=!0);k&&(b.append($("<br />")),b.append($("<small></small>").text("Thanks to the many unnamed contributors who greatly helped translating the game!".localize())),b.append($("<br />")))}};UI.Font={isInstalled:function(a){a=a.replace(/['"<>]/g,"");var b=document.body,c=document.createElement("div"),k=!1;a&&(c.innerHTML="<b style=\"display:inline !important; width:auto !important; font:normal 10px/1 'X',sans-serif !important\">mmmmmmmmwwwwwwww</b><b style=\"display:inline !important; width:auto !important; font:normal 10px/1 'X',monospace !important\">mmmmmmmmwwwwwwww</b>".replace(/X/g,
a),c.style.cssText="position: absolute; visibility: hidden; display: block !important",b.insertBefore(c,b.firstChild),a=c.getElementsByTagName("b"),k=a[0].offsetWidth===a[1].offsetWidth,b.removeChild(c));return k}};$(document).ready(function(){UI.IS_SEGOE_UI_INSTALLED=UI.Font.isInstalled("Segoe UI")})})();
(function(){GameFlags.RCLICK_MENU&&document.addEventListener("contextmenu",function(a){a.preventDefault();UI.toggleMainMenu();return!1},!1);GameFlags.ESC_MENU&&window.addEventListener("keydown",function(a){if(27==a.which&&!a.defaultPrevented)return UI.toggleMainMenu(),a.preventDefault(),!1},!1);var a=!1;UI.disableMainMenu=function(){a=!0};UI.enableMainMenu=function(){a=!1};UI.isMainMenuDisabled=function(){return a};UI.toggleMainMenu=function(){if(!UI.isMainMenuDisabled())if(b)c();else{UI.closePanels();
var a=$("#mainMenu"),f=a.find(".continueButton");GameManager.company||SplashScreen.isVisible()&&GameManager.getGameToContinue()?(f.removeClass("disabled"),f.clickExclOnce(function(){Sound.click();c();GameManager.company||GameManager.continueGame()})):(f.addClass("disabled"),f.clickExclOnce());a.find(".newButton").clickExclOnce(function(){Sound.click();GameManager.resume(!0,!0);SplashScreen.isVisible()||UI.hideAboutBadge();UI.closeNewsletterWidget();GameManager.startNewGame()});f=a.find(".saveButton");
GameManager.company?(f.removeClass("disabled"),f.clickExclOnce(function(){Sound.click();c();GameManager.saveActualGame()})):(f.addClass("disabled"),f.clickExclOnce());a.find(".loadButton").clickExclOnce(function(){Sound.click();GameManager.openLoadView();c()});a.find(".highscoreButton").clickExclOnce(function(){Sound.click();UI.toggleHighScorePanel();c()});a.find(".achievementsButton").clickExclOnce(function(){Sound.click();UI.toggleAchievementPanel();c()});a.find(".settingsButton").clickExclOnce(function(){Sound.click();
UI.toggleSettingsPanel();c()});PlatformShim.ISWIN8||a.find(".modsButton").clickExclOnce(function(){Sound.click();UI.toggleModsPanel();c()});a.find(".helpButton").clickExclOnce(function(){Sound.click();UI.toggleHelpPanel();c()});a.find(".version").text((GameFlags.G782?"V":"v")+PlatformShim.getVersion());a=a.find(".exitButton");PlatformShim.ISWIN8?a.hide():a.clickExclOnce(function(){Sound.click();window.close()});GameManager.pause(!0,!0);$("#mainMenu").gdDialog({popout:!0,close:!0,zIndex:1E4,onClose:function(){GameManager.resume(!0,
!0);SplashScreen.isVisible()||UI.hideAboutBadge();UI.closeNewsletterWidget();b=!1},onOpen:function(){UI.showAboutBadge();UI.showNewsletterWidget()}});b=!0}};var b=!1,c=function(){$("#mainMenu").dialog("close");b=!1}})();
(function(){UI.resetStatusBar=function(){for(var a=0;a<b.length;a++)createjs.Tween.removeTweens(b[a]._target),b[a]._target.remove();b=[];UI.updateStatusBar(GameManager.company)};UI.updateStatusBar=function(b){if(b){c(b);var k=b.cash,l=UI.getShortNumberString(k),h=$("#money"),m=h.get(0);m&&(0>k?(h.removeClass("green"),h.addClass("red")):(h.removeClass("red"),h.addClass("green")),m.innerText=l);k=b.getCurrentDate();k="Y{0} M{1} W{2}".localize("date display").format(k.year,k.month,k.week);d||(d=$("#date"));
d&&d.text(k);f||(f=$("#weekProgression"));if(f&&(k=GameManager.company.currentWeek%4+1,k-=Math.floor(k),k=0.25>=k?0:0.5>=k?1:0.75>=k?2:3,f.currentProgress!=k)){l=[1,2,3,4];for(h=0;h<l.length;h++)f.find(".p"+l[h]).css("opacity",h<=k?1:0);f.currentProgress=k}k=UI.getShortNumberString(b.fans);if(l=$("#fans").get(0))l.innerText="{0} Fans".localize().format(k);a||(a=$("#trendContainer"));b&&b.flags.trends?a.trend!=b.flags.trends.currentTrend&&(a.trend=b.flags.trends.currentTrend,a.trend&&a.trend.label?
a.text(a.trend.label).addClass("statusBar").show():a.removeClass("statusBar").hide()):a.hide()}};var a,b=[];(function(){GameManager.addTickListener(function(){if(0!=b.length)for(var a=0;a<b.length;a++){var c=b[a]._target;void 0!=c.opacity&&c.css({opacity:c.opacity})}})})();var c=function(a){if(a.cashLog.length){var c=$("#cashLogContainer"),d=[];a.fansChange&&d.push({amount:a.fansChange,label:"fans".localize()});d.addRange(a.cashLog);for(var f=0;f<d.length;f++){var m=d[f],n=$('<div class="cashLogItem"><div class="cashLogAmount"></div><div class="cashLogLabel"></div></div>');
n.find(".cashLogAmount").text(UI.getShortNumberString(Math.floor(m.amount))).addClass(0>m.amount?"red":"green");n.find(".cashLogLabel").text(m.label);n.opacity=0.5;m=createjs.Tween.get(n).to({opacity:1},200).wait(1500).to({opacity:0},400).call(function(a){b.remove(a);this.remove()});c.prepend(n);b.push(m)}5E3<Math.abs(a.cashLog.sum(function(a){return a.amount}))&&Sound.playSoundOnce("cash",0.2);a.cashLog.length=0;a.fansChange&&(a.fans+=a.fansChange,a.fansChange=0)}},d,f})();
(function(){var a=["./images/superb/conf1f.png","./images/superb/conf2f.png","./images/superb/conf3f.png"],b="./images/superb/conff1r.png ./images/superb/conff2r.png ./images/superb/conff3r.png ./images/superb/conff4r.png ./images/superb/confm1r.png ./images/superb/confm2r.png ./images/superb/confm3r.png ./images/superb/confm4r.png".split(" "),c="./images/superb/conff1l.png ./images/superb/conff2l.png ./images/superb/conff3l.png ./images/superb/conff4l.png ./images/superb/confm1l.png ./images/superb/confm2l.png ./images/superb/confm3l.png ./images/superb/confm4l.png".split(" ");
UI.showConferenceBoothList=function(a,b){var c=GameManager.company.booths;GameManager.company.conferenceStandFactor=null;$(".selectionOverlayContainer").hide();var d=$("#conferenceBoothPicker"),f={disableCheckForNotifications:!0,close:!0,onClose:function(){GameManager.company.activeNotifications.remove(a);GameManager.resume(!0);b&&b()}};d.find(".conferenceBoothPickerText").text("The big game convention will take place in four weeks time. Do you want to participate?".localize());var g=d.find(".conferenceBoothSliderContainer");
g.empty();var h=$('<div class="conferenceBoothVariationContainer royalSlider rsDefaultInv"></div>');g.append(h);for(var g=$("#genericBoothTemplate"),k=0;k<c.length;k++){var l=c[k];if(""!==l.description){var n=g.clone();n.find(".boothTitle").text(l.name);n.find(".boothDescription").text(l.description);n.find(".boothCashCost").text("Costs: {0}".localize().format(UI.getShortNumberString(l.cost)));h.append(n)}}PlatformShim.ISWIN8?h.gdSlider():f.onOpen=function(){h.gdSlider()};d.find(".okButton").clickExcl(function(){Sound.click();
var a=d.find(".rsActiveSlide").find(".boothTitle").text(),b=GameManager.company.booths.first(function(b){return b.name==a});GameManager.company.cash>=b.cost?(GameManager.company.conferenceStandFactor=b.standFactor,GameManager.company.adjustCash(-b.cost,b.name),UI.closeModal()):d.find(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50)});UI.showModalContent("#conferenceBoothPicker",f)};var d=function(a,b){var c="",c=GameManager.company.currentGame?b?GameManager.company.gameLog.last().title:
GameManager.company.currentGame.title:b?GameManager.company.gameLog[GameManager.company.gameLog.length-2].title:GameManager.company.gameLog.last().title,d=150,f=50,h=378,k=369;2===a?b?(d=90,f=25,h=385,k=392):(d=140,f=15,h=387,k=274):3===a?(d=245,f=33,h=372,k=234):4===a&&(b?(d=176,f=40,h=379,k=304):(d=150,f=15,h=378,k=252));return g(c,d,f,h,k)},f=function(a,b){var c=GameManager.company.name,d=180,f=30,h=381,k=256;2===a?(d=255,f=35,h=382,k=237):3===a?(d=300,f=35,h=373,k=180,b&&(d=127,f=15,h=376,k=331)):
4===a&&(d=290,f=29,h=378,k=348);return g(c,d,f,h,k)},g=function(a,b,c,d,f){var g=new createjs.Container;g.x=d;g.y=f;d=32;do f="bold {0}pt {1}".format(d,"Segoe UI"),f=new createjs.Text(a,f,"black"),d-=1;while((f.getMeasuredWidth()>b||f.getMeasuredLineHeight()>c)&&1<d);b=d/32;c=createjs.Graphics.getHSL(0,0,24);f=new createjs.Text(a,"bold 32pt {0}".format("Segoe UI"),c);f.textAlign="center";f.textBaseline="middle";g.scaleX=b;g.scaleY=b;g.addChild(f);return g},k=function(a,b){var c="",d=!1;GameManager.currentHwProject&&
GameManager.currentHwProject.announced?(c=GameManager.currentHwProject.iconUri,d=!0):(c=GameManager.company.licencedPlatforms.last(function(a){return a.isCustom}))?(c=c.iconUri,d=!0):c=GameManager.company.currentGame?Platforms.getPlatformImage(GameManager.company.currentGame.platforms[0],GameManager.company.currentWeek):Platforms.getPlatformImage(GameManager.company.gameLog.last().platforms[0],GameManager.company.currentWeek);if(b&&!d)for(d=GameManager.company.gameLog.length-1;0<d;d--){var f=Platforms.getPlatformImage(GameManager.company.gameLog[d].platforms[0],
GameManager.company.currentWeek);if(f!=c){c=f;break}}c=new createjs.Bitmap(c);d=new createjs.Container;d.scaleX=0.2;d.scaleY=0.2;3===a?(d.x=356,d.y=350):2===a?(d.y=315,d.x=b?265:460):4===a&&(d.scaleX=0.08,d.scaleY=0.08,d.y=300,d.x=b?236:509);d.addChild(c);return d};UI._showGameConferenceAnimation=function(a,b){var c=$("#gameConferenceAnimationDialog"),g=GameManager.company.booths.first(function(a){return a.standFactor==GameManager.company.conferenceStandFactor});c.find(".windowTitle").text(4!=g.id?
"Game Convention: G3".localize("heading"):"{0} Convention".localize("heading").format(GameManager.company.name));if(g){c.find(".conventionImageFloor").attr("src",g.floorImage);c.find(".conventionImageBg").attr("src",g.bgImage);var h=c.find(".conventionImageFg");g.fgImage?(h.show(),h.attr("src",g.fgImage)):h.hide()}c.find(".okButton").unbind("click").click(UI.closeConferenceAnimationDialog).hide();var l=this;UI.showModalContent("#gameConferenceAnimationDialog",{disableCheckForNotifications:!0,onOpen:function(){var b=
c.find("#animationLayer");b.empty();l.stage=new createjs.Stage(b[0]);l.stage.canvas.height=l.stage.canvas.clientHeight;l.stage.canvas.width=l.stage.canvas.clientWidth;l.flippingBox=new FlippingCounter.FlippingBox(8,6);l.flippingBox.init();l.flippingBox.fill("00000000");l.flippingBox.container.x=41;l.flippingBox.container.y=41;b=new createjs.Container;b.addChild(FlippingCounter.panel);b.addChild(l.flippingBox.container);b.x=190;b.scaleX=0.4;b.scaleY=0.4;l.stage.addChild(b);l.stage.addChild(f(g.id));
l.stage.addChild(d(g.id));if(3===g.id)l.stage.addChild(f(g.id,!0)),l.stage.addChild(k(g.id));else if(2===g.id||4===g.id)l.stage.addChild(d(g.id,!0)),l.stage.addChild(k(g.id)),l.stage.addChild(k(g.id,!0));UI._startGameConferenceAnimations(a.buttonText,g.id)},onClose:function(){GameManager.company&&-1!=GameManager.company.activeNotifications.indexOf(a)&&GameManager.company.activeNotifications.remove(a);var c=a.buttonText,d=c/1E6*0.1+1,f=GameManager.company;f.currentGame&&(f.currentGame.hypePoints+=
Math.min(200,Math.floor(c/1E6*200)));for(var g=Sales.getGamesToSell(f),h=0;h<g.length;h++)void 0===g[h].confAmount?g[h].totalSalesCash*=d:0<g[h].confAmount&&(g[h].totalSalesCash+=g[h].confAmount*(d-1)),g[h].confAmount=0;g=Sales.getConsolesToSell(f);for(h=0;h<g.length;h++)g[h].unitsSold+=1.5/Sales.consoleUnitPrice*(c/1E6);d=Math.floor(f.fans*(d-Math.floor(d))/10);0<d&&f.adjustFans(d);f.conferenceHype=Math.min(200,Math.floor(c/1E6*200));b&&b()},close:!1})};UI.closeConferenceAnimationDialog=function(){UI.closeModal()};
var l=[],h=0.9;GameManager.addTickListener(function(a){if(l&&0<l.length){a*=h;for(var b=0;b<l.length;b++)l[b].tick(a,!1);UI.stage.update()}});var m=function(){h=1.4},n=[],p=[],q=[];UI._startGameConferenceAnimations=function(d,f){if(0===n.length){for(var g=0;g<a.length;g++)n.push(new createjs.Bitmap(a[g]));for(g=0;g<c.length;g++)q.push(new createjs.Bitmap(c[g]));for(g=0;g<b.length;g++)p.push(new createjs.Bitmap(b[g]))}var k=$(".simplemodal-data"),w=k.find(".animationLayer");l=[];FlippingCounter._activeUITweens=
l;h=0.9;$(window).on("click",m);var y=1200;l.push(createjs.Tween.get(w).wait(0).call(function(){UI.flippingBox.fill(0)}));l.push(createjs.Tween.get(w).wait(y).call(function(){UI.flippingBox.fill(Math.round(d/20))}));l.push(createjs.Tween.get(w).wait(2*y).call(function(){UI.flippingBox.fill(Math.round(d/15))}));l.push(createjs.Tween.get(w).wait(3*y).call(function(){UI.flippingBox.fill(Math.round(d/10))}));l.push(createjs.Tween.get(w).wait(4*y).call(function(){UI.flippingBox.fill(Math.round(d/9))}));
l.push(createjs.Tween.get(w).wait(5*y).call(function(){UI.flippingBox.fill(Math.round(d/6))}));l.push(createjs.Tween.get(w).wait(6*y).call(function(){UI.flippingBox.fill(Math.round(d/4))}));l.push(createjs.Tween.get(w).wait(7*y).call(function(){UI.flippingBox.fill(Math.round(d/2.2))}));l.push(createjs.Tween.get(w).wait(8*y).call(function(){UI.flippingBox.fill(Math.round(d/1.8))}));l.push(createjs.Tween.get(w).wait(9*y).call(function(){UI.flippingBox.fill(Math.round(d/1.2))}));l.push(createjs.Tween.get(w).wait(10*
y).call(function(){UI.flippingBox.fill(d)}));var B=UI.stage.canvas.width,v=UI.stage.canvas.height,x=5E3,E=6E4*y/d;3===f?(x/=2,E/=2):4===f&&(x/=2.5,E/=2.5);y=E;for(g=0;g<=d;g+=x){var y=y+E,A=s(B,v,f);UI.stage.addChild(A);l.push(createjs.Tween.get(A).wait(y).to({alpha:0.15},500))}g=createjs.Tween.get(w).wait(y).call(function(){k.find(".okButton").slideDown("fast");$(window).off("click",m);l=[];FlippingCounter._activeUITweens=l;h=0.9});l.push(g)};var s=function(a,b,d){var c,f,g,h,k;1===d?(k=1,c=130+
Math.random()*(a-260-62*k),f=35*Math.random()+415-176*k,g=283,h=474):2===d?(k=0.625,c=100+Math.random()*(a-200-62*k),f=30*Math.random()+420-176*k,g=233,h=531):3===d?(k=0.075,f=Math.random(),c=113+f*(a-205-62*k),k*=4*Math.abs(0.46-f)+1,f=412-176*k,g=338,h=413):4===d&&(k=0.15,f=Math.random(),k*=4*Math.abs(0-f)+1,c=Math.random()*(a-62*k),f=85*f+365-176*k,g=283,h=476);a=void 0;a=3>d&&c<g||4===d&&c<g||3===d&&c>h?q.pickRandom().clone():3>d&&c>h||4===d&&c>h||3===d&&c>g?p.pickRandom().clone():n.pickRandom().clone();
a.alpha=0;a.x=c;a.y=f;a.scaleX=k;a.scaleY=k;return a}})();
(function(){var a;UI.showDevelopConsoleMenu=function(d,f){$(".selectionOverlayContainer").hide();var m=$("#createConsoleMenu");m.find(".consoleName")[0].value="Console Name".localize();var n={disableCheckForNotifications:!0,close:!0,onClose:function(){k();GameManager.company.activeNotifications.remove(d);GameManager.resume(!0);f&&f()}};m.find(".dialogNextButton").clickExcl(function(){$("#createConsoleMenu").find(".dialogNextButton").effect("shake",{times:2,distance:5},50)});m.find(".dialogBackButton").clickExcl(function(){Sound.click();
k();$("#createConsoleMenu").find(".dialogScreen1").transition({"margin-left":0});$("#createConsoleMenu").find(".dialogScreen2").transition({"margin-left":"100%"})});var p=m.find(".consoleQASlider");p.empty();var q=$('<div class="budgetSlider"></div>').slider({orientation:"horizontal",range:"min",min:0,max:100,value:0,animate:"fast",slide:function(a,b){var d=$(b.handle).closest(".budgetSlider");if(!d.hasClass("budgetSlider"))throw"couldn't find target slider";d.slider("value",b.value);g()}});p.append(q);
p=m.find(".consoleSliderContainer");p.empty();q=$('<div class="consoleVariationContainer royalSlider rsDefaultInv"></div>');p.append(q);for(var s=GameManager.company.licencedPlatforms.count(function(a){return a.isCustom})+1,p=b(),t=0;t<p.length;t++){var r=$("<div><img src='images/platforms/superb/{0}' style='width:200px;'/><div class='sliderTabCaption rsTmb'>".format(p[t])+PlatformShim.toStaticHtml("Variation {0}".localize().format(t+1))+"</div></div>");q.append(r)}PlatformShim.ISWIN8&&q.gdSlider();
n.onOpen=function(){PlatformShim.ISWIN8||q.gdSlider();UI.maxFont(m.find("bolder",".dialogScreen1Title"),34);UI.maxFont(m.find("bolder",".dialogScreen2Title"),34);UI.maxFont(m.find(void 0,".windowMainActionButton"),34);c();g()};var u=m.find(".okButton");u.clickExcl(function(){var b=g();Sound.click();if(b>GameManager.company.cash)u.parent().effect("shake",{times:2,distance:5},50),$(".simplemodal-data").find(".windowCostLabel").effect("pulsate",{times:2});else{u.off("click");var d=m.find(".consoleName")[0].value,
c=m.find(".rsActiveSlide img").attr("src"),f=a.filter(function(a){return void 0!=a.techLevel}).average(function(a){return a.techLevel}),h=Math.floor(500*f),k=m.find(".budgetSlider").slider("value")/100,c={id:"custom console",pointsCost:h,name:d,iconUri:c,targetZone:0,techLevel:f,version:s,variation:parseInt(c.slice(38,39)),qF:k,features:a.map(function(a){return a.id})};GameManager.company.adjustCash(-b,"{0} costs".localize().format(d));GameManager.startProject(c);UI.closeModal()}});UI.showModalContent("#createConsoleMenu",
n)};var b=function(){for(var a=[],d=1;5>d&&(GameManager.company.flags["console"+d+"Used"]||(a=4===d?a.concat(["CustomPlatform"+d+"V1.png","CustomPlatform"+d+"V2.png"]):a.concat(["CustomPlatform"+d+"V1.png","CustomPlatform"+d+"V2.png","CustomPlatform"+d+"V3.png"]),6!==a.length));d++);if(0===a.length){for(d=1;5>d;d++)GameManager.company.flags["console"+d+"Used"]=void 0;return b()}return a},c=function(){var a=$(".simplemodal-data").find(".dialogNextButton");a.clickExcl(function(){Sound.click();PlatformShim.execUnsafeLocalFunction(function(){d();
g()});$("#createConsoleMenu").find(".dialogScreen1").transition({"margin-left":"-200%"});$("#createConsoleMenu").find(".dialogScreen2").transition({"margin-left":0})});a.removeClass("baseButton").addClass("selectorButton").addClass("orangeButton")},d=function(){var b=$(".simplemodal-data").find(".featureSelectionContainer"),d=General.getAvailableFeaturesForConsole().groupBy(function(a){return a.category}),c=d.filter(function(a){return"Graphic"===a.category}),d=c.concat(d.except(c));b.empty();a=[];
for(var c=null,f=[],k=function(d,c){if(d.hasClass("selectedFeature")){if("graphic-type"===c.group)return;d.removeClass("selectedFeature");a.remove(c)}else{if(c.group){var h=".radioButton"+f.indexOf(c.group);b.find(h).removeClass("selectedFeature");for(var h=a.filter(function(a){return a.group===c.group}),k=0;k<h.length;k++)a.remove(h[k])}d.addClass("selectedFeature");a.push(c);UI._updateGameDefinitionCost()}g()},q=0;q<d.length;q++){var s=d[q];s.category!=c&&(b.append($('<div class="featureSelectionCategoryHeading">{0}</div>'.format(s.categoryDisplayName?
s.categoryDisplayName:s.category))),c=s.category);var t=UI.generateFeatureElement(s);t.find(".featureContent").text("{0} ({1})".format(s.name,UI.getShortNumberString(100*Research.getEngineCost(s))));if(s.group){-1==f.indexOf(s.group)&&f.push(s.group);var r="radioButton"+f.indexOf(s.group);t.addClass(r)}(function(a,b){a.clickExcl(function(){k(a,b)})})(t,s);b.append(t);GameManager.uiSettings.selectedConsoleFeatures&&-1!=GameManager.uiSettings.selectedConsoleFeatures.indexOf(s.id)?k(t,s):a.some(function(a){return"Graphic"===
a.category})||k(t,s)}g()},f=function(){return a&&0!=a.length?a.sum(function(a){return 100*Research.getEngineCost(a)}):0},g=function(){var a=$(".simplemodal-data"),b;b=1E7+f();var d,c=a.find(".budgetSlider").slider("value")/100;d=(c/=1)*c;c*=d;d=Math.floor(1+19*(0+1*(-0.5*c*d+3*d*d+-3.5*c+2*d)));d*=1E6;b+=d;a=a.find(".windowCostLabel");UI.maxFont(void 0,a,20,"Cost: {0}".localize().format(UI.getShortNumberString(b)));return b},k=function(){a&&(GameManager.uiSettings.selectedConsoleFeatures=a.map(function(a){return a.id}))};
UI.createConsoleClick=function(){Sound.click()}})();
(function(){var a=[];UI.addMaintenanceCard=function(f){if(1<=f.maintenanceLog.length)if(1===f.maintenanceLog.length){var g=c(f),h=d(!0);g.stage.addChild(h);h.x=60;h.y=105;h.width=115;h.scaleY=0;var s=f.maintenanceLog[0]/99*70;m.push(createjs.Tween.get(h).to({y:105-s,scaleY:s/70},300));g.shapes=[h];h=d(!1);g.stage.addChild(h);h.x=60;h.y=105;h.scaleY=0;h.width=115;g.repairShapes=[h];h=b();s=b();g.lines=[h,s];k(g);g.stage.addChild(h);g.stage.addChild(s);h=new ProgressBarVisual;h.alpha=1;h.progress=0.5;
h.width=20;h.height=65;h.x=10;h.y=33;h.isHorizontal=!1;g.stage.addChild(h);g.progressBar=h;a.push(g);f.repairPointsLog||(f.repairPointsLog=[0])}else l(f)};var b=function(){var a=new createjs.Shape;a.alpha=1;a.x=60;var b=a.graphics;b.beginFill(createjs.Graphics.getRGB(45,45,45,1));b.drawRect(0,0,115,0.5);b.closePath();return a},c=function(a){var b=$("#consoleMaintenanceContainer"),d=$("#consoleMainCardTemplate").clone();d.clickExcl(function(){VisualsManager.scrollToZone(0,!0)});d.removeAttr("id");
d.title=d.find(".title");d.points=d.find(".points");f(d,a.name);g(d,a.maintenancePoints);b.append(d);b=d.find(".consoleMainCardGroupCanvas");b=new createjs.Stage(b[0]);b.canvas.height=105;b.canvas.width=180;return{id:a.id,stage:b,card:d,console:a}},d=function(a){var b=new createjs.Shape;b.alpha=1;b.x=60;var d=b.graphics;a?d.beginFill(createjs.Graphics.getRGB(255,0,0,1)):d.beginFill(createjs.Graphics.getRGB(86,216,86,1));d.drawRect(0,0,115,70);d.closePath();return b},f=function(a,b,d){d=UI.getMeasuredWidth(b,
14);d=Math.min(180/d*14,14);a.title.css("font-size",d+"pt");a.title.text(b)},g=function(a,b){a.points.text("Backlog: {0}".localize().format(b))},k=function(a){a.stage.removeChild(a.lines[0]);a.stage.removeChild(a.lines[1]);var b=Math.max(99,a.console.maintenanceLog.max(function(a){return a}));a.lines[0].y=105-66/b*70;a.lines[1].y=105-99/b*70;a.stage.addChild(a.lines[0]);a.stage.addChild(a.lines[1])},l=function(f){var g=c(f),h=new ProgressBarVisual;h.alpha=1;h.progress=f.satisFaction.clamp(0,1);h.color=
createjs.Graphics.getHSL(80*f.satisFaction.clamp(0,1),100,50);h.width=20;h.height=65;h.x=10;h.y=33;h.isHorizontal=!1;g.stage.addChild(h);g.progressBar=h;var l=Math.max(99,f.maintenanceLog.max(function(a){return a})),m=f.maintenanceLog.length,h=[];g.maintenanceShapes=[];g.repairShapes=[];for(var r=0;r<m;r++){var u=d(!0);u.scaleX=1/m;u.x=60+115/m*r;var z=f.maintenanceLog[r]/l*70;u.y=105-z;u.scaleY=z/70;h.push(u);var w=d(!1);w.scaleX=1/m;w.x=60+115/m*r;z=f.repairPointsLog[r]/l*70;w.y=105-z;w.scaleY=
z/70;g.repairShapes.push(w);g.stage.addChild(u);g.stage.addChild(w)}f=b();l=b();g.lines=[f,l];k(g);g.stage.update();g.shapes=h;a.push(g)};UI.updateMaintenanceCard=function(b){var c=a.first(function(a){return a.id===b.id});c||(UI.addMaintenanceCard(b),c=a.first(function(a){return a.id===b.id}));g(c.card,b.maintenancePoints);if(c&&c.shapes.length<b.maintenanceLog.length){var f=c.stage,h,l=Math.max(99,b.maintenanceLog.max(function(a){return a})),r=b.maintenanceLog.length,u=115/r;30<=b.maintenanceLog.length&&
(c.stage.removeChild(c.shapes[0]),c.shapes.remove(c.shapes[0]),b.maintenanceLog.splice(0,1),c.stage.removeChild(c.repairShapes[0]),c.repairShapes.remove(c.repairShapes[0]),b.repairPointsLog.splice(0,1),r--);b.repairPointsLog.length<b.maintenanceLog.length&&(b.repairPointsLog.push(0),b.repairPoints=0,h=d(!1),h.y=105,h.x=175-u,h.scaleX=1/r,h.scaleY=0,c.repairShapes.push(h));for(var z=c.shapes.length,w=0;w<z;w++){var y=b.maintenanceLog[w]/l*70,B=1/r;m.push(createjs.Tween.get(c.shapes[w]).to({scaleX:B,
x:60+115/r*w,y:105-y,scaleY:y/70},500))}z=d(!0);z.y=105;z.x=175-u;z.scaleX=1/r;z.scaleY=0;c.shapes.push(z);y=70*(b.maintenanceLog.last()/l);m.push(createjs.Tween.get(z).wait(500).to({y:105-y,scaleY:y/70},300));for(w=0;w<c.repairShapes.length;w++)y=b.repairPointsLog[w]/l*70,B=1/r,m.push(createjs.Tween.get(c.repairShapes[w]).to({scaleX:B,x:60+115/r*w,y:105-y,scaleY:y/70},500));f.addChild(z);h&&f.addChild(h);k(c)}};UI.updateRepairPoints=function(b){var d=a.first(function(a){return a.id===b.id});if(d){var c=
Math.max(99,b.maintenanceLog.max(function(a){return a}));b.repairPointsLog[b.repairPointsLog.length-1]=b.repairPoints;var c=70*(b.repairPointsLog.last()/c),f=d.repairShapes.last();f.y=105-c;f.scaleY=c/70;g(d.card,b.maintenancePoints)}};UI.clearMaintenanceCards=function(){a.forEach(function(a){UI.removeMaintenanceCard(a.id,!1)});$("#consoleMaintenanceContainer").empty();a=[]};UI.removeMaintenanceCard=function(b,d){var c=a.first(function(a){return a.id===b.id});c&&(c.card.remove(),a.remove(c))};var h=
function(b,d){var c=a.first(function(a){return a.id===b.id});b.satisFaction||(b.satisFaction=1);33>b.maintenancePoints?b.satisFaction+=0.04*d/500:66>b.maintenancePoints?b.satisFaction+=0.02*d/500:99<b.maintenancePoints?b.satisFaction-=0.02*d/350:122<b.maintenancePoints&&(b.satisFaction-=0.04*d/350);b.satisFaction=b.satisFaction.clamp(-0.3,1.3);c.progressBar.progress=b.satisFaction.clamp(0,1);c.progressBar.color=createjs.Graphics.getHSL(80*b.satisFaction.clamp(0,1),100,50)},m=[];GameManager.addTickListener(function(b,
d){if(!d&&m&&0<m.length&&!d){for(var c=0;c<m.length;c++)m[c].tick(b,!1);for(c=0;c<a.length;c++)h(a[c].console,b),a[c].stage.update()}},!0)})();
(function(){UI._isModalContentOpen=!1;UI.isModalContentOpen=function(){return b.some(function(a){return a.dialog("isOpen")})||UI._isModalContentOpen||!0===$("#newGameView").dialog("isOpen")||!0===$("#loadView").dialog("isOpen")||!0===$("#saveView").dialog("isOpen")||!0===$("#overwriteGameDialog").dialog("isOpen")||!0===$("#useKnowledgeFromPreviousGameDialog").dialog("isOpen")||!0===$("#gameHistoryDialog").dialog("isOpen")||!0===$("#platformReleaseNewsContent").dialog("isOpen")};UI.realignOpenDialogs=
function(){var a=$(document).find(".ui-dialog"),b=$(document.body);0<a.length&&a.position({of:b,my:"center center",at:"center center",offset:"0 0"})};UI._supressModalAnimations=!1;UI.showModalContent=function(a,b){b||(b={});if(b.disableCheckForNotifications||"#notificationContent"==a){GameManager.pause(!0);var f=!0===b.close;$(a).modal({close:f,onOpen:function(a){b.sound?Sound.playSoundOnce(b.sound,b.volume):UI._supressModalAnimations||Sound.playSoundOnce("popupOpen",0.35);if(f){var c=$(UI.closeButtonTemplate);
c.css("z-index",5E3);c.clickExcl(function(){Sound.click();var a=$(".simplemodal-data").find(".selectionOverlayContainer");0<a.length&&a.is(":visible")?a.fadeOut("fast"):UI.closeModal()});$(".simplemodal-container").append(c);GDT.fire(a,GDT.eventKeys.ui.dialogOpen)}UI._isModalContentOpen=!0;UI._supressModalAnimations||a.container.addClass("windowStyleStartState");a.overlay.show();a.container.show();a.data.show();a.overlay.transit({opacity:0.2},UI._supressModalAnimations?0:200);a.container.removeClass("windowStyleStartState");
a.container.addClass("windowStyleShowState");$(".simplemodal-data").find(".windowTitle:first:visible");UI.maxFont("bolder",$(".simplemodal-data").find(".windowTitle:first:visible"),34);if(b&&b.onOpen)b.onOpen()},onClose:function(a){a.container.removeClass("windowStyleShowState");UI._supressModalAnimations||(a.container.addClass("windowStyleHideState"),a.overlay.transit({opacity:0},100));var c=function(){UI.closeModal();a.container.removeClass("windowStyleHideState");UI._isModalContentOpen=!1;if(b&&
b.onClose)b.onClose();UI.currentCloseCallback&&(UI.currentCloseCallback(),UI.currentCloseCallback=null);GameManager.resume(!0)};UI._supressModalAnimations?c():setTimeout(c,100);GDT.fire(a,GDT.eventKeys.ui.dialogClose)},escClose:f,zIndex:4500})}else GameManager.showPendingNotifications(function(){PlatformShim.execUnsafeLocalFunction(function(){b.disableCheckForNotifications=!0;UI.showModalContent(a,b)})})};UI.currentCloseCallback=null;UI.closeModal=function(a){UI._supressModalAnimations=0<GameManager.company.activeNotifications.length;
if(null!=UI.currentCloseCallback&&a)throw"attempting to override existing callback";a&&(UI.currentCloseCallback=a);PlatformShim.execUnsafeLocalFunction(function(){$.modal.close()})};var a=!1;UI.closeAllDialogs=function(){$("#newGameView").dialog("close");$("#loadView").dialog("close");$("#saveView").dialog("close");$("#overwriteGameDialog").dialog("close");$("#gameHistoryDialog").dialog("close");$("#platformReleaseNewsContent").dialog("close");$("#purchasePlatformDialog").dialog("close");$("#useKnowledgeFromPreviousGameDialog").dialog("close");
$(document).find("#gamePausedOverlay").hide();UI.enableMainMenu();for(var c=0;c<b.length;c++)a=!0,b[c].dialog("close");a=!1;$.modal.impl.o&&($.modal.impl.o.onClose=null);PlatformShim.execUnsafeLocalFunction(function(){$.modal.close()});UI._isModalContentOpen=!1;UI.closeContextMenu()};(function(a){var b=a.noop;a.browser.msie&&(b=function(b){b=a(b).parent(".ui-dialog");var d=b.innerWidth();d&&b.css("width",d)});var f=a.ui.dialog.prototype._init;a.ui.dialog.prototype._init=function(){if("auto"==this.options.width){var g=
this.options.open;this.options.open=function(){b(this);g&&g.apply(this)}}a.browser.msie&&"drop"==this.options.hide&&(this.options.hide="fold");return f.apply(this)}})(jQuery);var b=[];$.fn.gdDialog=function(c){c||(c={});void 0==c.zIndex&&(c.zIndex=5E3);var d,f,g;this.hasClass("tallWindow")?(d=600,f=650,g="tallWindow"):this.hasClass("smallWindow")?(d=500,f=350,g="smallWindow"):this.hasClass("wideWindow")&&(d=800,f=650,g="wideWindow");this.hasClass("windowBorder")&&(g+=" windowBorder");var k=this;b.push(k);
k.dialog({close:!1,closeOnEscape:c.close,draggable:!1,width:d?d:"auto",height:f?f:"auto",modal:!0,resizable:!1,show:"fade",zIndex:c.zIndex,open:function(){var a=$(this);if(c.close){var b=$(UI.closeButtonTemplate);b.css("z-index",5500);b.clickExclOnce(function(){Sound.click();k.dialog("close")});a.parents(".ui-dialog:first").append(b)}c.popout&&$("#gameContainerWrapper").addClass("popout-active");a.siblings(".ui-dialog-titlebar").remove();g&&$(a).parents(".ui-dialog:first").addClass(g);a.parents(".ui-dialog:first").removeClass("ui-widget-content");
if(c&&c.onOpen)c.onOpen();$(".ui-widget-overlay:last").css("z-index",c.zIndex-10);a.parents(".ui-dialog:first").css("z-index",c.zIndex);GDT.fire(a,GDT.eventKeys.ui.dialogOpen)},close:function(){c.popout&&$("#gameContainerWrapper").removeClass("popout-active").addClass("popout-inactive");$(this).dialog("destroy");this.style.cssText="display:none;";-1!=b.indexOf(k)&&b.remove(k);if(c.onClose&&!a)c.onClose();GDT.fire($(this),GDT.eventKeys.ui.dialogClose)}})}})();
(function(){UI.showNotifications=function(a){var b=GameManager.company.activeNotifications;0===b.length&&a();UI._supressModalAnimations=!1;UI._showNotification(b[0],a)};UI._showNotification=function(a,b){GameManager.pause(!0);GDT.fire(GameManager,GDT.eventKeys.ui.beforeShowingNotification,{notification:a});switch(a.header){case "{Reviews}":GameManager.company.gameLog.last().reviewMessageDisplayed=!0;UI.showReviewWindow(a,b);break;case "{BoothPicker}":GameManager.showBoothList(a,b);break;case "{GameDefinition}":UI._showGameDefinition(a,
b);break;case "{FeatureList}":UI._showFeatureList(a,b);break;case "{MarketingList}":UI.showMarketingList(a,b);break;case "{ReleaseGame}":UI._showReleaseGame(a,b);break;case "{GameConferenceAnimation}":UI._showGameConferenceAnimation(a,b);break;case "{Research}":UI.showResearchMenu(a,b);break;case "{Training}":UI.showTrainingMenu(a,b);break;case "{CreateEngine}":UI.showCreateEngineMenu(a,b);break;case "{FindContractWork}":UI.showFindContractWorkMenu(a,b);break;case "{DevelopConsole}":UI.showDevelopConsoleMenu(a,
b);break;case "{TrialEnd}":UI.showTrialEnd(a,b);break;case "{GameEnd}":UI.showGameEnd(a,b);break;case "{PlatformReleaseNews}":UI.showPlatformReleaseNews(a,b);break;case "{enterCompanyName}":UI.showNewGameView(a,b);break;case "{HireStaff}":UI.showHireStaff(a,b);break;case "{SupportGreenheartGames}":UI.showSupportUsOptionsWindow(a,b);break;case "{PostMortemComplete}":UI.showPostMortemComplete(a,b);break;default:c(a,b)}};var a=function(a,b,c){var k=34;c=c?"":"bolder";var l=UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":
"Open Sans";do{var h="{0} {1}pt {2}".format(c,k,l),h=new createjs.Text(b,h,"black");k--}while(390<h.getMeasuredWidth()&&10<k);a.css({font:"{0} {1}pt {2}".format(c,k,l)}).text(b)},b=function(a){var b="bold {0}pt {1}".format(22,UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans");a=new createjs.Text(a,b,"black");return a.getMeasuredWidth()},c=function(c,f){var g=$("#notificationContent");g.empty();var k=$("#notificationContentTemplate").clone();c.options?2==c.options.length?k.find(".smallWindow").removeClass("smallWindow").addClass("notificationTwoOptions"):
k.find(".smallWindow").removeClass("smallWindow").addClass("notificationThreeOptions"):k.find(".notificationOption2").hide();var l=k.find(".windowTitle");a(l,c.header);(l=c.text)&&(l=l.replace(/\n/g,"<br />"));c.image?(k.find(".notificationImage").attr("src",c.image),k.find(".notificationImageContainer").show()):k.find(".notificationImageContainer").hide();var h=k.find(".notificationButton").css({opacity:0}).text(c.buttonText),m=[h[0]];if(c.options){var n=290,p=b(c.options[0]),p=Math.min(n/p*22,22);
$(h[0]).css("font-size",p+"pt");$(h[0]).text(c.options[0]);p=b(c.options[1]);p=Math.min(n/p*22,22);$(h[1]).css("font-size",p+"pt");$(h[1]).text(c.options[1]);m.push(h[1]);2<c.options.length&&(p=b(c.options[2]),p=Math.min(n/p*22,22),$(h[2]).css("font-size",p+"pt"),$(h[2]).text(c.options[2]),m.push(h[2]));var q=$("#sidebar").width();$("#sidebar span").each(function(){var a=$(this).width(),a=q/a*12;$(this).css({"font-size":a,"line-height":a/1.2+"px"})})}else n=290,p=b(h[0].innerText),p=Math.min(n/p*
22,22),$(h[0]).css("font-size",p+"pt");var s=function(a){Sound.click();GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(c),1);var b;c.sourceId&&(b=$(a.srcElement).hasClass("notificationOption1")?0:$(a.srcElement).hasClass("notificationOption2")?1:2);General.notificationShown(c,b);GameManager.company&&(0<GameManager.company.activeNotifications.length?UI.closeModal(function(){UI._showNotification(GameManager.company.activeNotifications[0],f)}):f?UI.closeModal(function(){f&&
f()}):UI.closeModal())};k.find(".notificationText").text(l).typewrite({delay:20,extra_char:"",replace_br:!0,speedUpOnClick:!0,soundLoop:"notificationTyping",volume:0.12,callback:function(){$(m).transition({opacity:1},"fast").clickExclOnce(function(a){s(a)})}});UI.IS_SEGOE_UI_INSTALLED||k.find(".notificationText").addClass("fallback");"{noButton}"===c.buttonText&&h.hide();g.append(k);g={};c.sound&&$.extend(g,{sound:c.sound,volume:c.volume});UI.showModalContent("#notificationContent",g)};UI.showPlatformReleaseNews=
function(a,b){var c=$("#platformReleaseNewsContent");c.empty();var k=$("#platformReleaseNewsTemplate").clone();k.find(".windowTitle").text("News".localize("heading"));for(var l,h=0;h<Platforms.allPlatforms.length;h++)if(Platforms.allPlatforms[h].id===a.text){l=Platforms.allPlatforms[h];break}h="Today the new game platform {0} by {1} has been released.".localize().format(l.name,l.company);k.find(".platformRelaseNewsImage").attr("src",Platforms.getPlatformImage(l,GameManager.company.currentWeek));var m=
k.find(".platformReleaseOkButton").css({opacity:0}).text(a.buttonText),n=function(){Sound.click();GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),1);0<GameManager.company.activeNotifications.length?UI.closeModal(function(){UI._showNotification(GameManager.company.activeNotifications[0],b)}):UI.closeModal(function(){b&&b()})};k.find(".notificationText").text(h).typewrite({delay:20,extra_char:"",replace_br:!0,speedUpOnClick:!0,soundLoop:"notificationTyping",
volume:0.12,callback:function(){m.transition({opacity:1},"fast").clickExclOnce(n)}});UI.IS_SEGOE_UI_INSTALLED||k.find(".notificationText").addClass("fallback");c.append(k);UI.showModalContent("#platformReleaseNewsContent",{disableCheckForNotifications:!0,close:!1})}})();
(function(){UI.pickTopicFontSize=void 0;UI._getMaxFontSize=function(a,c,d,f,g,k,l){for(var h=a.format(d,c),m=0;m<l.length&&d!=f;m++){var n=new createjs.Text(l[m],h,"black");if(n.getMeasuredWidth()>g||0<k&&n.getMeasuredHeight()>k)d-=1,h=a.format(d,c),m--}return d};UI.pickTopicClick=function(a){Sound.click();var c="research"===a;if(!c){var d=GameManager.company.currentGame;if(d&&d.flags.lockedSettings&&d.flags.lockedSettings.topic){$(".simplemodal-data").find(".pickTopicButton").parent(".centeredButtonWrapper").effect("shake",
{times:2,distance:5},50);return}}!c&&a?UI._selectTopic(a.innerText):PlatformShim.execUnsafeLocalFunction(function(){var a=$(".simplemodal-data");a.find(".overlayTitle").text("Pick Topic".localize("heading"));var b=a.find(".listContainer");b.empty();var d=0,l=0,h=General.getTopicOrder(GameManager.company),m=c?General.getTopicsAvailableForResearch(GameManager.company):[];if(void 0==UI.pickTopicFontSize){for(var n=[],p=0;p<h.length;p++)n.push(h[p].name);UI.pickTopicFontSize=UI._getMaxFontSize("{0}pt {1}",
UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans",16,10,175,50,n)}for(p=0;p<h.length;p++){var q=h[p];d++;3<d&&(l++,d=1);var n=-1!=GameManager.company.topics.indexOf(q),s=0<GameManager.currentResearches.filter(function(a){return a.topicId===q.id}).length,t=c?!n&&!s&&-1!=m.indexOf(q):n,r=t?'<div class="selectorButton whiteButton" onclick="UI.pickTopicClick(this)">{{name}}</div>':'<div class="selectorButton disabledButton">{{name}}</div>',r=(!c||t||n||s)&&(c||t)?GameManager.areHintsEnabled()&&Knowledge.hasTopicAudienceWeightingKnowledge(GameManager.company,
q)?('<div class="selectorButton'+(t?" whiteButton ":" ")+"pickTopicButtonAudienceHintVisible"+(t?'" onclick="UI.pickTopicClick(this)':" disabledButton")+'"><span style="position:relative;top:5px;">{0}<span style="font-size:11pt;"><br/>{1}</span></span></div>').format(q.name,Knowledge.getTopicAudienceHtml(GameManager.company,q)):r.replace("{{name}}",q.name):r.replace("{{name}}","?"),n=$(r);n.css("position","absolute");n.css("top",50*l+10*l);n.css("left",190*(d-1)+10);n.css("font-size",UI.pickTopicFontSize+
"pt");b.append(n)}a.find(".selectionOverlayContainer").fadeIn("fast")})};UI._selectTopic=function(a){var c=$(".simplemodal-data").find(".pickTopicButton");a=a.split("\n");c.get(0).innerText=a[0];c.removeClass("selectorButtonEmpty");UI.maxFont(void 0,c,18);$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");UI._updateGameDefinitionNextButtonEnabled()};UI.pickPlatformClick=function(a){Sound.click();var c=a.hasClass("platform2")?1:a.hasClass("platform3")?2:0,d=GameManager.company.currentGame;
if(0===c&&d&&d.flags.lockedSettings&&d.flags.lockedSettings.platform)$(".simplemodal-data").find("#pickPlatformButton").parent(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50);else if(d&&d.platforms.length<c){var f=".pickPlatformButton";0<d.platforms.length&&(f+=".platform"+d.platforms.length);$($(".simplemodal-data").find(f).get(0)).effect("pulsate",{times:2})}else PlatformShim.execUnsafeLocalFunction(function(){var d=$(".simplemodal-data");d.find(".overlayTitle").text("Pick Platform".localize("heading"));
var f=d.find(".listContainer");f.empty();var l=Platforms.getPlatformsOnMarket(GameManager.company),h=GameManager.company.currentGame,l=l.except(h.platforms);h.platforms.length>c&&l.push(h.platforms[c]);l=l.slice().sort(function(a,b){return Platforms.getTotalMarketSizePercent(b,GameManager.company)-Platforms.getTotalMarketSizePercent(a,GameManager.company)});if(1<h.platforms.length&&h.platforms.length>c){var m=$("<div class='removePlatformButton whiteButton'></div>").text("Remove Platform".localize());
(function(a){a.on("click",function(){var a=GameManager.company.currentGame.platforms;a.length<=c||a.splice(c,1);$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");UI._updatePickPlatformButtonStates(h);UI._updateGameDefinitionNextButtonEnabled();UI._updateGameDefinitionCost()})})(m);f.append(m)}for(var n=0;n<l.length;n++){m=$("#platformButtonTemplate").clone();m.removeAttr("id");var p=l[n];m.platformId=p.id;var q=-1!=GameManager.company.licencedPlatforms.indexOf(p);m.find(".platformButtonImage").attr("src",
Platforms.getPlatformImage(p,GameManager.company.currentWeek));m.find(".platformTitle").text(p.name);m.find(".cost").text("Dev. cost: ".localize()+UI.getShortNumberString(p.developmentCosts));q?m.find(".licenseCost").hide():(m.find(".licenseCost").text("License cost: ".localize()+UI.getShortNumberString(p.licencePrize)),GameManager.company.cash<p.licencePrize&&m.find(".licenseCost").addClass("red"));m.find(".marketShare").text("Marketshare: ".localize()+UI.getPercentNumberString(Platforms.getTotalMarketSizePercent(p,
GameManager.company)));if(GameManager.areHintsEnabled()){var s=Knowledge.getPlatformAudienceHintHtml(GameManager.company,p);s&&m.find(".audienceHints").html(s);(s=Knowledge.getPlatformGenreHintHtml(GameManager.company,p))&&m.find(".genreHints").html(s)}(function(c){q?(c.addClass("whiteButton"),c.on("click",function(){UI._selectPlatform(c.platformId,a)})):p.licencePrize<=GameManager.company.cash?(c.addClass("whiteButton"),c.on("click",function(){UI.buyPlatform($(this).find(".platformTitle").get(0).innerText,
function(d){d&&UI._selectPlatform(c.platformId,a)})})):c.addClass("disabledButton")})(m);f.append(m)}d.find(".selectionOverlayContainer").fadeIn("fast")})};var a=function(a,c){var d=GameManager.company.currentGame.platforms;if(d.length==a)d.push(c);else if(d.length>=a)d[a]=c;else throw"unexpected platform length";UI._updatePickPlatformButtonStates(GameManager.company.currentGame)};UI.getMeasuredWidth=function(a,c){var d="bold {0}pt {1}".format(c,UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans");a=
new createjs.Text(a,d,"black");return a.getMeasuredWidth()};UI._updatePickPlatformButtonStates=function(a){for(var c=$(".simplemodal-data"),d=0;3>d;d++){var f=".pickPlatformButton";0<d&&(f+=".platform"+(d+1));var f=$(c.find(f).get(0)),g="Pick Platform".localize();GameManager.company.canDevelopMultiPlatform();a.platforms.length>=d?(f.removeClass("selectorButtonEmpty").removeClass("selectorButtonInactive windowStepActionButtonDisabled").addClass("selectorButton windowStepActionButton"),a.platforms[d]&&
(g=a.platforms[d].name),f.text(g)):f.addClass("selectorButtonInactive windowStepActionButtonDisabled").removeClass("selectorButton windowStepActionButton").text("Pick Platform".localize());UI.maxFont(void 0,f,18,g)}};UI._selectPlatform=function(b,c){var d=GameManager.company.licencedPlatforms.first(function(a){return a.id===b}),f=c?$(c):$(".simplemodal-data").find("#pickPlatformButton");f.get(0).innerText=d.name;$(".simplemodal-data").find("#gameDefinition")&&a(f.hasClass("platform2")?1:f.hasClass("platform3")?
2:0,d);f.removeClass("selectorButtonEmpty");$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");UI._updateGameDefinitionNextButtonEnabled();UI._updateGameDefinitionCost()};UI.buyPlatform=function(a,c){var d=GameManager.company.availablePlatforms.concat(GameManager.company.licencedPlatforms).first(function(c){return c.name==a});if(d){var f="You require a developer license to be able to develop for this platform.<br/><br/> Do you want to pay <strong>{0}</strong> to acquire a license for the <strong>{1}</strong>?".localize().format(UI.getLongNumberString(d.licencePrize),
d.name);$("#purchasePlatformDialog").find(".purchasePlatformMessage").html(PlatformShim.toStaticHtml(f));$("#purchasePlatformDialog").dialog({draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:6E3,open:function(){$(this).siblings(".ui-dialog-titlebar").remove();$(this).find(".cancelActionButton").clickExclOnce(function(){Sound.click();$("#purchasePlatformDialog").dialog("close")});$(this).find(".confirmActionButton").clickExclOnce(function(){Sound.click();$("#purchasePlatformDialog").dialog("close");
GameManager.buyPlatform(d);c(!0)})}})}};UI.pickGenreClick=function(a){Sound.click();var c=GameManager.company.currentGame;c&&c.flags.lockedSettings&&c.flags.lockedSettings.genre?$(".simplemodal-data").find("#pickGenreButton").parent(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50):a?UI._selectGenre(a.innerText):PlatformShim.execUnsafeLocalFunction(function(){var a=$(".simplemodal-data");a.find(".overlayTitle").text("Pick Genre".localize("heading"));var b=a.find(".listContainer");
b.empty();for(var c=General.getAvailableGenres(GameManager.company),k=a.find("#pickSecondGenreButton").get(0).innerText,l=!1,h=0;h<c.length;h++)if(k!=c[h].name){var m=$('<div class="selectorButton" onclick="UI.pickGenreClick(this)">{{name}}</div>'.replace("{{name}}",c[h].name));m.css("margin-left",210);l||(m.css("margin-top",90),l=!0);m.addClass("whiteButton");b.append(m)}a.find(".selectionOverlayContainer").fadeIn("fast")})};UI._selectGenre=function(a,c){var d=2==c?$(".simplemodal-data").find("#pickSecondGenreButton"):
$(".simplemodal-data").find("#pickGenreButton"),f=d.get(0).innerText;a==f?(d.text("Pick Genre".localize()),d.addClass("selectorButtonEmpty")):(d.text(a),d.removeClass("selectorButtonEmpty"));d=GameGenre.getAll().first(function(c){return c.name==a});f=GameManager.company.currentGame;2!=c?(f.genre=d,f.genre&&$(".simplemodal-data").find("#pickSecondGenreButton").removeClass("selectorButtonInactive windowStepActionInactive").addClass("selectorButton windowStepActionButton")):f.secondGenre=d;$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");
UI._updateGameDefinitionNextButtonEnabled()};UI.pickSecondGenreClick=function(a){Sound.click();var c=GameManager.company.currentGame;c&&c.flags.lockedSettings&&c.flags.lockedSettings.secondGenre?$(".simplemodal-data").find("#pickSecondGenreButton").parent(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50):c&&!c.genre?$(".simplemodal-data").find("#pickGenreButton").effect("pulsate",{times:2}):a?UI._selectGenre(a.innerText,2):PlatformShim.execUnsafeLocalFunction(function(){var a=$(".simplemodal-data");
a.find(".overlayTitle").text("Pick Genre".localize("heading"));var b=a.find(".listContainer");b.empty();for(var c=General.getAvailableGenres(GameManager.company),k=a.find("#pickGenreButton").get(0).innerText,l=!1,h=0;h<c.length;h++)if(k!=c[h].name){var m=$('<div class="selectorButton" onclick="UI.pickSecondGenreClick(this)">{{name}}</div>'.replace("{{name}}",c[h].name));m.css("margin-left",210);l||(m.css("margin-top",90),l=!0);m.addClass("whiteButton");b.append(m)}a.find(".selectionOverlayContainer").fadeIn("fast")})};
UI.pickEngineClick=function(a){Sound.click();if(a){var c=GameManager.company.engines.first(function(c){return c.id===a.engineId}),d=c.name,f=$(".simplemodal-data").find(".pickEngineButton");f.get(0).innerText=d;$(".simplemodal-data").find("#gameDefinition")&&(GameManager.company.currentGame.engine=c);f.removeClass("selectorButtonEmpty");$(".simplemodal-data").find(".selectionOverlayContainer").fadeOut("fast");UI._updateGameDefinitionNextButtonEnabled()}else PlatformShim.execUnsafeLocalFunction(function(){var a=
$(".simplemodal-data");a.find(".overlayTitle").text("Pick Engine".localize("heading"));var b=a.find(".listContainer");b.empty();var c=$('<div class="engineButtonContainer"></div>');b.append(c);for(var b=$("#engineButtonTemplate").get(0).outerHTML,d=GameManager.company.engines.slice().reverse(),f=0;f<d.length;f++){var n=d[f],p=$(b);p.engineId=n.id;p.text(n.name);p.addClass("whiteButton");(function(a){a.clickExcl(function(){UI.pickEngineClick(a)})})(p);n=$('<div class="centeredButtonWrapper"></div>');
n.append(p);c.append(n)}a.find(".selectionOverlayContainer").fadeIn("fast")})}})();
(function(){var a=!1,b;UI._showGameDefinition=function(b,d,f){if(!f&&GameManager.flags.selectGameActive){var g=GameManager.gameId;UI.showGameHistory(function(){if(g==GameManager.gameId)if(GameManager.flags.selectGameActive=!1,GameManager.flags.selectedGameId){var a=GameManager.flags.selectedGameId,c=GameManager.company.currentGame,f=GameManager.company.getGameById(a);c.sequelTo=a;c.genre=f.genre;c.secondGenre=f.secondGenre;c.topic=f.topic;c.targetAudience=f.targetAudience;c.gameSize=f.gameSize;GameManager.flags.createPack&&
(c.flags.lockedSettings||(c.flags.lockedSettings={}),c.flags.lockedSettings.topic=!0,c.flags.lockedSettings.genre=!0,c.flags.lockedSettings.platform=!0,c.flags.lockedSettings.targetAudience=!0,c.secondGenre&&(c.flags.lockedSettings.secondGenre=!0),c.flags.lockedSettings.mmo=!0,c.flags.mmo=!0,c.platforms=f.platforms.slice());GameManager.flags.selectedGameId=null;UI._showGameDefinition(b,d,!0)}else GameManager.company.activeNotifications.remove(b),GameManager.gameDefinitionCancelled()},!0)}else UI.showGameDefinition(GameManager.company,
{close:!0,disableCheckForNotifications:!0,onOpen:function(){var a=GameManager.company.currentGame;a.topic&&UI._selectTopic(a.topic.name);var b=a.secondGenre;a.genre?UI._selectGenre(a.genre.name):a.secondGenre||$(".simplemodal-data").find("#pickSecondGenreButton").addClass("selectorButtonInactive windowStepActionButtonDisabled").removeClass("selectorButton windowStepActionButton");b&&UI._selectGenre(b.name,2);UI._updatePickPlatformButtonStates(a);if(a.targetAudience){var c=a.targetAudience,b=$(".simplemodal-data");
b.find(".rating").removeClass("selected");c=b.find("young"===c?".ratingY":"mature"===c?".ratingM":".ratingE");c.addClass("selected");c.hasClass("rating")&&b.find(".ratingLabel").text(p(c))}a.gameSize&&(b=a.gameSize,c=$(".simplemodal-data"),c.find(".gameSizeButton").removeClass("selected"),c.find("small"===b?".gameSizeSmall":"medium"===b?".gameSizeMedium":"large"===b?".gameSizeLarge":".gameSizeAAA").addClass("selected"));a.flags.mmo&&(a=a.flags.mmo,b=$(".simplemodal-data").find(".gameGenreMMO"),b.removeClass("selected"),
a&&b.addClass("selected"));UI._updateGameDefinitionCost();UI._updateGameDefinitionNextButtonEnabled()},onClose:function(){c&&(clearInterval(c),c=void 0);a?GameManager.company.activeNotifications.remove(b):(GameManager.company.activeNotifications.remove(b),GameManager.gameDefinitionCancelled())}})};var c=0,d=function(a){var b;a.focus(function(){c&&clearInterval(c);b=Date.now();c=setInterval(function(){b&&6E4<=Date.now()-b&&(Achievements.activate(Achievements.writersBlock),GameManager.checkAchievements(),
clearInterval(c))},1E3)});a.blur(function(){clearInterval(c);c=0})};UI.showGameDefinition=function(c,f){var g=c.currentGame;$(".selectionOverlayContainer").hide();var h=$(".gameDefinitionContent");h.empty();var k=$("#gameDefinitionContentTemplate").clone();k.find("#gameTitle").attr("value",c.currentGame.title);b=c.currentGame.title;d(k.find("#gameTitle"));k.find(".pickTopicButton").clickExcl(function(){UI.pickTopicClick()});k.find("#pickGenreButton").clickExcl(function(){UI.pickGenreClick()});k.find("#pickSecondGenreButton").clickExcl(function(){UI.pickSecondGenreClick()});
k.find(".pickPlatformButton").clickExcl(function(){UI.pickPlatformClick($(this))});k.find(".pickEngineButton").clickExcl(function(){UI.pickEngineClick()});c.canDevelopMediumGames()?(c.canDevelopLargeGames()||k.find(".gameSizeLarge").hide(),c.canDevelopAAAGames()||k.find(".gameSizeAAA").hide()):k.find("#gameSizeGroup").hide();c.canDevelopMMOGames()||k.find(".gameGenreMMO").hide();c.canUseMultiGenre()?(k.find("#pickSecondGenreButton").css("margin-left","2.5px").css("margin-right","2.5px").css("width",
"145px"),k.find("#pickGenreButton").css("margin-left","2.5px").css("margin-right","2.5px").css("width","145px")):k.find("#pickSecondGenreButton").hide();c.canDevelopMultiPlatform()?k.find(".pickPlatformButton").css("margin-left","2.5px").css("margin-right","2.5px").css("width","145px"):k.find(".pickPlatformButton").slice(1).hide();c.canSetTargetAudience()||k.find("#targetRating").hide();k.find(".gameDefSelection").clickExcl(function(){Sound.click();var a=$(this);if(!(a.hasClass("rating")&&g.flags.lockedSettings&&
g.flags.lockedSettings.targetAudience||a.hasClass("gameSizeButton")&&g.flags.lockedSettings&&g.flags.lockedSettings.gameSize)){if(a.hasClass("gameGenreMMO")){if(g.flags.lockedSettings&&g.flags.lockedSettings.mmo)return;a.hasClass("selected")?a.removeClass("selected"):a.addClass("selected")}else a.parent().find(".gameDefSelection").removeClass("selected"),a.addClass("selected"),a.hasClass("rating")?k.find(".ratingLabel").text(p(a)):a.hasClass("gameSizeButton")&&(g.gameSize=s(k.find(".gameSizeButton.selected")));
UI._updateGameDefinitionCost();UI._updateGameDefinitionNextButtonEnabled()}});k.find(".windowCostLabel").hide();0===c.engines.length?k.find(".pickEngineButtonWrapper").hide():k.find(".pickEngineButtonWrapper").show();var l=null!=GameManager.company.currentGame.sequelTo,m=$("#gameDefinition").find(".dialogScreen1Title");l?(l=GameManager.company.getGameById(GameManager.company.currentGame.sequelTo),null===l?(GameManager.company.currentGame.sequelTo=null,m.removeClass("smallerWindowTitle").text("Game Concept".localize())):
m.addClass("smallerWindowTitle").text("Sequel to {0}".localize().format(l.title))):m.removeClass("smallerWindowTitle").text("Game Concept".localize());$("#gameDefinition").find(".dialogNextButton").clickExcl(function(){$("#gameDefinition").find(".dialogNextButton").effect("shake",{times:2,distance:5},50)});var n=Research.getAllItems().filter(function(a){return"graphic-type"===a.group}).map(function(a){return a.id});$("#gameDefinition").find(".dialogBackButton").clickExcl(function(){Sound.click();
UI._saveSelectedGameFeatureSettings(function(a){return-1!=n.indexOf(a)});$("#gameDefinition").find(".dialogScreen1").transition({"margin-left":0});$("#gameDefinition").find(".dialogScreen2").transition({"margin-left":"100%"})});a=!1;PlatformShim.execUnsafeLocalFunction(function(){h.append(k);var a=h.find(".gameSizeSmall");UI.maxFont(void 0,a,18);a=h.find(".gameSizeMedium");UI.maxFont(void 0,a,18);a=h.find(".gameSizeLarge");UI.maxFont(void 0,a,18);a=h.find(".gameSizeAAA");UI.maxFont(void 0,a,18);a=
h.find("#pickSecondGenreButton");UI.maxFont(void 0,a,18);a=h.find("#pickGenreButton");UI.maxFont(void 0,a,18);a=h.find(".pickEngineButton");UI.maxFont(void 0,a,18);a=h.find(".pickTopicButton");UI.maxFont(void 0,a,18);UI.showModalContent("#gameDefinition",f)})};var f=function(){var a=$(".simplemodal-data").find(".pickTopicButton").text();return GameManager.company.topics.first(function(b){return b.name==a})},g=function(){var a=$(".simplemodal-data").find("#pickGenreButton").text();return GameGenre.getAll().first(function(b){return b.name==
a})},k=function(){var a=$(".simplemodal-data").find("#pickSecondGenreButton").text();return GameGenre.getAll().first(function(b){return b.name==a})},l=function(){var a=$(".simplemodal-data").find(".pickEngineButton").get(0).innerText;return GameManager.company.engines.first(function(b){return b.name.trim()==a.trim()})};UI._updateGameDefinitionCost=function(){var a=$(".simplemodal-data"),b=GameManager.company.currentGame,c;c=0+q(s(a.find(".gameSizeButton.selected")));b&&0<b.platforms.length&&(c+=b.platforms.sum(function(a){return a?
a.developmentCosts:0}),c*=General.getMultiPlatformCostFactor(b),c+=UI._getGameFeatureCosts());a.find(".gameGenreMMO").hasClass("selected")&&(c*=4);a=a.find(".windowCostLabel");UI.maxFont(void 0,a,20,"Cost: {0}".localize().format(UI.getShortNumberString(c)));a.fadeIn();return c};var h=function(a){a||(a=$(".simplemodal-data"));if(f()&&g()){var b=GameManager.company.currentGame;b.topic=f();b.genre=g();b.secondGenre=k();GameManager.areHintsEnabled()&&Knowledge.hasComboKnowledge(GameManager.company,b)?
(a=a.find(".comboHint"),a.text("{0} combo".localize().format(Knowledge.getComboHintText(b))),UI.maxFont(void 0,a,14)):a.find(".comboHint").text("")}};UI._updateGameDefinitionNextButtonEnabled=function(){var a=$(".simplemodal-data"),b=a.find(".dialogNextButton");UI.maxFont(void 0,a.find(".windowMainActionButton"),22);if(0!==b.length){var c=GameManager.company.currentGame,d=f()&&0<c.platforms.length&&g();h(a);var k="",m=s(a.find(".gameSizeButton.selected"));m&&"small"!=m&&(c=c.platforms.filter(function(a){return!Platforms.doesPlatformSupportGameSize(a,
m)}),0<c.length&&(k=c.first(),k="{0} does not support {1} games!".localize("{0} platform, {1} game size").format(k.name,General.getGameSizeLabel(m))));a.find(".gameGenreMMO").hasClass("selected")&&"large"!=m&&"aaa"!=m&&(k="MMO's cannot be small or medium.".localize());0==k.length&&(c=l())&&a.find(".gameGenreMMO").hasClass("selected")&&!c.parts.some(function(a){return"mmoSupport"===a.id})&&(k="Engine does not support MMO.".localize());a=a.find(".gameDefinitionWarningText");0<k.length?(a.text(k).fadeIn().effect("pulsate",
{times:3}),d=!1):a.fadeOut();d?(b.clickExcl(function(){Sound.click();PlatformShim.execUnsafeLocalFunction(function(){n()});$("#gameDefinition").find(".dialogScreen1").transition({"margin-left":"-200%"});$("#gameDefinition").find(".dialogScreen2").transition({"margin-left":0})}),b.removeClass("baseButton").addClass("selectorButton").addClass("orangeButton"),PlatformShim.execUnsafeLocalFunction(function(){n()})):b.removeClass("selectorButton").removeClass("orangeButton").addClass("baseButton").addClass("disabledButton").clickExcl(function(){b.effect("shake",
{times:2,distance:5},50)})}};var m=[];UI._getSelectedFeatures=function(){return m};UI._getGameFeatureCosts=function(){if(!m||0==m.length)return 0;var a=GameManager.company.currentGame.features;return(a?m.except(a):m).sum(function(a){return Research.getDevCost(a,GameManager.company.currentGame)})};UI.generateFeatureElement=function(a,b){var c=$("#selectableGameFeatureItem").clone();c.attr("feature-id",a.id);GameManager.areHintsEnabled()&&a.isSkillTraining&&c.append($('<div style="font-size:12pt;"><span>{0}</span>{1}</div>'.format("Effect: ".localize(),
Knowledge.getTrainingKnowledgeHtml(a))));c.on("mousedown mouseup mouseleave",function(a){c.toggleClass("active","mousedown"===a.type)});return c};var n=function(){UI._updateFeatureListContainer({filter:function(a){return void 0!=a.techLevel||"Special Items"===a.category}},!0);UI._updateGameDefinitionCost();var a=$(".simplemodal-data").find(".featureSelectionPanel");a.hasClass("featureSelectionPanelHiddenState")&&(a.removeClass("featureSelectionPanelHiddenState"),a.addClass("featureSelectionShowState"))};
UI.maxFont=function(a,b,c,d,f){void 0!=b&&0<b.length&&(d=d?d:b[0].innerText,void 0!=d&&0<d.length&&(d=d.trim(),a=UI._getMaxFontSize(a?a+" {0}pt {1}":"{0}pt {1}",UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans",c,4,f?b.width():b.width()-11,f?b.height():b.height()-11,[d]),c=$("<span>{0}</span>".format(d)),c.css("font-size",a+"pt"),b.empty().append(c)))};UI._updateFeatureListContainer=function(a,b){var c=a;c||(c={readOnly:!1});var d=c.onChange;d||(d=function(){UI._updateGameDefinitionCost()});var f=$(".simplemodal-data");
UI.maxFont("bolder",f.find(".dialogScreen1Title"),34);UI.maxFont("bolder",f.find(".dialogScreen2Title"),34);var g=f.find(".featureSelectionContainer"),h=GameManager.company.currentGame,f=GameManager.getAvailableGameFeatures(h.engine).filter(function(a){return!a.canUse||a.canUse(h)}).groupBy(function(a){return a.category});g.empty();m=[];var k=null,l=[],n=function(a,b){if(a.hasClass("selectedFeature"))"graphic-type"!==b.group&&(a.removeClass("selectedFeature"),m.remove(b),d());else{if(b.group){var c=
".radioButton"+l.indexOf(b.group);g.find(c).removeClass("selectedFeature");for(var c=m.filter(function(a){return a.group===b.group}),f=0;f<c.length;f++)m.remove(c[f])}a.addClass("selectedFeature");m.push(b);d()}};c.categories&&0<c.categories.length&&(f=f.filter(function(a){return-1!=c.categories.indexOf(a.category)}));c.filter&&(f=f.filter(c.filter));var p=$("#featureCategoryHeading");b&&(f=f.slice().sort(function(a,b){return a.techLevel-b.techLevel}));for(var q=0;q<f.length;q++){var t=f[q];if(t.category!=
k){k=p.clone();k.removeAttr("id");var s=Missions.getMissionWithId(t.category);s&&k.attr("mission-id",s.id);k.text(s?s.name:t.categoryDisplayName);g.append(k);k=t.category}var s=UI.generateFeatureElement(t,k),D=GameManager.company.currentGame.features,D=(D=D&&-1!=D.indexOf(t)?0:Research.getDevCost(t,GameManager.company.currentGame))?"{0} ({1})".format(t.name,UI.getShortNumberString(D)):t.name;s.find(".featureContent").text(D);t.group&&(-1==l.indexOf(t.group)&&l.push(t.group),D="radioButton"+l.indexOf(t.group),
s.addClass(D));c.readOnly||function(a,b){a.clickExcl(function(){n(a,b)})}(s,t);g.append(s);-1!=GameManager.uiSettings.selectedGameFeatures.indexOf(t.id)?n(s,t):"graphic-type"!==t.group||m.some(function(a){return"graphic-type"===a.group})||n(s,t)}return f.length};UI._saveSelectedGameFeatureSettings=function(a){if(a){var b=GameManager.uiSettings.selectedGameFeatures.filter(function(b){return!a(b)});GameManager.uiSettings.selectedGameFeatures=b.concat(m.map(function(a){return a.id}).filter(function(b){return a(b)}))}else if(GameFlags.ghg6)throw"unexpected method call";
};var p=function(a){var b=null;a.hasClass("ratingY")?b="Young".localize("audience category"):a.hasClass("ratingE")?b="Everyone".localize("audience category"):a.hasClass("ratingM")&&(b="Mature".localize("audience category"));return b},q=function(a){switch(a){case "aaa":return 1E7;case "large":return 15E5;case "medium":return 15E4;default:return 0}},s=function(a){var b=null;a.hasClass("gameSizeSmall")?b="small":a.hasClass("gameSizeMedium")?b="medium":a.hasClass("gameSizeLarge")?b="large":a.hasClass("gameSizeAAA")&&
(b="aaa");return b},t=function(){var a=GameManager.company,c=a.currentGame,d=null;c.sequelTo&&(d=a.getGameById(c.sequelTo));a=a.gameLog.concat(a.trashedGames);c.engine&&(c.flags.isNewBetterEngine=!a.some(function(a){return a.engine&&a.engine.techLevel>=c.engine.techLevel}));a.some(function(a){return a.secondGenre===c.secondGenre&&a.genre===c.genre&&a.topic===c.topic})||(c.researchFactor=Research.FACTOR_FOR_NEW_COMBINATIONS,c.flags.isNewCombination=!0);a=!a.some(function(a){return a.topic.id===c.topic.id});
c.flags.isNewTopic=a;d&&(d.engine&&c.engine&&d.engine.id===c.engine.id?c.flags.usesSameEngineAsSequel=!0:c.engine&&(!d.engine||c.engine.techLevel>d.engine.techLevel)&&(c.flags.hasBetterEngineThanSequel=!0));c.flags.hasCustomName=c.title!=b;!0===GameManager.flags.createPack&&(c.flags.isExtensionPack=!0)};UI.closeGameDefinition=function(){Sound.click();var b=GameManager.company.currentGame,c=$(".simplemodal-data"),d=c.find("#gameTitle")[0].value;b.title=d;d=c.find(".rating.selected");b.targetAudience=
d.hasClass("ratingY")?"young":!d.hasClass("ratingE")&&d.hasClass("ratingM")?"mature":"everyone";d=s(c.find(".gameSizeButton.selected"));b.gameSize=d;if(d=f())if(b.topic=d,d=g()){b.genre=d;if(d=k())b.secondGenre=d;0!=b.platforms.length&&(d=l(),b.engine=d,b.costs=UI._updateGameDefinitionCost(),b.features=m,b.flags.techLevel=b.features.filter(function(a){return void 0!=a.techLevel}).average(function(a){return a.techLevel}),c.find(".gameGenreMMO").hasClass("selected")&&(b.flags.mmo=!0),t(),a=!0,UI.closeModal(function(){VisualsManager.gameStatusBar.updateGameName();
VisualsManager.gameStatusBar.updatePoints();VisualsManager.gameStatusBar.progressBar.alpha=0;GameManager.notifyIdleState()}))}}})();
(function(){UI.getDevStageSliderValues=function(a){return GameManager.uiSettings["stage{0}SliderValues".format(a)]};UI.selectedFeatures=[];var a=[],b=[],c=0,d=[],f=[];UI.showFeatureList=function(h,n){var p=GameManager.company.currentGame.isStaffResponsibilityEnabled();UI.selectedFeatures=[];a=[];b=[];d=[];f=[];for(var r=UI.getDevStageSliderValues(GameManager.getCurrentDevStage()),u=0;u<h.length;u++)UI.selectedFeatures.push(h[u]);PlatformShim.execUnsafeLocalFunction(function(){var c=$("#selectFeatureMenu");
c.empty();var d=$("#selectFeatureMenuTemplate").clone();d.find(".focusSliderStaffName").css("opacity",0);var f=GameManager.company.currentGame;d.find(".featureWindowTitle").text("Development Stage {0}".localize().format(GameManager.getCurrentDevStage()));d.find(".gameName").text(f.title);f.secondGenre?d.find(".topicGenre").text(f.topic.name+"/"+f.genre.name+"-"+f.secondGenre.name):d.find(".topicGenre").text(f.topic.name+"/"+f.genre.name);d.find(".featureDurationPreview").each(function(b,c){var d=
$(c);a.push(d)});d.find(".focusSliderWrapper").each(function(a,c){var d=$(c);p&&l(d.find(".focusSliderStaffName"),h[a]);b.push(d);d.value=r[a];d.find(".focusSlider").slider({orientation:"vertical",range:"min",min:0,max:100,value:r[a],animate:!1,slide:function(a,b){d.value=b.value;UI._updateFeatureFocusPreview()}});d.find(".focusSliderTitle")[0].innerText="{0} Lvl. {1}".localize("{0} feature name, {1} lvl number").format(h[a].name,LevelCalculator.getMissionLevel(h[a]));var n=d.find(".focusSliderHint"),
s="";if(GameManager.areHintsEnabled()){var z=Knowledge.getMissionWeightingHint(Missions.getMissionWithId(h[a].id),f);z&&(s=z.hint,z.exactMatch?n.removeClass("unsure"):(n.addClass("unsure"),s+=" ?"))}n.text(s);p&&d.droppable({hoverClass:"dragHover",tolerance:"pointer",drop:function(b,c){var d=$(this).find(".focusSliderStaffName"),f=d.text(),l,n=void 0;c.draggable.hasClass("focusSliderStaffName")?(l=c.draggable.text(),n=c.draggable):l=c.draggable.find(".staffName,").text();g(d,l)&&(k(h[a],l),n&&(g(n,
f),d=k,n=n.parent(".focusSliderWrapper"),n=n.hasClass("feature1")?0:n.hasClass("feature2")?1:n.hasClass("feature3")?2:void 0,d(h[n],f)),m())}})});c.append(d)});UI.showModalContent("#selectFeatureMenu",{close:!1,onOpen:function(){var a=$(".simplemodal-data"),b=$("#canvasScrollContainer").width(),d=$("#simplemodal-container");d.removeClass("smallScreenPopup");1024>=b&&(d.addClass("smallScreenPopup"),b=d.width(),d=d.height(),b=0.9*(0.5*window.innerWidth-0.5*b),d=0.9*(0.5*window.innerHeight-0.5*d),$("#simplemodal-container").css({zoom:"90%",
left:b,top:d}));c=a.find(".featureDurationPreviewWrapper").width();GameManager.company.currentGame.isStaffResponsibilityEnabled()?UI._updateStaffListForFeatures():GameManager.company.currentGame.flags.featureResponsibility={};var g=!1,k=function(){var b=UI.getShortNumberString(UI._getGameFeatureCosts());a.find(".featureSelectionPanel .cost").text("Cost: {0}".localize().format(b))},l=GameManager.company.currentGame.features.map(function(a){return a.id}),d=UI._updateFeatureListContainer({readOnly:!1,
categories:h.map(function(a){return a.id}),filter:function(a){return"graphic-type"!=a.group||-1!=l.indexOf(a.id)},onChange:function(){k();g&&UI._updateFeatureFocusPreview()}});k();g=!0;a.find(".featureSelectionCategoryHeading").each(function(a,b){var c=$(b);c.missionId=c.attr("mission-id");f.push(c)});0<d&&a.find(".featureSelectionPanel").delay(200).queue(function(){$(this).removeClass("featureSelectionPanelHiddenState").addClass("featureSelectionShowState");$(this).dequeue()});p&&(a.find(".featureStaffAsignPanel").delay(200).queue(function(){$(this).removeClass("hidden").addClass("showState");
$(this).dequeue()}),a.find(".focusSliderStaffName").draggable({helper:"clone",zIndex:7E3,appendTo:a,start:function(a,b){b.helper.addClass("staffItemBorder")}}));UI.maxFont(a.find("bolder",".featureWindowTitle"),34);UI.maxFont(a.find(void 0,".feature1").find(".focusSliderTitle"),16);UI.maxFont(a.find(void 0,".feature2").find(".focusSliderTitle"),16);UI.maxFont(a.find(void 0,".feature3").find(".focusSliderTitle"),16);UI.maxFont(a.find("bolder",".featureSelectionPanel").find(".windowTitle"),22);UI._updateFeatureFocusPreview()},
onClose:n.onClose,disableCheckForNotifications:!0})};var g=function(a,b){if(a.text()!=b)return a.transition({opacity:0},null,null,function(){a.text(b).transition({opacity:1},400)}),!0;a.effect("pulsate",{times:1});return!1},k=function(a,b){var c=GameManager.company,d=c.currentGame,c=c.staff.first(function(a){return a.name==b});d.flags.featureResponsibility[a.id]=c?c.id:null},l=function(a,b){var c=GameManager.company,d=c.currentGame.flags.featureResponsibility,f=!1;if(d.hasOwnProperty(b.id)){var g=
d[b.id];if(c=c.staff.first(function(a){return a.id===g}))a.text(c.name).css("opacity",1),f=!0}f||a.text("Drag staff here".localize()).css("opacity",1).delay(800).queue(function(){$(this).effect("pulsate",{times:1});$(this).dequeue()})};UI._updateStaffListForFeatures=function(){var a=GameManager.company,b=$(".simplemodal-data"),c=b.find(".staffListContainer");c.empty();for(var a=a.staff,f=0;f<a.length;f++){var g=a[f],h,k=g;h=$("#staffListItemTemplate").clone();h.removeAttr("id");h.find(".staffName").text(k.name);
if(k.flags.expert){var l="({0})".format(Missions.getMissionWithId(k.flags.expert).name),m=UI._getMaxFontSize("{0}pt {1}",UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans",11,7,75,50,[l]),n=h.find(".specialization");n.text(l);11>m&&n.css("font-size",m+"pt")}l=Math.floor(500*k.designFactor);h.find(".design").html("{0}<span>{1}</span>".format("Design: ".localize(),l));k=Math.floor(500*k.technologyFactor);h.find(".technology").html("{0}<span>{1}</span>".format("Tech.: ".localize(),k));m=UI._getMaxFontSize("bold {0}pt {1}",
UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans",11,7,75,50,["Design: ".localize(),"Tech.: ".localize()]);11>m&&h.css("font-size",m+"pt");h.draggable({helper:"clone",zIndex:7E3,appendTo:b});d.push({staffName:g.name,element:h,workLoadElement:h.find(".workload"),captionElement:h.find(".responsibility")});c.append(h)}};var h=[];GameManager.addTickListener(function(){if(0!=h.length){for(var a=0;a<h.length;a++){var b=h[a],c={};b.width&&(c.width=b.width);b.background&&(c.background=b.background);b.css(c);
b.textValue&&b.text(b.textValue)}h=[]}},!1);UI._updateFeatureFocusPreview=function(){for(var b=UI._getSelectedFeaturePercentages(),d=0;d<a.length;d++){var f=a[d];f.width&&(f.width=b[d]/100*c+"px");h.push(f)}GameManager.company.currentGame.isStaffResponsibilityEnabled()&&m(b);n(b)};var m=function(a,b){a||(a=UI._getSelectedFeaturePercentages());var c=GameManager.company,f=c.currentGame;if(f.isStaffResponsibilityEnabled()){for(var g={},k=0;k<c.staff.length;k++){var l=c.staff[k];l.flags.workload||(l.flags.workload=
0);for(var m=g[l.id]?workloads[l.id]:l.flags.workload,n=0;n<UI.selectedFeatures.length;n++){var p=f.flags.featureResponsibility[UI.selectedFeatures[n].id];void 0!==p&&p===l.id&&(m+=a[n])}g[l.id]=m;m*=100/(300/General.getOptimalTeamSize(f));n=d.first(function(a){return a.staffName==l.name});p=n.workLoadElement;p.width=m.clamp(0,100)+"%";var x=((m-100)/50).clamp(0,1);p.background=createjs.Graphics.getHSL(120-120*x,100,60,0.5);-1==h.indexOf(p)&&h.push(p);n.captionElement.textValue="{0}%".format(Math.round(m));
-1==h.indexOf(n.captionElement)&&h.push(n.captionElement)}if(b)for(k=0;k<c.staff.length;k++)l=c.staff[k],g.hasOwnProperty(l.id)&&(l.flags.workload=g[l.id])}},n=function(a){for(var b=UI._getSelectedFeatures(),c=0;c<UI.selectedFeatures.length;c++){var d=UI.selectedFeatures[c],g=UI.selectedFeatures[c].id,k=b.filter(function(a){return a.category===g}),l=General.getFeatureEfficiencyFromMissionFocus(GameManager.company.currentGame,k,a[c]),l=Math.round(l);if(k=f.first(function(a){return a.missionId===d.id}))l=
100===l?d.name:"{0} ({1}%)".format(d.name,Math.round(l)),k.textValue!=l&&(k.textValue=l,-1==h.indexOf(k)&&h.push(k))}};UI._getSelectedFeaturePercentages=function(){var a=UI._getSelectedSliderValues(),b=a.sum();return 0==b?[100/3,100/3,100/3]:a.map(function(a){return a/(b/70)+10})};UI._getSelectedSliderValues=function(){return b.map(function(a){return a.value})};var p=function(){var a=$(".simplemodal-data"),b=[],c=GameManager.company;a.find(".focusSliderStaffName").each(function(a,d){var f=$(d),g=
f.text();c.staff.first(function(a){return a.name==g})||b.push(f)});return 0<b.length?b:!1};UI.featuresSelectedClick=function(){Sound.click();var a=GameManager.company.currentGame,b=$(".simplemodal-data");if(a.isStaffResponsibilityEnabled()){var c=p();if(c){$(c).each(function(a,b){b.effect("pulsate",{times:3})});b.find(".okButton").parent().effect("shake",{times:2,distance:5},50);return}}for(var c=GameManager.getCurrentDevStage(),d=UI.getDevStageSliderValues(c),f=UI._getSelectedSliderValues(),g=0;g<
f.length;g++)d[g]=f[g];d=UI._getSelectedFeaturePercentages();for(g=0;g<d.length;g++)UI.selectedFeatures[g].percentage=d[g];g=UI._getGameFeatureCosts();0!=g&&GameManager.company.adjustCash(-g,"Dev. stage {0}".localize().format(c));var g=UI._getSelectedFeatures(),h=a.features.map(function(a){return a.id});a.features.addRange(g.filter(function(a){return-1==h.indexOf(a.id)}));3===c&&(GameManager.uiSettings.selectedGameFeatures=a.features.map(function(a){return a.id}));b.find(".featureSelectionPanel").removeClass("featureSelectionShowState").addClass("featureSelectionPanelHiddenState");
b.find(".featureStaffAsignPanel").removeClass("showState").addClass("hidden");b.delay(200).queue(function(){UI.closeModal(function(){m(null,!0);GameManager.executeFeatures(UI.selectedFeatures)});$(this).dequeue()})}})();
(function(){UI._showReleaseGame=function(a,b){for(var c=GameManager.company.staff.filter(function(a){return!0}),d=0;d<c.length;d++)c[d].state===CharacterState.Working&&(c[d].state=CharacterState.Idle,c[d].currentFeature=null),c[d].resetLeftOverPoints();VisualsManager.gameStatusBar.endDevelopment();GameManager.company.currentGame?UI.showReleaseGameDialog({disableCheckForNotifications:!0,onClose:function(){Research.checkForNewResearch();GameManager.company&&0<GameManager.company.activeNotifications.length&&
GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),1);GameManager.notifyIdleState();b&&b()}}):(GameManager.resume(!0),Research.checkForNewResearch(),GameManager.company&&0<GameManager.company.activeNotifications.length&&GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),1),GameManager.notifyIdleState(),b&&b())};UI.showReleaseGameDialog=function(a){var b=$("#releaseGameDialog"),c=GameManager.company.currentGame;
b.find(".releaseGameNameDisplay").text("{0}".localize("{0} game name").format(c.title));b.find(".releaseGameNameInput").attr("value","{0}".localize("{0} game name").format(c.title));b.find(".okButton").hide();b.find(".trashGameButton").unbind("click").click(UI.trashGameClick).hide();b.find(".releaseGameNameEditButton").unbind("click").click(UI.releaseGameNameEditButtonClick);b.find(".releaseGameNameEditOKButton").unbind("click").click(UI.releaseGameNameEditOKButtonClick);b.find(".pointsContainer").hide();
b.find(".pointsNewRecord").hide();b.find(".xpTitle").hide();b.find(".xpBonus").hide();UI.showModalContent("#releaseGameDialog",{onOpen:function(){UI._startReleaseGameDialogAnimations()},onClose:a.onClose,disableCheckForNotifications:a.disableCheckForNotifications})};UI.releaseGameNameEditButtonClick=function(){var a=$(".simplemodal-data");a.find(".gameNameDisplay").transit({opacity:0},500);var b=a.find(".gameNameEdit");b.show().css("opacity",0).transit({opacity:1},500);setTimeout(function(){b.focus()},
100)};UI.releaseGameNameEditOKButtonClick=function(){var a=$(".simplemodal-data"),b=a.find(".releaseGameNameInput")[0].value;b&&(a.find(".gameNameDisplay").transit({opacity:1},500),a.find(".gameNameEdit").transit({opacity:0},500,null,function(){a.find(".gameNameEdit").hide()}),a.find(".releaseGameNameDisplay").text(b),GameManager.company.currentGame.title!=b&&(GameManager.company.currentGame.flags.hasCustomName=!0),GameManager.company.currentGame.title=b)};var a=[],b=1;GameManager.addTickListener(function(c){if(a&&
0<a.length){c*=b;for(var d=0;d<a.length;d++){var k=a[d],l=k._target;l.klug_progress&&l.progressbar({value:l.klug_progress});l.css_width_percent&&l.css({width:l.css_width_percent+"%"});if(l.klug_int_text){var h=Math.floor(l.klug_int_text);l.text(h)}l.klug_number_int_text&&(h=Math.floor(l.klug_number_int_text),l.text(0==h?h:0<h?"+"+h:"-"+h));k.tick(c,!1)}}});var c=function(){b=5},d;UI._startReleaseGameDialogAnimations=function(){var f=GameManager.gameId,g=GameManager.company,k=$(".releaseGameFeatureTemplate"),
l=$(".simplemodal-data"),h=l.find(".featuresContainer");h.empty();a=[];b=1;var m=0,n=g.currentGame,p=n.featureLog.first().lastUpdate,q=new MersenneTwister(p),s=0<g.gameLog.length&&!g.gameLog.some(function(a){return a.technologyPoints>n.technologyPoints}),t=0<g.gameLog.length&&!g.gameLog.some(function(a){return a.designPoints>n.designPoints}),p=l.find(".technologyPoints"),r=l.find(".designPoints");p.klug_int_text=0;r.klug_int_text=0;a.push(createjs.Tween.get(p).wait(200).call(function(){$(window).on("click",
c)}));Sound.playSoundLoop("pointCount",1);var u=createjs.Tween.get(p).to({klug_int_text:n.technologyPoints},1800).call(function(){s&&f==GameManager.gameId&&(Sound.playSoundOnce("newRecord",0.7),l.find(".technologyPointsNewRecord").fadeIn().effect("pulsate",{times:3}),l.find(".pointDisplayContainer").transition({height:120}),l.find(".featuresContainer").transition({height:250}))});a.push(u);u=createjs.Tween.get(r).to({klug_int_text:n.designPoints},1800).call(function(){if(t){if(f!=GameManager.gameId)return;
Sound.playSoundOnce("newRecord",0.7);l.find(".designPointsNewRecord").fadeIn().effect("pulsate",{times:3});l.find(".pointDisplayContainer").transition({height:120});l.find(".featuresContainer").transition({height:250})}Sound.stopSound("pointCount")});a.push(u);m+=1800;r=[];n.flags.isNewTopic&&r.push({bonus:0.2,label:"New Topic".localize()});n.flags.isNewCombination&&r.push({bonus:0.3,label:"New Combo".localize()});n.isStaffResponsibilityEnabled()&&(g.staff.count(function(a){return n.getRatioWorked(a)&&
101<=General.getEffectiveWorkload(a,n)})||r.push({bonus:0.3,label:"Good Management".localize()}));var z=1+r.sum(function(a){return a.bonus}),w="",y=l.find(".xpBonusModifier").hide();if(1!=z){for(var B=1,u=createjs.Tween.get(y).wait(m),p=0;p<r.length;p++)(function(a,b){u=u.wait(1200*b).call(function(){f==GameManager.gameId&&(B+=a.bonus,0!=b&&(w+=", "),w+=a.label,y.text("(Bonus: x{0} - {1})".localize("{0} bonusMultiplier, {1} label").format(Math.roundToDecimals(B,2),w)),y.effect("pulsate",{times:2}))})})(r[p],
p),m+=1200;a.push(u)}p=General.getGameSizeDurationFactor(n.gameSize);1<p&&(p*=0.7);for(var z=z*p,v=[],x=n.features,p=0;p<n.featureLog.length;p++){var E=n.featureLog[p];if("mission"==E.missionType){var A=General.getMission(E.id),H=A.percentage?A.percentage/100:1,r=(150+45*q.random())*z,r=0.3*r+0.7*r*H,r=0.75*r,r={originalItem:A,name:A.name,level:LevelCalculator.getLevel(A.experience),progress:LevelCalculator.getProgressToNextLevel(A.experience),xpGain:r,progressColor:"orange",progressGainColor:"#FFC456"};
r.newLevel=LevelCalculator.getLevel(A.experience+r.xpGain);r.progressGain=LevelCalculator.getProgressToLevel(r.level+1,A.experience+r.xpGain)-r.progress;v.push(r);for(var F=x.filter(function(a){return a.showXPGain&&a.category===E.id}),C=0;C<F.length;C++)A=General.getFeature(F[C].id),r=(270+81*q.random())*z,r=0.3*r+0.7*r*H,r*=0.75,r={originalItem:A,name:A.name,level:LevelCalculator.getLevel(A.experience),progress:LevelCalculator.getProgressToNextLevel(A.experience),xpGain:r,progressColor:"#00BFFF",
progressGainColor:"#8CE2FF"},r.newLevel=LevelCalculator.getLevel(A.experience+r.xpGain),r.progressGain=LevelCalculator.getProgressToLevel(r.level+1,A.experience+r.xpGain)-r.progress,v.push(r)}}for(var G=[],D=[],p=0;p<g.staff.length;p++)r=g.staff[p],n.getRatioWorked(r)&&function(a){var b=a.experience,c=LevelCalculator.getLevel(b),d=(80+32*q.random())*z,f=n.getRatioWorked(a),d=d*f.clamp(0,1),d=0.75*d,f=General.getEffectiveWorkload(a,n);void 0!=f&&(isNaN(f)?d*=0.1:(f=0.5*(1-1*(Math.abs(f-100)/100)).clamp(0,
1),d+=d*f));f={originalItem:a,name:a.name,level:c,progress:LevelCalculator.getProgressToNextLevel(b),xpGain:d,newLevel:LevelCalculator.getLevel(b+d),progressColor:"firebrick",progressGainColor:"red",apply:function(){a.experience+=d;var b=LevelCalculator.getLevel(a.experience);if(b!=c){a.qualityFactor=b/5;if(0!==a.id){var f=(b-c)*Character.BASE_SALARY_PER_LEVEL,f=f+0.4*f*g.getRandom(),f=1E3*Math.floor(f/1E3);a.salary+=f;G.push({staff:a,value:f})}5==b&&(Tutorial.staffReachedLvl5(),-1==D.indexOf(a)&&
D.push(a))}}};f.progressGain=LevelCalculator.getProgressToLevel(f.level+1,b+f.xpGain)-f.progress;v.push(f)}(r);x=14;r="{0}pt {1}";A=UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans";1<v.count(function(a){return a.level<a.newLevel})&&(r="bold {0}pt {1}",x=UI._getMaxFontSize(r,A,x,8,130,20,["Level Up!".localize()]));H=[];F=[];for(p=0;p<v.length;p++){H.push(v[p].name);var I="Lvl. ".localize()+v[p].level;0==F.count(function(a){return a==I})&&F.push(I)}x=UI._getMaxFontSize(r,A,x,8,195,20,H);x=UI._getMaxFontSize(r,
A,x,8,53,20,F);14==x&&(x=void 0);for(p=0;p<v.length;p++)A=k.clone(),void 0!=x&&A.css("font-size",x+"pt"),r=v[p],function(b,c){b.find(".featureName").text(c.name);b.find(".featureLevel").text("Lvl. ".localize()+c.level);var d=b.find(".featureLevelUp");d.hide();b.find(".featureProgress").css({width:c.progress-1+"%"}).css({"background-color":c.progressColor});var g=b.find(".featureProgressGain").css({"background-color":c.progressGainColor});g.css_width_percent=0;var k=b.find(".featureGainCaption");k.klug_number_int_text=
0;b.hide();u=createjs.Tween.get(b).wait(m).call(function(){f==GameManager.gameId&&(h.append(b),Sound.playSoundOnce("tack",0.2),b.slideDown("normal"),h.stop().animate({scrollTop:b.offset().top},600))});a.push(u);u=createjs.Tween.get(g).wait(m).to({css_width_percent:c.progressGain},800);a.push(u);u=createjs.Tween.get(k).wait(m).to({klug_number_int_text:c.xpGain},800);a.push(u);c.newLevel!=c.level&&(u=createjs.Tween.get(d).wait(m+800).call(function(){f==GameManager.gameId&&(d.show("slow"),Sound.playSoundOnce("levelUp",
0.4),b.find(".featureLevel").text("Lvl. ".localize()+c.newLevel),b.css("font-weight","bold"))}),a.push(u));m+=1200}(A,r);d=function(){for(var a=0;a<v.length;a++){var b=v[a];b.apply?b.apply():v[a].originalItem.experience+=v[a].xpGain}};k=createjs.Tween.get(h).wait(m).call(function(){l.find(".okButton").slideDown("fast").click(function(){d&&(d(),d=null);if(0<G.length){for(var a="Due to increase in experience the following staff have earned a raise:".localize()+"\n",b=0;b<G.length;b++)var c=G[b],f=c.staff,
a=a+"{0}{1}: {2} + {3} = {4}".format(4==b?"{n}":"\n",f.name,UI.getShortNumberString(f.salary-c.value),UI.getShortNumberString(c.value),UI.getShortNumberString(f.salary));g.notifications.push(new Notification("Salary increase".localize("heading"),a))}if(0<D.length){a="Special training available for:".localize()+"\n";for(b=0;b<D.length;b++)c=D[b],a+="{0}{1}".format(4==b?"{n}":"\n",c.name);g.notifications.push(new Notification("Special training".localize("heading"),a))}UI.closeModal();General.releaseGame(GameManager.company);
GameManager.autoSave()});l.find(".trashGameButton").fadeIn();$(window).off("click",c);a=[];b=1});a.push(k)};UI.trashGameClick=function(){var a=$("#trashGameConfirmationDialog");a.find(".cancelActionButton").clickExclOnce(function(){Sound.click();a.dialog("close")});a.find(".confirmActionButton").clickExclOnce(function(){Sound.click();d&&(d(),d=null);a.dialog("close");UI.closeModal(function(){General.trashGame(GameManager.company)})});a.gdDialog({popout:!0,close:!0})}})();
(function(){var a="Company Name".localize(),b=void 0,c=void 0,d=void 0,f=void 0,g=void 0;UI.showNewGameView=function(k,h){PlatformShim.execUnsafeLocalFunction(function(){$.modal.impl.o&&($.modal.impl.o.onClose=null);$.modal.close()});void 0==b&&(b=!0,d=c=1,g=f=9);var m=$("#newGameViewContent");m.empty();var n=$("#newGameViewTemplate").clone();n.find("#companyName").attr("value",a);var p=PlatformShim.getUserName();p||(p="Player Name".localize());n.find("#playerName").attr("value",p);b?n.find("#maleRadio").attr("checked",
"checked"):n.find("#femaleRadio").attr("checked","checked");m.append(n);UI.closeAllLoadSaveViews();var m=$("#newGameView"),q=m.find(".featureSelectionPanel");m.find(".configButton").clickExcl(function(){q.hasClass("featureSelectionPanelHiddenState")?q.removeClass("featureSelectionPanelHiddenState").addClass("featureSelectionShowState"):q.removeClass("featureSelectionShowState").addClass("featureSelectionPanelHiddenState")});UI.showModalContent("#newGameView",{disableCheckForNotifications:!0,onClose:function(){GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(k),
1);h&&h()},onOpen:function(){UI._updatePreview();var a=$("#canvasScrollContainer").width(),b=$("#simplemodal-container");b.removeClass("smallScreenPopup");1024>=a&&b.addClass("smallScreenPopup")}})};UI._updatePreview=function(){var a=$(".simplemodal-data").find(".characterPreviewCanvas")[0];a.height=254;a.width=360;a=a.getContext("2d");a.drawImage(GameDev.ResourceManager.resources[ResourceKeys.PreviewDesk],0,0,360,254);a.drawImage(UI._getChair(),122,22,200,200);a.drawImage(UI._getPants(),122,22,200,
200);a.drawImage(UI._getHands(),122,22,200,200);a.drawImage(UI._getBody(),122,22,200,200);a.drawImage(UI._getHead(),122,22,200,200)};UI._getChair=function(){return GameDev.ResourceManager.resources[ResourceKeys.PreviewChair]};UI._getPants=function(){return b?GameDev.ResourceManager.resources[ResourceKeys.PreviewPants1]:GameDev.ResourceManager.resources[ResourceKeys.PreviewPants9]};UI._getHands=function(){return b?4===d||7===d?GameDev.ResourceManager.resources[ResourceKeys.PreviewHands4]:5===d||8===
d?GameDev.ResourceManager.resources[ResourceKeys.PreviewHands5]:GameDev.ResourceManager.resources[ResourceKeys.PreviewHands1]:12===g?GameDev.ResourceManager.resources[ResourceKeys.PreviewHands12]:10===g?GameDev.ResourceManager.resources[ResourceKeys.PreviewHands10]:GameDev.ResourceManager.resources[ResourceKeys.PreviewHands9]};UI._getBody=function(){return b?GameDev.ResourceManager.resources[ResourceKeys["PreviewBody"+c]]:GameDev.ResourceManager.resources[ResourceKeys["PreviewBody"+f]]};UI._getHead=
function(){return b?GameDev.ResourceManager.resources[ResourceKeys["PreviewHead"+d]]:GameDev.ResourceManager.resources[ResourceKeys["PreviewHead"+g]]};UI.selectSexClicked=function(a){(b="male"===a)?($(".femaleSex").removeClass("selected"),$(".maleSex").removeClass("selected").addClass("selected")):($(".maleSex").removeClass("selected"),$(".femaleSex").removeClass("selected").addClass("selected"));UI._updatePreview()};UI.nextBody=function(){b?(c+=1,9===c&&(c=1)):(f+=1,13===f&&(f=9));UI._updatePreview()};
UI.prevBody=function(){b?(c-=1,0===c&&(c=8)):(f-=1,8===f&&(f=12));UI._updatePreview()};UI.nextHead=function(){b?(d+=1,9===d&&(d=1)):(g+=1,13===g&&(g=9));UI._updatePreview()};UI.prevHead=function(){b?(d-=1,0===d&&(d=8)):(g-=1,8===g&&(g=12));UI._updatePreview()};UI.closeNewGameView=function(){if(!Knowledge.isPlayerKnowledgeAvailable()||GameManager.useKnowledgeAnswered){Sound.click();GameManager.state=State.Idle;$("#mainBackground").fadeIn();$("foregroundCanvas").fadeIn();var k=$(".simplemodal-data"),
h=GameManager.company;h.name=k.find("#companyName")[0].value;h.flags.hasCustomName=h.name!=a;h.staff[0].name=k.find("#playerName")[0].value;h.staff[0].sex=b?"male":"female";h.staff[0].flags.body=b?c:f;h.staff[0].flags.head=b?d:g;GameManager.flags.gameLengthModifier=parseFloat(k.find("#gameLengthSelection").val());GameManager.openSaveView();VisualsManager.resetAllCharacters();for(k=0;k<h.staff.length;k++)h.staff[k].startAnimations();UI.closeModal()}else UI.showUseKnowledgeFromPrevGameDialog()};UI.showUseKnowledgeFromPrevGameDialog=
function(){var a="Since you have played the game before you can choose to use all previously gained hints in this new game.".localize(),a=a+("<br/><br/>"+"Would you like to import all previously gained hints into this game?".localize());$("#useKnowledgeFromPreviousGameDialog").find(".useKnowledgeFromPreviousGameMessage").html(PlatformShim.toStaticHtml(a));$("#useKnowledgeFromPreviousGameDialog").dialog({draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:5E3,open:function(){$(this).siblings(".ui-dialog-titlebar").remove();
$(this).find(".cancelActionButton").clickExclOnce(function(){Sound.click();$("#useKnowledgeFromPreviousGameDialog").dialog("close");GameManager.useKnowledgeAnswered=!0;UI.closeNewGameView()});$(this).find(".confirmActionButton").clickExclOnce(function(){Sound.click();$("#useKnowledgeFromPreviousGameDialog").dialog("close");Knowledge.usePlayerKnowledge(GameManager.company);GameManager.useKnowledgeAnswered=!0;UI.closeNewGameView()});UI.maxFont("bolder",$(this).find(".windowTitle"),34)}})};UI._getElementForSaveGame=
function(a,b){var c=$("#loadSaveButtonTemplate").clone();if(void 0!=a.currentWeek)var d=b.getDate(a.currentWeek),f=$.timeago(a.saveTime);c.find(".saveTime").text(f);"auto"==a.slot?c.find(".slot").text("Auto".localize()):c.find(".slot").text("Slot ".localize()+a.slot);c.find(".name").text(a.companyName);f=c.find(".cash").text(UI.getShortNumberString(a.cash));0>a.cash?f.addClass("red"):f.addClass("green");void 0!=a.fans&&c.find(".fans").text(UI.getShortNumberString(a.fans)+" fans".localize());void 0!=
d&&c.find(".week").text("Y{0} M{1} W{2}".localize("date display").format(d.year,d.month,d.week));if(!PlatformShim.ISWIN8)if(a.mods&&0<a.mods.length){var g=ModSupport.currentMods,k=a.mods.length,t=c.find(".mods");t.find(".listTitle").html("Mods: ".localize());a.mods.forEach(function(a,b){if("gdt-modAPI"!=a.id){var c=$("<span>").clone(),d="{0} - {1}({2}) {3}".format(a.name,a.author,a.id,"Version: ".localize()+a.version),f=g.first(function(b){return b===a.id})?"green":"red";c.addClass(f);c.append(a.name);
c.attr("title",d);t.append(c);k==b+1?t.append("."):t.append(", ")}})}else c.find(".mods").hide();return c};UI.closeAllLoadSaveViews=function(){$("#loadView").dialog("close");$("#saveView").dialog("close");$("#newGameView").dialog("close");$("#overwriteGameDialog").dialog("close")};UI.showLoadView=function(a){var b=$("#loadViewContent");b.empty();for(var c=new Company("x"),d=0;d<a.length;d++){var f=a[d],g=UI._getElementForSaveGame(f,c);b.append(g);g=g.get(0);g.saveGame=f;g.onclick=function(){Sound.click();
GameManager.reload(this.saveGame.slot)}}UI.closeAllLoadSaveViews();GameManager.pause(!0);GameManager.loadScreenOpened=!0;$("#loadView").dialog({width:630,draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:6800,open:function(){var a=$(UI.closeButtonTemplate);a.zIndex=6900;a.clickExclOnce(function(){Sound.click();$("#loadView").dialog("close");GameManager.resume(!0)});$(this).find(".windowTitle").css({margin:"5px 50px 5px 65px"});$(this).parents(".ui-dialog:first").append(a);$(this).siblings(".ui-dialog-titlebar").remove();
$(this).parents(".ui-dialog:first").addClass("tallWindow");$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content")},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;";GameManager.resume(!0)}})};var k=0;UI.showSaveView=function(a){var b=$("#saveViewContent");b.empty();$("#loadSaveButtonTemplate").get(0);for(var c=new Company("x"),d=1;5>=d;d++){for(var f=null,g=0;g<a.length;g++)if(a[g].slot==d){f=a[g];
break}g=null;if(f)g=UI._getElementForSaveGame(f,c);else{GameManager.company.slot=d;GameManager.save(GameManager.company.slot);GameManager.save(GameManager.company.slot+"L1");return}b.append(g);g=g.get(0);g.saveGame=f;g.onclick=function(){Sound.click();k=this.saveGame.slot;UI.showOverwriteView()}}UI.closeAllLoadSaveViews();$("#saveView").dialog({width:630,draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:6E3,open:function(){var a=$(this).find(".windowTitle");UI.maxFont("bolder",a,35);a=$(UI.closeButtonTemplate);
a.zIndex=6200;a.clickExclOnce(function(){Sound.click();$("#saveView").dialog("close")});$(this).parents(".ui-dialog").append(a);$(this).siblings(".ui-dialog-titlebar").remove();$(this).parents(".ui-dialog:first").addClass("tallWindow");$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content")},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;";GameManager.company.slot?GameManager.resume(!0):GameManager.startNewGame()}})};
UI.showOverwriteView=function(){$("#overwriteGameDialog").dialog({draggable:!1,modal:!0,resizable:!1,show:"fade",zIndex:7E3,title:"Attention",open:function(){$(this).siblings(".ui-dialog-titlebar").remove();$(this).find(".cancelActionButton").clickExclOnce(function(){Sound.click();$("#overwriteGameDialog").dialog("close")});$(this).find(".confirmActionButton").clickExclOnce(function(){Sound.click();GameManager.company.slot=k;$("#overwriteGameDialog").dialog("close");$("#saveView").dialog("close");
$("#splashProgress").fadeOut();GameManager.save(GameManager.company.slot);GameManager.save(GameManager.company.slot+"L1");GameManager.resume(!0)})},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;"}})}})();
(function(){var a=[];UI.addSalesCard=function(f,l,h,m,n,p,q,s,t,r,u,z){h<m&&0<h&&0===q.length&&q.push(h);1===q.length?(f=b(f,l,p,n),l=d(t!=Sales.consoleUnitPrice),f.stage.addChild(l),l.y=51,l.width=223,f.shapes=[l],a.push(f),h=1-(GameManager.company.currentWeek-Math.floor(GameManager.company.currentWeek)),g.push(createjs.Tween.get(l).to({y:0,height:51},7500*h)),h=n,s?(h=z?n+s/z/t:n+s/t,g.push(createjs.Tween.get(f).wait(500).to({unitsSold:h},7500))):g.push(createjs.Tween.get(f).wait(500).to({unitsSold:n},
7500)),r&&(l=d("maintenance"),f.stage.addChild(l),l.y=51,l.width=223,f.maintenanceShapes=[l],g.push(createjs.Tween.get(l).to({y:51-r/t/h*51,height:r/t/h*51},7500)))):1<q.length&&c(f,l,p,n,q,t,u,z)};var b=function(a,b,c,d){var g=$("#gameSalesContainer"),p=$("#gameSalesCardTemplate").clone();p.removeAttr("id");p.rankElement=p.find(".gameSalesRankLabel");p.unitsElement=p.find(".gameSalesUnitsLabel");p.find(".gameNameLabel").text(b);f(p,c,d,{currentRankText:"",currentUnitsText:""});g.append(p);b=p.find(".gameSalesCardCanvas");
b=new createjs.Stage(b[0]);b.canvas.height=51;b.canvas.width=223;p.on("click",function(b){UI.salesContainerClick(b,a)});return{id:a,stage:b,card:p,currentSalesRank:c,unitsSold:d}},c=function(c,f,g,m,n,p,q,s){c=b(c,f,g,m);40<=n.length&&(stageObject.stage.removeChild(stageObject.shapes[0]),stageObject.shapes.remove(stageObject.shapes[0]),n.splice(0,1),q&&(stageObject.stage.removeChild(stageObject.maintenanceShapes[0]),stageObject.maintenanceShapes.remove(stageObject.maintenanceShapes[0]),q.splice(0,
1)));f=n.max(function(a){return a});g=n.length;m=[];c.maintenanceShapes=[];if(q)for(s=0;s<g;s++){var t=p!=Sales.consoleUnitPrice,t=d(t);t.scaleX=1/g-0.01;t.x=223/g*s;var r=n[s]/f*51;t.y=51-r;t.scaleY=r/51;m.push(t);var u=d("maintenance");u.scaleX=1/g-0.01;u.x=223/g*s;r=q[s]/p/f*51;u.y=51-r;u.scaleY=r/51;c.maintenanceShapes.push(u);n[s]>q[s]?(c.stage.addChild(t),c.stage.addChild(u)):(c.stage.addChild(u),c.stage.addChild(t))}else for(s=0;s<g;s++)t=p!=Sales.consoleUnitPrice,t=d(t),c.stage.addChild(t),
t.scaleX=1/g-0.01,t.x=223/g*s,r=n[s]/f*51,t.y=51-r,t.scaleY=r/51,m.push(t);c.stage.update();c.shapes=m;a.push(c)},d=function(a){var b=new createjs.Shape;b.alpha=1;b.x=0;var c=b.graphics;"maintenance"===a?c.beginFill(createjs.Graphics.getRGB(255,0,0,1)):a?c.beginFill(createjs.Graphics.getRGB(86,216,86,1)):c.beginFill(createjs.Graphics.getRGB(0,191,255,1));c.drawRect(0,0,223,51);c.closePath();return b},f=function(a,b,c,d){var f="",g="";0<b&&(f="Rank: ".localize()+b);g="Units: ".localize()+UI.getShortNumberString(Math.floor(c));
d.currentRankText!=f&&(a.rankElement.text(f),d.currentRankText=f);d.currentUnitsText!=g&&(a.unitsElement.text(g),d.currentUnitsText=g)};UI.updateSalesCard=function(b,c,f,m,n,p,q,s,t){void 0===f&&(f=0);if(q=a.first(function(a){return a.id===b})){q.currentSalesRank=p;p=q.stage;40<=m.length&&(q.stage.removeChild(q.shapes[0]),q.shapes.remove(q.shapes[0]),m.splice(0,1),s&&(q.stage.removeChild(q.maintenanceShapes[0]),q.maintenanceShapes.remove(q.maintenanceShapes[0]),s.splice(0,1)));for(var r=m.max(function(a){return a}),
u=m.length,z=223/u,w=n!=Sales.consoleUnitPrice,y=q.shapes.length,B=0;B<y;B++){var v=m[B]/r*51,x=1/u-0.01;g.push(createjs.Tween.get(q.shapes[B]).to({scaleX:x,x:223/u*B,y:51-v,scaleY:v/51},500))}w=d(w);w.y=51;w.x=223-z;w.scaleX=1/u-0.01;q.shapes.push(w);v=51*(m.last()/r);g.push(createjs.Tween.get(w).wait(500).to({y:51-v,scaleY:v/51},7500));t||(t=1);g.push(createjs.Tween.get(q).wait(500).to({unitsSold:c+f/t/n},7500));if(s){for(B=0;B<q.maintenanceShapes.length;B++)v=s[B]/r*51,x=1/u-0.01,g.push(createjs.Tween.get(q.maintenanceShapes[B]).to({scaleX:x,
x:223/u*B,y:51-v,scaleY:v/51},500));c=d("maintenance");c.y=51;c.x=223-z;c.scaleX=1/u-0.01;m.last()>s.last()?(p.addChild(w),p.addChild(c)):(p.addChild(c),p.addChild(w));q.maintenanceShapes.push(c);v=51*(s.last()/r);g.push(createjs.Tween.get(c).wait(500).to({y:51-v,scaleY:v/51},7500))}else p.addChild(w)}};UI.clearSalesCards=function(){a.forEach(function(a){UI.removeSalesCard(a.id,!1)});$("#gameSalesContainer").empty();a=[]};UI.removeSalesCard=function(b,c){var d=a.first(function(a){return a.id===b});
d&&(d.card.off("click"),d.card.slideUp("slow",function(){$(this).remove()}),a.remove(d))};var g=[];GameManager.addTickListener(function(b,c){if(g&&0<g.length&&!c){for(var d=0;d<g.length;d++)g[d].tick(b,!1);for(d=0;d<a.length;d++)a[d].stage.update(),f(a[d].card,a[d].currentSalesRank,a[d].unitsSold,a[d])}},!0)})();
(function(){UI.showMarketingList=function(a,b){var c=Missions.MarketingMissions;$(".selectionOverlayContainer").hide();var d=$("#marketingPicker"),f={disableCheckForNotifications:!0,close:!0,onClose:function(){GameManager.company.activeNotifications.remove(a);GameManager.resume(!0);b&&b()}},g=d.find(".marketingPickerText"),k=GameManager.company.currentGame?GameManager.company.currentGame.title:"";g.text("How do you want to market {0}?".localize().format(k));g=d.find(".marketingSliderContainer");g.empty();
var l=$('<div class="marketingVariationContainer royalSlider rsDefaultInv"></div>');g.append(l);g=$("#genericMarketingTemplate");for(k=0;k<c.length;k++){var h=c[k],m=g.clone();m.find(".marketingTitle").text(h.name);m.find(".marketingShortTitle").text(h.shortName);m.find(".marketingDescription").text(h.description);m.find(".marketingCashCost").text("Costs: {0}".localize().format(UI.getShortNumberString(h.cost)));l.append(m)}PlatformShim.ISWIN8?l.gdSlider():f.onOpen=function(){l.gdSlider()};d.find(".okButton").clickExcl(function(){Sound.click();
var a=d.find(".rsActiveSlide").find(".marketingTitle").text(),b=Missions.MarketingMissions.first(function(b){return b.name==a});GameManager.company.cash>=b.cost?(Missions.executePublishingMission(GameManager.company,b),UI.closeModal()):d.find(".centeredButtonWrapper").effect("shake",{times:2,distance:5},50)});UI.showModalContent("#marketingPicker",f)}})();
(function(){UI.showCreateEngineMenu=function(a,b){UI.selectedEngineParts=[];var d=$("#createEngineMenu");d.find(".selectionOverlayContainer").hide();f();$(".engineTitleInput")[0].value="Game Engine #{0}".localize("{0} is number").format(GameManager.company.engines.length+1);UI.showModalContent("#createEngineMenu",{disableCheckForNotifications:!0,close:!0,onOpen:function(){c();UI.maxFont("bolder",d.find(".windowTitle"),34)},onClose:function(){GameManager.company&&0<GameManager.company.activeNotifications.length&&
GameManager.company.activeNotifications.splice(GameManager.company.activeNotifications.indexOf(a),1);GameManager.resume(!0);b&&b()}})};var a=function(){GameManager.uiSettings.selectedEngineParts=d.map(function(a){return a.id})},b=function(a){var b=$(".simplemodal-data").find("#createEngineButton");a?b.hasClass("orangeButton")||(b.removeClass("disabledButton").addClass("orangeButton"),b.clickExcl(function(){UI.createEngineClick()})):b.hasClass("disabledButton")||b.removeClass("orangeButton").addClass("disabledButton").unbind("click")},
c=function(){var a=d.sum(function(a){return Research.getEngineCost(a)}),c=$(".simplemodal-data").find(".engineCost");c.text("Cost: {0}".localize().format(UI.getShortNumberString(a)));a>GameManager.company.cash?(c.addClass("red"),b(!1)):(c.removeClass("red"),b(0<d.length))},d=[],f=function(){var a=$(".enginePartsContainer"),b=General.getAvailableEngineParts(GameManager.company).groupBy(function(a){return a.category});a.empty();var f=null;d=[];for(var h=function(a,b){a.hasClass("selectedFeature")?(a.removeClass("selectedFeature"),
d.remove(b)):($(".simplemodal-data").find(".enginePartsContainer"),a.addClass("selectedFeature"),d.push(b))},m=0;m<b.length;m++){var n=b[m];n.category!=f&&(a.append($('<div class="featureSelectionCategoryHeading">{0}</div>'.format(n.categoryDisplayName))),f=n.category);var p=UI.generateFeatureElement(n);p.find(".featureContent").text("{0} ({1})".format(n.name,UI.getShortNumberString(Research.getEngineCost(n))));p.addClass("radioButton");(function(a,b){a.clickExcl(function(){h(a,b);c()})})(p,n);GameManager.uiSettings.selectedEngineParts&&
-1!=GameManager.uiSettings.selectedEngineParts.indexOf(n.id)&&h(p,n);a.append(p)}};UI.createEngineClick=function(){UI.selectedEngineParts=d;a();if(0!==UI.selectedEngineParts.length){var b=UI.selectedEngineParts.sum(function(a){return Research.getEngineCost(a)});if(!(GameManager.company.cash<b)){var c=$(".simplemodal-data").find(".engineTitleInput")[0].value;UI.closeModal(function(){GameManager.createEngine(c,UI.selectedEngineParts)})}}}})();
(function(){UI.showResearchMenu=function(a,c){b(a,!1,c)};UI.showTrainingMenu=function(a,c){b(a,!0,c)};var a=!0,b=function(b,d,f){a=d;var k=GameManager.company.staff.first(function(a){return a.id===GameManager.uiSettings.selectedChar});PlatformShim.execUnsafeLocalFunction(function(){$(".selectionOverlayContainer").hide();g(k,a);var b=$("#researchMenu");b.find(".windowTitle").text(a?"Training Options".localize("heading"):"What do you want to research?".localize());var d=b.find(".staffInfoPanel");a&&
d.empty().append(c(k));var h=a?"Start Training".localize("button"):"Start Research".localize("button");UI.showModalContent("#researchMenu",{close:!0,disableCheckForNotifications:!0,onClose:function(){GameManager.company.activeNotifications.splice(0,1);f&&f()},onOpen:function(){a?d.delay(200).queue(function(){$(this).removeClass("hidden").addClass("showState");$(this).dequeue()}):d.removeClass("showState").addClass("hidden");UI.maxFont("bold",$(".simplemodal-data").find(".okButton"),22,h);UI.maxFont(void 0,
$(".simplemodal-data").find(".trainingD .leftColumn"),22,void 0,!0);UI.maxFont(void 0,$(".simplemodal-data").find(".trainingS .leftColumn"),22,void 0,!0);UI.maxFont(void 0,$(".simplemodal-data").find(".trainingT .leftColumn"),22,void 0,!0);UI.maxFont(void 0,$(".simplemodal-data").find(".trainingR .leftColumn"),22,void 0,!0)}})})},c=function(a){var b=$("#trainingStaffInfo").clone(),c=b.find(".name"),d=15,f=UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans";do{var g="{0} {1}pt {2}".format("bold",d,f),
g=new createjs.Text(a.name,g,"black");d--}while(195<g.getMeasuredWidth()&&10<d);c.css({font:"{0} {1}pt {2}".format("bold",d,f)}).text(a.name);a.flags.expert&&b.find(".expert").text("({0})".format(Missions.getMissionWithId(a.flags.expert).name));b.find(".lvl").text(a.getLevel());b.find(".design").text(a.getDesignSkillPoints());b.find(".technology").text(a.getTechnologySkillPoints());b.find(".speed").text(a.getSpeedSkillPoints());b.find(".research").text(a.getResearchSkillPoints());return b},d=function(){var a=
$(".simplemodal-data").find("#startResearchButton");f&&!a.hasClass("orangeButton")&&(a.removeClass("disabledButton").addClass("orangeButton"),a.clickExcl(function(){k()}))},f,g=function(a,b){var c=$("#researchButtonContainer"),g;g=b?Training.getAvailableTraining(a):GameManager.company.availableResearch.filter(function(a){return"New Topic"===a.id||0===GameManager.currentResearches.filter(function(b){return b.id===a.id}).length}).groupBy(function(a){return a.category});c.empty();var k=null;$("#selectableGameFeatureItem");
f=null;for(var q=function(a,b){a.hasClass("selectedFeature")?(a.removeClass("selectedFeature"),f=null):($(".simplemodal-data").find(".selectedFeature").removeClass("selectedFeature"),a.addClass("selectedFeature"),f=b);d()},s=0;s<g.length;s++){var t=g[s],r=Research.getPointsCost(t);t.category!=k&&(c.append($('<div class="featureSelectionCategoryHeading">{0}</div>'.format(t.categoryDisplayName?t.categoryDisplayName:t.category))),k=t.category);var u=UI.generateFeatureElement(t);u.find(".levelLabel").hide();
t.style&&u.addClass(t.style);t.isTraining&&t.canUse&&!t.canUse(a,GameManager.company)&&u.addClass("disabled");var r=t.name+" ({0} ".format(UI.getShortNumberString(r))+"RP".localize("RP short for research points"),z=Research.getResearchCost(t);z&&(r+=", {0} ".format(UI.getShortNumberString(z))+"cr.".localize("cr. short for credits"));r+=")";u.find(".featureContent").text(r);u.addClass("radioButton");(function(b,c){var d=Research.getPointsCost(c);b.clickExcl(function(){if(!(d>GameManager.company.researchPoints||
c.isTraining&&c.canUse&&!c.canUse(a,GameManager.company)))if(q(b,c),c==Research.ResearchTopicItem)UI.pickTopicClick("research"),b.hasClass("selectedFeature")||q(b,c);else{var f=Research.ResearchTopicItem.name+" ({0} ".format(UI.getShortNumberString(Research.getPointsCost(Research.ResearchTopicItem)))+"RP".localize("RP short for research points"),g=Research.getResearchCost(Research.ResearchTopicItem);g&&(f+=", {0} ".format(UI.getShortNumberString(g))+"cr.".localize("cr. short for credits"));f+=")";
$(".simplemodal-data").find(".pickTopicButton").text(f)}})})(u,t);t==Research.ResearchTopicItem&&u.addClass("pickTopicButton");c.append(u)}},k=function(){Sound.click();if(f){var b=$(".simplemodal-data");if(f===Research.ResearchTopicItem){var c=b.find(".pickTopicButton").get(0).innerText,b=Topics.topics.first(function(a){return a.name==c});if(!b)return;GameManager.researchTopic(b)}else GameManager.research(f,a?"training":"research");UI.closeModal()}}})();
(function(){UI._gameDetailsColumn1FontSize=void 0;UI._getElementForGameDetail=function(a,b){var c=GameManager.company.getDate(a.releaseWeek),d=$("#gameDetailsTemplate").clone();d.removeAttr("id");d.find(".gameDetailsTitle").text(a.title);if(void 0==UI._gameDetailsColumn1FontSize){for(var f=d.find(".gameDetailsColumn1"),g=[],k=0;k<f.length;k++)f[k].innerText&&g.push(f[k].innerText);f=UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans";UI._gameDetailsColumn1FontSize=15;for(var l="bolder {0}pt {1}".format(UI._gameDetailsColumn1FontSize,
f),k=0;k<g.length&&10!=UI._gameDetailsColumn1FontSize;k++)180<(new createjs.Text(g[k],l,"black")).getMeasuredWidth()&&(UI._gameDetailsColumn1FontSize-=1,l="{0}pt {1}".format(UI._gameDetailsColumn1FontSize,f),k--)}d.find(".gameDetailsColumn1").css({"font-size":UI._gameDetailsColumn1FontSize+"pt"});UI.IS_SEGOE_UI_INSTALLED||(d.find(".gameDetailsColumn1").css({"font-family":"Open Sans"}),d.find(".gameDetailsColumn2").css({"font-size":"12pt","font-family":"Open Sans"}));d.find(".gameId").text(a.id);a.secondGenre?
d.find(".gameDetailsTopicGenre").text(a.topic.name+"/"+a.genre.name+"-"+a.secondGenre.name):d.find(".gameDetailsTopicGenre").text(a.topic.name+"/"+a.genre.name);g=a.platforms.map(function(a){return a.name}).join(", ");d.find(".gameDetailsPlatform").text(g);-1!=GameManager.company.researchCompleted.indexOf(Research.TargetAudience)&&d.find(".gameDetailsAudience").text(General.getAudienceLabel(a.targetAudience));d.find(".gameDetailsImage").attr("src",Platforms.getPlatformImage(a.platforms[0],a.releaseWeek));
d.find(".gameDetailsCosts").text(UI.getShortNumberString(a.costs));a.releaseWeek>GameManager.company.currentWeek?d.find(".gameDetailsReleaseWeek").text("coming soon".localize()):d.find(".gameDetailsReleaseWeek").text("Y{0} M{1} W{2}".localize("date display").format(c.year,c.month,c.week));0<a.revenue?(d.find(".gameDetailsAmountEarned").text(UI.getShortNumberString(a.revenue)),c=d.find(".gameDetailsTotal"),g=a.revenue-a.costs,0>g?(d.find(".gameDetailsTotalLabel").text("Loss:".localize()),c.addClass("red")):
c.addClass("green"),c.text(UI.getShortNumberString(g)),d.find(".gameDetailsFansChange").text(UI.getLongNumberString(Math.max(0,Math.round(a.fansChanged)))),0<a.topSalesRank?d.find(".gameDetailsTopSalesRank").text(a.topSalesRank):d.find(".gameDetailsTopSalesRank").text("100+"),d.find(".gameDetailsUnitsSold").text(UI.getShortNumberString(a.unitsSold))):(c=a.flags.isExtensionPack?"-":"?",d.find(".gameDetailsUnitsSold").text(c),d.find(".gameDetailsAmountEarned").text(c),d.find(".gameDetailsTotal").text(c),
d.find(".gameDetailsFansChange").text(c),d.find(".gameDetailsTopSalesRank").text(c),d.find(".gameDetailsAmountEarned").removeClass("green"));a.reviewMessageDisplayed?(d.find(".gameAverageScoreOverview").text(b),d.find(".gameDetailsAvgReview").text(b)):(d.find(".gameAverageScoreOverview").text("?"),d.find(".gameDetailsAvgReview").text("?"));return d};UI.showGameHistory=function(a,b,c){b=b?!0===GameManager.flags.createPack?GameManager.company.getPossibleGamesForPack():GameManager.company.getPossibleGamesForSequel():
GameManager.company.gameLog;c&&(b=GameManager.company.gameLog.filter(function(a){return a.canDoPostMortem()}));if(0<b.length){GameManager.pause(!0);var d=$("#gameHistoryDialog"),f=d.find("#gameHistoryContent");f.empty();var g=$('<div class="gameHistorySliderContainer royalSlider rsDefaultInv"></div>');f.append(g);b.slice().sort(function(a,b){return a.releaseWeek>b.releaseWeek?1:-1});for(f=b.length-1;0<=f;f--){var k=b[f];if(!k.flags.isExtensionPack||c){var l=k.reviews.average(function(a){return a.score}),
k=UI._getElementForGameDetail(k,l);g.append(k)}}var h=GameManager.flags.selectGameActive;h&&(GameManager.flags.selectedGameId=null);c=h?"Select Game".localize("heading"):"Game History".localize();d.find(".windowTitle").text(c);c=h?"Select".localize("button"):"OK".localize();d.find(".okButton").text(c).clickExcl(function(){Sound.click();h&&(GameManager.flags.selectedGameId=d.find(".rsActiveSlide").find(".gameId").text());$("#gameHistoryDialog").dialog("close");GameManager.resume(!0)});PlatformShim.ISWIN8&&
g.gdSlider();d.dialog({draggable:!1,width:660,height:650,modal:!0,resizable:!1,show:"fade",zIndex:6E3,open:function(){UI.maxFont("bolder",d.find(".windowTitle"),34);var a=$(this).parents(".ui-dialog:first").find(".closeDialogButton");0==a.length&&(a=$(UI.closeButtonTemplate),$(this).parents(".ui-dialog:first").append(a));a.zIndex=4500;a.clickExclOnce(function(){Sound.click();d.dialog("close")});$(this).siblings(".ui-dialog-titlebar").remove();$(this).parents(".ui-dialog:first").addClass("tallWindow");
$(this).parents(".ui-dialog:first").addClass("windowBorder");$(this).parents(".ui-dialog:first").removeClass("ui-widget-content");PlatformShim.ISWIN8||g.gdSlider()},close:function(){$(this).dialog("destroy");this.style.cssText="display:none;";a&&a();GameManager.resume(!0)}})}else a&&a()}})();
(function(){UI.showGameEnd=function(c,f){var g=$("#gameEndDialog");d=1;g.find(".next").hide().clickExclOnce(function(){g.dialog("close")});g.find(".companyName").text(GameManager.company.name).hide();$("#gameEndDialog").gdDialog({popout:!0,onOpen:function(){s(g);l(g)},onClose:function(){a=[];b=[];GameManager.company.activeNotifications.remove(c);Media.createEndOfGameStories();GameManager.resume(!0);f&&f()}})};var a=[],b=[],c,d=1,f=function(){d+=0.4},g,k=function(f){if(0!==a.length||c){f*=d;for(var g=
0;g<a.length;g++)a[g].tick(f,!1);for(g=0;g<b.length;g++)f=b[g],f.int_value!=f._currentValue&&(0!=f.int_value&&f.text(UI.getLongNumberString(Math.floor(f.int_value))),f._currentValue=f.int_value),f._scale!=f._currentScale&&(f.transition({scale:f._scale},0),f._currentScale=f._scale),f._opacity!=f._currentOpacity&&(f.css("opacity",f._opacity),f._currentOpacity=f._opacity),f._top!=f._currentTop&&(f.css("top",f._top),f._currentTop=f._top),f._left!=f._currentLeft&&(f.css("left",f._left),f._currentLeft=
f._left);c&&c.update()}},l=function(d){a=[];b=[];var h=GameManager.company,l=d.find(".counterContainer");l.empty();var p=document.createElement("canvas");p.width=700;p.height=150;var q=new FlippingCounter.FlippingBox(8,6);q.init();q.fill(0);q.container.x=41;q.container.y=41;FlippingCounter._activeUITweens=a;var s=new createjs.Container;s.addChild(FlippingCounter.panel);s.addChild(q.container);s.x=160;s.scaleX=0.5;s.scaleY=0.5;c=new createjs.Stage(p);c.addChild(s);l.append($(p));p=n(h);l=d.find(".animationItemsContainer");
l.empty();for(var s=$("#gameEndAnimationItem"),B=0,v=0,x=createjs.Tween.get(l),E=0;E<p.length;E++){var A=s.clone().removeAttr("id");A.label=A.find(".label");A.value=A.find(".value");A.value.text("0").css("opacity",0);A.value._opacity=0;(function(c,d,f){c.value.int_value=0;var g=createjs.Tween.get(c.value).wait(B).call(function(){m(c,f)});1<=d.value&&g.wait(1700).set({_opacity:1}).to({int_value:d.value},700).call(function(){v+=d.value;q.fill(Math.floor(v))});var h=c.label.text(d.label).typewrite({wait:B+
650,delay:20,soundLoop:"notificationTyping",volume:0.12,type:"return-tween"});b.push(c.value);c.hide();l.append(c);B+=3700;a.addRange([g,h])})(A,p[E],E)}x.wait(B).call(function(){var a=d.find(".companyName").remove();l.append(a);a.fadeIn();d.find(".next").slideDown();h.flags.finalScore=v;DataStore.setScore(h.uid,h.name,v)}).wait(700).call(function(){Achievements.activate(Achievements.finishedGame);GameManager.checkAchievements()});a.push(x);$(window).on("click",f);x.wait(B).call(function(){$(window).off("click",
f)});g||(GameManager.addTickListener(k,!1),g=!0)},h=[],m=function(c,d){0===d&&(h=[]);var f=createjs.Tween.get(c);c.css({position:"absolute",opacity:0}).show();var g=c.width();c.height();c.css({left:390-g/2,top:20});c._opacity=0;c._scale=0;c._top=20;c._left=390-g/2;var k=h.slice();f.to({_opacity:1,_scale:1.6},1500).wait(2500).to({_scale:1,_left:20,_top:130},400);g=createjs.Tween.get(k);g.wait(4E3).call(function(){c.value.transition({opacity:0})}).call(function(){for(var b=0;b<k.length;b++){var c=h[b],
d=createjs.Tween.get(c);c.tween&&-1!=a.indexOf(c.tween)&&a.remove(c.tween);c.tween=d;c.tween.to({_top:c._top+30},400,createjs.Ease.sineIn);a.push(c.tween)}});b.push(c);a.push(f);a.push(g);h.push(c)},n=function(a){var b=[],c=a.gameLog.filter(function(a){return"small"===a.gameSize}),d=a.gameLog.filter(function(a){return"medium"===a.gameSize}),f=a.gameLog.filter(function(a){return"large"===a.gameSize}),g=a.gameLog.filter(function(a){return"aaa"===a.gameSize}),h=c.concat(d).concat(f).concat(g),k=a.gameLog.slice().sort(function(a,
b){return b.costs-a.costs});0<k&&(k=k.first(),b.push({label:"Most expensive ({0}): {1}".localize().format(k.title,UI.getShortNumberString(k.costs))}));k=a.gameLog.slice().sort(function(a,b){return b.totalSalesCash-b.costs-(a.totalSalesCash-a.costs)});if(0<k){var l=k.first();b.push({label:"Most profitable ({0}): {1}".localize().format(l.title,UI.getShortNumberString(l.totalSalesCash-l.costs))})}1<k.length&&(k=k.last(),b.push({label:"Least profitable ({0}): {1}".localize().format(k.title,UI.getShortNumberString(k.totalSalesCash-
k.costs))}));k=a.gameLog.map(function(a){return a.topic.name});if(l=q(k)){var m=l[0],l=l.join(", ");b.push({label:"Most used topic ({0}): {1}".localize().format(l,k.count(function(a){return a==m}))})}k=a.gameLog.map(function(a){return a.genre.name});if(l=q(k)){var n=l[0],l=l.join(" ,");b.push({label:"Most used genre ({0}): {1}".localize().format(l,k.count(function(a){return a==n}))})}b.push({label:"Researched topics: {0}".localize().format(a.topics.length),value:100*a.topics.length});k=a.researchCompleted.count();
b.push({label:"Total research completed: {0}".localize().format(k),value:100*k});k=h.sum(function(a){return a.designPoints});b.push({label:"Design points generated: {0}".localize().format(k),value:10*k});k=h.sum(function(a){return a.technologyPoints});b.push({label:"Technology points generated: {0}".localize().format(k),value:10*k});k=c.sum(function(a){return a.score/10*1E3*GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre)});b.push({label:"Small games: {0}".localize().format(c.count()),
value:k});k=d.sum(function(a){return 5E3*a.score*GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre)});b.push({label:"Medium games: {0}".localize().format(d.count()),value:k});k=f.sum(function(a){return 1E4*a.score*GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre)});b.push({label:"Large games: {0}".localize().format(f.count()),value:k});k=g.sum(function(a){return 5E4*a.score*GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre)});
b.push({label:"AAA games: {0}".localize().format(g.count()),value:k});k=h.count(function(a){return 7.6<a.score&&9>a.score});b.push({label:"Good games: {0}".localize().format(k),value:1E5*k});k=h.count(function(a){return 9<=a.score});b.push({label:"Top hits: {0}".localize().format(k),value:2E6*k});k=h.count(function(a){return a.flags.royaltyRate});b.push({label:"Publishers used: {0}".localize().format(k),value:1E3*k});k=h.length-k;b.push({label:"Self-published games: {0}".localize().format(k),value:5E3*
k});if(c=a.getBestSeller())k=1E6*c.score,b.push({label:"Best seller: {0} ({1} units)".localize().format(c.title,UI.getShortNumberString(c.unitsSold)),value:k});b.push({label:"Fans: {0}".localize().format(UI.getShortNumberString(a.fans)),value:4*a.fans});b.push({label:"Cash: {0}".localize().format(UI.getShortNumberString(a.cash)),value:(0.01*a.cash).clamp(0,5555555)});a=a.licencedPlatforms.filter(function(a){return a.isCustom});k=a.sum(function(a){return 1E6*a.successFactor});b.push({label:"Custom consoles: {0}".localize().format(a.length),
value:k});return b};UI.getThanksForPurchasingNotification=function(a){(a=a?a:PlatformShim.getUserName())&&0!=a.length&&"Player"!=a||(a="you");a="To: {0}\nFrom: Patrick & Daniel Klug (Greenheart Games).\nHi {0}, we are the creators of Game Dev Tycoon and would like to thank you very much for purchasing the game and supporting us.{n}Game Dev Tycoon is our very first game and it means a lot to us that you are enjoying it. With your purchase you support our little start-up and this will hopefully make sure that we can bring you more games in the future.{n}Seriously, you rock! Thank you very much and have fun with Game Dev Tycoon.".localize().format(a)+
"\n\nPatrick & Daniel Klug\nGreenheart Games\nwww.greenheartgames.com";a=new Notification({header:"Thank you".localize("heading"),text:a,image:"./images/greenheart.png",weeksUntilFired:1});a.adjustFans(2);return a};purchaseGame=function(a,b){ghg4.ghg5("purchased-clicked");GameManager.ghg3().requestAppPurchaseAsync(!0).done(function(a){a?GameManager.ghg2()?(PlatformShim.alert("It seems that something went wrong when purchasing the app.\nPlease close the app and try again later.\n If the issue persists please contact\n\n{0}".localize().format("support@greenheartgames.com"),
"Store Confirmation Error".localize("heading")),ghg4.ghg5("purchased but still trial")):GameManager.ghg2()||(ghg4.ghg5("purchased"),Achievements.activate(Achievements.supporter),GameManager.checkAchievements(),GameManager.company.notifications.push(UI.getThanksForPurchasingNotification()),DataStore.setValue("thankYouMessageShown",!0),b&&b()):ghg4.ghg5("purchase cancelled")},function(a){ghg4.ghg5("purchase unsuccessful",{error:a.message,"error-number":a.number});PlatformShim.alert("It seems that something went wrong when trying to purchase the app.\nThis usually indicates a problem with the Store. Please try again later and if the issue persists please contact\n\n{0}".localize().format("support@greenheartgames.com"),
"Store Error".localize("heading"))})};var p=function(a,b){Sound.click();if(GameManager.ghg0()){var c=DataStore.getValue("full-game-uri");if(PlatformShim.ISWIN8){c||(c="http://www.greenheartgames.com/game-dev-tycoon-status");var d=new Windows.Foundation.Uri(c);Windows.System.Launcher.launchUriAsync(d).then(function(a){a?ghg4.ghg5("navigate-to-full-game",{url:c,success:!0}):(ghg4.ghg5("navigate-to-full-game",{url:c,success:!1}),Windows.UI.Popups.MessageDialog("It seems that something went wrong when trying to go to the Store page for the full app.\nPlease try again and if the issue persists please contact {0} or search for Game Dev Tycoon manually on the Windows Store.".localize().format("support@greenheartgames.com"),
"Store Error".localize("heading")).showAsync())})}else c||(c="http://www.greenheartgames.com/game-dev-tycoon-downloads"),PlatformShim.openUrlExternal(c)}else purchaseGame(b,function(){GameManager.ghg2()||a.dialog("close")})};UI.showTrialEnd=function(a,b){if(GameManager.ghg2()){var c=$("#gameEndTrialDialog"),d=GameManager.ghg0()?"lite".localize("as in lite edition of the game"):"trial".localize(),f="You have reached the end of the {0} version.\nIf you like what you've seen so far then you should definitely check out the full game. You can find a brief description of what awaits you below.".localize();
GameManager.ghg0()||(f+="\n\n<strong>If you unlock the full game you can continue playing the game you've already started.</strong>".localize());c.find(".endOfGameBlurb").html(f.replaceAll("\n","<br/>").format(d));d=$("#fullGameFeatureTeaser").clone();d.removeAttr("id");c.find(".featureTeaserContainer").empty().append(d);var g=c.find(".purchaseButton");g.text(GameManager.ghg0()?"Go to full game ...".localize():" Unlock full game ...".localize()).clickExcl(function(){p(c,a)});c.gdDialog({popout:!0,
close:!1,onOpen:function(){s(c);UI.maxFont(void 0,g,18)},onClose:function(){GameManager.ghg2()||(GameManager.company.activeNotifications.remove(a),GameManager.resume(!0),b&&b())}})}else GameManager.company.activeNotifications.remove(a),GameManager.resume(!0),b&&b()};var q=function(a){for(var b=[],c=0;c<a.length;c++)-1==b.indexOf(a[c])&&b.push(a[c]);for(var d={},f=0,c=0;c<b.length;c++){var g=a.count(function(a){return a==b[c]});d[c]=g;g>f&&(f=g)}return 1>=f?null:b.filter(function(a){return d[b.indexOf(a)]==
f})},s=function(a){a=a.find(".gameEndStatisticsContainer");var b=GameManager.company,c=[];c.push({name:"Cash".localize(),value:UI.getShortNumberString(b.cash)});c.push({name:"Total fans".localize(),value:b.fans});c.push({name:"Total game releases".localize(),value:UI.getShortNumberString(b.gameLog.length)});if(0<b.gameLog.length){c.push({name:"Total unit sales".localize(),value:UI.getShortNumberString(b.gameLog.sum(function(a){return a.unitsSold}))});c.push({name:"Total design points generated".localize(),
value:UI.getShortNumberString(b.gameLog.sum(function(a){return a.designPoints}))});c.push({name:"Total technology points generated".localize(),value:UI.getShortNumberString(b.gameLog.sum(function(a){return a.technologyPoints}))});c.push({name:"Total research completed".localize(),value:b.researchCompleted.length});var d=b.gameLog.slice().sort(function(a,b){return b.unitsSold-a.unitsSold}).first();c.push({name:"Most sales ({0})".localize().format(d.title),value:UI.getShortNumberString(d.unitsSold)});
d=b.gameLog.slice().sort(function(a,b){return b.fansChanged-a.fansChanged}).first();c.push({name:"Most fans ({0})".localize().format(d.title),value:UI.getShortNumberString(d.fansChanged)});d=b.gameLog.slice().sort(function(a,b){return b.costs-a.costs}).first();c.push({name:"Most expensive ({0})".localize().format(d.title),value:UI.getShortNumberString(d.costs)});var d=b.gameLog.slice().sort(function(a,b){return b.totalSalesCash-b.costs-(a.totalSalesCash-a.costs)}),f=d.first();c.push({name:"Most profitable ({0})".localize().format(f.title),
value:UI.getShortNumberString(f.totalSalesCash-f.costs)});1<d.length&&(d=d.last(),c.push({name:"Least profitable ({0})".localize().format(d.title),value:UI.getShortNumberString(d.totalSalesCash-d.costs)}));d=b.gameLog.map(function(a){return a.topic.name});if(f=q(d)){var g=f[0],f=f.join(", ");c.push({name:"Most used topic ({0})".localize().format(f),value:d.count(function(a){return a==g})})}b=b.gameLog.map(function(a){return a.genre.name});if(d=q(b)){var h=d[0],f=d.join(" ,");c.push({name:"Most used genre ({0})".localize().format(f),
value:b.count(function(a){return a==h})})}}a.empty();b=$("#gameEndStatisticItem");for(d=0;d<c.length;d++){var f=c[d],k=b.clone();k.removeAttr("id");k.text("{0}: {1}".format(f.name,f.value));a.append(k)}};UI.showgameTrialDialog=function(){GameManager.pause(!0);Sound.click();var a=$("#gameTrialDialog"),b=GameManager.ghg0()?"lite":"trial",c="Thank you for playing the {0} version.\nIf you like what you've seen so far then you should definitely check out the full game.".localize();GameManager.ghg0()||
(c+="\n\n<strong>"+"If you unlock the full game you can continue playing the game you've already started.".localize()+"</strong>");a.find(".gameTrialBlurb").html(PlatformShim.toStaticHtml(c.replaceAll("\n","<br/>").format(b)));b=$("#fullGameFeatureTeaser").clone();b.removeAttr("id");a.find(".featureTeaserContainer").empty().append(b);a.find(".purchaseButton").text(GameManager.ghg0()?"Go to full game ...".localize():" Unlock full game ...".localize()).clickExcl(function(){p(a)});$("#gameTrialDialog").gdDialog({popout:!0,
close:!0,onClose:function(){GameManager.resume(!0)}})}})();
(function(){function a(){var a=GameManager.company;if(a.cash<k)$(".okButtonWrapper").effect("shake",{times:2,distance:5},50);else{a.adjustCash(-k,"Find Staff".localize("heading"));var b=l/100,c=1.5+1.5*b;Tutorial.hiringStaff(c);a.notifications.push(new Notification("{HireStaff}",null,null,c));GameManager.uiSettings.findStaffData={costs:k,ratio:b,tests:g.map(function(a){return a.id}),slot:d,startWeek:GameManager.company.currentWeek,targetWeek:GameManager.company.currentWeek+c,seed:Math.floor(65535*
a.getRandom())};g.first();UI.closeModal()}}var b=[{id:"ComplexAlgorithms",name:"Complex Algorithms".localize(),minT:0.6},{id:"GameDemo",name:"Game Demo".localize(),minD:0.3,minT:0.3},{id:"Showreel",name:"Showreel".localize(),minD:0.6}];UI.isStaffSearchInProgress=function(){return GameManager.uiSettings?null!=GameManager.uiSettings.findStaffData:!1};var c;GameManager.addTickListener(function(){if(UI.isStaffSearchInProgress()&&GameManager.company){var a=GameManager.uiSettings.findStaffData,a=((GameManager.company.currentWeek-
a.startWeek)/(a.targetWeek-a.startWeek)).clamp(0,1);c||(c=$("#canvasContainer"));var b=c.find(".hireStaffButtonBase");b.hasClass("hireStaffButton")&&(b.unbind("click").removeClass("hireStaffButton").find(".hireButtonLabel").text("Searching...".localize("button")),UI.maxFont("bold",b.find(".hireButtonLabel"),12));b.find(".hireStaffProgress").css("width",100*a+"%")}},!0);var d=0;UI.showFindStaffWindow=function(c){if(!UI.isStaffSearchInProgress()){d=c;c=$(".hireStaffBudgetSlider");c.empty();var l=$('<div class="budgetSlider"></div>').slider({orientation:"horizontal",
range:"min",min:0,max:100,value:0,animate:"fast",slide:function(a,b){var c=$(b.handle).closest(".budgetSlider");if(!c.hasClass("budgetSlider"))throw"couldn't find target slider";c.slider("value",b.value);h()}});c.append(l);k=0;g=[];c=$(".findStaffFilters");c.empty();for(l=0;l<b.length;l++)c.append(f(b[l]));$("#findStaffDialog").find(".okButton").clickExcl(a);UI.showModalContent("#findStaffDialog",{close:!0,onOpen:function(){h()}})}};var f=function(a){var b=$('<div class="selectableGameFeatureItem"></div>').text(a.name);
b.clickExcl(function(){b.hasClass("selectedFeature")?(b.removeClass("selectedFeature"),g=[]):(b.parent().find(".selectableGameFeatureItem").removeClass("selectedFeature"),g=[],b.addClass("selectedFeature"),g.push(a))});return b},g=[],k=0,l=0,h=function(){var a=$(".simplemodal-data"),b=a.find(".budgetSlider").slider("value"),c,d=b/100;c=(d/=1)*d;d*=c;c=Math.floor(2+198*(0+1*(-0.5*d*c+3*c*c+-3.5*d+2*c)));k=c*=1E4;l=b;a=a.find(".windowCostLabel");UI.maxFont(void 0,a,20,"Cost: {0}".localize().format(UI.getShortNumberString(k)));
a.toggleClass("red",k>GameManager.company.cash)};UI._generateJobApplicants=function(){var a=GameManager.uiSettings.findStaffData;a||(a={ratio:0.1,tests:[]});a.seed||(a.seed=Math.floor(65535*GameManager.company.getRandom()));for(var c=a.ratio,d=b.first(function(b){return b.id==a.tests.first()}),f=GameManager.company,g=new MersenneTwister(a.seed),h=[],k=Math.floor(2+3*(c+0.2).clamp(0,1)),l=0,f=4==f.currentLevel?0.8:0.4,m=GameManager.company.staff.map(function(a){return a.name}),F=0;F<k;F++){var C=c/
3+(1-c/3)*g.random();0.95<=g.random()&&(f+=0.2);var G=0.2+f*C,D=Math.floor(5*G).clamp(1,5),I=1,M=0;d&&(d.minT&&(I-=d.minT),d.minD&&(M=d.minD,I-=M));var L=200*D,I=L*M+L*I*g.random(),L=L-I,J=g.random(),M=0.2+f*J,K=g.random(),P=0.2+f*K,O=0.5<K&&0.5<C&&0.5<J;if(!O&&2>l&&g.random()<=(c+0.1).clamp(0,0.7))F--,l++;else{l=0;C=!1;J="male";do J="male",O?(0.15<g.random()?K=0.5>L/I?p.pickRandom(g):0.5>I/L?n.pickRandom(g):q.pickRandom(g):(K=s.pickRandom(g),J="female"),C=!0):(0.25<g.random()?K=r.pickRandom(g)+" "+
u.pickRandom(g):(K=t.pickRandom(g)+" "+u.pickRandom(g),J="female"),C=!1);while(-1!=m.indexOf(K));m.push(K);D*=Character.BASE_SALARY_PER_LEVEL;D+=0.2*D*g.random()*g.randomSign();D=1E3*Math.floor(D/1E3);h.push({name:K,qualityFactor:G,technologyFactor:L/500,designFactor:I/500,researchFactor:M,speedFactor:P,salary:D,isFamous:C,sex:J})}}GDT.fire(GameManager,GDT.eventKeys.gameplay.staffFired,{applicants:h,settings:a,rng:g});return h};UI.showHireStaff=function(a,b){var c=$("#hireStaffDialog"),d=UI._generateJobApplicants(),
f=c.find(".applicantSliderContainer"),g=m(f,d);c.find(".okButton").clickExclOnce(function(){var a=c.find(".rsActiveSlide").find(".staffName").text(),b=d.first(function(b){return b.name==a});UI._hireStaff(b);UI.closeModal()});f={disableCheckForNotifications:!0,close:!0,onClose:function(){GameManager.uiSettings.findStaffData=void 0;VisualsManager.refreshHiringButtons();GameManager.company.activeNotifications.remove(a);GameManager.resume(!0);b&&b()}};PlatformShim.ISWIN8?g.gdSlider():f.onOpen=function(){g.gdSlider()};
UI.showModalContent("#hireStaffDialog",f)};var m=function(a,b,c){a.empty();c=$('<div class="applicantContainer royalSlider rsDefaultInv"></div>');a.append(c);a=$("#staffTemplate");for(var d=0;d<b.length;d++){var f=b[d],g=a.clone();g[0].id=void 0;g.find(".staffName").text(f.name);var h=f.experience?LevelCalculator.getLevelFractional(f.experience):5*f.qualityFactor;g.find(".staffQ").text("Level: ".localize()+Math.floor(h));g.find(".staffS").text(Math.floor(500*f.speedFactor));var k=500*f.designFactor,
l=500*f.technologyFactor;g.find(".staffD").text(Math.floor(k));g.find(".staffT").text(Math.floor(l));h=100/((k+l)/k);k=100/((k+l)/l);g.find(".staffDBar").css("width",h-1+"%");g.find(".staffTBar").css("width",k-1+"%");g.find(".staffR").text(Math.floor(500*f.researchFactor));g.find(".staffSalary").text("{0} per month".localize().format(UI.getShortNumberString(f.salary)));c.append(g)}return c};UI._hireStaff=function(a){var b=GameManager.company,c=5*a.qualityFactor,c=new Character({id:GameManager.getGUID(),
name:a.name,dF:a.designFactor,tF:a.technologyFactor,speedF:a.speedFactor,qualityF:Math.floor(c)/5,experience:LevelCalculator.getXpForLevel(c),researchF:a.researchFactor,salary:a.salary,efficiency:0.05,slot:GameManager.uiSettings.findStaffData.slot,sex:a.sex});GameManager.setBodyAndHead(c);c.flags.hiredTimestamp=GameManager.gameTime;c.flags.nextVacation=GameManager.gameTime+48E3*GameManager.SECONDS_PER_WEEK;c.flags.workload=0;GameManager.uiSettings.findStaffData=null;b.staff.forEach(function(a){a.adjustEfficiency(-0.4)});
b.staff.push(c);Tutorial.staffHired();GDT.fire(GameManager,GDT.eventKeys.gameplay.staffHired,{character:c,applicant:a});VisualsManager.reloadAllCharacters();GameManager.company.staff[GameManager.company.staff.length-1].startAnimations();Research.checkForNewResearch();VisualsManager.addComputer(c);VisualsManager.refreshHiringButtons();VisualsManager.refreshTrainingOverlays();2<GameManager.company.staff.length&&GameManager.enableMediumContracts();UI.reset();a.isFamous&&Achievements.activate(Achievements.hireSomeoneFamous)};
UI.showFireStaffPrompt=function(a){GameManager.company.notifications.insertAt(0,DecisionNotifications.fireEmployee.getNotification(GameManager.company,a))};UI.showStaffList=function(a){var b=$("#staffListDialog"),c=b.find(".staffSliderContainer"),d=m(c,GameManager.company.staff);b.find(".okButton").clickExclOnce(function(){UI.closeModal()});b={disableCheckForNotifications:!1,close:!0,onClose:function(){a&&a()}};PlatformShim.ISWIN8?d.gdSlider():b.onOpen=function(){d.gdSlider()};UI.showModalContent("#staffListDialog",
b)};var n="Sip Meyer;Christoph Sowyer;James E. Garmack;Johnny Rome;James Di Margiti;Mick Brash;David Draben;Hasir Nebelli;Andres Lamot;Scott Rro;Ben Silverman;Martin Person;Tom References".split(";"),p="Jerry Sole;Richard Chariott;Bill Bright;Christian Robertson;Eric Robertson;Dennis Avelone;Drew Darpyshyn;David Drossman;Peter Polynox;Migeru Mayomoto;Tom Schofer;Ron Raglow;Eduard McGillen;Markus Stonefeather;Bill J. Allen;Jona Chen;Paul Reed".split(";"),q="Warden Vector;Ricky Rartle;Leeroy Rubshaw;Kevin Flin;Ralph Koster;Joe Smodley;Jack Long;Allen Low;Clinton Harris;Arthur Bee;Phillip Fesh;Paul Pres;Kyle Stabler;Ronny Garmel;Dennis Habbabis;Chris Maley;Mark Torris;Tony Rodriguez;Arnt Johnson;Dino Watty".split(";"),
s="Erica Robinson;Pauline Zobeck;Lucy Broadshaw;Brenda Wrathbate;Rina Brok;Jennifer Cavanagh;Beverly Larand;Amy Nenning;Laureen Kamo;Heather Hailey;Jane Lean".split(";"),t="Mary Patricia Linda Barbara Elizabeth Jennifer Susan Margaret Dorothy Liza Nancy Karen Betty Helen Sandra Donna Carol Ruth Sharon Michelle Laura Sarah Kimberly Deborah Jessica Shirley Cynthia Angela Melissa Brenda Amy Anna Rebecca Virginia Kathleen Pamela Martha Debra Amanda Stephanie Carolyn Christine Marie Janet Catherine Frances Ann Joyce Diane Alice Julie Heather Teresa Doris Gloria Evelyn Jean Cheryl Katherine Joan Ashley Judith Rose Janice Kelly Nicole Judy Christina Kathy Theresa Beverly Denise Tammy Irene Jane Lori Rachel Marilyn Andrea Kathryn Louise Sara Anne Jacqueline Wanda Bonnie Julia Ruby Lois Tina Phyllis Norma Paula Diana Annie Lillian Emily Robin Peggy Crystal Gladys Rita Dawn Connie Florence Tracy Edna Tiffany Carmen Rosa Cindy Grace Wendy Victoria Edith Kim Sherry Sylvia Josephine Thelma Shannon Ethel Ellen Elaine Marjorie Carrie Charlotte Monica Esther Pauline Emma Juanita Anita Rhonda Hazel Amber Eva Debbie April Leslie Clara Lucille Jamie Joanne Eleanore Valerie Danielle Megan Alicia Suzanne Michele Gail Bertha Darlene Veronica Jill Erin Lauren Cathy Joann Lorraine Lynn Sally Regina Erica Beatrice Dolores Bernice Audrey Yvonne Annette June Samantha Marion Dana Stacy Ana Renee Ida Vivian Roberta Holly Brittany Melanie Loretta Yolanda Jeanette Laurie Katie Kristen Vanessa Alma Sue Elsie Beth".split(" "),
r="Jacob Michael Joshua Matthew Daniel Christopher Andrew Ethan Joseph William Anthony David Alexander Nicholas Ryan Tyler James John Jonathan Noah Brandon Christian Dylan Samuel Benjamin Nathan Zachary Logan Justin Gabriel Jose Austin Kevin Elijah Caleb Robert Thomas Jordan Cameron Jack Hunter Jackson Angel Isaiah Evan Isaac Mason Luke Jason Gavin Jayden Aaron Connor Aiden Aidan Kyle Juan Charles Luis Adam Lucas Brian Eric Adrian Nathaniel Sean Alex Carlos Ian Bryan Owen Landon Julian Chase Cole Diego Jeremiah Steven Sebastian Xavier Timothy Carter Wyatt Brayden Blake Hayden Devin Cody Richard Seth Dominic Jaden Antonio Miguel Liam Patrick Carson Jesse Tristan Alejandro Henry Victor Trevor Bryce Jake Riley Colin Jared Jeremy Mark Caden Garrett Parker Marcus Vincent Kaleb Kaden Brady Colton Kenneth Joel Oscar Josiah Jorge Cooper Ashton Tanner Eduardo Paul Edward Ivan Preston Maxwell Alan Levi Stephen Grant Nicolas Omar Dakota Alexis George Collin Eli Spencer Gage Max Cristian Ricardo Derek Micah Brody Francisco Nolan Ayden Dalton Shane Peter Damian Jeffrey Brendan Travis Fernando Peyton Conner Andres Javier Giovanni Shawn Braden Jonah Bradley Cesar Emmanuel Manuel Edgar Erik Mario Edwin Johnathan Devon Erick Wesley Oliver Trenton Hector Malachi Jalen Raymond Gregory Abraham Elias Leonardo Sergio Donovan Colby Marco Bryson Martin".split(" "),
u="Smith Johnson Williams Jones Brown Davis Miller Wilson Moore Taylor Anderson Thomas Jackson White Harris Martin Thompson Garcia Martinez Robinson Clark Rodriguez Lewis Lee Walker Hall Allen Young Hernandez King Wright Lopez Hill Scott Green Adams Baker Gonzalez Nelson Carter Mitchell Perez Roberts Turner Phillips Campbell Parker Evans Edwards Collins Stewart Sanchez Morris Rogers Reed Cook Morgan Bell Murphy Bailey Rivera Cooper Richardson Cox Howard Ward Torres Peterson Gray Ramirez James Watson Brooks Kelly Sanders Price Bennett Wood Barnes Ross Henderson Coleman Jenkins Perry Powell Long Patterson Hughes Flores Washington Butler Simmons Foster Gonzales Bryant Alexander Russell Griffin Diaz Hayes Myers Ford Hamilton Graham Sullivan Wallace Woods Cole West Jordan Owens Reynolds Fisher Ellis Harrison Gibson Mcdonald Cruz Marshall Ortiz Gomez Murray Freeman Wells Webb Simpson Stevens Tucker Porter Hunter Hicks Crawford Henry Boyd Mason Morales Kennedy Warren Dixon Ramos Reyes Burns Gordon Shaw Holmes Rice Robertson Hunt Black Daniels Palmer Mills Nichols Grant Knight Ferguson Rose Stone Hawkins Dunn Perkins Hudson Spencer Gardner Stephens Payne Pierce Berry Matthews Arnold Wagner Willis Ray Watkins Olson Carroll Duncan Snyder Hart Cunningham Bradley Lane Andrews Ruiz Harper Fox Riley Armstrong Carpenter Weaver Greene Lawrence Elliott Chavez Sims Austin Peters Kelley Franklin Lawson Fields Gutierrez Ryan Schmidt Carr Vasquez Castillo Wheeler Chapman Oliver Montgomery Richards Williamson Johnston Banks Meyer Bishop Mccoy Howell Alvarez Morrison Hansen Fernandez Garza Harvey Little Burton Stanley Nguyen George Jacobs Reid Kim Fuller Lynch Dean Gilbert Garrett Romero Welch Larson Frazier Burke Hanson Day Mendoza Moreno Bowman Medina Fowler Brewer Hoffman Carlson Silva Pearson Holland Douglas Fleming Jensen Vargas Byrd Davidson Hopkins May Terry Herrera Wade Soto Walters Curtis Neal Caldwell Lowe Jennings Barnett Graves Jimenez Horton Shelton Barrett Obrien Castro Sutton Gregory Mckinney Lucas Miles Craig Rodriquez Chambers Holt Lambert Fletcher Watts Bates Hale Rhodes Pena Beck Newman Haynes Mcdaniel Mendez Bush Vaughn Parks Dawson Santiago Norris Hardy Love Steele Curry Powers Schultz Barker Guzman Page Munoz Ball Keller Chandler Weber Leonard Walsh Lyons Ramsey Wolfe Schneider Mullins Benson Sharp Bowen Daniel Barber Cummings Hines Baldwin Griffith Valdez Hubbard Salazar Reeves Warner Stevenson Burgess Santos Tate Cross Garner Mann Mack Moss Thornton Dennis Mcgee Farmer Delgado Aguilar Vega Glover Manning Cohen Harmon Rodgers Robbins Newton Todd Blair Higgins Ingram Reese Cannon Strickland Townsend Potter Goodwin Walton Rowe Hampton Ortega Patton Swanson Joseph Francis Goodman Maldonado Yates Becker Erickson Hodges Rios Conner Adkins Webster Norman Malone Hammond Flowers Cobb Moody Quinn Blake Maxwell Pope Floyd Osborne Paul Mccarthy Guerrero Lindsey Estrada Sandoval Gibbs Tyler Gross Fitzgerald Stokes Doyle Sherman Saunders Wise Colon Gill Alvarado Greer Padilla Simon Waters Nunez Ballard Schwartz Mcbride Houston Christensen Klein Pratt Briggs Parsons Mclaughlin Zimmerman French Buchanan Moran Copeland Roy Pittman Brady Mccormick Holloway Brock Poole Frank Logan Owen Bass Marsh Drake Wong Jefferson Park Morton Abbott Sparks Norton Huff Clayton Massey Lloyd Figueroa Carson Bowers Roberson Barton Tran Lamb Harrington Casey Boone Cortez Clarke Mathis Singleton Wilkins Cain Bryan Underwood Hogan Mckenzie Collier Luna Phelps Mcguire Allison Bridges Wilkerson Nash Summers Atkins".split(" ")})();
(function(){UI._resetBoostUI=function(){b()};UI._resetCallbacks.push(UI._resetBoostUI);var a=[],b=function(){$(".charBoost").remove();a=[];for(var b=VisualsManager.characterOverlays,c=0;c<b.length;c++){var k=b[c];if(0!=k.character.maxBoostLevel){var l=d(k.x,k.y);k.boostButton=l;(function(a,b){b.clickExcl(function(){if(!a.onFire&&1===a.boostRechargeProgress||1<=a.boostLevel)Sound.playSoundOnce("boost",0.065),a.activateBoost(),b.find(".boostButton").removeClass("enabled"),b.enabled=!1;window.event.cancelBubble=
!0})})(k.character,l)}}},c=["#00698C","#007CA5","#008FBF","#00A2D8","deepskyBlue"];GameManager.addTickListener(function(a){if(a=VisualsManager.characterOverlays)for(var b=0;b<a.length;b++){var d=a[b],l=d.character,h=d.boostButton;if(h){var m=0,n=l.boostLevel;l.onFire?m=l.boostRechargeProgress:(m=l.boostRechargeProgress,(1==m||1<=n)&&!h.enabled&&(h.find(".boostButton").addClass("enabled"),h.enabled=!0));if(h.boostLevel!==n||h.onFire!==l.onFire){h.onFire=l.onFire;n?h.levelElement.text("x"+n):h.levelElement.text("");
h.boostLevel=n;var p,q;switch(n){case 1:p=c[1];q=c[0];break;case 2:p=c[2];q=c[1];break;case 3:p=c[3];q=c[2];break;case 4:p=c[4];q=c[3];break;case 5:c[4];c[4];break;default:p=c[0],q="transparent"}d.boostVisual.fgColor=p;d.boostVisual.bgColor=q;d.boostVisual.invalidate()}h.boostValue!=m&&(d.boostVisual.updateValue(360*m),d.boostVisual.invalidate())}}},!0);var d=function(b,c){var d=$("#boostButtonTemplate").clone();d[0].id=void 0;var l=GameFlags.IS_LOW_RES?-3:0;d.css({position:"absolute",top:c+VisualsManager.toScreenCoordinates(-3,
CanvasManager.globalScale)+"px",left:b+VisualsManager.toScreenCoordinates(159+l,CanvasManager.globalScale)+"px"});d.addClass("charBoost");d.levelElement=d.find(".boostMultiplier");$("#canvasContainer").append(d);a.push(d);return d}})();
(function(){UI.showGenericProjectWindow=function(a){var b=General.getAvailableProjects(GameManager.company,a);if(b&&b.length){a=$("#genericProjectMenu");var c={close:!0},d=a.find(".genericProjectSliderContainer");d.empty();var f=$('<div class="projectSlider royalSlider rsDefaultInv"></div>');d.append(f);for(var d=$("#genericProjectTemplate"),g=0;g<b.length;g++){var k=b[g],l=d.clone();l[0].id=void 0;l.find(".projectTitle").text(k.name);l.find(".projectIcon").attr("src",k.iconUri);l.find(".projectDescription").text(k.description);
l.find(".projectPointCost").text("Project Size: ".localize()+k.pointsCost);f.append(l)}PlatformShim.ISWIN8?f.gdSlider():c.onOpen=function(){f.gdSlider()};a.find(".okButton").clickExcl(function(){Sound.click();var a=$(".simplemodal-data").find(".projectSlider").find(".rsActiveSlide").find(".projectTitle").text(),c=b.first(function(b){return b.name==a});c&&(GameManager.startProject(c),UI.closeModal())});UI.showModalContent("#genericProjectMenu",c)}}})();
(function(){var a=function(a){if("gameContract"===a.type)return b(a);var c=$("#contractTemplate").clone();c.removeAttr("id");c.find(".contract.name").text(a.name);var g=UI._getMaxFontSize("bold {0}pt {1}",UI.IS_SEGOE_UI_INSTALLED?"Segoe UI":"Open Sans",26,7,460,60,[a.name]);26>g&&c.find(".contract.name").css("font-size",g+"pt");c.find(".sliderTabCaption").append($("<span>{0}</span>".format(a.shortName?a.shortName:a.name)));c.find(".contract.description").html(UI.getHtmlText(a.description));a.payment&&
c.find(".contract.payment").text("Pay: {0}".localize().format(UI.getShortNumberString(a.payment)));a.penalty&&c.find(".contract.penalty").text("Penalty: {0}".localize().format(UI.getShortNumberString(a.penalty)));a.requiredD&&c.find(".contract.designPoints").text(a.requiredD);a.requiredT&&c.find(".contract.technologyPoints").text(a.requiredT);a.weeksToFinish&&c.find(".contract.duration").text("{0} weeks".localize().format(a.weeksToFinish));a.size&&("medium"===a.size?(c.find(".contract.designPoints").addClass("medium"),
c.find(".contract.technologyPoints").addClass("medium")):"large"===a.size&&(c.find(".contract.designPoints").addClass("large"),c.find(".contract.technologyPoints").addClass("large")));return c},b=function(a){var b=$("#gameContractTemplate").clone();b.removeAttr("id");b.find(".contract.name").text(a.name);if(a.topic){var c=Topics.topics.first(function(b){return b.id===a.topic});-1==GameManager.company.topics.indexOf(c)&&(b.find(".contract.topicNotResearched").text("{0} not researched".localize().format(c.name)),
a.disabled=!0)}b.find(".sliderTabCaption").append($("<span>{0}</span>".format(a.shortName?a.shortName:a.name)));b.find(".contract.description").html(UI.getHtmlText(a.description));c="Min Score: {0}".localize().format(a.minScore);a.gameSize&&(c+="\n"+"Game Size:".localize()+" "+General.getGameSizeLabel(a.gameSize));a.gameAudience&&(c+="\n"+"Target Audience:".localize()+" "+General.getAudienceLabel(a.gameAudience));b.find(".contract.reqs").html(UI.getHtmlText(c));b.find(".contract.royaltyRate").text("Royalties: {0}%".localize().format(Math.floor(100*
a.royaltyRate)));b.find(".contract.payment").text("Up-front Pay: {0}".localize().format(UI.getShortNumberString(a.payment)));b.find(".contract.penalty").text("Penalty: {0}".localize().format(UI.getShortNumberString(a.penalty)));if(a.platform){var k=Platforms.allPlatforms.first(function(b){return b.id===a.platform});if(k){c=Platforms.getPlatformImage(k,GameManager.company.currentWeek);b.find(".contract.platform").attr("src",c);var c=-1!=GameManager.company.licencedPlatforms.indexOf(k),l=k.name;c||
(l+=" (no license)".localize(),a.disabled=!0,a.tryEnable=function(b){if(a.topic){var c=Topics.topics.first(function(b){return b.id===a.topic});if(-1==GameManager.company.topics.indexOf(c))return!1}UI.buyPlatform(k.name,b);return!1});b.find(".contract.platformLabel").text(l);c||b.find(".contract.platformLabel").addClass("red")}}return b},c;UI.showFindContractWorkMenu=function(b,f){var g=GameManager.company;c=ProjectContracts.getAvailable(g,GameManager.uiSettings.selectedContractType);if(0==c.length)g.activeNotifications.remove(b),
g.notifications.push(new Notification("Contracts".localize("heading"),"There are no contracts currently available.".localize())),GameManager.showPendingNotifications(f);else{var k=$("#findContractWorkWindow"),g=k.find("#contractSliderContainer");g.empty();for(var l=$('<div class="contractSlider royalSlider rsDefaultInv"></div>'),h=0;h<c.length;h++){var m=a(c[h]);m.append('<div class="cardId" style="display:none">{0}</div>'.format(h));l.append(m)}g.append(l);k.find(".okButton").clickExcl(function(){Sound.click();
var a=l.find(".rsActiveSlide").find(".cardId").text();if(void 0!=a){var b=c[parseInt(a)];b&&(b.disabled?b.tryEnable?b.tryEnable(function(){k.dialog("close");GameManager.startContract(b)}):k.find(".okButton").parent().effect("shake",{times:2,distance:5},50):(k.dialog("close"),GameManager.startContract(b)))}});PlatformShim.ISWIN8&&l.gdSlider();k.gdDialog({close:!0,onClose:function(){GameManager.company.activeNotifications.remove(b);GameManager.resume(!0);f&&f()},onOpen:function(){PlatformShim.ISWIN8||
l.gdSlider()}})}}})();
(function(){var a=[],b=[];UI.resetAchievementsUI=function(){a.forEach(function(a){a.remove()});a=[];b=[];UI._achievementsActiveTimeModifier=1};UI._resetCallbacks.push(UI.resetAchievementsUI);UI._achievementsActiveTimeModifier=1;UI.showAchievements=function(c){var d=GameManager.gameId,k=200,l=$("<div></div>");l.css("font-size",1).animate({"font-size":0},{duration:200,easeing:"easein",step:function(a,b){GameManager.gameId==d&&(UI._achievementsActiveTimeModifier=a)}});setTimeout(function(){Sound.pauseAllLoopingFx()},k);
for(var h=0;h<c.length;h++){var m=c[h];if(-1==b.indexOf(m.id)){b.push(m.id);var n=$(document.body),p=$("#achievementTemplate").clone().hide();p.removeAttr("id");var q=document.body.clientWidth,s=document.body.clientHeight;p.css({position:"absolute","z-index":5E4,top:-s});m.tint&&(p.find(".tint").css("color",m.tint),p.find(".backgroundTint").css("background",m.tint));n.append(p);var n=p.width(),t=p.height();p.find(".title").text(m.title).hide().css("margin-left",-q/2-n);p.find(".descr").text(m.description).hide().css("margin-left",
q+n);q/=2;s/=2;q-=n/2;s-=t/2;(function(c,f,h){c.delay(h).queue(function(){Sound.playSoundOnce("achievement1",0.3);c.show().transition({left:q,top:s},200,"out");c.find(".achievement.unlocked").transition({"margin-top":-25,delay:200},200,"out");c.find(".title").show().transition({"margin-left":0,delay:500},200,"out");c.find(".descr").show().transition({"margin-left":0,delay:700},200,"out");c.find(".sliceGlow").transition({"margin-left":-230,opacity:0,delay:200},800).transition({"margin-left":120,opacity:0.5},
400,"out").transition({"margin-left":230,opacity:0},800,"out");setTimeout(function(){c.find(".achievement.innerContainer").addClass("hideState");setTimeout(function(){c.remove();GameManager.gameId==d&&(a.remove(c),b.remove(f.id),Achievements.complete(f))},400)},4E3);$(this).dequeue()})})(p,m,k);a.push(p);k+=4200}}l.delay(k).animate({"font-size":1},{duration:200,easeing:"easein",step:function(a,b){GameManager.gameId==d&&(UI._achievementsActiveTimeModifier=a)}});setTimeout(function(){Sound.resumeAllLoopingFx()},
k+200)};var c=function(a){if(UI.isPanelOpen())return UI.closePanels(),!1};UI._isAchievementsPanelVisible=!1;UI.toggleAchievementPanel=function(){UI._isHighScorePanelVisible&&UI.toggleHighScorePanel();var a=$("#achievementsPanel");a.hasClass("hidden")?(d(a.find(".achievementsContainer")),a.show().removeClass("hidden").addClass("show"),$("#gameContainerWrapper").focus(),a.delay(400).queue(function(){UI.overrideClick=c;GameManager.pause(!0,!0);$(this).dequeue()}),UI._isAchievementsPanelVisible=!0):(a.removeClass("show").addClass("hidden"),
UI.overrideClick=null,UI._isAchievementsPanelVisible=!1,GameManager.resume(!0,!0),a.delay(400).queue(function(){$(this).hide();$(this).dequeue()}))};var d=function(a){a.empty();for(var b=Achievements.getAllItems().filter(function(a){return Achievements.hasAchieved(a)||!a.hidden}),c=[],d=[],h=0;h<b.length;h++){var m=b[h];Achievements.hasAchieved(m)?c.push(m):d.push(m)}b=c.concat(d);d=$("#achievementTemplate");d=d.clone();d.find(".achievement.unlocked").remove();d.find(".achievement.dismiss").remove();
for(h=0;h<b.length;h++){var m=b[h],n=h<c.length,p=d.clone();p.removeAttr("id");p.find(".title").text(m.title);p.find(".descr").text(m.description);m.tint&&(p.find(".tint").css("color",m.tint),p.find(".backgroundTint").css("background",m.tint));n||p.find(".achievement").addClass("disabled");a.append(p)}}})();
(function(){UI.closePanels=function(){UI._isHighScorePanelVisible&&UI.toggleHighScorePanel();UI._isAchievementsPanelVisible&&UI.toggleAchievementPanel()};UI.isPanelOpen=function(){return UI._isHighScorePanelVisible||UI._isAchievementsPanelVisible};UI._isHighScorePanelVisible=!1;var a=function(a){if(UI.isPanelOpen())return UI.closePanels(),!1},b=function(a){a=a.find(".highScoreContainer");a.empty();var b=DataStore.getHighScoreList(),b=b.slice().sort(function(a,b){return b.score-a.score});if(0==b.length)a.append($("<p>"+
"No scores yet. Once you finish a game your high score will be listed here.".localize()+"</p>"));else for(var f=$('<div class="highScoreItem"><div class="highScoreItemNname"></div><div class="score"></div></div>'),g=0;g<b.length;g++){var k=b[g],l=f.clone();l.find(".highScoreItemNname").text(k.name);l.find(".score").text(UI.getLongNumberString(k.score));a.append(l)}};UI.toggleHighScorePanel=function(){UI._isAchievementsPanelVisible&&UI.toggleAchievementPanel();var c=$("#highScorePanel");c.hasClass("hidden")?
(b(c),c.show().removeClass("hidden").addClass("show"),$("#gameContainerWrapper").focus(),c.delay(400).queue(function(){UI.overrideClick=a;GameManager.pause(!0,!0);$(this).dequeue()}),UI._isHighScorePanelVisible=!0):(c.removeClass("show").addClass("hidden"),UI.overrideClick=null,UI._isHighScorePanelVisible=!1,GameManager.resume(!0,!0),c.delay(400).queue(function(){$(this).hide();$(this).dequeue()}))}})();
(function(){UI.showReviewWindow=function(b,c){var d=$("#reviewWindow");d.find("#reviewAnimationContainer").empty();d.find(".okButton").hide().clickExclOnce(function(){g=[];k=[];UI.closeModal(c)});UI.showModalContent("#reviewWindow",{disableCheckForNotifications:!0,onOpen:function(){a()},onClose:function(){GameManager.company.activeNotifications.remove(b)}})};var a=function(){g=[];k=[];for(var a=$(".simplemodal-data"),c=a.find("#reviewAnimationContainer"),m=GameManager.company.gameLog.last(),n=$("#reviewItemTemplate"),
p="Reviews for {0}".localize().format(m.title),q=a.find(".windowTitle").text(p).typewrite({type:"return-tween",delay:20,soundLoop:"notificationTyping",volume:0.12}),p=20*p.length,s=0;s<m.reviews.length;s++){var t=n.clone(),r=m.reviews[s];t.removeAttr("id");t.scoreElement=t.find(".score").css("opacity",0);t.textElement=t.find(".text").css("opacity",0);t.reviewerElement=t.find(".reviewer").css("opacity",0);Localization.isRTLLanguage()?t.css({right:60,top:40+100*s}):t.css({left:60,top:40+100*s});c.append(t);
p+=b(t,r,p)}d=1;$(window).on("click",f);q.wait(p).call(function(){$(window).off("click",f);a.find(".okButton").slideDown()});g.push(q)},b=function(a,b,d){var f=Localization.isRTLLanguage(),p=[],q=createjs.Tween.get(a).wait(d);a.scoreElement.opacity=0;f?a.scoreElement.marginRight=0:a.scoreElement.marginLeft=0;var s=createjs.Tween.get(a.scoreElement).wait(d).to({opacity:1}),t;t=f?createjs.Tween.get(a.scoreElement).wait(d).to({marginRight:Math.floor(80*Math.random())},7E3):createjs.Tween.get(a.scoreElement).wait(d).to({marginLeft:Math.floor(80*
Math.random())},7E3);var r=c(a.scoreElement,b.score,q);p.addRange([q,s,t]);s=a.textElement;f?s.marginRight=10:s.marginLeft=10;s.opacity=0;s.text(b.message);s.css("opactity",0);t=Math.max(20*b.message.length,400);var u=s.typewrite({delay:20,wait:d+r-400,type:"return-tween",soundLoop:"notificationTyping",volume:0.12}),q=f?createjs.Tween.get(s).wait(d+r-400).to({marginRight:40,opacity:1},400,createjs.Ease.sineOut):createjs.Tween.get(s).wait(d+r-400).to({marginLeft:40,opacity:1},400,createjs.Ease.sineOut),
r=r+t;p.addRange([u,q]);k.push(s);r+=500;s=a.reviewerElement;f?s.marginLeft=30:s.marginRight=30;s.opacity=0;q="... {0}".format(b.reviewerName);s.text(q);s.css("opactity",0);b=Math.max(20*q.length,400);u=s.typewrite({delay:20,wait:d+r-400,type:"return-tween",soundLoop:"notificationTyping",volume:0.12});q=f?createjs.Tween.get(s).wait(d+r-400).to({marginLeft:-10,opacity:1},400,createjs.Ease.sineOut):createjs.Tween.get(s).wait(d+r-400).to({marginRight:-10,opacity:1},400,createjs.Ease.sineOut);r+=b;p.addRange([u,
q]);k.push(s);g.addRange(p);k.push(a.scoreElement.show());q.wait(t+b).call(function(){for(var b=0;b<p.length;b++)-1!=g.indexOf(p[b])&&g.remove(p[b]);-1!=k.indexOf(a.scoreElement)&&k.remove(a.scoreElement)});return r},c=function(a,b,c){for(var d=0,f=GameManager.gameId,g=0;45>g;g++)(function(a,g){d+=a/4*20;c=c.wait(a/4*20).call(function(){if(f==GameManager.gameId){var c;c=(a+1)/45;1==c?c=b:(c=b+9*Math.random()*(1-c)*Math.randomSign(),c=Math.floor(c).clamp(1,10));g.textValue!=c&&Sound.playSoundOnce("reviewTack",
0.15);g.textValue=c}})})(g,a);return d+=300},d=1,f=function(){d=(d+0.5).clamp(1,3)},g=[],k=[];GameManager.addTickListener(function(a){if(0!=g.length||0!=k.length){for(var b=0;b<k.length;b++){var c=k[b];c.textValue!=c.currentText&&(c.text(c.textValue),c.currentText=c.textValue);c.opacity!=c.currentOpacity&&(c.css("opacity",c.opacity),c.currentOpacity=c.opacity);c.marginLeft!=c.currentMarginLeft&&(c.css("margin-left",c.marginLeft),c.currentMarginLeft=c.marginLeft);c.marginRight!=c.currentMarginRight&&
(c.css("margin-right",c.marginRight),c.currentMarginRight=c.marginRight)}for(b=0;b<g.length;b++)g[b].tick(a*d)}},!1)})();
(function(){var a;UI.isMenuOpen=function(){return void 0!=a};UI.showContextMenu=function(d,f){if(d&&0!=d.length){a&&UI.closeContextMenu(a);var g=$("<div id='contextMenu'></div>");b(g,d);var k=$("#gameContainerWrapper");g.hide();k.append(g);var l=g.width(),h=g.height(),m=f.x-l/4,n=f.y-h-5,m=m.clamp(0,k.width()-l),n=n.clamp(0,k.height()-h);g.css({position:"absolute",left:m,top:n});g.show();c(g,!0)}};var b=function(a,b){for(var c=$("#contextMenuItemTemplate"),k=0;k<b.length;k++){var l=b[k],h=c.clone();
h.removeAttr("id");h.text(l.label);(function(b){h.clickExclOnce(function(){UI.closeContextMenu(a);b.action()})})(l);a.append(h)}},c=function(b,c,g){var k=$.makeArray(b.children());c||k.reverse();for(var l=0;l<k.length;l++)(function(a){b.delay(100).queue(function(){c?a.removeClass("hideState").addClass("showState"):a.removeClass("showState").addClass("hideState");$(this).dequeue()})})($(k[l]));g&&b.delay(600).queue(function(){g();$(this).dequeue()});c&&(a=b)};UI.closeContextMenu=function(b,f){b||(b=
a);a===b&&(a=null);b&&c(b,!1,function(){b.remove()})}})();
(function(){UI.showSupportUsOptionsWindow=function(a,b){var c=$("#supporterDialog");c.find(".rateAndReview").clickExcl(function(){Sound.click();ghg4.ghg5("supporter:rate/review clicked");PlatformShim.goToReviewPage()});c.find(".sendFeedback").clickExcl(function(){Sound.click();ghg4.ghg5("supporter:send feedback clicked");Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri("mailto:support@greenheartgames.com?Subject=Game%20Dev%20Tycoon")).done()});c.find(".okButton").clickExclOnce(function(){Sound.click();
c.dialog("close")});c.find(".packOptions").hide();DataStore.remoteSettings.supporterPacksEnabled&&SupportPacks.getPacks(function(a){a=a.productListings;var b=0;if(a.hasOwnProperty("1")){var g=a["1"];(function(a){var b=c.find(".pack1");b.text(a.name+" ({0})".format(a.formattedPrice)).clickExcl(function(){Sound.click();ghg4.ghg5("supporter:pack 1 clicked");SupportPacks.buy(a.name,function(){b.text(a.name+" ({0}) - purchased!".localize().format(a.formattedPrice)).effect("pulsate",{times:2})})})})(g);
b++}a.hasOwnProperty("2")&&(g=a["2"],function(a){var b=c.find(".pack2");b.text(a.name+" ({0})".format(a.formattedPrice));b.clickExcl(function(){Sound.click();ghg4.ghg5("supporter:pack 2 clicked");SupportPacks.buy(a.name,function(){b.text(a.name+" ({0}) - purchased!".localize().format(a.formattedPrice)).effect("pulsate",{times:2})})})}(g),b++);(2==b||GameFlags.ghg6)&&c.find(".packOptions").fadeIn()});c.gdDialog({popout:!0,close:!0,onClose:function(){a&&GameManager.company.activeNotifications.remove(a);
GameManager.resume(!0);b&&b()}})}})();
(function(a){var b=[],c;GameManager.addTickListener(function(a){if(0!=b.length){if(isNaN(c)||0===c)c=1;a*=c;if(0!==a)for(var f=0;f<b.length;f++)b[f].tick(a,!1)}},!1);a.fn.typewrite=function(d){d||(d={});var f=Localization.isRTLLanguage(),g={selector:this,delay:100,speedUpOnClick:!1,callback:null,animateScroll:!0,scrollPadding:25,scrollPollIntervalInChars:50};d&&a.extend(g,d);f&&(g.delay*=5,g.scrollPollIntervalInChars/=5);c=1;var k=function(a){c=(c+2.5).clamp(1,10)};if(d.speedUpOnClick){var l=g.callback;
g.callback=function(){a(window).off("click",k);l()}}for(var h=a(g.selector),m=h.text().replaceAll("<br />","\n"),n=a("<span></span>"),p={},q="",s=0;s<m.length;s++)if(q+=m[s],"["==q){var t=m.substr(s);t.startsWith("[pause:")?(q=s+7,s=m.indexOf("]",q),q=m.substr(q,s-q),p[n.children().length]={type:"pause",value:parseFloat(q)},q=""):t.startsWith("[delay:")&&(q=s+7,s=m.indexOf("]",q),q=m.substr(q,s-q),p[n.children().length]={type:"delay",value:q},q="")}else"\n"==q?(n.append(a("<br />")),q=""):f?" "==
m[s]&&(n.append(a("<span></span>").text(q)),q=""):(n.append(a("<span></span>").text(q)),q="");""!=q&&n.append(a("<span></span>").text(q));var r=[];n.children().each(function(){a(this).css({opacity:0})});h.empty();h.append(n);var u=0,z=0,w=0,y=n.children().length,B=h.parent();n.children().each(function(b){(function(a,b){r.push(function(){b.css({opacity:1});if(g.animateScroll&&(w++>=g.scrollPollIntervalInChars-1||a==y-1)){w=0;0==z&&(z=h.height());var c=g.scrollPadding+b.position().top-h.position().top-
z;0<c&&u<c&&(B.stop().animate({scrollTop:c},600),u=c)}})})(b,a(this))});var v=createjs.Tween.get(h);d.wait&&(v=v.wait(d.wait));d.soundLoop&&(v=v.call(function(){Sound.playSoundLoop(d.soundLoop,d.volume)}));f=1;for(s=0;s<r.length;s++){if(p.hasOwnProperty(s))if("pause"==p[s].type){v=v.call(function(){d.soundLoop&&Sound.stopSound(d.soundLoop)}).wait(p[s].value).call(function(){d.soundLoop&&Sound.playSoundLoop(d.soundLoop,d.volume)}).call(r[s]);continue}else"delay"==p[s].type&&(f="slow"==p[s].value?10:
1);v=v.wait(g.delay*f).call(r[s])}v.call(function(){d.soundLoop&&Sound.stopSound(d.soundLoop);"return-tween"!=d.type&&-1!=b.indexOf(v)&&b.remove(v);g.callback&&g.callback()});if("return-tween"===d.type)return v;setTimeout(function(){b.push(v);if(g.speedUpOnClick)a(window).on("click",k)},g.delay)}})(jQuery);
(function(){UI.showPostMortemComplete=function(b,c){GameManager.company.activeNotifications.remove(b);var d=GameManager.company.getGameById(b.text);if(d){for(var f=a(d),g,k="",l=0,h=0;h<f.length;h++,l++){var m=f[h];g||(g=m.category);g!=m.category&&(k+="{n}"+"We have some additional insights:".localize()+"\n",l=0);0<h&&(k+="[pause:500]");k+="\n{0}. {1}".format(l+1,f[h].msg)}0===f.length&&(k="No new insights".localize());GameManager.company.notifications.push(new Notification("Game Report".localize(),
"Our post-release analysis of {0} is complete and we got the following results:".localize().format(d.title)+"\n"+k))}GameManager.resume(!0);c&&c()};var a=function(a){var c=GameManager.company,d=[],f="1";if(!Knowledge.hasComboKnowledge(c,a)){var g=Knowledge.getComboHintText(a);Knowledge.setComboKnowledge(c,a);var k="{0} and {1} is a {2} combination.".localize().format(a.topic.name,a.getGenreDisplayName(),g),k=k.replace("a okay","an okay");d.push({category:f,msg:k})}k=a.featureLog.filter(function(a){return"mission"===
a.missionType}).filter(function(d){return!Knowledge.hasMissionWeightingKnowledge(c,d,a,!1)});if(0<k.length){var l=[k.pickRandom()];1<k.length&&0.9<c.getRandom()&&l.push(k.except(l).pickRandom());for(k=0;k<l.length;k++){var h=l[k];General.getGameSizeDurationFactor(a.gameSize);var g=Missions.getGenreWeighting(h,a),m=Missions.getMissionWithId(h.id),g=Knowledge.getMissionWeightingDisplayText(g,!0),g="{0} seems to be {1} for this type of game.".localize().format(m.name,g);d.push({category:f,msg:g});Knowledge.setMissionWeightingKnowledge(c,
h,a)}}for(k=0;k<a.platforms.length;k++){var n=a.platforms[k],p=a.genre;if(!Knowledge.hasPlatformGenreWeightingKnowledge(c,n,p)&&(g=GameGenre.getGenreWeighting(n.genreWeightings,p),l=0.2,0.7>=g?l=1:(h=c.gameLog.count(function(c){return c.platforms.first(function(c){return c.id==n.id&&a.genre.id==p.id})})-1,l+=0.4*h),c.getRandom()<l)){Knowledge.setPlatformGenreWeightingKnowledge(c,n,p);g=Knowledge.getFactorAdj(g,!0);d.push({category:f,msg:"Platform genre-match ({0}/{1}): {2}.".localize().format(p.name,
n.name,g)});break}}if(c.canSetTargetAudience()){for(var q=a.targetAudience,k=0;k<a.platforms.length;k++)if(n=a.platforms[k],!Knowledge.hasPlatformAudienceWeightingKnowledge(c,n,q)&&(g=Platforms.getAudienceWeighting([n],q,!0),l=0.2,0.7>=g?l=1:(h=c.gameLog.count(function(c){return c.platforms.first(function(c){return c.id==n.id&&a.targetAudience==q})})-1,l+=0.4*h),c.getRandom()<l)){Knowledge.setPlatformAudienceWeightingKnowledge(c,n,q);g=Knowledge.getFactorAdj(g,!0);d.push({category:f,msg:"Platform audience-match ({0}/{1}): {2}.".localize().format(General.getAudienceLabel(q),
n.name,g)});break}var s=a.topic;Knowledge.hasTopicAudienceWeightingKnowledge(c,s,q)||(g=General.getAudienceWeighting(s.audienceWeightings,q),l=0.2,0.7>=g?l=1:(h=c.gameLog.count(function(a){return a.topic.id==s.id&&a.targetAudience==q})-1,l+=0.4*h),c.getRandom()<l&&(Knowledge.setTopicAudienceWeightingKnowledge(c,s,q),g=Knowledge.getFactorAdj(g,!0),d.push({category:f,msg:"Topic audience-match ({0}/{1}): {2}.".localize().format(General.getAudienceLabel(q),s.name,g)})))}f="2";a.flags.sameGenreTopic&&
d.push({category:f,msg:"The market really doesn't like when we publish very similar games too close to each other.".localize()});if(a.flags.newStaffIds&&(l=a.flags.newStaffIds.map(function(a){return GameManager.company.staff.first(function(b){return b.id==a})}).filter(function(a){return a}),0<l.length)){h=l[0].name;for(k=1;k<l.length;k++)h+=", {0}".format(l[k].name);k=1==l.length?"{0} is still new to the team.".localize("{0} is a single name").format(h):"{0} are still new to the team.".localize("{0} is a list of names").format(h);
k+=" "+"A few more games and the team will have higher potential".localize();d.push({category:f,msg:k})}1<c.staff.length&&a.flags.teamContribution&&0.8>=a.flags.teamContribution&&d.push({category:f,msg:"We should try to focus our entire team on the development of a game.".localize()});"small"!=a.gameSize&&(a.flags.royaltyRate&&a.flags.fansAtLaunch>Sales.getTargetFans(c,a)?0.2>c.getRandom()&&d.push({category:f,msg:"Our fan base is big enough to make self-publishing {0} games viable. Unless a publishing deal gives us a great royalty rate we are likely better off publishing {0} games ourselves".localize().format(General.getGameSizeLabel(a.gameSize))}):
!a.flags.royaltyRate&&a.flags.fansAtLaunch<Sales.getTargetFans(c,a)&&0.2>c.getRandom()&&d.push({category:f,msg:"Self-publishing {1} games will be most efficient when we have at least {0} fans. Publishing deals can give us great exposure and help us reach more players.".localize().format(UI.getShortNumberString(Sales.getTargetFans(c,a)),General.getGameSizeLabel(a.gameSize))}));return d}})();
(function(){var a;UI.showNewsletterWidget=function(){if(!UI.isNewsletterWidgetDisabled()){var a=GameManager.getSaveGames();a&&a.first(function(a){return a.currentWeek&&3<Company.getDate(a.currentWeek).year})&&UI._showNewsletterWidget()}};UI.isNewsletterWidgetDisabled=function(){return DataStore.getValue("isNewsletterWidgetDisabled")};UI.disableNewsletterWidget=function(){DataStore.setValue("isNewsletterWidgetDisabled",!0)};UI._showNewsletterWidget=function(){a=$("#newsletterSignup");a.clearQueue();
showing=!0;a.find(".newsletterIconText").removeAttr("style").text("Sign up to our newsletter".localize());a.find(".deleteButton").clickExcl(function(){UI.disableNewsletterWidget();a.transit({opacity:0},400);setTimeout(function(){a.hide()},400)});a.find(".orangeButton").clickExcl(function(){b(a)});a.find("input").on("focus",function(b){$(document).click(function(b){a.removeClass("active");b.stopPropagation()});a.click(function(a){a.stopPropagation()})});a.on("mouseenter mouseleave touchstart",function(a){a=
$(this).find("input").is(":focus")||"mouseenter"===a.type||"touchstart"===a.type;$(this).toggleClass("active",a)});0<a.length&&(a.css("opacity",0).show(),a.transit({opacity:1},400))};UI.closeNewsletterWidget=function(){a&&a.hide()};var b=function(a){a.removeClass("active").off("mouseenter mouseleave touchstart").find(".newsletterIconText").text("Signing up...".localize()).css({width:"auto","margin-right":"10px"});a.children().effect("pulsate",{times:10},1500);var b=a.find("input").val();$.ajax({type:"POST",
url:"http://sendy.greenheartgames.com/subscribe",data:{list:"bpgZ4tZtAeBVss3M0t0PSA",email:b,"boolean":"true"}}).complete(function(b){b=b.responseText;a.children().stop(!0,!0).css("opacity","");"1"==b?(a.find(".newsletterIconText").text("Signup successful!".localize()).typewrite({delay:20}),a.css("color","darkgreen"),setTimeout(function(){a.children().effect("pulsate",{times:2},400)},1500),setTimeout(function(){a.transit({opacity:0},500).hide();UI.disableNewsletterWidget()},2500)):(a.find(".newsletterIconText").text(b).typewrite({delay:20}),
a.css("color","red"),setTimeout(function(){a.children().effect("pulsate",{times:2},400)},1500),setTimeout(function(){a.find(".newsletterIconText").text("");a.removeAttr("style");UI._showNewsletterWidget()},2500))})}})();
(function(){function a(a){var b=$("<div>"),f=a.length-1;a.filter(function(a,c){var l="{0} - {1}({2}) - {3}".format(a.name,a.author,a.id,"Version: {0}".localize().format(a.version)),h=$(".modMismatchModItem").clone();h.text(a.name);h.attr("title",l);f!=c?h.append(", "):h.append(" ");b.append(h)});return b}function b(b,d){var f=$("#modMismatchDialog").clone();if(0<b.length){var g=$("#modMismatchTextMissingMods").clone();g.append(a(b));g.appendTo(f.find("#modMismatchModPrintout"))}0<d.length&&(g=$("#modMismatchTextAdditionalMods").clone(),
g.append(a(d)),g.appendTo(f.find("#modMismatchModPrintout")));0<d.length&&0<b.length&&f.find("#modMismatchTextMissingMods").after("<br/>");return f}UI.showModMismatchDialog=function(a,d,f){if(1>d.length&&1>f.length)return a();var g=b(d,f);g.gdDialog({close:!1,zIndex:8E3,onOpen:function(){UI.disableMainMenu();g.find(".confirmActionButton").clickExclOnce(function(){Sound.click();a();g.dialog("close");g.dialog("destroy").remove()});g.find(".cancelActionButton").clickExclOnce(function(){Sound.click();
SplashScreen.reshow();g.dialog("close");g.dialog("destroy").remove()})},onClose:function(){UI.enableMainMenu();g.dialog("destroy").remove()}})}})();
(function(){UI._prepareGreenworks=function(){if(GameFlags.IS_STEAM&&Greenworks&&Greenworks.available){var a=$("#modsPanel");a.find("#modsPanelActions").show();var b=a.find("#modsPanelButtonMods"),c=a.find("#modsPanelButtonWorkshop"),d=a.find("#modsPanelButtonUpload"),f=a.find("#modsPanelButtonPublishNow"),g=a.find("#modsPanelButtonUpdate"),k=a.find("#modsPanelButtonUpdateNow"),l=a.find("#ugcModFolder"),h=a.find("#ugcModFolderName"),m=a.find("#ugcModTitle"),n=a.find("#ugcModDesc"),p=a.find("#ugcModImageName"),
q=a.find("#ugcModImage"),s=a.find("#ugcModImagePreview"),t=a.find("#ugcModFolderUpd"),r=a.find("#ugcModFolderNameUpd"),u=a.find("#ugcModTitleUpd"),z=a.find("#ugcModDescUpd"),w=a.find("#ugcModImageNameUpd"),y=a.find("#ugcModImageUpd"),B=a.find("#ugcModImagePreviewUpd"),v=a.find("#modsPanelWorkshopUpdateInputFields"),x=a.find("#ugcMods"),E=a.find("#browseForButtonUpload"),A=a.find("#browseForImageButtonUpload"),H=a.find("#browseForButtonUpdate"),F=a.find("#browseForImageButtonUpdate"),C=a.find(".ugcModUploadInputFieldR"),
G=a.find(".ugcModUpdateInputFieldR"),D=a.find("#modsPanelUploadStatus"),I=a.find("#modsPanelUploadStatusUpd"),M=a.find(".modsPanelItem"),L=a.find("#modsPanelMods"),J=a.find("#modsPanelUpload"),K=a.find("#modsPanelUpdate"),P=a.find(".workshoplegalagreement"),a=a.find(".moddinglegalagreement"),O=!1,S=!1;b.clickExcl(function(){Sound.click();M.hide();L.show()});c.clickExcl(function(){Sound.click();Greenworks.showOverlay()});d.clickExcl(function(){Sound.click();M.hide();J.show()});g.clickExcl(function(){Sound.click();
M.hide();K.show();U(x);Q(!1);Q(!0);x.append($(document.createElement("li")).text("Please wait...".localize()));X()});E.clickExcl(function(){Sound.click();l.click()});A.clickExcl(function(){Sound.click();q.click()});H.clickExcl(function(){Sound.click();t.click()});F.clickExcl(function(){Sound.click();y.click()});C.bind("change focus input click",function(a){N(!1)});G.bind("change focus input click",function(a){N(!0)});P.clickExcl(function(){PlatformShim.openUrlExternal("http://steamcommunity.com/sharedfiles/workshoplegalagreement")});
a.clickExcl(function(){PlatformShim.openUrlExternal("http://www.greenheartgames.com/legal/game-dev-tycoon-modding-agreement/")});l.bind("change focus input click",function(a){var b=$(this).val();h.val(b);"change"===a.type&&(D.text("Reading package.json...".localize()),(a=Greenworks.readPackageJsonAsObject(b))?(O=!0,m.val(a.name),n.val(a.description),D.text("Idle".localize())):(O=!1,D.text("Error. Invalid Game Dev Tycoon Mod!".localize())),N(!1))});t.bind("change input focus click",function(a){var b=
$(this).val();r.val(b);"change"===a.type&&(I.text("Reading package.json...".localize()),Greenworks.readPackageJsonAsObject(b)?(S=!0,I.text("Idle".localize())):(S=!1,I.text("Error. Invalid Game Dev Tycoon Mod!".localize())),N(!0))});q.bind("change input focus click",function(){p.val($(this).val());s.attr("src",$(this).val())});y.bind("change input focus click",function(){w.val($(this).val());B.attr("src",$(this).val())});var U=function(a){a.children().each(function(a){0<=a&&$(this).remove()})},Y=function(a){a.children().each(function(a){0<=
a&&$(this).removeClass("selected")})},Q=function(a){a?(u.val(""),z.val(""),t.val(""),r.val(""),y.val(""),w.val(""),B.attr("src",""),S=!1,N(!0)):(m.val(""),n.val(""),l.val(""),h.val(""),q.val(""),p.val(""),s.attr("src",""),O=!1,N(!1))},V=function(a,b){a?!0===b?k.hasClass("modsPanelWorkshopButtoDisabled")&&k.removeClass("modsPanelWorkshopButtoDisabled").addClass("modsPanelWorkshopButton"):f.hasClass("modsPanelWorkshopButtoDisabled")&&f.removeClass("modsPanelWorkshopButtoDisabled").addClass("modsPanelWorkshopButton"):
!0===b?k.hasClass("modsPanelWorkshopButton")&&k.removeClass("modsPanelWorkshopButton").addClass("modsPanelWorkshopButtoDisabled"):f.hasClass("modsPanelWorkshopButton")&&f.removeClass("modsPanelWorkshopButton").addClass("modsPanelWorkshopButtoDisabled")},T=function(a,b){b?a?(u.is(":disabled")&&u.removeAttr("disabled"),z.is(":disabled")&&z.removeAttr("disabled"),y.is(":disabled")&&y.removeAttr("disabled"),t.is(":disabled")&&t.removeAttr("disabled"),x.find("li").each(function(){$(this).text($(this).attr("wstitle"))}),
x.find("#wsModPleaseWait").remove()):(u.attr("disabled",!0),z.attr("disabled",!0),y.attr("disabled",!0),t.attr("disabled",!0),x.find("li").each(function(){$(this).text("")}),x.append($(document.createElement("li")).text("Please wait...".localize()).attr("id","wsModPleaseWait"))):a?(m.is(":disabled")&&m.removeAttr("disabled"),n.is(":disabled")&&n.removeAttr("disabled"),q.is(":disabled")&&q.removeAttr("disabled"),l.is(":disabled")&&l.removeAttr("disabled")):(m.attr("disabled",!0),n.attr("disabled",
!0),q.attr("disabled",!0),l.attr("disabled",!0))},N=function(a){var b=!1;a?b=S:(b=""!=m.val().trim()&&O,b&=""!=l.val().trim());V(b,a)};U(x);Q(!1);Q(!0);x.append($(document.createElement("li")).text("Please wait...".localize()));v.css("opacity","0");var X=function(){V(!1,!0);Greenworks.getPublishedItems(function(a){if(a){U(x);for(var b=0;b<a.length;b++){var c=a[b],c=$(document.createElement("li")).text(c.title).attr({wsTitle:c.title,wsDesc:c.description,wsId:c.publishedFileId,wsFile:Greenworks.extractFilename(c.fileName,
!1)}).addClass("workshopItem active").css({display:"block"});c.clickExcl(function(){Q(!0);var a=$(this).attr("wsId"),b=$(this).attr("wsTitle"),c=$(this).attr("wsDesc");$(this).attr("wsFile");Y(x);$(this).addClass("selected");u.val(b);z.val(c);v.css("opacity",0<a.length?"1":"0")});x.append(c)}1>a.length?x.append($(document.createElement("li")).text("No Mods found.".localize())):x.children().first().click()}N(!0)})},W=function(a,b){if(!0!==R){R=!0;V(!1,b);T(!1,b);var c=[],d="";b||(""==l.val().trim()&&
c.push("Folder".localize()),""==m.val().trim()&&c.push("Title".localize()));var f=b?I:D;if(0>=c.length)if(d=b?"Updating...".localize():"Publishing...".localize(),f.text(d),b){var g=x.find("li.selected").attr("wsId");Greenworks.createArchiveAndPublishUpdate({name:u.val(),desc:z.val(),image:y.val(),folder:t.val(),pid:g,createImage:!0,updateJson:!0},function(a){f.text(a)},function(){f.text("Update done".localize());N(!0);T(!0,!0);R=!1;setTimeout(function(){f.text("Idle".localize())},2500);Greenworks.showOverlay(g)})}else Greenworks.createArchiveAndPublish({name:m.val(),
desc:n.val(),image:q.val(),folder:l.val(),createImage:!0,updateJson:!0},function(a){f.text(a)},function(a){f.text("Publish done".localize());N(!1);T(!0,!1);R=!1;Q(!1);setTimeout(function(){f.text("Idle".localize())},2500);Greenworks.showOverlay(a.id)});else d="Error. Missing {0}".localize().format(c.join(", ")),f.text(d),N(b),T(!0,b),R=!1,setTimeout(function(){f.text("Idle".localize())},2500)}},R=!1;f.clickExcl(function(){$(this).hasClass("modsPanelWorkshopButtoDisabled")||(Sound.click(),W(this,!1))});
k.clickExcl(function(){$(this).hasClass("modsPanelWorkshopButtoDisabled")||(Sound.click(),W(this,!0))});M.hide();L.show();N(!1);N(!0)}}})();
(function(){Media.TriggerNotifications=[{id:"mediumFansTargetReached",trigger:function(a){return a.canDevelopMediumGames()&&a.fans>Sales.MediumTargetFans},notification:new Notification("Goal reached".localize("heading"),"You now have more than {0} fans! With such a big fan base you should now be able to self-publish medium games.".localize().format(UI.getLongNumberString(Sales.MediumTargetFans)))},{id:"largeFansTargetReached",trigger:function(a){return a.canDevelopLargeGames()&&a.fans>Sales.LargeTargetFans},
notification:new Notification("Goal reached".localize("heading"),"You now have more than {0} fans! With such a big fan base you should now be able to self-publish large games.".localize().format(UI.getLongNumberString(Sales.LargeTargetFans)))},{id:"gameConvention",trigger:function(a){return 1<a.currentLevel&&a.isLaterOrEqualThan(8,2,1)},getNotification:function(a){return new Notification("Game Convention".localize(),"Dear {0},\nWe have followed your progress in recent years and would like to extend this formal invitation to participate in the biggest game convention on the planet 'Games, Games, Games' also known as G3.{n}By having your own company booth at G3 you can gain a lot of fans and hype for your games and we think our audience would love to see you there.\nWe will contact you yearly with booth options. Hope to see you at G3.\nThe G3 committee.".localize().format(a.name))}},
{id:"level2Guide",notification:new Notification("Goal Hint".localize("heading"),"If you have more than 1M in cash you will be able to move to the next level. This might sound a lot but don't worry. Once you release a hit game you will get to this amount easily.".localize()),trigger:function(a){return 1===a.currentLevel&&1E6>a.cash&&a.isLaterOrEqualThan(4,7,2)}},{id:"engineHint",trigger:function(a){return a.isLaterOrEqualThan(3,1,2)&&0===a.engines.length},notification:new Notification("Engine Reminder".localize("heading"),
"Don't forget creating custom game engines. This will improve your games a lot! You can create your custom engine through the action menu once you have researched the Custom Engine.".localize())},{id:"thankYou",trigger:function(a){return!PlatformShim.ISWIN8&&!GameManager.ghg2()&&a.isLaterOrEqualThan(1,12,3)&&!DataStore.getValue("thankYouMessageShown")},getNotification:function(a){DataStore.setValue("thankYouMessageShown",!0);return UI.getThanksForPurchasingNotification(a.staff[0].name)}},{id:"publisherUnlock",
trigger:function(a){return a.canDevelopMediumGames()},getNotification:function(a){a="Hi {0},\nI have followed the progress of {1} for a while and it seems that with your recent expansion you have started developing larger games.\nLarger games deserve to be seen by more people and this is where a publisher can come in handy.{n}A publisher will market and publish your game around the world. They will also help fund development. In return they keep most of the profits but since the game will sell a lot more it is usually still worth it.{n}I can put you in touch with some publishers so you can look at some of the available contracts. Just let me know.\nJasmine Droke{n}Find Publishing Contract has been unlocked. It is accessible in the action menu.".localize().format(a.staff[0].name,
a.name);a=new Notification({header:"Publishing Contracts".localize("heading"),text:a});a.setFlag("publishersEnabled",!0);return a}},{id:"multiplatformOptimizationUnlock",trigger:function(a){return a.canDevelopMultiPlatform()&&1<a.gameLog.count(function(b){return 1<b.platforms.length&&(b.flags.postMortemCompleted||a.isLaterOrEqualThan(24,2))})},getNotification:function(a){a="Looking at our past multi-platform games it becomes clear that we should be able to drastically reduce the cost of developing a single game for multiple platforms if we could better optimize our game engines for multi-platform development.".localize();
a=new Notification({header:"New Insight".localize("heading"),text:a,weeksUntilFired:2});a.setFlag("multiPlatformOptimizeResearchAvailable",!0);return a}}]})();var DESIGN_POINTS_COLOR="orange",TECHNOLOGY_POINTS_COLOR="#00BFFF",RESEARCH_POINTS_COLOR="#006AFF",BUGS_COLOR="#FF6A00",VisualsManager={};
(function(){var a=VisualsManager,b=CanvasManager;a.Divisor=1;PlatformShim.ISLOWRES&&(a.Divisor=1.874084919472914);a.toScreenCoordinates=function(b,c){var d=isNaN(c)?1:c;return Math.round(b/a.Divisor*d)};a.gameStatusBar=void 0;a.researchPoints=void 0;a.reset=function(){if(GameManager.company.hwCrew)for(var c=0;c<GameManager.company.hwCrew.length;c++)GameManager.company.hwCrew[c].load();if(GameManager.company.rndCrew)for(c=0;c<GameManager.company.rndCrew.length;c++)GameManager.company.rndCrew[c].load();
a.computerImages=[void 0,void 0,void 0,void 0,void 0];a.loadStage(!0);a.gameStatusBar||(a.gameStatusBar=new GameStatusBar,b.foregroundStage.addChild(a.gameStatusBar));a.gameStatusBar.x=b.foregroundStage.canvas.width/2-a.gameStatusBar.width/2;a.gameStatusBar.y=15;a.gameStatusBar.reset();a.researchPoints||(a.researchPoints=new PointsDisplayVisual(RESEARCH_POINTS_COLOR,"white","Research".localize()),b.foregroundStage.addChild(a.researchPoints));a.researchPoints.y=15;a.researchPoints.size=100;a.researchPoints.x=
a.gameStatusBar.x+a.gameStatusBar.width+70;a.resetAllCharacters();a.refreshLabCrew();a.updatePoints();a.gameStatusBar.updateGameName();UI.clearSalesCards();UI.clearMaintenanceCards();GameManager.company.licencedPlatforms.forEach(function(a){!0===a.isCustom&&(0<a.nextSalesCash||0===a.currentSalesCash)&&(UI.addSalesCard(a.id,a.name,a.currentSalesCash,a.unitsSold,a.currentUnitsSold,-1,a.salesCashLog,a.nextSalesCash,Sales.consoleUnitPrice),0<a.currentSalesCash&&UI.updateMaintenanceCard(a))});GameManager.company.gameLog.forEach(function(a){a.currentSalesCash<
a.totalSalesCash&&UI.addSalesCard(a.id,a.title,a.currentSalesCash,a.totalSalesCash,a.unitsSold,a.currentSalesRank,a.salesCashLog,a.nextSalesCash,a.unitPrice,a.nextMaintenance,a.maintenanceLog)});CanvasManager.update(!0);a.updateReleaseReadyButton();UI.reset()};a.resetAllCharacters=function(){for(var c=b.characterStage.children.slice(),d=0;d<c.length;d++)b.characterStage.children.remove(c[d]);a.characterOverlays=[];a.reloadAllCharacters();a.refreshTrainingOverlays();a.refreshHiringButtons()};a.removeStaff=
function(c){var d=a.characterOverlays.first(function(a){return a.character===c});a.characterOverlays.remove(d);b.characterStage.removeChild(d);a.removeComputer(c);a.refreshTrainingOverlays();a.refreshHiringButtons();UI._resetBoostUI()};a.backgroundImage=void 0;a.computerImages=[void 0,void 0,void 0,void 0,void 0];a.nextLevel=function(){var b=GameManager.company.currentLevel;GameManager.pause(!0);var c=ResourceKeys.getLevelResources.apply(ResourceKeys,[1,2,3,4].except([b]));GameDev.ResourceManager.removeResources(c);
UI.fadeInTransitionOverlay();var d=Date.now(),f=function(){a.loadStage(!0);for(var b=0;b<a.characterOverlays.length;b++){var c=a.characterOverlays[b];c.character.visualData=c.saveState();c.parent.removeChild(c)}a.characterOverlays=[];a.reloadAllCharacters();a.refreshTrainingOverlays();a.refreshHiringButtons();if(0<GameManager.currentResearches.length)for(b=0;b<GameManager.company.staff.length;b++)GameManager.company.staff[b].state===CharacterState.Researching&&VisualsManager.getCharacterOverlay(GameManager.company.staff[b]).startResearching();
UI._resetBoostUI();CanvasManager.update();UI.fadeOutTransitionOverlay();GameManager.resume(!0)};FlippingCounter.init();GameDev.ResourceManager.ensureResources(ResourceKeys.getLevelResources(b),function(){var a=Date.now()-d;2E3>a?setTimeout(function(){f()},2E3-a):f()})};a.addComputer=function(b){if(0<b.slot){b=b.slot;var c=void 0,d=1,f=GameManager.company.currentLevel,g=0,p=0,q=CanvasManager.globalScale;2===f?1===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level2C1],g=1005,p=707,d=4):2===b?
(c=GameDev.ResourceManager.resources[ResourceKeys.Level2C2],g=880,p=698):3===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level2C3],g=1164,p=576):4===b&&(c=GameDev.ResourceManager.resources[ResourceKeys.Level2C4],g=1114,p=511):3===f?1===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level3C1],g=1005,p=723,d=4):2===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level3C2],g=878,p=703):3===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level3C3],g=1159,p=593):4===b&&(c=GameDev.ResourceManager.resources[ResourceKeys.Level3C4],
g=1109,p=511):4===f&&(1===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level4C1],g=463,p=978,d=4):2===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level4C2],g=428,p=756):3===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level4C1],g=745,p=812):4===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level4C2],g=711,p=591):5===b?(c=GameDev.ResourceManager.resources[ResourceKeys.Level4C1],g=1014,p=649):6===b&&(c=GameDev.ResourceManager.resources[ResourceKeys.Level4C2],g=981,p=426));
g=a.toScreenCoordinates(g,q);p=a.toScreenCoordinates(p,q);if(c){var f=CanvasManager.backgroundStage,s=f.canvas.width,t=f.canvas.height,r=1366/768,u=0;0.1<Math.abs(s/t-r)&&(r*=t,u=-(r-s)/2,s=r);a.currentXOffset=u;r=document.createElement("canvas");r.width=s;r.height=t;r.getContext("2d").drawImage(c,0,0,c.width,c.height,u+g,p,Math.floor(c.width*q),Math.floor(c.height*q));c=new createjs.Bitmap(r);c.width=s;c.height=t;a.computerImages[b]=c;f.children.length>=d-1?f.addChildAt(c,d):f.addChild(c);CanvasManager.invalidateBackground()}}};
a.removeComputer=function(b){var c=CanvasManager.backgroundStage;a.computerImages[b.slot]&&(c.removeChild(a.computerImages[b.slot]),a.computerImages[b.slot]=void 0,CanvasManager.invalidateBackground())};a.getLabSign=function(a,b,c,d,f){var g=new createjs.Container;g.x=d;g.y=f;d=32;do f="bold {0}pt {1}".format(d,"Segoe UI"),f=new createjs.Text(a,f,"black"),d-=1;while((f.getMeasuredWidth()>b||f.getMeasuredLineHeight()>c)&&1<d);b=d/32;c=createjs.Graphics.getHSL(0,0,24);f=new createjs.Text(a,"bold 32pt {0}".format("Segoe UI"),
c);f.textAlign="center";f.textBaseline="middle";g.scaleX=b;g.scaleY=b;g.addChild(f);return g};a.loadStage=function(b){var c=GameManager.company,g=CanvasManager.backgroundStage,m=CanvasManager.backgroundOverlayStage,n=CanvasManager.globalScale,p=g.canvas.width,q=g.canvas.height,s=1366/768,t=0;0.1<Math.abs(p/q-s)&&(s*=q,t=-(s-p)/2,p=s);var r=c.currentLevel,u;a.toScreenCoordinates(2921);var z=a.toScreenCoordinates(39),w;a.toScreenCoordinates(4156);var s=a.toScreenCoordinates(47),y=GameDev.ResourceManager.resources[ResourceKeys.Level1],
B=a.toScreenCoordinates(563),v=a.toScreenCoordinates(217);2===r?(y=GameDev.ResourceManager.resources[ResourceKeys.Level2],B=a.toScreenCoordinates(83),v=a.toScreenCoordinates(54)):3===r?(y=GameDev.ResourceManager.resources[ResourceKeys.Level3],B=a.toScreenCoordinates(83),v=a.toScreenCoordinates(54)):4===r&&(y=GameDev.ResourceManager.resources[ResourceKeys.Level4],B=a.toScreenCoordinates(367),v=a.toScreenCoordinates(39),GameManager.company.flags.rndLabUnlocked||(w=GameDev.ResourceManager.resources[ResourceKeys.Level4LockedRight]),
GameManager.company.flags.hwLabUnlocked||(u=GameDev.ResourceManager.resources[ResourceKeys.Level4LockedLeft]),a.toScreenCoordinates(2560));if(!a.backgroundImage||a.backgroundImage.width!=p||a.backgroundImage.height!=q||a.currentXOffset!=t||b){g.removeAllChildren();m.removeAllChildren();f=void 0;a.currentXOffset=t;b=document.createElement("canvas");b.width=p;b.height=q;var x=b.getContext("2d");4===r?x.drawImage(y,a.toScreenCoordinates(2193),0,a.toScreenCoordinates(2560),a.toScreenCoordinates(1384),
0,Math.floor(v*n),Math.floor(a.toScreenCoordinates(2560)*n),Math.floor(a.toScreenCoordinates(1384)*n)):x.drawImage(y,0,0,y.width,y.height,Math.floor(B*n),Math.floor(v*n),Math.floor(y.width*n),Math.floor(y.height*n));u&&(x.clearRect(t,z*n,(u.width-5)*n,u.height*n),x.drawImage(u,0,0,u.width,u.height,t,z*n,(u.width-4)*n,u.height*n));w&&(x.clearRect(Math.floor((a.toScreenCoordinates(2590)-w.width)*n),Math.floor((s-1)*n),Math.floor(w.width*n),Math.floor(w.height*n)),x.drawImage(w,0,0,w.width,w.height,
Math.floor((a.toScreenCoordinates(2588)-w.width)*n),Math.floor(s*n),Math.floor(w.width*n),Math.floor(w.height*n)));t=new createjs.Bitmap(b);t.width=p;t.height=q;a.backgroundImage=t;g.addChildAt(t,0);a.updateComputers();CanvasManager.leftScreen.backgroundStage.removeAllChildren();CanvasManager.leftScreen.backgroundOverlayStage.removeAllChildren();CanvasManager.leftScreen.invalidateBackground();CanvasManager.rightScreen.backgroundStage.removeAllChildren();CanvasManager.rightScreen.backgroundOverlayStage.removeAllChildren();
CanvasManager.rightScreen.invalidateBackground();a.levelOverlay=new LevelOverlay(c);if(4===r){c=document.createElement("canvas");c.width=p;c.height=q;var g=c.getContext("2d"),E;u||(g.drawImage(y,0,0,2560/a.Divisor-B,1384/a.Divisor,B*n,v*n,(2560/a.Divisor-B)*n,1384/a.Divisor*n),E=a.getLabSign("Hardware lab".localize(),a.toScreenCoordinates(264,n),a.toScreenCoordinates(54,n),a.toScreenCoordinates(1878,n),a.toScreenCoordinates(145,n)));u=new createjs.Bitmap(c);u.width=p;u.heigth=q;CanvasManager.leftScreen.backgroundStage.addChildAt(u,
0);CanvasManager.leftScreen.backgroundOverlayStage.addChild(a.levelOverlay.leftOverlay);E&&CanvasManager.leftScreen.backgroundOverlayStage.addChild(E);E=document.createElement("canvas");E.width=p;E.height=q;u=E.getContext("2d");var A;w?u.drawImage(w,a.toScreenCoordinates(596),0,a.toScreenCoordinates(29),w.height,0,s*n,a.toScreenCoordinates(29,n),w.height*n):(u.drawImage(y,a.toScreenCoordinates(2560,2)-B,0,y.width-(a.toScreenCoordinates(2560,2)-B),y.height,0,v*n,(y.width-(2560/a.Divisor*2-B))*n,y.height*
n),A=a.getLabSign("R&D lab".localize(),a.toScreenCoordinates(264,n),a.toScreenCoordinates(54,n),a.toScreenCoordinates(690,n),a.toScreenCoordinates(138,n)));n=new createjs.Bitmap(E);n.width=p;n.heigth=q;CanvasManager.rightScreen.backgroundStage.addChildAt(n,0);CanvasManager.rightScreen.backgroundOverlayStage.addChild(a.levelOverlay.rightOverlay);A&&CanvasManager.rightScreen.backgroundOverlayStage.addChild(A)}m.addChild(a.levelOverlay.centerOverlay)}a.updateCompanyNameInOffice();CanvasManager.invalidateBackground();
a.scrollToZone(GameManager.company.flags.currentZone);d()};a.installAirCon=function(){a.levelOverlay.startAirCon1();a.levelOverlay.startAirCon2()};var c=!1,d=function(){c||(c=!0,$("#gameContainerWrapper").wipetouch({tapToClick:!1,wipeLeft:function(a){VisualsManager.scrollToNextZone(1)},wipeRight:function(a){VisualsManager.scrollToNextZone(-1)},wipeMove:function(b){if((!document.activeElement||!$(document.activeElement).hasClass("ui-slider-handle"))&&b.dX){a.lastMove=Date.now();var c=$("#canvasScrollContainer").width(),
d=CanvasManager.backgroundStage.canvas.width,f=GameManager.company;if(f&&4==f.currentLevel||c<d)diff=c-d,c=$("#innerCanvasContainer").offset().left,c+=b.dX,CanvasManager.zone0Activ=c>-d,CanvasManager.zone1Activ=c>-2*d&&c<=diff,CanvasManager.zone2Activ=c>-3*d&&c<=diff-d,$("#innerCanvasContainer").css("left",c+"px")}}}),$("a").live("touchend",function(a){location.href=$(this).attr("href")}))};a.scrollToNextZone=function(b){if(GameManager.company){var c=GameManager.company.flags.currentZone;void 0===
c&&(c=1);c=(c+b).clamp(0,2);4!=GameManager.company.currentLevel?c=1:(GameManager.company.flags.hwLabUnlocked||(c=c.clamp(1,2)),GameManager.company.flags.rndLabUnlocked||(c=c.clamp(0,1)));a.scrollToZone(c,!0)}};a.scrollToZone=function(b,c){var d=CanvasManager.backgroundStage.canvas.width;void 0===b&&(b=1);var f=0==b?a.toScreenCoordinates(270):1==b?a.toScreenCoordinates(2560):a.toScreenCoordinates(4760),f=f*CanvasManager.globalScale,g=$("#canvasScrollContainer").width(),d=Math.abs(g-d)/2,d=f+d*b;$("#innerCanvasContainer").offset().left!=
d&&(f=c?a.toScreenCoordinates(600):0,a.isAnimatingScroll=!0,$("#innerCanvasContainer").transition({left:-d},f),setTimeout(function(){a.isAnimatingScroll=!1},f));a._zoneChanged(b,c);GameManager.company.flags.currentZone=b};a.updateComputers=function(){GameManager.company.staff.slice().sort(function(a,b){return a.slot-b.slot}).forEach(function(b){a.addComputer(b)})};var f;a.updateCompanyNameInOffice=function(){var b=GameManager.company.currentLevel;1!=b&&(f||(f=new IsometricCompanyNameVisual,CanvasManager.backgroundStage.addChild(f)),
f.updateVisual(2==b),2===b||3==b?(f.x=a.toScreenCoordinates(690,CanvasManager.globalScale),f.y=a.toScreenCoordinates(1100,CanvasManager.globalScale)):4==b&&(f.x=a.toScreenCoordinates(1410,CanvasManager.globalScale),f.y=a.toScreenCoordinates(300,CanvasManager.globalScale),f.scaleX*=0.8,f.scaleY*=0.8),f.x+=a.currentXOffset)};a.startCreateEngine=function(){a.gameStatusBar.startEngine();a.updatePoints()};a.startContract=function(){a.gameStatusBar.startContract();a.updatePoints()};a.updateEngineStatus=
function(){var b=GameManager.currentEngineDev;a.gameStatusBar.updateProgress(b.progress,!0,100);a.gameStatusBar.updateStatusMessage(b.currentPart.name)};a.finishEngine=function(){a.gameStatusBar.finishEngine();GameManager.spawnedPoints=0};a.updatePoints=function(){a.gameStatusBar.updatePoints();a.researchPoints.updatePoints(GameManager.company.researchPoints)};a.pulsePointsDisplay=function(b,c){"r"===b?a.researchPoints.pulse(c):a.gameStatusBar.pulsePointsDisplay(b,c)};a.getGlobalLocationOfPointsDisplay=
function(b){return"r"===b?{x:a.researchPoints.x+a.researchPoints.size/2,y:a.researchPoints.y+a.researchPoints.size/2}:a.gameStatusBar.getGlobalLocationOfPointsDisplay(b)};a.reloadAllCharacters=function(){if(GameManager.company&&GameManager.company.staff)for(var b=GameManager.company.staff,c=0;c<b.length;c++){var d=b[c];a.getCharacterOverlay(d);d.refreshPoints()}};a.characterOverlays=[];a.getCharacterOverlay=function(b,c){var d=a.characterOverlays.first(function(a){return a.character===b});return d||
c?d:a.createCharacterOverlay(b)};a.getCurrentPosition=function(b,c){var d={};1===b&&(d.x=998*CanvasManager.globalScale,d.y=599*CanvasManager.globalScale);2===b||3===b?0===c?(d.x=1515*CanvasManager.globalScale,d.y=995*CanvasManager.globalScale):1===c?(d.x=1055*CanvasManager.globalScale,d.y=790*CanvasManager.globalScale):2===c?(d.x=803*CanvasManager.globalScale,d.y=589*CanvasManager.globalScale):3===c?(d.x=1283*CanvasManager.globalScale,d.y=658*CanvasManager.globalScale):4===c&&(d.x=1036*CanvasManager.globalScale,
d.y=451*CanvasManager.globalScale):4===b&&(0===c?(d.x=1565*CanvasManager.globalScale,d.y=915*CanvasManager.globalScale):1===c?(d.x=516*CanvasManager.globalScale,d.y=1023*CanvasManager.globalScale):2===c?(d.x=436*CanvasManager.globalScale,d.y=711*CanvasManager.globalScale):3===c?(d.x=798*CanvasManager.globalScale,d.y=857*CanvasManager.globalScale):4===c?(d.x=719*CanvasManager.globalScale,d.y=547*CanvasManager.globalScale):5===c?(d.x=1067*CanvasManager.globalScale,d.y=694*CanvasManager.globalScale):
6===c&&(d.x=989*CanvasManager.globalScale,d.y=382*CanvasManager.globalScale));d.x=a.toScreenCoordinates(d.x);d.y=a.toScreenCoordinates(d.y);d.x+=a.currentXOffset;return d};a.positionCharacterOverlay=function(b,c,d){var f=a.getCurrentPosition(c,d);b.x=f.x;b.y=f.y;a.updateImages(b,c,d)};a.updateImages=function(b,c,d){var f=200;PlatformShim.ISLOWRES&&(f=107);var g=CanvasManager.globalScale;if(2===d||4===d||6==d)2===c?(b.deskImage=a.getSubImage(b.x-807/a.Divisor*g,b.y-527/a.Divisor*g,f,f,ResourceKeys.Level2Desk),
2===d?(b.keyBoardImage=a.getSubImage(b.x-889/a.Divisor*g,b.y-716/a.Divisor*g,f,f,ResourceKeys.Level2C2Keyboard),b.pcImage=a.getSubImage(b.x-880/a.Divisor*g,b.y-698/a.Divisor*g,f,f,ResourceKeys.Level2C2)):(b.keyBoardImage=a.getSubImage(b.x-1117/a.Divisor*g,b.y-582/a.Divisor*g,f,f,ResourceKeys.Level2C2Keyboard),b.pcImage=a.getSubImage(b.x-1114/a.Divisor*g,b.y-511/a.Divisor*g,f,f,ResourceKeys.Level2C4))):3===c?(b.deskImage=a.getSubImage(b.x-807/a.Divisor*g,b.y-527/a.Divisor*g,f,f,ResourceKeys.Level3Desk),
2===d?(b.keyBoardImage=a.getSubImage(b.x-893/a.Divisor*g,b.y-713/a.Divisor*g,f,f,ResourceKeys.Level3C2Keyboard),b.pcImage=a.getSubImage(b.x-878/a.Divisor*g,b.y-703/a.Divisor*g,f,f,ResourceKeys.Level3C2)):(b.keyBoardImage=a.getSubImage(b.x-1130/a.Divisor*g,b.y-578/a.Divisor*g,f,f,ResourceKeys.Level3C2Keyboard),b.pcImage=a.getSubImage(b.x-1109/a.Divisor*g,b.y-511/a.Divisor*g,f,f,ResourceKeys.Level3C4))):4===c&&(b.deskImage=a.getSubImage(b.x-427/a.Divisor*g,b.y-460/a.Divisor*g,f,f,ResourceKeys.Level4Desk),
2===d?(b.keyBoardImage=a.getSubImage(b.x-541/a.Divisor*g,b.y-840/a.Divisor*g,f,f,ResourceKeys.Level4C2Keyboard),b.pcImage=a.getSubImage(b.x-428/a.Divisor*g,b.y-756/a.Divisor*g,f,f,ResourceKeys.Level4C2)):4===d?(b.keyBoardImage=a.getSubImage(b.x-824/a.Divisor*g,b.y-676/a.Divisor*g,f,f,ResourceKeys.Level4C2Keyboard),b.pcImage=a.getSubImage(b.x-711/a.Divisor*g,b.y-591/a.Divisor*g,f,f,ResourceKeys.Level4C2)):6===d&&(b.keyBoardImage=a.getSubImage(b.x-1094/a.Divisor*g,b.y-511/a.Divisor*g,f,f,ResourceKeys.Level4C2Keyboard),
b.pcImage=a.getSubImage(b.x-981/a.Divisor*g,b.y-426/a.Divisor*g,f,f,ResourceKeys.Level4C2)))};a.getSubImage=function(b,c,d,f,g){var p=document.createElement("canvas");p.width=d;p.height=f;p.getContext("2d").drawImage(GameDev.ResourceManager.resources[g],-((b-a.currentXOffset)/CanvasManager.globalScale),-c/CanvasManager.globalScale);b=new Image;b.src=p.toDataURL("image/png");return b};a.refreshHiringButtons=function(){var b=$("#canvasContainer");b.find(".hireStaffButtonBase").remove();var c=GameManager.company.currentLevel,
d=GameManager.company.staff;if(1<c&&(2!=c&&3!=c||5!=d.length)&&!(3<c&&7==d.length)){var f=[1,2,3,4,5,6].first(function(a){return!d.some(function(b){return b.slot==a})}),c=a.createHireButton(c,f);b.append(c);UI.maxFont("bold",b.find(".hireButtonLabel"),12)}};var g;a.updateReleaseReadyButton=function(){g||(g=$('<div id="releaseButton" class="selectorButton greenButton windowStyleHideState" style="position:absolute; opacity=0;">'+"Finish".localize("button")+"</div>"),g.gdIsActive=!1,$("#canvasContainer").append(g));
var a=g.parent().width();g.css({left:a/2-g.width()/2+"px"});a=GameManager.company&&GameManager.company.currentGame&&!GameManager.company.currentGame.flags.devCompleted&&GameManager.company.currentGame.flags.releaseReady;if(a!=g.gdIsActive){g.gdIsActive=a;var b=function(){g.transition({opacity:0},200);g.removeClass("windowStyleShowState").addClass("windowStyleHideState");g.gdIsActive=!1};a?(g.transition({opacity:1},200),g.removeClass("windowStyleHideState"),Sound.playSoundOnce("gameReady",0.2),g.clickExclOnce(function(a){Sound.click();
b();GameManager.currentFeature&&(GameManager.currentFeature.progress=1);GameManager.company.currentGame&&(GameManager.company.currentGame.flags.finished=!0);return!1})):b()}};a.createHireButton=function(b,c){var d=$(PlatformShim.toStaticHtml('<div class="hireStaffButtonBase hireStaffButton"><div class="hireButtonLabel">'+"Fill Position".localize()+'</div><div class="hireStaffProgress"></div></div>')),f=0,g=0;if(2===b||3===b)switch(c){case 1:f=1060;g=840;break;case 2:f=880;g=720;break;case 3:f=1290;
g=720;break;case 4:f=1130,g=580}if(4===b)switch(c){case 1:f=480;g=1040;break;case 2:f=480;g=850;break;case 3:f=750;g=920;break;case 4:f=780;g=680;break;case 5:f=1050;g=730;break;case 6:f=1E3,g=500}f=a.toScreenCoordinates(f,CanvasManager.globalScale);g=a.toScreenCoordinates(g,CanvasManager.globalScale);f+=a.currentXOffset;d.css({position:"absolute",top:g+"px",left:f+"px"});d.on("mousedown mouseup mouseleave",function(a){$(this).toggleClass("active","mousedown"===a.type)});d.clickExcl(function(){Sound.click();
1==GameManager.company.maxStaff?(GameManager.company.activeNotifications.insertAt(0,new Notification("Hint".localize(),"You have to complete the Staff Management training before you can hire someone. Simply {0} on your player character to access the training menu.".localize().format(Tutorial.getClickVerb()))),GameManager.showPendingNotifications()):UI.isStaffSearchInProgress()||(1<GameManager.company.staff.length?Tutorial.hireMoreStaff():Tutorial.findStaff(),UI.showFindStaffWindow(c));window.event.cancelBubble=
!0});return d};a.createCharacterOverlay=function(c){var d=b.characterStage,f=new CharacterOverlay(c);a.positionCharacterOverlay(f,GameManager.company.currentLevel,c.slot);a.characterOverlays.push(f);a.addCharacterOverlayToStage(d,f);return f};a.addCharacterOverlayToStage=function(a,b){var c=b.character.slot;if(0===c)a.addChild(b);else for(var d=0;d<a.children.length;d++)if(a.children[d].character)if(4===c||6===c||3===c||5===c){a.addChildAt(b,0);break}else if(1===c&&1>a.children[d].character.slot||
2===c&&4>a.children[d].character.slot||3===c&&2>a.children[d].character.slot){a.addChildAt(b,d);break}else if(4<c){a.addChild(b);break}};a.refreshTrainingOverlays=function(){var b=$("#canvasContainer");b.find(".trainingOverlayTemplate").remove();for(var c=0;c<a.characterOverlays.length;c++){var d=a.characterOverlays[c],f=$("#trainingOverlayTemplate").clone();f.removeAttr("id");var g=GameFlags.IS_LOW_RES?-30:0;f.css({position:"absolute",top:d.y-VisualsManager.toScreenCoordinates(120,CanvasManager.globalScale)+
"px",left:d.x-VisualsManager.toScreenCoordinates(60,CanvasManager.globalScale)+g+"px",transform:"scale({0},{0})".format(CanvasManager.globalScaleIgnoringLowResBackground)});d.trainingOverlay=f;b.append(f);f.hide();d.resumeTraining()}}})();
(function(){var a=VisualsManager,b=[];a.refreshLabCrew=function(){b&&(b.forEach(function(a){a.parent.removeChild(a)}),b=[]);f();l();4==GameManager.company.currentLevel&&a._zoneChanged(GameManager.company.flags.currentZone,!1)};var c=function(a){var b=$("#projectStatusCardTemplate").clone();b[0].id=void 0;b.find(".projectBudgetSlider").slider({orientation:"horizontal",range:"min",min:0,max:100,value:a,animate:"fast",slide:function(a,c){var d=$(c.handle).closest(".projectBudgetSlider");if(!d.hasClass("projectBudgetSlider"))throw"couldn't find target slider";
b._gd_sliderValue=c.value;d.slider("value",c.value);d=c.value;b.hasClass("rndCard")?GameManager.company.flags.rndBudget=d/100:GameManager.company.flags.hwBudget=d/100;m(b)}});return b},d,f=function(){var f=GameManager.company;if(!d){var h=f.flags.hwBudget;void 0==h&&(h=0);d=c(100*h);d.addClass("projectCardLeft").addClass("hwCard");d.find(".projectCardLabel").text("Hardware lab".localize());d.clickExcl(function(){a.scrollToZone(0,!0)});d.insertBefore("#consoleMaintenanceContainer");d._gd_projectVisible=
!0}if(4>f.currentLevel||!f.flags.hwLabUnlocked)d.hide();else{d.show();m(d,GameManager.currentHwProject);f.hwCrew||(f.hwCrew=[]);for(var k=f.hwCrew,l=GameManager.getMaxHwBudget(),h=CanvasManager.leftScreen.characterStage,t=[],r=0;12>=r;r++){k.length<r+1&&(k.push(new ProjectWorkerVisual),k[r].zone=0,k[r].setPosition(r),k[r].loadAnimations());var u=k[r];u.getCurrentProject=function(){return GameManager.currentHwProject};(function(a,b){a.getAffordanceFactor=function(){return g(l*f.flags.hwBudget,b)}})(u,
l/12*(r+1));3==r||7==r?t.push(u):(h.addChild(u),b.push(u))}r=0;for(k=t.length;r<k;r++)h.addChild(t[r]),b.push(t[r]);a.putConsoleToPedestal()}};a.putConsoleToPedestal=function(){var b=GameManager.company;if(4===b.currentLevel&&b.flags.hwLabUnlocked){a.consoleContainer&&CanvasManager.leftScreen.backgroundOverlayStage.contains(a.consoleContainer)&&CanvasManager.leftScreen.backgroundOverlayStage.removeChild(a.consoleContainer);var c=void 0,d=void 0;if(GameManager.currentHwProject&&"custom console"===
GameManager.currentHwProject.id)c={iconUri:GameManager.currentHwProject.iconUri};else if(d=b.licencedPlatforms.filter(function(a){return a.isCustom}),d.length)c=d.last();else if((d=b.currentGame)&&0<d.platforms.length&&"PC"!=d.platforms[0].id&&"G64"!=d.platforms[0].id&&"Gameling"!=d.platforms[0].id&&"Vena Gear"!=d.platforms[0].id&&"PPS"!=d.platforms[0].id&&"GS"!=d.platforms[0].id&&"grPhone"!=d.platforms[0].id)c=b.currentGame.platforms[0];else for(d=b.gameLog.length-1;0<d;d--){var f=b.gameLog[d].platforms;
if("PC"!=f[0].id&&"G64"!=f[0].id&&"Gameling"!=f[0].id&&"Vena Gear"!=f[0].id&&"PPS"!=f[0].id&&"GS"!=f[0].id&&"grPhone"!=f[0].id){c=f[0];break}}c&&(d=Platforms.getPlatformImage(c,b.currentWeek),b=new createjs.Bitmap(d),c=new createjs.Container,d=CanvasManager.globalScale,c.scaleX=0.45*d,c.scaleY=0.45*d,c.x=2230*d,c.y=1104*d,c.addChild(b),a.consoleContainer=c,CanvasManager.leftScreen.backgroundOverlayStage.addChild(a.consoleContainer))}};var g=function(a,b){if(0===a)return-4;var c=a/b;1>c&&(c=-1+c);
return c},k,l=function(){var d=GameManager.company;if(!k){var f=d.flags.rndBudget;void 0==f&&(f=0);k=c(100*f);k.addClass("projectCardRight").addClass("rndCard");k.find(".projectCardLabel").text("R&D lab".localize());k.clickExcl(function(){a.scrollToZone(2,!0)});$("#gameUIContainer").append(k);k._gd_projectVisible=!0}if(4>GameManager.company.currentLevel||!d.flags.rndLabUnlocked)k.hide();else{k.show();m(k,GameManager.currentRnDProject);d.rndCrew||(d.rndCrew=[]);for(var h=d.rndCrew,l=GameManager.getMaxRndBudget(),
f=CanvasManager.rightScreen.characterStage,t=[],r=0;12>=r;r++){h.length<r+1&&(h.push(new ProjectWorkerVisual),h[r].zone=2,h[r].setPosition(r),h[r].loadAnimations());var u=h[r];u.getCurrentProject=function(){return GameManager.currentRnDProject};(function(a,b){a.getAffordanceFactor=function(){return g(l*d.flags.rndBudget,b)}})(u,l/12*(r+1));5===r||7===r?t.push(u):(f.addChild(u),b.push(u))}r=0;for(h=t.length;r<h;r++)f.addChild(t[r]),b.push(t[r])}};a._zoneChanged=function(a,b){var c=b?"normal":0;CanvasManager.zone0Activ=
0===a;CanvasManager.zone1Activ=1===a;CanvasManager.zone2Activ=2===a;2!=a&&k&&(k.find(".projectBudgetSlider").slideUp(c),k.find(".projectCardLabel").slideDown(c));2==a&&k&&(k.find(".projectBudgetSlider").slideDown(c),k.find(".projectCardLabel").slideUp(c));0!=a&&d&&(d.find(".projectBudgetSlider").slideUp(c),d.find(".projectCardLabel").slideDown(c));0==a&&d&&(d.find(".projectBudgetSlider").slideDown(c),d.find(".projectCardLabel").slideUp(c));h();2==a?Media.enterRndLab(GameManager.company):0==a&&Media.enterHwLab(GameManager.company)};
var h=function(){var a=CanvasManager.isSmallScreen;if(k){var b=a&&GameManager.currentRnDProject;b&&!k.hasClass("small")?k.addClass("small"):!b&&k.hasClass("small")&&k.removeClass("small")}d&&((b=a&&GameManager.currentHwProject)&&!d.hasClass("small")?d.addClass("small"):!b&&d.hasClass("small")&&d.removeClass("small"))},m=function(a){if(a){var b=GameManager.company;if(b){var c=100*b.flags.hwBudget,d=GameManager.getLabCostPerMonth(0),f=GameManager.currentHwProject;a.hasClass("rndCard")&&(f=GameManager.currentRnDProject,
d=GameManager.getLabCostPerMonth(2),c=100*b.flags.rndBudget);!f&&a._gd_projectVisible?(a.find(".projectStatusContainer").slideUp(),a._gd_projectVisible=!1):f&&(a._gd_projectVisible||(a.find(".projectStatusContainer").slideDown(),a._gd_projectVisible=!0),a._gd_iconUrl!=f.iconUri&&(a.find(".projectIcon").attr("src",f.iconUri),a._gd_iconUrl=f.iconUri),a._gd_title!=f.name&&(b=a.find(".projectTitle"),UI.maxFont("bold",b,20,f.name),a._gd_title=f.name),a._gd_progress!=f.progress&&(a.find(".projectProgress").stop().transit({width:100*
f.progress+"%"}),a._gd_progress=f.progress),a._gd_pointsRemaining!=f.remainingPoints&&(a.find(".projectPointsRemaining").text(f.startPoints-f.remainingPoints),a._gd_pointsRemaining=f.remainingPoints));a._gd_budget!==d&&(a.find(".projectBudgetValue").text("{0} per month".localize().format(UI.getShortNumberString(d))),a._gd_budget=d);Math.round(a._gd_sliderValue)!=Math.round(c)&&(a.find(".projectBudgetSlider").slider({value:c}),a._gd_sliderValue=c);h()}}};a.updateProjectStatusCards=function(){GameManager.company.flags.hwLabUnlocked&&
m(d);GameManager.company.flags.rndLabUnlocked&&m(k)}})();var WindowsIntegration={};
(function(){if(PlatformShim.ISWIN8){var a=WindowsIntegration,b=Windows.UI.Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication(),c="Player";Windows.System.UserProfile.UserInformation.getDisplayNameAsync().then(function(a){c=a});a.goToReviewPage=function(){var a=new Windows.Foundation.Uri("ms-windows-store:REVIEW?PFN={0}".format(Windows.ApplicationModel.Package.current.id.familyName));Windows.System.Launcher.launchUriAsync(a).done()};a.getUserName=function(){return c};$(document).ready(function(){$(document).find("#resumeCommandButton").hide();
$(document).find("#gamePausedOverlay").hide()});a.onPause=function(){b.clear();var a=new Windows.Data.Xml.Dom.XmlDocument;a.loadXml('<badge version="1" value="paused"/>');b.update(new Windows.UI.Notifications.BadgeNotification(a));$(document).find("#pauseCommandButton").hide();$(document).find("#gamePausedOverlay").css({opacity:0}).show().transit({opacity:1});$(document).find("#resumeCommandButton").show()};a.onResume=function(){var a=new Windows.Data.Xml.Dom.XmlDocument;a.loadXml('<badge version="1" value="none"/>');
b.update(new Windows.UI.Notifications.BadgeNotification(a));$(document).find("#pauseCommandButton").show();$(document).find("#gamePausedOverlay").transit({opacity:0});$(document).find("#resumeCommandButton").hide()};var d=new Windows.Devices.Input.TouchCapabilities;a.isTouchCapable=d.touchPresent;var f=Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication();a.updateTile=function(){var a=Windows.UI.Notifications.TileUpdateManager.getTemplateContent(Windows.UI.Notifications.TileTemplateType.tileWideText01);
if(!GameManager.company||0>=GameManager.company.gameLog.length)f.clear();else{var b=GameManager.company,c=b.getBestSeller();c&&(c=c.title);for(var d=a.getElementsByTagName("text"),b=[b.name,UI.getShortNumberString(b.cash)+" cash",UI.getShortNumberString(b.fans)+" fans","Bestseller: "+c.title],c=0;c<d.length;c++)d[c].appendChild(a.createTextNode(b[c]));a=new Windows.UI.Notifications.TileNotification(a);f.update(a)}};var g=function(a,b,c,d,f){f||(f=10);do{var g=b.format(c),g=new createjs.Text(a,g,"black");
c--}while(g.getMeasuredWidth()>d&&c>f);return c},k,l,h=function(a){var b=GameManager.company;if(b&&0!==b.gameLog.length){var c=document.createElement("canvas");c.width=558;c.height=270;k||(k=$('<img src="/images/active-tile.png" />'));var d=function(){var d=c.getContext("2d");d.drawImage(k[0],0,0);d.textAlign="center";var f=g(b.name,"bold {0}pt Segoe UI",40,300);d.fillStyle="black";d.font="bold {0}pt Segoe UI".format(f);d.fillText(b.name,370,50);var h=b.gameLog.slice().sort(function(a,b){return b.unitsSold-
a.unitsSold}).first().title,f=g(h,"bold {0}pt Segoe UI",22,250);d.font="bold {0}pt Segoe UI".format(f);d.fillText(h,370,90);h=UI.getShortNumberString(b.fans)+" fans";f=g(h,"bold {0}pt Segoe UI",40,290);d.font="bold {0}pt Segoe UI".format(f);d.fillText(h,370,160);h=UI.getShortNumberString(b.cash)+" cash";f=g(h,"bold {0}pt Segoe UI",32,250);d.font="bold {0}pt Segoe UI".format(f);d.fillText(h,370,210);h="{0} Achievements unlocked!".format(Achievements.getAllItems().count(function(a){return Achievements.hasAchieved(a)}));
f=g(h,"bold {0}pt Segoe UI",17,250);d.font="bold {0}pt Segoe UI".format(f);d.fillText(h,370,250);DataStore.saveCanvasToFile(c,"active-tile.png",a)};k.complete?d():k.load(function(){k.complete=!0;d()})}};a.updateImageTile=function(){if(!l){l=!0;try{h(function(){try{var a=Windows.UI.Notifications.TileUpdateManager.getTemplateContent(Windows.UI.Notifications.TileTemplateType.tileWideImage),b=a.getElementsByTagName("image");b[0].setAttribute("src","ms-appdata:///images/logo-wide.png");var c=new Windows.UI.Notifications.TileNotification(a);
m.update(c);b[0].setAttribute("src","ms-appdata:///local/active-tile.png");c=new Windows.UI.Notifications.TileNotification(a);m.update(c)}catch(d){Logger.LogInfo("game tile update failed",d)}l=!1})}catch(a){Logger.LogInfo("game tile update failed",a)}}};var m=Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication();a.showGetSteamKey=function(){var a=document.getElementById("steamkey");a.lastElementChild.innerText="Get Steam Key".localize();a.disabled=!1};a.getSteamkey=function(){Windows.ApplicationModel.Store.CurrentApp.getAppReceiptAsync().done(function(a){a=
encodeURIComponent(a);PlatformShim.xhr({type:"POST",url:"http://customers.greenheartgames.com/winstore",headers:{"Content-type":"application/x-www-form-urlencoded"},data:"data="+a},function(a){if(a&&a.responseText)if("INVALID"==a.responseText)WindowsIntegration.showGetSteamKey(),Logger.LogError("Could not verify app receipt",null,"Could not verify app receipt from Windows Store.".localize());else try{try{var b=new Windows.Foundation.Uri(a.responseText)}catch(c){WindowsIntegration.showGetSteamKey();
PlatformShim.alert(a.responseText,"Response");return}Windows.System.Launcher.launchUriAsync(b).done();WindowsIntegration.showGetSteamKey()}catch(d){WindowsIntegration.showGetSteamKey(),Logger.LogError("Invalid response: "+a.responseText,d,"Could not verify app receipt from Windows Store.".localize())}else WindowsIntegration.showGetSteamKey(),Logger.LogError("No response from server.",null,"No response from server. Please try again later.".localize())},function(a){WindowsIntegration.showGetSteamKey();
Logger.LogError("Could not verify app receipt",null,"Could not verify app receipt from Windows Store.".localize()+"\n"+a.statusText)})},function(a){WindowsIntegration.showGetSteamKey();Logger.LogError("Could not get app receipt",null,"Could not get app receipt from Windows Store.".localize()+"\n"+a.statusText)})}}})();var Tutorial={};
(function(){var a=function(a){return GameFlags.TUTORIAL_DISABLED?!1:SettingsGameplay.isTutorialOff()||!SettingsGameplay.alwaysShowTutorials()&&-1!=DataStore.getTutorialSettings()["tutorials-shown"].indexOf(a)?(b(a),!1):-1==GameManager.company.tutorialMessagesShown.indexOf(a)},b=function(a){var b=DataStore.getTutorialSettings();-1==GameManager.company.tutorialMessagesShown.indexOf(a)&&GameManager.company.tutorialMessagesShown.push(a);-1==b["tutorials-shown"].indexOf(a)&&(b["tutorials-shown"].push(a),
DataStore.saveSettings())},c=function(c,d,f){var g=c.id;c=c.msg;a(g)&&(d||(d=0),d=new Notification("Tutorial".localize(),c,"OK".localize(),d),f&&(d.image=f),GameManager.company.notifications.push(d),b(g))},d=WindowsIntegration.isTouchCapable?"tap".localize("verb"):"click".localize("verb");Tutorial.getClickVerb=function(){return d};Tutorial.messages={};var f=Tutorial.messages,g=function(a,b,c){this.id=a;this.heading=b;this.msg=c};Tutorial.getAllShownMessages=function(a){for(var b=[],c=0;c<a.tutorialMessagesShown.length;c++){var d=
a.tutorialMessagesShown[c];f.hasOwnProperty(d)&&b.push(f[d])}return b};f.createdCompany=new g("createdCompany","Create a company".localize("heading"),"Congratulations!\nYou've just started your very own game development company!\nAt the moment your office is in a garage and you are the only employee but don't worry, many successful businesses have started out this way!{n}Let's start developing your first game.\nClose this message and then {0} anywhere on the screen to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.createdCompany=function(){c(f.createdCompany)};f.createGame=new g("createGame","Create a game".localize("heading"),"Before development can begin you have to decide what kind of game you want to create and give your game a name.\nYou can also select which graphic technology your game should use.{n}Your options are initially limited but once you have a bit of experience you will be able to unlock new options.".localize());Tutorial.createGame=function(){c(f.createGame)};Tutorial.createSequel=
function(){};f.gamePoints=new g("gamePoints","Game points".localize("heading"),"Game development has now started.{n}While developing your game you will generate game points which you can see bubbling up.\nGame points are divided into design points and technology points. The more points you generate the better the game will be.{n}From time to time there will also be bug points generated. These points become less likely once you gain experience. Bugs should be fixed before the game is released and increase development time and cost.".localize());
Tutorial.gamePoints=function(){c(f.gamePoints)};f.firstGameFinished=new g("firstGameFinished","First game finished".localize("heading"),"After publishing a game you can invest a little bit of time to analyze your creation and generate a game report. Game reports are a great way to gain research points as well as valuable insights into what works and what doesn't work when developing a game.{n}To generate a game report close this message and then {0} anywhere on the screen to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.firstGameFinished=function(a){c(f.firstGameFinished,a)};var k=WindowsIntegration.isTouchCapable?"swipe from the edge of the screen to bring up the app bar".localize("appbar fragment"):"right click to bring up the app bar".localize("appbar fragment"),l=WindowsIntegration.isTouchCapable?"swipe from the right edge of the screen".localize("charmsbar fragment"):"bring your cursor to the top right corner of the screen and then move down.".localize("charmsbar fragment");f.appbarAndHelpWin8=new g("appbarAndHelp",
"Appbar and help menu".localize("heading"),"If you ever want to review the tutorial messages then you can do so in the Help menu. To access the Help menu and other features such as saving, loading and creating a game simply {0}.{n}You can also change game settings by using the Settings charm. To show the charms bar simply {1} You can then {2} on Settings.".localize("{0} is appbar fragment, {1} is charmsbar fragment, {2} is click/tap verb").format(k,l,Tutorial.getClickVerb()));f.mainMenu=new g("mainMenu",
"Main Menu".localize("heading"),"If you ever want to review the tutorial messages then you can do so in the Help menu. To access the Help menu and other features such as saving, loading and creating a game simply press ESC to access the main menu.".localize());Tutorial.AppbarAndHelp=function(){PlatformShim.ISWIN8?c(f.appbarAndHelpWin8):c(f.mainMenu)};f.contractsUnlocked=new g("contractsUnlocked","Contracts unlocked".localize("heading"),"Contracts have now been unlocked.\nTo see available contracts close this message and then {0} anywhere on the screen to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.contractsUnlocked=function(a){c(f.contractsUnlocked,a)};f.contracts=new g("contracts","Contracts".localize(),"Contracts are a useful tool to earn some extra cash when your balance is low and can also be useful to generate a small number of research points.\nContracts require you to generate a certain amount of design and technology points before the time runs out.{n}Decide carefully what contract you accept. If you miss the deadline for a contract you will have to pay a penalty so it's better to start out with smaller contracts and see how much you can handle.".localize());
Tutorial.contracts=function(){c(f.contracts)};f.gameReleased=new g("gameReleased","Game released".localize("heading"),"Your game is now complete and will be handed off to publishing.\nWe should see reviews and sales coming in for the game soon!".localize());Tutorial.gameReleased=function(){c(f.gameReleased)};f.gameDevCompleted=new g("gameDevCompleted","Game development completed".localize("heading"),"The development of your game has now finished. While developing games you gain experience and improve your skills.\nWhen development is completed you will be presented with a summary of the experience gained.".localize());
Tutorial.gameDevCompleted=function(a){c(f.gameDevCompleted,a)};f.firstSales=new g("firstSales","First sales".localize("heading"),"Now that your game is on sale you will receive the income from the game every week.\nYou can see how well your game is doing by looking at the sales graph in the top right of the screen.".localize());Tutorial.firstSales=function(){c(f.firstSales,0.1)};f.researchMenu=new g("researchMenu","Research".localize("heading"),"Research is important to unlock new options and make better games.\nYou should try to save enough research points to be able to create your own game engine.\nThis will greatly improve your games.{n}Hint: Try to develop games with different topic and genre combinations for a slight research boost.".localize());
Tutorial.researchMenu=function(){c(f.researchMenu)};f.devPhases=new g("devPhases","Development phases".localize("heading"),"Game development runs through three stages. At the beginning of each stage you can decide what areas of the game you want to focus on.\nPicking the right focus for your game greatly increases the points you generate.{n}Think about what areas are important for your game and decrease the focus on areas you think are less important. If you want to read a brief description of the different areas please refer to the Help menu.".localize());
Tutorial.devPhases=function(a){c(f.devPhases,a)};f.researchedCustomEngine=new g("researchedCustomEngine","Research custom engine".localize("heading"),"Now you can create your own game engines.\nTo get started close this message and {0} anywhere to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.researchedCustomEngine=function(){c(f.researchedCustomEngine)};f.researchedEnginePart=new g("researchedEnginePart","Research engine part".localize("heading"),
"You have just researched your first engine part.\nTo be able to use this in your games you need to create a new engine which includes this part.".localize());Tutorial.researchedEnginePart=function(){c(f.researchedEnginePart)};f.creatingEngine=new g("creatingEngine","Creating engine".localize("heading"),"You are now creating your own custom game engine.\n\nOnce the engine is finished you will be able to use it when creating new games.".localize());Tutorial.creatingEngine=function(){c(f.creatingEngine,
0.5)};f.targetAudience=new g("targetAudience","Target audience".localize("heading"),"You can now specify what your main target audience is for your game. Games can be targeted at young people, at everyone or at more mature audiences.{n}Picking the right target audience for your game is important. Your target platform can also play a role. Some platforms are especially popular with a specific audience.".localize());Tutorial.targetAudience=function(){c(f.targetAudience)};f.marketingUnlocked=new g("marketingUnlocked",
"Marketing Unlocked".localize("heading"),"You've successfully unlocked marketing. You can access marketing options in the action menu but only while a game is in development.".localize());Tutorial.marketingUnlocked=function(){c(f.marketingUnlocked)};f.marketing=new g("marketing","Marketing".localize(),"Marketing can be very effective to reach more potential customers but it can be very expensive too. It is best to experiment carefully with marketing to get a feel for what works best. Don't invest too much and remember that timing is important. Don't invest in your marketing efforts too early in development or too late.{n}It is also important to know that no matter how much money you pump into marketing, it will not make a bad game successful. To the contrary, it can even hurt to market bad games too much as it can upset your existing fans.".localize());
Tutorial.marketing=function(a){c(f.marketing,a)};f.hypePoints=new g("hypePoints","Hype points".localize("heading"),"Developing a great game is not the only recipe for success. It is essential to build hype to ensure that players are excited about your game.{n}In the beginning of your career, hype is mostly generated through random events but once you gain more experience you can use marketing and other strategies to generate hype.".localize());Tutorial.hypePoints=function(){c(f.hypePoints)};f.level2=
new g("level2","Level 2".localize("heading"),"You now may also train yourself and your staff to improve skills.\nLet's try this by completing a management course which is required before you can hire your first employee.{n}To get started close this message and then {0} on your character to bring up the training menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.level2=function(){c(f.level2,0.3)};f.firstEngine=new g("firstEngine","First engine".localize("heading"),"Congratulations! Your first custom game engine is now ready.\nYou should try using it in your next game.".localize());
Tutorial.firstEngine=function(){c(f.firstEngine)};f.findStaff=new g("findStaff","Finding staff".localize("heading"),"Before you can hire someone you have to advertise the open position, set an advertising budget and decide how you want to test your applicants.{n}A high budget will increase the number of applicants and the different tests will help find people with the right balance of design and technology skills.".localize());Tutorial.findStaff=function(){c(f.findStaff)};f.needsAHoliday=new g("needsAHoliday",
"Staff vacation".localize("heading"),"From time to time your employees need to recharge their batteries and go on vacation. You can tell that an employee is in need of rest when their efficiency steadily decreases.{n}To give them a holiday just {0} on them and select Send on Vacation".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.needsAHoliday=function(){c(f.needsAHoliday,0.3)};f.hireStaff=new g("hireStaff","Hiring staff".localize("heading"),"The search for the open position is complete!\nYou can now review the list of applicants and hire someone for this position.{n}Don't forget that you can always train your employees to improve their skills.".localize());
Tutorial.hiringStaff=function(b){a("hireStaff")&&(c(f.hireStaff,b),Media.createLevel2OfficeStory())};f.staffHired=new g("staffHired","Staff hired".localize("heading"),"Congratulations on your first hire!\nNew employees have to settle in before they become fully effective.\nWhen a character is not fully efficient you can see an efficiency bar next to them. This bar will fill up slowly over time.{n}It is usually a good idea to give your new staff a Welcome training to get them up to speed quickly.\nThis will maximize their efficiency way faster than normally.\nTo do this close this message and then {0} on the character to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.staffHired=function(){a("staffHired")&&c(f.staffHired)};f.hireMoreStaff=new g("hireMoreStaff","Hiring more staff".localize("heading"),"You can hire up to four employees in this office. Don't try to hire everyone at once as staff are expensive.\nMany rookies hire too early and go bankrupt.\nIt is best to take it slow.".localize());Tutorial.hireMoreStaff=function(){c(f.hireMoreStaff)};f.boosts=new g("boosts","Boosts".localize("heading"),"Boosts are a powerful tool that allow you to temporarily increase the output of your staff.\nThey are most effective when timed strategically during the development of a game or during training.{n}Boosts need to recharge before you can use them. You can activate a boost as soon as the recharge progress is complete but you can also wait a little longer to further increase the effectiveness of the boost.".localize());
Tutorial.boosts=function(){c(f.boosts,0.3,"./images/misc/boost.png")};f.additionalFeatures=new g("additionalFeatures","Additional game features".localize("heading"),"During development you can also select additional features for your game. Right now you can only pick 'Basic Sounds' but your options will increase quickly. Selecting additional features makes the game generally better but also increases its cost.{n}You will also see the graphic type you selected when you defined the game. This is just to remind you of your choice. You cannot change the type of graphics mid-game.".localize());
Tutorial.additionalFeatures=function(a){c(f.additionalFeatures,a)};f.finishingPhase=new g("finishingPhase","Finishing phase".localize("heading"),"The development of your first game is now complete. You can press the 'Finish' button to publish your game but you should only do that once you fix the majority of bugs.{n}Releasing a game without fixing bugs can severely affect your ratings so you should only ever consider that if you need the cash and you can't afford to wait.".localize());Tutorial.finishingPhase=
function(a){c(f.finishingPhase,a)};f.training=new g("training","Training".localize("heading"),"If you want to create hit-games and have a world class team then training is important.\n For best results train your staff regularly but don't overwhelm them with too many sessions at once.{n}There are different training options available.\nSome options are better to increase certain skills than others. Experimenting is the best way to figure out which training options fit your plans.\nIt is useful to have a mix of 'specialists' and allrounders in your team but aim to have at least one design specialist and technology specialist.".localize());
Tutorial.training=function(){c(f.training)};f.staffReachedLvl5=new g("staffReachedLvl5","Level 5 unlocks".localize("heading"),"Someone on your team has reached experience level 5! This unlocks a special training item called Boost. The training for it is expensive and you can only do it once the character has at least 500 design or technology points but the investment is well worth it.{n}Once trained, the boost allows you to temporarily increase the output of your staff and can really help you to make a hit-game.".localize());
Tutorial.staffReachedLvl5=function(){c(f.staffReachedLvl5)};f.publishers=new g("publishers","Publishers".localize("heading"),"Using a publisher is a great way to get your games in front of a large audience which in turns helps to grow your fan base.\nOnce your fan base is big enough you can self-publish your larger games without the need for a publisher.\nFor medium games you should aim to have at least 100K fans before you publish them yourself.{n}To use a publisher you need to sign a contract. The contract will dictate what game you need to create. Pay attention to all the details, most importantly the minimum score that the contract dictates. If the game you release does not meet the minimum score you will have to pay a penalty, which can be costly.{n}It is also important to pay attention to the royalty rate. The higher the rate the more money you will make from the contract.".localize());
Tutorial.publishers=function(){c(f.publishers)};f.staffResponsibility=new g("staffResponsibility","Staff responsibilities".localize("heading"),"Creating larger games is a significant task and, unlike in small games, one person cannot effectively be responsible for every aspect of a game.\nTo create a good game and to make best use of your team you will have to assign which of your team is responsible for which areas.{n}Pick team members whose skills match the area to get the best result.\nWhen you assign a team member responsibilities you will see their workload. Try not to overload them too much.".localize());
Tutorial.staffResponsibility=function(a){c(f.staffResponsibility,a)};f.designSpecialist=new g("designSpecialist","Design specialist".localize("heading"),"You need a design specialist to open a research and development lab. You can train someone to become a specialist via the training menu but the option is only available once they have a certain design skill level.{n}You can also train technology specialists which come in handy for later options.".localize());Tutorial.designSpecialist=function(a){c(f.designSpecialist,
a)};f.rndLabReady=new g("rndLabReady","R&D lab is ready".localize("heading"),"To visit the lab simply {0} the screen and drag to the left or use the arrow keys on the keyboard. Alternatively, you can also click on the little R&D Lab information card in the bottom right of the screen.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.rndLabReady=function(){c(f.rndLabReady)};f.rndLab=new g("rndLab","R&D lab".localize(),"To start a project simply {0} the screen to bring up the research menu.\nOnce you start a project you can also cancel it using the same menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.rndLab=function(a){c(f.rndLab,a)};f.hwLabReady=new g("hwLabReady","Hardware lab is ready".localize("heading"),"To visit the hardware lab simply {0} the screen and drag to the right or use the arrow keys on the keyboard. Alternatively, you can also click on the little Hardware Lab information card in the top left of the screen.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));Tutorial.hwLabReady=function(){c(f.hwLabReady)};f.rndProjectStarted=new g("rndProjectStarted","R&D project started".localize("heading"),
"The project is now started and as your researchers work on it you will see the progress in the status card. Don't forget to adjust the budget! If the budget is 0 the project will never progress.".localize());Tutorial.rndProjectStarted=function(){c(f.rndProjectStarted)};f.consoleDev=new g("consoleDev","Console Development".localize(),"Developing your own console is a very costly undertaking. Not only do you have to pay a big chunk of money up front for the project but you will also have to pay your hardware lab crew. Only attempt to create a console if you are confident that you have enough capital.{n}When developing a console you can decide on how your console will look like and decide on the technical features as well as the quality assurance budget. The more sophisticated your technology is the better the console will fare against competing products. The more budget you reserve for QA the better the quality of your console will be.".localize());
Tutorial.devConsole=function(){c(f.consoleDev)};f.consoleReleased=new g("consoleReleased","Console released".localize("heading"),"Your very own game console is now on the market. Game consoles are complex machines and when you sell a lot of them it is only natural that some of them need to be repaired.{n}While your console is on sale your hardware team will have to work off maintenance points. Depending on the quality of the console and how many you sell these points vary from week to week.{n}Try to give your hardware lab enough budget so that they stay on top of the maintenance, otherwise customers will become unhappy when they have to wait too long for their consoles to be repaired. You can see how well your team is doing in the console information card in the top left of the screen.".localize());
Tutorial.consoleReleased=function(a){c(f.consoleReleased,a)};f.mmoOnSale=new g("mmoOnSale","MMO on sale".localize("heading"),"Your MMO is on sale now. MMOs work slightly different than normal games. MMOs not only generate income but also cause maintenance costs as we need to run game servers and provide customer services. You will see the amount of maintenance paid in the sales card.{n}Unlike other games which have a limited sales duration MMOs sell indefinitely. You will have to decide yourself when you want to take an MMO off the market. To take an MMO off the market simply {0} on the sales card to bring up a menu.{n}Since MMOs are so expensive to create you might want to try to expand your current MMO rather than create a new one. To do this you will need to create a expansion pack, which you can start to research now.".localize().format(Tutorial.getClickVerb()));
Tutorial.mmoOnSale=function(a){c(f.mmoOnSale,a)};f.additionalSpecialists=new g("additionalSpecialists","Additional Specialists".localize("heading"),"While you only need one specialist to start running a lab you can train more than one. Additional specialists decrease the overall running cost of your lab.".localize());Tutorial.additionalSpecialists=function(a){c(f.additionalSpecialists,a)};f.missionHints=new g("missionHints","Hints".localize("heading"),"While generating game reports you start to gain insights into the development process and learn about what works well and what doesn't work so well.\nThese insights are shown as hints on the development screen (unless you have turned this option off in the settings).{n}The hints range from '+++' to '--' and indicate how important an area is for this type of game. When hints have a question mark at the end (e.g. '+++?') it means that you have insights from a game in the same genre but that you are not yet sure whether this holds true for this particular genre/topic combination.".localize());
Tutorial.missionHints=function(a){c(f.missionHints,a)};f.gameReportComplete=new g("gameReportComplete","Game Reports".localize("heading"),"Game reports are a great way to gain more research points and new insights. It pays off to generate a report for each game you release.\nNow that you've completed your first game report it's a good idea to look at the research menu.\nTo open the research menu close this message and then {0} anywhere on the screen to bring up the action menu.".localize("{0} click/touch verb").format(Tutorial.getClickVerb()));
Tutorial.gameReportComplete=function(a){c(f.gameReportComplete,a)}})();var Research={};
(function(){var a=Research;a.FACTOR_FOR_NEW_COMBINATIONS=2;a.TOPICS_VISIBLE=4;var b="General",c="General".localize(),d="general";a.ResearchTopicItem={id:"New Topic",name:"New Topic".localize(),pointsCost:10,duration:1E4,category:b,categoryDisplayName:c};a.CustomEngine={id:"Custom Engine",name:"Custom Game Engine".localize(),pointsCost:50,duration:15E3,category:b,categoryDisplayName:c};a.BasicItems=[a.ResearchTopicItem,a.CustomEngine];a.checkForNewResearch=function(){for(var b=[],c=GameManager.company,
d=this.getAllItems().except(Research.StartEngineParts.concat(c.researchCompleted.concat(c.availableResearch).concat(General.getAvailableEngineParts(c)))),f=0;f<d.length;f++){var m=d[f];void 0!=m.canResearch&&m.canResearch(c)&&(m.v&&c.canDevelopEngine()||!m.v)&&-1==b.indexOf(m)&&b.push(m)}if(0<b.length){d="New research available:".localize();for(f=0;f<b.length;f++)m=b[f],c.availableResearch.push(m),d+="\n"+m.name;b=new Notification("New Research!".localize("heading"),d);b.sound="research";c.notifications.push(b)}a._checkForNewLabResearch&&
a._checkForNewLabResearch(c)};b="Graphic";c="Graphic".localize();d="graphic-type";a.textGraphics={id:"Text Based",name:"Text based".localize(),devCost:2E3,v:1,techLevel:0,category:b,categoryDisplayName:c,group:d};var f="2D Graphics V{0}".localize();a.TwoDGraphicsV1={id:"2D Graphics V1",name:f.format(1),engineCost:1E4,devCost:15E3,v:2,canResearch:function(a){return!1},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:1};a.TwoDGraphicsV2={id:"2D Graphics V2",name:f.format(2),v:4,canResearch:function(a){return!1},
category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:2,showXPGain:!0};a.TwoDGraphicsV3={id:"2D Graphics V3",name:f.format(3),v:6,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"2D Graphics V2")},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:2,showXPGain:!0};a.TwoDGraphicsV4={id:"2D Graphics V4",name:f.format(4),v:8,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"2D Graphics V3")},category:b,categoryDisplayName:c,group:d,consolePart:!0,
techLevel:3,showXPGain:!0};a.TwoDGraphicsV5={id:"2D Graphics V5",name:f.format(5),v:10,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"2D Graphics V4")},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:3,showXPGain:!0};f="3D Graphics V{0}".localize();a.ThreeDGraphicsV1={id:"3D Graphics V1",name:f.format(1),v:2,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"2D Graphics V2")},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:1,
showXPGain:!0};a.ThreeDGraphicsV2={id:"3D Graphics V2",name:f.format(2),v:4,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"3D Graphics V1")},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:2,showXPGain:!0};a.ThreeDGraphicsV3={id:"3D Graphics V3",name:f.format(3),v:6,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"3D Graphics V2")},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:3,showXPGain:!0};a.ThreeDGraphicsV4={id:"3D Graphics V4",
name:f.format(4),v:8,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"3D Graphics V3")},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:4,showXPGain:!0};a.ThreeDGraphicsV5={id:"3D Graphics V5",name:f.format(5),v:10,canResearch:function(a){return 2<LevelCalculator.getFeatureLevel(a,"3D Graphics V4")},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:5,showXPGain:!0};a.ThreeDGraphicsV6={id:"3D Graphics V6",name:f.format(6),v:12,canResearch:function(a){return!1},
category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:6,showXPGain:!0};a.ThreeDGraphicsV7={id:"3D Graphics V7",name:f.format(7),v:14,canResearch:function(a){return!1},category:b,categoryDisplayName:c,group:d,consolePart:!0,techLevel:7,showXPGain:!0};a.stereoScopic3D={id:"Stereoscopic 3D",name:"Advanced Stereoscopic 3D".localize(),v:4,canResearch:function(a){return 6<LevelCalculator.getMissionLevel("Graphic")},canUse:function(a){if(!a||!a.features)return!1;var b="3D Graphics V3;3D Graphics V4;3D Graphics V4;3D Graphics V5;3D Graphics V6;3D Graphics V7".split(";");
return a.features.some(function(a){return-1!=b.indexOf(a.id)})},category:b,categoryDisplayName:c,consolePart:!0};a.graphicItems=[a.textGraphics,a.TwoDGraphicsV1,a.TwoDGraphicsV2,a.TwoDGraphicsV3,a.TwoDGraphicsV4,a.TwoDGraphicsV5,a.ThreeDGraphicsV1,a.ThreeDGraphicsV2,a.ThreeDGraphicsV3,a.ThreeDGraphicsV4,a.ThreeDGraphicsV5,a.ThreeDGraphicsV6,a.ThreeDGraphicsV7,a.stereoScopic3D];b="Sound";c="Sound".localize();d="Sound";a.simpleSounds={id:"Basic Sound",name:"Basic sounds".localize(),devCost:1E3,v:1,
category:b,categoryDisplayName:c,group:d};a.mono={id:"Mono sound",name:"Mono sound".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&1<LevelCalculator.getMissionLevel("Sound")},category:b,categoryDisplayName:c,group:d};a.stereo={id:"Stereo sound",name:"Stereo sound".localize(),v:4,canResearch:function(a){return 3<LevelCalculator.getMissionLevel("Sound")},category:b,categoryDisplayName:c,group:d,consolePart:!0};a.soundTrack={id:"Soundtrack",name:"Soundtrack".localize(),v:4,canResearch:function(a){return 4<
LevelCalculator.getMissionLevel("Sound")},category:b,categoryDisplayName:c,group:"soundtrack",consolePart:!0};a.surround={id:"Surround sound",name:"Surround sound".localize(),v:6,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Sound")},category:b,categoryDisplayName:c,group:d,consolePart:!0};a.orchestralSoundtrack={id:"Orchestral Soundtrack",name:"Orchestral soundtrack".localize(),v:8,canResearch:function(a){return 6<LevelCalculator.getMissionLevel("Sound")},category:b,categoryDisplayName:c,
group:"soundtrack"};a.soundItems=[a.simpleSounds,a.mono,a.stereo,a.soundTrack,a.surround,a.orchestralSoundtrack];b="AI";c="A.I.".localize();a.simpleAI={id:"simpleAI",name:"Simple A.I.".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&1<LevelCalculator.getMissionLevel("AI")},category:b,categoryDisplayName:c,group:"ai"};a.AI={id:"AI",name:"Better A.I.".localize(),v:4,canResearch:function(a){return a.canDevelopEngine()&&3<LevelCalculator.getMissionLevel("AI")},category:b,categoryDisplayName:c,
group:"ai"};a.AICompanions={id:"AI Companions",name:"A.I. Companions".localize(),v:4,canResearch:function(a){return 4<LevelCalculator.getMissionLevel("AI")},category:b,categoryDisplayName:c};a.SelfLearningAI={id:"Self learning AI",name:"Self-learning A.I.".localize(),v:10,canResearch:function(a){return 8<LevelCalculator.getMissionLevel("AI")},category:b,categoryDisplayName:c};a.aiItems=[a.AI,a.AICompanions,a.SelfLearningAI];b="Gameplay";c="Gameplay".localize();a.GameTutorials={id:"Game Tutorials",
name:"Game tutorials".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&1<LevelCalculator.getMissionLevel("Gameplay")},category:b,categoryDisplayName:c};a.BetterUI={id:"BetterUI",name:"Better user experience".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&2<LevelCalculator.getMissionLevel("Gameplay")},category:b,categoryDisplayName:c};a.characterProgression={id:"Character progression",name:"Character progression".localize(),v:4,canResearch:function(a){return a.canDevelopEngine()&&
3<LevelCalculator.getMissionLevel("Gameplay")},category:b,categoryDisplayName:c};a.Achievements={id:"Achievements",name:"Achievements".localize(),v:2,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Gameplay")&&a.isLaterOrEqualThan(13)},category:b,categoryDisplayName:c,consolePart:!0};a.SkillTrees={id:"Skill trees",name:"Skill trees".localize(),v:6,canResearch:function(a){return 6<LevelCalculator.getMissionLevel("Gameplay")},category:b,categoryDisplayName:c};a.CoOp={id:"CoOp",name:"Cooperative play".localize(),
v:8,canResearch:function(a){return 7<LevelCalculator.getMissionLevel("Gameplay")},category:b,categoryDisplayName:c};a.vrHeadset={id:"vrHeadset",name:"Visorius Support".localize(),v:8,canResearch:function(a){return a.flags.visoriusAnnounced},category:b,categoryDisplayName:c,consolePart:!0};a.gameplayItems=[a.GameTutorials,a.BetterUI,a.Achievements,a.characterProgression,a.SkillTrees,a.CoOp,a.vrHeadset];b="Engine";c="Engine".localize();a.saveGame={id:"Savegame",name:"Savegame".localize(),v:1,canResearch:function(a){return!1},
category:b,categoryDisplayName:c,group:"savegame"};a.Multiplayer={id:"Multiplayer",name:"Multiplayer".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&3<LevelCalculator.getMissionLevel("Engine")},category:b,categoryDisplayName:c,group:"multiplayer",consolePart:!0};a.VideoPlayback={id:"Video playback",name:"Video playback".localize(),v:4,canResearch:function(a){return a.canDevelopEngine()&&4<LevelCalculator.getMissionLevel("Engine")},category:b,categoryDisplayName:c,consolePart:!0};
a.BasicPhysics={id:"Basic physics",name:"Basic physics".localize(),v:4,canResearch:function(a){return a.canDevelopEngine()&&5<LevelCalculator.getMissionLevel("Engine")},category:b,categoryDisplayName:c,consolePart:!0};a.ModSupport={id:"Mod support",name:"Mod support".localize(),v:2,canResearch:function(a){return a.canDevelopEngine()&&5<LevelCalculator.getMissionLevel("Engine")},category:b,categoryDisplayName:c};a.OnlinePlay={id:"Online play",name:"Online play".localize(),v:6,canResearch:function(a){return a.canDevelopEngine()&&
6<LevelCalculator.getMissionLevel("Engine")},category:b,categoryDisplayName:c,group:"multiplayer",consolePart:!0};a.AdvancedPhysics={id:"Advanced Physics",name:"Advanced physics".localize(),v:8,canResearch:function(a){return a.canDevelopEngine()&&8<LevelCalculator.getMissionLevel("Engine")},category:b,categoryDisplayName:c,consolePart:!0};a.saveToCloud={id:"Save to cloud",name:"Save to cloud".localize(),v:2,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Engine")&&a.isLaterOrEqualThan(13)},
category:b,categoryDisplayName:c,consolePart:!0};a.MMOSupport={id:"mmoSupport",name:"MMO Support".localize(),v:10,canResearch:function(a){return a.canDevelopMMOGames()},category:b,categoryDisplayName:c,group:"multiplayer",consolePart:!1,canUse:function(a){return!1}};a.sdk={id:"SDK",name:"Software Development Kit".localize(),pointsCost:100,duration:1E4,enginePoints:40,engineCost:1E5,canResearch:function(b){return-1!=b.researchCompleted.indexOf(a.sublicenseEngines)},category:b,categoryDisplayName:c,
canUse:function(a){return!1}};a.MultiPlatformOptimized={id:"MultiPlatformOptimized",name:"Multi-Platform optimized".localize(),pointsCost:100,duration:1E4,enginePoints:50,engineCost:2E6,canResearch:function(a){return a.flags.multiPlatformOptimizeResearchAvailable},category:b,categoryDisplayName:c,canUse:function(a){return!1}};a.engineItems=[a.saveGame,a.Multiplayer,a.VideoPlayback,a.BasicPhysics,a.OnlinePlay,a.AdvancedPhysics,a.MMOSupport,a.saveToCloud,a.ModSupport,a.sdk,a.MultiPlatformOptimized];
b="Story/Quests";c="Story/Quests".localize();a.linearStory={id:"Linear story",name:"Linear story".localize(),v:2,canResearch:function(a){return!1},category:b,categoryDisplayName:c,group:"story"};a.simpleCutScenes={id:"Simple cutscenes",name:"Simple cutscenes".localize(),v:2,canResearch:function(a){return 2<LevelCalculator.getMissionLevel("Story/Quests")},category:b,categoryDisplayName:c,group:"cutscenes"};a.branchedStory={id:"Branching story",name:"Branching story".localize(),v:4,canResearch:function(a){return 3<
LevelCalculator.getMissionLevel("Story/Quests")},category:b,categoryDisplayName:c,group:"story"};a.advancedCutScenes={id:"Advanced cutscenes",name:"Advanced cutscenes".localize(),v:4,canResearch:function(a){return 4<LevelCalculator.getMissionLevel("Story/Quests")},category:b,categoryDisplayName:c,group:"cutscenes"};a.fullMotionVideo={id:"fmv",name:"Full motion video".localize(),v:6,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Story/Quests")},category:b,categoryDisplayName:c};
a.interactiveStory={id:"Interactive story",name:"Interactive story".localize(),v:6,canResearch:function(a){return 6<LevelCalculator.getMissionLevel("Story/Quests")},category:b,categoryDisplayName:c,group:"story"};a.moralChoices={id:"Moral choices",name:"Moral choices".localize(),v:6,canResearch:function(a){return 6<LevelCalculator.getMissionLevel("Story/Quests")},category:b,categoryDisplayName:c};a.immersiveStoryTelling={id:"Immersive story telling",name:"Immersive story telling".localize(),v:8,canResearch:function(a){return 7<
LevelCalculator.getMissionLevel("Story/Quests")},category:b,categoryDisplayName:c,group:"story"};a.reactiveQuests={id:"Reactive quests",name:"Reactive quests".localize(),v:10,canResearch:function(a){return 8<LevelCalculator.getMissionLevel("Story/Quests")},category:b,categoryDisplayName:c};a.storyItems=[a.linearStory,a.branchedStory,a.simpleCutScenes,a.advancedCutScenes,a.fullMotionVideo,a.interactiveStory,a.moralChoices,a.immersiveStoryTelling,a.reactiveQuests];b="Dialogs";c="Dialogues".localize();
a.betterDialogs={id:"Better dialogues",name:"Better dialogues".localize(),v:1,canResearch:function(a){return 2<LevelCalculator.getMissionLevel("Dialogs")},category:b,categoryDisplayName:c};a.dialogueTree={id:"Dialogue tree",name:"Dialogue tree".localize(),v:4,canResearch:function(a){return 3<LevelCalculator.getMissionLevel("Dialogs")},category:b,categoryDisplayName:c};a.voiceOver={id:"Voice over",name:"Voice over".localize(),v:6,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Dialogs")},
category:b,categoryDisplayName:c,group:"Voice acting"};a.simpleBodyLanguage={id:"Simple body language",name:"Simple body language".localize(),v:6,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Dialogs")},category:b,categoryDisplayName:c,group:"Body language"};a.advancedBodyLanguage={id:"Advanced body language",name:"Advanced body language".localize(),v:8,canResearch:function(a){return 6<LevelCalculator.getMissionLevel("Dialogs")},category:b,categoryDisplayName:c,group:"Body language"};
a.celebrityVoiceActing={id:"Celebrity voice acting",name:"Celebrity voice acting".localize(),v:6,canResearch:function(a){return 7<LevelCalculator.getMissionLevel("Dialogs")},category:b,categoryDisplayName:c,group:"Voice acting"};a.realisticBodyLanguage={id:"Realistic body language",name:"Realistic body language".localize(),v:10,canResearch:function(a){return 8<LevelCalculator.getMissionLevel("Dialogs")},category:b,categoryDisplayName:c,group:"Body language"};a.dialogItems=[a.betterDialogs,a.dialogueTree,
a.voiceOver,a.simpleBodyLanguage,a.advancedBodyLanguage,a.celebrityVoiceActing,a.realisticBodyLanguage];b="World Design";c="World Design".localize();a.openWorld={id:"Open world",name:"Open world".localize(),v:2,canResearch:function(a){return 2<LevelCalculator.getMissionLevel("World Design")},category:b,categoryDisplayName:c};a.dayNightCycle={id:"Day/Night Cycle",name:"Day & night cycle".localize(),v:2,canResearch:function(a){return 3<LevelCalculator.getMissionLevel("World Design")},category:b,categoryDisplayName:c};
a.richBackStory={id:"Rich Backstory",name:"Rich backstory".localize(),v:2,enginePoints:0,canResearch:function(a){return 4<LevelCalculator.getMissionLevel("World Design")},category:b,categoryDisplayName:c};a.virtualEconomy={id:"Virtual economy",name:"Virtual economy".localize(),v:4,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("World Design")},category:b,categoryDisplayName:c};a.realisticWeather={id:"Realistic Weather",name:"Realistic weather".localize(),v:6,canResearch:function(a){return 6<
LevelCalculator.getMissionLevel("World Design")},category:b,categoryDisplayName:c};a.dynamicWorld={id:"Dynamic World",name:"Dynamic world".localize(),v:8,canResearch:function(a){return 7<LevelCalculator.getMissionLevel("World Design")},category:b,categoryDisplayName:c};a.worldDesignItems=[a.openWorld,a.dayNightCycle,a.richBackStory,a.virtualEconomy,a.realisticWeather,a.dynamicWorld];b="Level Design";c="Level Design".localize();a.levelEditor={id:"Level editor",name:"Level editor".localize(),v:1,canResearch:function(a){return 2<
LevelCalculator.getMissionLevel("Level Design")},category:b,categoryDisplayName:c};a.easterEggs={id:"Easter Eggs",name:"Easter eggs".localize(),v:2,canResearch:function(a){return 4<LevelCalculator.getMissionLevel("Level Design")},category:b,categoryDisplayName:c};a.miniGames={id:"Mini Games",name:"Mini games".localize(),v:4,canResearch:function(a){return 5<LevelCalculator.getMissionLevel("Level Design")},category:b,categoryDisplayName:c};a.dynamicEnvironment={id:"Dynamic Environment",name:"Dynamic environment".localize(),
v:6,canResearch:function(a){return 6<LevelCalculator.getMissionLevel("Level Design")},category:b,categoryDisplayName:c};a.noLoadingScreens={id:"No loading screens",name:"No loading screens".localize(),v:8,canResearch:function(a){return 7<LevelCalculator.getMissionLevel("Level Design")},category:b,categoryDisplayName:c};a.levelDesignItems=[a.levelEditor,a.easterEggs,a.miniGames,a.dynamicEnvironment,a.noLoadingScreens];a.StartEngineParts=[a.textGraphics,a.TwoDGraphicsV1,a.simpleSounds];a.MediumSizeGames=
{id:"MediumSizeGames",name:"Medium Games".localize(),pointsCost:10,duration:1E4,cost:15E4,canResearch:function(a){return 1<a.staff.length},category:"Project Management",categoryDisplayName:"Project Management".localize()};a.LargeSizeGames={id:"LargeGames",name:"Large Games".localize(),pointsCost:40,duration:15E3,cost:3E5,canResearch:function(a){return 14E4<a.fans&&4<a.staff.length},category:"Project Management",categoryDisplayName:"Project Management".localize()};b="Game Design";c="Game Design".localize();
a.TargetAudience={id:"TargetAudience",name:"Target Audience".localize(),pointsCost:15,duration:1E4,cost:3E4,canResearch:function(a){return-1!=a.scheduledStoriesShown.indexOf("TargetAudiences")},category:b,categoryDisplayName:c};a.Sequels={id:"Sequels",name:"Sequels".localize(),pointsCost:20,duration:13E3,cost:8E4,devCost:2E4,canResearch:function(a){return a.isLaterOrEqualThan(8,6)},category:b,categoryDisplayName:c};a.CasualGames={id:"CasualGames",name:"Casual games".localize(),category:b,categoryDisplayName:c,
pointsCost:20,duration:1E4,cost:25E3,canResearch:function(a){return a.isLaterOrEqualThan(3,10)}};a.Marketing={id:"Marketing",name:"Marketing".localize(),category:"Publishing",categoryDisplayName:"Publishing".localize(),pointsCost:40,duration:1E4,cost:5E4,canResearch:function(a){return-1!=a.scheduledStoriesShown.indexOf("MarketingStory")},complete:function(){Tutorial.marketingUnlocked()}};a.MultiGenre={id:"MultiGenre",name:"Multi genre".localize(),category:b,categoryDisplayName:c,pointsCost:80,duration:1E4,
cost:35E3,canResearch:function(a){return a.isLaterOrEqualThan(12,8)}};a.expansionPack={id:"expansionPack",name:"Expansion pack".localize(),category:b,categoryDisplayName:c,pointsCost:150,duration:1E4,cost:1E5,canResearch:function(a){return a.canDevelopMMOGames()&&a.isMMOInSale()}};a.MultiPlatform={id:"MultiPlatform",name:"Multi-Platform".localize(),category:"Technology",categoryDisplayName:"Technology".localize(),pointsCost:100,duration:15E3,cost:5E5,canResearch:function(a){return a.isLaterOrEqualThan(17,
2)}};a.SpecialItems=[a.TargetAudience,a.MediumSizeGames,a.LargeSizeGames,a.Sequels,a.CasualGames,a.Marketing,a.MultiGenre,a.expansionPack,a.MultiPlatform];a.getAllItems=function(){return a.BasicItems.concat(a.engineItems).concat(a.gameplayItems).concat(a.storyItems).concat(a.dialogItems).concat(a.levelDesignItems).concat(a.aiItems).concat(a.worldDesignItems).concat(a.graphicItems).concat(a.soundItems).concat(a.SpecialItems).concat(a.ProductPlacement1)};a.getUsableFeatureList=function(a,b){for(var c=
[],d=0;d<b.length;d++){var f=b[d];(void 0===f.canUse||f.canUse(a))&&c.push(f)}return c};a.ProductPlacement1={id:"ProductPlacement1",name:"Red Exploding Barrels".localize(),cost:5E3,d:0,t:0,category:"Special Items",categoryDisplayName:"Special Items".localize()};a.OneTimeItems=[a.ProductPlacement1];Research.getPointsCost=function(a){if(!a.v)return a.pointsCost;var b=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==b)throw"invalid v";b=[10,15,40,80,100,150,250,300][b];a.pointsCostAdjustment&&(b+=a.pointsCostAdjustment);
return b};Research.getDuration=function(a){if(!a.v)return a.duration;a=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==a)throw"invalid v";return 1E3*[8,10,12,14,16,20,25,30][a]};Research.getDevCost=function(a,b){if(!a.v)return a.cost;var c=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==c)throw"invalid v";c=1E3*[5,10,30,60,100,150,300,400][c];b&&(c=c*General.getGameSizeDurationFactor(b.gameSize)*General.getMultiPlatformCostFactor(b),c=1E3*Math.floor(c/1E3));return c};Research.getResearchCost=function(a){return a.cost?
a.cost:4*Research.getDevCost(a)};Research.getEnginePoints=function(a){if(a.enginePoints)return a.enginePoints;if(!a.v)return 0;a=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==a)throw"invalid v";return[10,15,30,40,80,120,200,300][a]};Research.getEngineCost=function(a){if(0===a.enginePoints)return 0;if(a.engineCost)return a.engineCost;if(!a.v)return 0;a=[1,2,4,6,8,10,12,14].indexOf(a.v);if(-1==a)throw"invalid v";return 1E3*[10,30,50,100,140,180,350,500][a]}})();(function(){Research.consoleItems=[]})();
(function(){var a=Research;a._checkForNewLabResearch=function(b){if(b.flags.rndLabUnlocked){var c="";b.flags.bigProjectsResearchActiveShown||(b.flags.bigProjectsResearchActiveShown=[]);for(var g=0;g<a.bigProjects.length;g++){var k=a.bigProjects[g];k.canResearch(b)&&-1==b.flags.bigProjectsResearchActiveShown.indexOf(k.id)&&(b.flags.bigProjectsResearchActiveShown.push(k.id),c+="\n"+k.name)}0<c.length&&(c=new Notification("R&D lab".localize(),"New research available:".localize()+" \n"+c),b.notifications.push(c))}};
var b=2,c="Lab report".localize();a.opportunityInternet={id:"opportunityInternet",name:"Internet Opportunities".localize(),pointsCost:500,canResearch:function(b){return-1==b.researchCompleted.indexOf(a.opportunityInternet)},iconUri:"./images/projectIcons/superb/internet.png",description:"The internet will change our lives forever. This project will investigate how we can use the internet to make better games and deliver better experiences. Completing this project should unlock new options for research.".localize(),
targetZone:b,complete:function(b){b.researchCompleted.push(a.opportunityInternet);var f="After careful examination we come to the conclusion that the internet is a huge opportunity in the gaming industry. We already see some small signs how successful multiplayer games can be but multiplayer is usually an additional feature to a game and not the main focus.{n}We think we could develop technologies to create a massively multiplayer online game (short MMO), a game where tens of thousands of players can play together. To create such an MMO more research is necessary.{n}The second discovery is that we could start developing an online distribution platform. Instead of players buying games in local stores they could download games directly from our servers. This would cut out the middle man and we could gain a large share of the market and additional income to fund our developments.".localize(),
f=new Notification(c,f);b.notifications.push(f)}};a.grid={id:"Grid",name:"Codename: Grid".localize(),pointsCost:1200,canResearch:function(b){return!b.flags.grid&&-1!=b.researchCompleted.indexOf(a.opportunityInternet)&&b.researchCompleted.indexOf(a.grid)},iconUri:"./images/projectIcons/superb/grid.png",description:"A bold plan to develop an internet-based distribution platform for games. Rather than buying games through retailers players worldwide can simply download them. The platform features digital rights management to combat piracy and also enables a new market for smaller developers to show off their products.".localize(),
targetZone:b,complete:function(b){b.researchCompleted.push(a.grid);var f=b.licencedPlatforms.some(function(a){return a.isCustom}),g="Boss, it is done and it is live! Grid is the name of our very own internet-based distribution platform.".localize()+" ",g=f?g+"Since we already have our own console we have integrated this service into our console. This should boost our market share considerably.".localize():g+"This system should boost the market share of the PC considerably and if we ever have our own console it will also be of great benefit.".localize(),
g=g+("{n}"+"Grid will generate income every month which should boost our ability to create new games and develop new projects.".localize());b.flags.grid=!0;b.notifications.push(new Notification(c,g))}};a.ownConvention={id:"ownConvention",name:"Own Convention".localize(),pointsCost:500,canResearch:function(a){return 1E6<=a.fans&&!a.flags.customConference||a.isLaterOrEqualThan(23)},iconUri:"./images/projectIcons/superb/convention.png",description:"It's all well and good to have a booth at the yearly game convention and show off our products but with our large fan base we should consider staging our very own convention instead!".localize(),
targetZone:b,complete:function(a){a.flags.customConference=!0;var b="Boss, we have completed the organization of our own convention.".localize(),b=new Notification(c,b);a.notifications.push(b)}};a.ThreeDGraphicsV6Project={id:"3D Graphics V6 Project",name:"3D Graphics V6".localize(),pointsCost:1200,canResearch:function(a){return!a.flags.graphicsV6&&3<LevelCalculator.getEnginePartLevel(a,"3D Graphics V5")},iconUri:"./images/projectIcons/superb/graphics-v6.png",description:"Pushing the boundaries of photorealism this revolutionary graphics engine will blow away everything that has come before. Near infinite draw distance, ultra-high polygon counts and realistic particle and volumetric effects.".localize(),
targetZone:b,complete:function(b){b.flags.graphicsV6=!0;b.researchCompleted.push(a.ThreeDGraphicsV6);b.notifications.push(new Notification({header:c,text:"We have successfully completed the research on our next generation graphics technology and we can now start building a game engine to make use of this research.".localize(),image:"./images/projectIcons/superb/graphics-v6.png"}))}};a.ThreeDGraphicsV7PRoject={id:"3D Graphics V7 Project",name:"3D Graphics V7".localize(),pointsCost:1600,canResearch:function(a){return!a.flags.graphicsV7&&
3<LevelCalculator.getEnginePartLevel(a,"3D Graphics V6")},iconUri:"./images/projectIcons/superb/graphics-v7.png",description:"The ultimate in graphics technology. This will look better than reality. If anyone ever builds a holodeck then this is the graphics engine it would run on.".localize(),targetZone:b,complete:function(b){b.flags.graphicsV7=!0;b.researchCompleted.push(a.ThreeDGraphicsV7);b.notifications.push(new Notification({header:c,text:"We have done it! Our research was successful and we should be able to support our concepts for the ultimate graphics technology in our next game engine. This will be a revolution for the gaming industry!".localize(),
image:"./images/projectIcons/superb/graphics-v7.png"}))}};a.sublicenseEngines={id:"sublicenseEngines",name:"License Game Engines".localize(),pointsCost:1500,canResearch:function(b){return 10<=b.engines.length&&-1==b.researchCompleted.indexOf(a.sublicenseEngines)},iconUri:"./images/projectIcons/superb/license-engine.png",description:"We have a lot of experience in creating custom game engines. Why not sub-license our engines to other developers? Not only will this cement our market position as a technology leader but it will also help offset the growing costs of developing engines.".localize(),
targetZone:b,complete:function(b){b.researchCompleted.push(a.sublicenseEngines)}};a.hardware={id:"hardware",name:"Hardware",pointsCost:800,canResearch:function(a){return!a.flags.customHardwareResearched},iconUri:"./images/projectIcons/superb/hw-lab.png",description:"Software doesn't run without hardware. We are experts in creating software but why not also investigate whether we can create our own hardware?".localize(),targetZone:b,complete:function(a){a.flags.customHardwareResearched=!0;var b=a.staff.some(function(a){return a.flags.technologySpecialist}),
g="Our research is complete. There is definitely a big opportunity ahead of us. If we create our own hardware lab and have the appropriate technology specialists to run it then we could even create our very own gaming console!{n}It would not be cheap and it will probably take us a few years but maybe we could even trump the likes of an mBox or the Playsystem!".localize();b||(g+="{n}"+"Before we can think about creating this lab we need at least one technology specialist on our team so this should be our priority.".localize());
b=new Notification(c,g);a.notifications.push(b)}};a.MMO={id:"MMO",name:"MMO".localize(),pointsCost:1700,canResearch:function(b){return-1==b.researchCompleted.indexOf(a.MMO)&&-1!=b.researchCompleted.indexOf(a.opportunityInternet)},iconUri:"./images/projectIcons/superb/mmo.png",description:"Massively Multiplayer Online games! We know how much fun it is to play multiplayer games but imagine that instead of playing with a handful of players you could play with thousands! This project will unlock a brand new genre to allow you to create MMO games.".localize(),
targetZone:b,complete:function(b){b.researchCompleted.push(a.MMO);var f="Boss, our research into massively multiplayer online (MMO) games is complete. The possibilities of MMOs are big but they are also risky. In our research we realized that before we can begin to develop an MMO we will need to create a special game engine for it.{n}You will need to complete the research for the MMO support feature with one of your staff. Once it is integrated into a game engine you can start building an MMO but be careful. It seems that MMOs only work with the best theme/genre combinations and you will also need to have specialists on your team to make an MMO successful.".localize(),
f=new Notification(c,f);b.notifications.push(f)}};a.AAA={id:"AAA",name:"AAA Games".localize(),pointsCost:2E3,canResearch:function(b){return-1==b.researchCompleted.indexOf(a.AAA)&&b.gameLog.some(function(a){return 10===a.score&&"large"===a.gameSize})},iconUri:"./images/projectIcons/superb/aaa.png",description:"We have proven that we can make large games work. How about we see how we can make games that are so massive in scope and of such high quality that they will create an entire new label. To borrow a term from the finance sector they will be triple A rated games or to borrow from the movie industry, true blockbusters.".localize(),
targetZone:b,complete:function(b){b.researchCompleted.push(a.AAA);var f="Boss, our research into AAA games is complete and we can now begin to create AAA games. A triple A game requires well-trained staff and it is best to have specialists in the different areas to make sure the team does their best work.{n}When creating a AAA game we can also use the R&D lab to develop a special marketing campaign which greatly enhances the hype around the game.".localize();b.flags.hwLabUnlocked&&(f+="\n"+"The hardware lab can also be used to develop special hardware products such as keyboard, mice and headsets that are sold with the game.".localize());
f=new Notification(c,f);b.notifications.push(f)}};a.AAAMarketingCampaign={id:"AAAMarketingCampaign",name:"Marketing Campaign".localize(),pointsCost:1E3,canResearch:function(a){return a.currentGame&&"aaa"==a.currentGame.gameSize&&!a.currentGame.flags.AAAMarketingCompleted},iconUri:"./images/projectIcons/superb/aaa-marketing.png",description:"Let's use our in-house skills to design a special marketing campaign for our AAA title.".localize(),targetZone:b,complete:function(a){a.currentGame&&(a.currentGame.flags.AAAMarketingCompleted=
!0)},cancel:function(a){a.currentGame&&(a.currentGame.flags.AAAMarketingCompleted=!0)},isRepeatable:!0};b=0;a.AAACustomHardware={id:"AAACustomHardware",name:"Custom Hardware".localize(),pointsCost:1E3,canResearch:function(a){return a.flags.hwLabUnlocked&&a.currentGame&&"aaa"==a.currentGame.gameSize&&!a.currentGame.flags.AAACustomHardwareCompleted},iconUri:"./images/projectIcons/superb/aaa-hardware.png",description:"Let's use our in-house hardware lab to design and develop special hardware products to coincide with the release of our AAA title.".localize(),
targetZone:b,complete:function(a){a.currentGame&&(a.currentGame.flags.AAACustomHardwareCompleted=!0)},cancel:function(a){a.currentGame&&(a.currentGame.flags.AAACustomHardwareCompleted=!0)},isRepeatable:!0};a.bigProjects=[a.AAAMarketingCampaign,a.AAACustomHardware,a.ownConvention,a.opportunityInternet,a.grid,a.ThreeDGraphicsV6Project,a.ThreeDGraphicsV7PRoject,a.sublicenseEngines,a.hardware,a.MMO,a.AAA]})();var Training={};
(function(){var a=Training;a.getAvailableTraining=function(b){for(var d=[],f=a.getAllTrainings(),g=0;g<f.length;g++){var k=f[g];k.canSee&&k.canSee(b,GameManager.company)||void 0===k.canUse?d.push(k):!k.canSee&&k.canUse(b,GameManager.company)&&d.push(k)}return d};a.getAllTrainings=function(){var c=[];c.addRange(b());for(var d in a)if(a.hasOwnProperty(d)){var f=a[d];void 0!=f.id&&void 0!=f.pointsCost&&void 0!=f.duration&&(f.isTraining=!0,c.push(f))}return c};category="Management";categoryDisplayName=
"Management".localize();a.managementL1={id:"Management1",name:"Staff Management".localize(),cost:25E3,pointsCost:0,duration:12E3,canUse:function(a,b){return 0===a.id&&2<=b.currentLevel&&1===b.maxStaff},complete:function(a){a="Well done!\nYou've successfully completed your management course and you are now able to hire your very first employee!\n To get started close this message and then {0} the 'Fill Position...' button which is visible near the big desk.".localize();a=a.format(Tutorial.getClickVerb());
GameManager.company.maxStaff=5;GameManager.company.notifications.push(new Notification("Training Complete".localize(),a,"OK".localize()));VisualsManager.refreshHiringButtons()},category:category,categoryDisplayName:categoryDisplayName};a.WelcomeTraining={id:"WelcomeTraining",name:"Staff Welcome Training".localize(),pointsCost:0,cost:1E4,duration:5E3,canUse:function(a,b){return!a.flags.didWelcomeTraining&&a.flags.hiredTimestamp&&a.flags.hiredTimestamp>GameManager.gameTime-3E4},tick:function(a,b){a.adjustEfficiency(b/
5E3*0.2)},complete:function(a){a.flags.didWelcomeTraining=!0},category:"Special",categoryDisplayName:"Special".localize()};a.patchGame={id:"PatchGame",name:"Develop patch".localize(),duration:8E3,pointsCost:0,isTraining:!0,canUse:function(){return!1},complete:function(a){VisualsManager.getCharacterOverlay(a).saySomething("patch complete".localize(),1500);a=GameManager.company;var b=a.flags.patchData.fansChange,f=a.flags.patchData.gameName,g=a.notifications.first(function(a){return a.flags&&a.flags.isPatchNotification});
g?(g.text="{0} has recently released a much needed patch for {1}.\nOne fan said: 'I love companies like {0}. They don't just milk their customers for more money but also understand our concerns and make sure that we can enjoy our games!'.".localize().format(a.name,f),g.adjustFans(b)):(a.notifications.push(new Notification("News".localize(),"It seems that {0} has finally released their patch for {1}. One fan said: 'I can't believe it took them so long to release a patch! I surely hope that they are more efficient next time!'".localize().format(a.name,
f),"OK".localize())),a.adjustFans(Math.floor(b/2)))}};a.postMortem={id:"postMortem",name:void 0,baseDuration:7E3,duration:7E3,pointsCost:0,isTraining:!0,progressColor:"purple",canUse:function(){return!1},tick:function(b,d){var f=b.currentResearch;if(void 0===f.lastSpawnTick)f.lastSpawnTick=0,f.targetRPoints=f.duration/a.postMortem.baseDuration*b.researchFactor*10,f.targetRPoints+=0.25*f.targetRPoints*GameManager.company.getRandom(),f.currentRPoints=0,f.nextCheck=200+250*GameManager.company.getRandom();
else{var g=f.duration*f.progress;if(g-f.lastSpawnTick>=f.nextCheck){f.lastSpawnTick=g;var k=f.targetRPoints*f.progress;if(Math.floor(k)>Math.floor(f.currentRPoints)){for(var k=Math.floor(k-f.currentRPoints),l=0;l<k;l++)b.spawnPoints(1,"r",50*l);f.currentRPoints+=k}f.nextCheck=Math.min(f.duration-g-50,350+3E3*GameManager.company.getRandom())}}},complete:function(a){var b=a.flags.postMortemGameId,f=GameManager.company.getGameById(b);f&&(f.flags.postMortemCompleted=!0,b=new Notification("{PostMortemComplete}",
b),a.flags.postMortemGameId=null,GameManager.company.notifications.push(b),Tutorial.gameReportComplete(0.3))}};category="Specialists";categoryDisplayName="Specialists".localize();a.designSpecialist={id:"designSpecialist",name:"Design Specialist (Req. 700 D)".localize(),category:category,categoryDisplayName:categoryDisplayName,cost:5E6,pointsCost:100,duration:2E4,canSee:function(a,b){return 4==b.currentLevel&&b.flags.dTSpecialistTrainingEnabled&&!a.flags.designSpecialist&&!a.flags.technologySpecialist},
canUse:function(a,b){return 700<=a.getDesignSkillPoints()},complete:function(a){a.flags.designSpecialist=!0;Tutorial.additionalSpecialists(10)},style:"trainingItemSmall"};a.techSpecialist={id:"techSpecialist",name:"Technology Specialist (Req. 700 T)".localize(),category:category,categoryDisplayName:categoryDisplayName,cost:5E6,pointsCost:100,duration:2E4,canSee:function(a,b){return 4==b.currentLevel&&b.flags.dTSpecialistTrainingEnabled&&!a.flags.designSpecialist&&!a.flags.technologySpecialist},canUse:function(a,
b){return 700<=a.getTechnologySkillPoints()},complete:function(a){a.flags.technologySpecialist=!0},style:"trainingItemSmall"};a.boostL1={id:"BoostL1",name:"Boost (Req. D:500 or T:500)".localize(),cost:1E6,pointsCost:20,duration:15E3,canSee:function(a){return 0==a.maxBoostLevel&&5<=a.getLevel()},canUse:function(a,b){return 500<=a.getDesignSkillPoints()||500<=a.getTechnologySkillPoints()},complete:function(a){a.maxBoostLevel=2;a.boostLevel=0;a.boostRechargeProgress=0;UI._resetBoostUI();Tutorial.boosts()},
category:"Special",categoryDisplayName:"Special".localize()};a.boostL2={id:"BoostL2",name:"Boost Max. Level 3 (Req. D:700 or T:700)".localize(),cost:2E6,pointsCost:50,duration:15E3,canSee:function(a){return 2==a.maxBoostLevel&&6<=a.getLevel()},canUse:function(a,b){return 700<=a.getDesignSkillPoints()||700<=a.getTechnologySkillPoints()},complete:function(a){a.maxBoostLevel=3},category:"Special",categoryDisplayName:"Special".localize(),style:"trainingItemSmall"};var b=function(){for(var a=[],b=Missions.getAllMissions().filter(function(a){return"dev"===
a.missionType}),f=0;f<b.length;f++){var g=b[f],k=Math.round(900*g.designFactor),l=Math.round(900*g.technologyFactor);(function(b,d,f){var g={id:"specialization_"+f.id,category:"Specialization",categoryDisplayName:"Specialization".localize(),name:"{0} [Req. {1}D/{2}T]".localize().format(f.name,b,d),cost:5E6,pointsCost:200,duration:2E4,canSee:function(a){return 7<=a.getLevel()&&!a.flags.expert},canUse:function(a){return 500*a.technologyFactor>d&&500*a.designFactor>b},complete:function(a){a.flags.expert=
f.id;VisualsManager.getCharacterOverlay(a).refreshName()},isTraining:!0,style:"trainingItemSmall"};a.push(g)})(k,l,g)}return a};a.codingContest={id:"codingContest",name:"Coding contest".localize(),duration:3E4,pointsCost:0,basePoints:12,isTraining:!0,isSkillTraining:!0,tF:0.2,dF:0.2,rF:1,sF:0.3,qF:0,maxP:900,canUse:function(){return!1},complete:function(a){VisualsManager.getCharacterOverlay(a).saySomething("done".localize("word appears on top of staff when they finish a coding contest"),1500);a.flags.codingContestDone=
GameManager.gameTime;DecisionNotifications.codingContestParticipationFinished()},category:"Skills"};category="Teach and learn";categoryDisplayName="Teach and learn".localize();a.designTraining3={id:"designTraining3",name:"Game Design Course".localize(),cost:14E4,pointsCost:30,duration:2E4,basePoints:13,tF:0.2,dF:1,rF:0.1,sF:0,qF:0,maxP:900,canUse:function(a,b){return b.flags.trainingV3Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.techTraining3={id:"techTraining3",
name:"Programming Course".localize(),cost:14E4,pointsCost:30,duration:2E4,basePoints:13,tF:1,dF:0.2,rF:0.1,sF:0,qF:0,maxP:900,canUse:function(a,b){return b.flags.trainingV3Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.speedTraining3={id:"speedTraining3",name:"Product Management Course".localize(),cost:14E4,pointsCost:30,duration:2E4,basePoints:13,tF:0.1,dF:0.1,rF:0.2,sF:1,qF:0,maxP:900,canUse:function(a,b){return b.flags.trainingV3Enabled},category:category,
categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.researchTraining3={id:"researchTraining3",name:"R&D Course".localize(),cost:14E4,pointsCost:30,duration:2E4,basePoints:13,tF:0.1,dF:0.1,rF:1,sF:0.1,qF:0,maxP:900,canUse:function(a,b){return b.flags.trainingV3Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};category="Practice, Practice, Practice";categoryDisplayName="Practice, Practice, Practice".localize();a.designTraining2={id:"designTraining2",name:"G3 Pixel Cup".localize(),
cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:0.2,dF:1,rF:0.1,sF:0,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.techTraining2={id:"techTraining2",name:"G3 Code Jam".localize(),cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:1,dF:0.2,rF:0.1,sF:0,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};
a.holisticTraining2={id:"holisticTraining2",name:"G3 Game Jam".localize(),cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:0.5,dF:0.5,rF:0.1,sF:0,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.speedTraining2={id:"speedTraining2",name:"G3 Time Trials".localize(),cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:0.1,dF:0.1,rF:0.2,sF:1,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},
category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.researchTraining2={id:"researchTraining2",name:"G3 Innovation Challenge".localize(),cost:7E4,pointsCost:10,duration:2E4,basePoints:12,tF:0.1,dF:0.1,rF:1,sF:0.1,qF:0,maxP:700,canUse:function(a,b){return b.flags.trainingV2Enabled},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};category="Book studies";categoryDisplayName="Book studies".localize();a.holisticTraining={id:"holisticTraining",name:"Game dev gems".localize(),
cost:15E3,pointsCost:5,duration:2E4,basePoints:8,tF:0.5,dF:0.5,rF:0.1,sF:0.1,qF:0,maxP:500,canUse:function(a,b){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.researchTraining={id:"researchTraining",name:"Make me think!".localize(),cost:15E3,pointsCost:5,duration:2E4,basePoints:8,tF:0.1,dF:0.1,rF:1,sF:0.1,qF:0,maxP:500,canUse:function(a,b){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.designTraining={id:"designTraining",
name:"Game design for pirates".localize(),cost:15E3,pointsCost:5,duration:2E4,basePoints:8,tF:0.2,dF:1,rF:0.1,sF:0,qF:0,maxP:500,canUse:function(a,b){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};a.speedTraining={id:"speedTraining",name:"Don't repeat yourself".localize(),cost:15E3,pointsCost:5,duration:2E4,basePoints:8,tF:0.1,dF:0.1,rF:0.2,sF:1,qF:0,maxP:500,canUse:function(a,b){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0};
a.techTraining={id:"techTraining",name:"Code incomplete".localize(),cost:15E3,pointsCost:5,duration:2E4,basePoints:8,tF:1,dF:0.2,rF:0.1,sF:0,qF:0,maxP:500,canUse:function(a,b){return!0},category:category,categoryDisplayName:categoryDisplayName,isSkillTraining:!0}})();var Achievements={};
(function(){var a=Achievements,b=[];a.resetAchievements=function(){var c=a.hasAchieved(a.supporter);DataStore.getAchievements().achieved=[];c&&a.activate(a.supporter);b=[]};a.complete=function(a){DataStore.getAchievements().achieved.push({id:a.id,time:Date.now()});a.completed&&a.completed();Steam&&Steam.activateAchievement(a.id,function(){Achievements.achievedOnSteam(a.id)});DataStore.saveSettings()};a.activate=function(a){if(-1==b.indexOf(a.id)){try{ghg4.ghg5("achievement activated",{id:a.id})}catch(c){Logger.LogInfo("tagEvent failed",
c)}b.push(a.id)}};a.hasAchieved=function(a){return void 0!=DataStore.getAchievements().achieved.first(function(b){return b.id===a.id})};a.achievedOnSteam=function(a){var b=DataStore.getAchievements().achieved.first(function(b){return b.id==a});void 0!=b&&(b.s=!0);DataStore.saveSettings()};a.checkForAchievmentsNotCompletedOnSteam=function(b){try{if(GameFlags.IS_STEAM&&Steam&&Steam.isAvailable()){var c=a.getAllItems(),d=DataStore.getAchievements().achieved.map(function(a){return a.id});for(b=0;b<c.length;b++){var l=
c[b];if(-1!=d.indexOf(l.id)){var h=DataStore.getAchievements().achieved.map(function(a){return a})[d.indexOf(l.id)];h.s||Steam.activateAchievement(h.id,function(){Achievements.achievedOnSteam(h.id)})}}return[]}}catch(m){}};a.checkForNew=function(c){if(!c)return[];for(var d=[],k=a.getAllItems(),l=DataStore.getAchievements().achieved.map(function(a){return a.id}),h=0;h<k.length;h++){var m=k[h];-1==l.indexOf(m.id)&&(m.isAchieved&&m.isAchieved(c)?d.push(m):-1!=b.indexOf(m.id)&&d.push(m))}return d};a.getAllItems=
function(){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];void 0!=d.id&&b.push(d)}return b};a.getWidthId=function(b){return a.getAllItems().first(function(a){return a.id===b})};var c="#78BA00",d=10;a.goodCombo={id:"goodCombo",title:"Good Judgement".localize("achievement title"),description:"Create a game with a good topic/genre combination.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())?1===GameGenre.getGenreWeighting(a.topic.genreWeightings,a.genre,a.secondGenre):
!1},tint:c,value:d};a.cult={id:"cult",title:"Cult Status".localize("achievement title"),description:"Set a new standard for the early gaming industry.".localize("achievement"),isAchieved:function(a){var b=a.gameLog.last();return b&&3===a.topScoreAchievements&&b.flags.topScore&&b.isOnSale()?!0:!1},tint:c,value:d};a.engine100K={id:"engine100K",title:"100K Engine".localize("achievement title"),description:"Invest over 100K in a new game engine.".localize("achievement"),isAchieved:function(a){return a.engines.some(function(a){return 1E5<
a.costs})},tint:c,value:d};a.engine500K={id:"engine500K",title:"500K Engine".localize("achievement title"),description:"Invest over 500K in a new game engine.".localize("achievement"),isAchieved:function(a){return a.engines.some(function(a){return 5E5<a.costs})},tint:c,value:d};a.engine1M={id:"engine1M",title:"1M Engine".localize("achievement title"),description:"Invest over one million in a new game engine.".localize("achievement"),isAchieved:function(a){return a.engines.some(function(a){return 1E6<
a.costs})},tint:c,value:d};c="#FDD017";d=50;a.gold={id:"gold",title:"Gold".localize("achievement title"),description:"Sell half a million copies of a game without the help of a publisher.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())&&!a.flags.royaltyRate&&5E5<=a.unitsSold?!0:!1},tint:c,value:d};a.platinum={id:"platinum",title:"Platinum".localize("achievement title"),description:"Sell one million copies of a game without the help of a publisher.".localize("achievement"),
isAchieved:function(a){return(a=a.gameLog.last())&&!a.flags.royaltyRate&&1E6<=a.unitsSold?!0:!1},tint:"#E5E4E2",value:80};a.diamond={id:"diamond",title:"Diamond".localize("achievement title"),description:"Sell ten million copies of a game without the help of a publisher.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())&&!a.flags.royaltyRate&&1E7<=a.unitsSold?!0:!1},tint:"white",value:100};a.unobtainium={id:"unobtainium",title:"Unobtainium (seriously?)".localize("achievement title, refers to unobtanium, mocks the name of the rare mineral in the movie Avatar"),
description:"Sell one hundred million copies of a game without the help of a publisher.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())&&!a.flags.royaltyRate&&1E8<=a.unitsSold?!0:!1},tint:"#F4F4F4",value:250,hidden:!0};a.professional={id:"professional",title:"Professional".localize("achievement title"),description:"Reach level 5 with a character.".localize("achievement"),isAchieved:function(a){return a.staff.some(function(a){return 1==a.qualityFactor})},tint:c,value:d};
a.legend={id:"legend",title:"Legend".localize("achievement title"),description:"Reach level 10 with a character.".localize("achievement"),isAchieved:function(a){return a.staff.some(function(a){return 2==a.qualityFactor})},tint:c,value:100};a.diversity={id:"diversity",title:"Diversity".localize("achievement title"),description:"Have male and female staff.".localize("achievement"),isAchieved:function(a){for(var b,c=1;c<a.staff.length;c++){var d=a.staff[c].sex;void 0===b&&(b=d);if(d!=b)return!0}return!1},
tint:c,value:d};a.hireSomeoneFamous={id:"hireSomeoneFamous",title:"Famous".localize("achievement title"),description:"Hire someone famous.".localize("achievement"),tint:c,value:d};a.fullHouse={id:"fullHouse",title:"Full House".localize("achievement title"),description:"Have the maximum number of employees.".localize("achievement"),isAchieved:function(a){return 7===a.staff.length},tint:c,value:d};a.finishedGame={id:"finishedGame",title:"Game Dev Tycoon".localize(),description:"Finish Game Dev Tycoon.".localize("achievement"),
tint:c,value:200};c="#4E0000";a.perfectGame={id:"perfectGame",title:"Perfect Game".localize("achievement title"),description:"Release a game with a clean score of 10.".localize("achievement"),isAchieved:function(a){return(a=a.gameLog.last())&&10===a.reviews.average(function(a){return a.score})&&a.isOnSale()&&!a.flags.pGAEarned?a.flags.pGAEarned=!0:!1},tint:c,value:100,canEarnMultiple:!0};a.perfectGame11={id:"perfectGame11",title:"Turn it up to 11".localize("achievement title"),description:"Get a reviewer to give you a 11/10 rating.".localize("achievement"),
isAchieved:function(a){return(a=a.gameLog.last())&&10<a.reviews.average(function(a){return a.score})&&(a.isOnSale()||a.soldOut)&&!a.flags.pGAEarned?a.flags.pGAEarned=!0:!1},tint:c,value:100,canEarnMultiple:!0};c="#F4B300";d=150;a.easterEggs={id:"easterEggs",title:"Detective".localize("achievement title"),description:"Find at least one of the easter eggs in the game.".localize("achievement"),isAchieved:function(a){return!1},tint:c,value:d};a.lvl1EasterEgg={id:"lvl1EasterEgg",title:"Treasure Hunter".localize("achievement title"),
description:"Activate the hidden treasure in the garage.".localize("achievement"),isAchieved:function(a){return!1},tint:c,value:d,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl2Poster1={id:"lvl2Poster1",title:"Bluehair reporting for space duty".localize("achievement refers to Wing Commander, leave 'Bluehair'"),description:"Little known fact: Cats go all aggro in space.".localize("achievement refers to Wing Commander"),isAchieved:function(a){return 2!=a.currentLevel?!1:(a=a.gameLog.last())&&
("Wing Commander"===a.title||"wing commander"===a.title)},tint:c,value:d,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl2Poster2={id:"lvl2Poster2",title:"Welcome to Mars".localize("achievement title, refers to Doom"),description:"How did I get here? Why is there a chainsaw? Who cares!".localize("achievement refers to Doom"),isAchieved:function(a){return 2!=a.currentLevel?!1:(a=a.gameLog.last())&&("doom"===a.title||"DOOM"===a.title||"Doom"===a.title)},tint:c,value:d,hidden:!0,completed:function(){a.activate(a.easterEggs)}};
a.lvl3Poster1={id:"lvl3Poster1",title:"Best ride to work ever".localize("achievement title, referes to half life"),description:"Workplace safety anyone?".localize("achievement referes to half life"),isAchieved:function(a){return 3!=a.currentLevel?!1:(a=a.gameLog.last())?(a=a.title.toLowerCase(),"half life"===a||"half-life"===a):!1},tint:c,value:d,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl3Poster2={id:"lvl3Poster2",title:"Welcome to your hospital".localize("achievement title, refers to Theme Hospital"),
description:"Patients are reminded not to die in the corridors.".localize("achievement refers to Theme Hospital, use official translation for this."),isAchieved:function(a){return 3!=a.currentLevel?!1:(a=a.gameLog.last())&&"Theme Hospital"===a.title||"theme hospital"===a.title},tint:c,value:d,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl4Poster1={id:"lvl4Poster1",title:"Welcome Chief".localize("achievement title, refers to Halo"),description:"This world is round but different.".localize("achievement refers to Halo"),
isAchieved:function(a){return 4==a.currentLevel&&a.flags.rndLabUnlocked?(a=a.gameLog.last())&&0===a.title.toLowerCase().indexOf("halo"):!1},tint:c,value:d,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl4Poster2={id:"lvl4Poster2",title:"The sky is not the limit.".localize("achievement title, refers to Star Citizen"),description:"Welcome back Chris. We've missed you.".localize("achievement refers to Chris Roberts"),isAchieved:function(a){return 4==a.currentLevel&&a.flags.rndLabUnlocked?
(a=a.gameLog.last())&&"star citizen"===a.title.toLowerCase():!1},tint:c,value:d,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.lvl4Poster3={id:"lvl4Poster3",title:"Painting with nature.".localize("achievement title, refers to Okami"),description:"Pay homage to a specific Japanese video game.".localize("achievement refers to Okami"),isAchieved:function(a){return 4==a.currentLevel&&a.flags.rndLabUnlocked?(a=a.gameLog.last())&&"okami"===a.title.toLowerCase()||"\u014ckami"===a.title||"\u5927\u795e"===
a.title:!1},tint:c,value:d,hidden:!0,completed:function(){a.activate(a.easterEggs)}};a.inception={id:"inception",title:"Inception".localize("achievement title"),description:"Develop the game within the game.".localize("achievement, inception"),isAchieved:function(a){return(a=a.gameLog.last())&&a.isOnSale()&&a.genre.id===GameGenre.Simulation.id&&"Game Dev"===a.topic.id&&"Game Dev Tycoon"===a.title?!0:!1},tint:c,value:d};a.fanBoy={id:"fanboy",title:"Fan".localize(),description:"Pick an inspired company name.".localize("achievement"),
tint:c,value:50};d=70;c="#00AAAA";a.versatile={id:"versatile",title:"Versatile".localize("achievement title"),description:"Release a successful game in each of the five main genres.".localize("achievement"),isAchieved:function(a){for(var b=GameGenre.getAll().slice(0,5),c=0;c<a.gameLog.length;c++){if(0==b.length)return!0;var d=a.gameLog[c];7<=d.score&&-1!=b.indexOf(d.genre)&&b.remove(d.genre)}return!1},tint:c,value:d};a.cake={id:"cake",title:"Eat Cake".localize("achievement title"),description:"Show them red barrels some action.".localize("achievement"),
tint:c,value:100};a.supporter={id:"supporter",title:"Supporter".localize("achievement title"),description:"Support a young start-up. Buy the game.".localize("achievement"),tint:"green",value:1E3,isAchieved:function(){return!GameManager.ghg2()}};a.supporter2={id:"supporter2",title:"Greenheart",description:"Support Greenheart Games by buying an optional supporter pack.".localize("achievement"),tint:"green",value:1E3,hidden:!0,canEarnMultiple:!0};c="#FF981D";d=100;a.admirer={id:"admirer",title:"Admirer".localize("achievement title"),
description:"Fun fact: We almost named our company Megaflop Productions!".localize("achievement, leave 'Megaflop Productions'"),tint:"green",hidden:!0,value:d};a.writersBlock={id:"writersBlock",title:"Writer's Block".localize("achievement title"),description:"Naming games is sometimes difficult.".localize("achievement"),isAchieved:function(a){return!1},tint:c,value:20,hidden:!0}})();var SpriteSheetX=function(a){createjs.SpriteSheet.apply(this,arguments);this.targetFPS=a.targetFPS;this.baseImage=a.baseImage};
(function(){SpriteSheetX.prototype=new createjs.SpriteSheet})();var AnimationSpriteSheets={};
(function(){var a=AnimationSpriteSheets;a.getAllImages=function(){return[]};PlatformShim.ISLOWRES?(a.typingScreenL1={images:["./animations1366/typingScreenL1.png"],frames:{regY:0,height:32,regX:0,width:23.4782,count:46},animations:{loop:[0,45]},targetFPS:{loop:7}},a.typingScreenL2={images:["./animations1366/superb/typingScreenL2.png"],frames:{regY:-14,height:25,regX:-9,width:22,count:18},animations:{loop:[0,17]},targetFPS:{loop:10},baseImage:"./animations1366/superb/typingScreenL2_base.png"},a.typingScreenL3=
{images:["./animations1366/superb/typingScreenL3.png"],frames:{regY:-10,height:34,regX:-18,width:28,count:19},animations:{loop:[0,18]},targetFPS:{loop:5},baseImage:"./animations1366/superb/typingScreenL3_base.png"},a.typingScreenL4={images:["./animations1366/superb/typingScreenL4.png"],frames:{height:48,width:39,count:84,regX:0,regY:0},animations:{loop:[0,83]},targetFPS:{loop:5},baseImage:"./animations1366/superb/typingScreenL4_base.png"},a.hwLabScreenWall={images:["./animations1366/superb/hwLabScreenWall.png"],
frames:{height:217,width:292,count:30,regX:-11,regY:-66},animations:{loop:[0,29]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwLabScreenWall_base.png"},a.hwTV={images:["./animations1366/superb/hwTV.png"],frames:{height:184,width:155,count:61,regX:-10,regY:-18},animations:{loop:[0,60]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwTV_base.png"},a.hwFrontFemale1={images:["./animations1366/superb/hwFrontFemale1.png"],frames:{height:61,width:40,count:31,regX:-24,regY:-7},animations:{loop:[0,
30]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontFemale1_base.png"},a.hwFrontFemale2={images:["./animations1366/superb/hwFrontFemale2.png"],frames:{height:98,width:40,count:31,regX:-24,regY:-10},animations:{loop:[0,30]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontFemale2_base.png"},a.hwFrontFemale4={images:["./animations1366/superb/hwFrontFemale4.png"],frames:{height:64,width:45,count:11,regX:-18,regY:-42},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontFemale4_base.png"},
a.hwBackFemale1={images:["./animations1366/superb/hwBackFemale1.png"],frames:{height:59,width:36,count:11,regX:-22,regY:-10},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackFemale1_base.png"},a.hwBackFemale2={images:["./animations1366/superb/hwBackFemale2.png"],frames:{height:57,width:36,count:11,regX:-22,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackFemale2_base.png"},a.hwBackFemale3={images:["./animations1366/superb/hwBackFemale3.png"],
frames:{height:59,width:48,count:11,regX:-22,regY:-10},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackFemale3_base.png"},a.hwBackFemale4={images:["./animations1366/superb/hwBackFemale4.png"],frames:{height:57,width:48,count:11,regX:-22,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackFemale4_base.png"},a.hwFrontMale2={images:["./animations1366/superb/hwFrontMale2.png"],frames:{height:58,width:43,count:31,regX:-24,
regY:-10},animations:{loop:[0,30]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontMale2_base.png"},a.hwFrontMale3={images:["./animations1366/superb/hwFrontMale3.png"],frames:{height:65,width:50,count:11,regX:-15,regY:-41},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwFrontMale3_base.png"},a.hwFrontMale4={images:["./animations1366/superb/hwFrontMale4.png"],frames:{height:66,width:50,count:11,regX:-15,regY:-41},animations:{loop:[0,10]},targetFPS:{loop:10},
baseImage:"./animations1366/superb/hwFrontMale4_base.png"},a.hwBackMale1={images:["./animations1366/superb/hwBackMale1.png"],frames:{height:58,width:42,count:11,regX:-20,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackMale1_base.png"},a.hwBackMale2={images:["./animations1366/superb/hwBackMale2.png"],frames:{height:58,width:53,count:11,regX:-20,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/hwBackMale2_base.png"},
a.rndActor1={images:["./animations1366/superb/rndActor1.png"],frames:{height:68,width:69,count:11,regX:-6,regY:-13},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndActor1_base.png"},a.rndFemaleBoardBack1={images:["./animations1366/superb/rndFemaleBoardBack1.png"],frames:{height:62,width:48,count:11,regX:-22,regY:-11},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleBoardBack1_base.png"},a.rndMaleBoardFront1={images:["./animations1366/superb/rndMaleBoardFront1.png"],
frames:{height:86,width:67,count:16,regX:-10,regY:-7},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleBoardFront1_base.png"},a.rndFemaleTypingBack1={images:["./animations1366/superb/rndFemaleTypingBack1.png"],frames:{height:57,width:51,count:18,regX:-17,regY:-14},animations:{loop:[0,17]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleTypingBack1_base.png"},a.rndMaleTypingBack1={images:["./animations1366/superb/rndMaleTypingBack1.png"],frames:{height:63,
width:52,count:18,regX:-13,regY:-9},animations:{loop:[0,17]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleTypingBack1_base.png"},a.rndOperator1={images:["./animations1366/superb/rndOperator1.png"],frames:{height:116,width:53,count:11,regX:-13,regY:-14},animations:{loop:[0,10]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndOperator1_base.png"},a.rndFemaleTableBack1={images:["./animations1366/superb/rndFemaleTableBack1.png"],frames:{height:63,width:54,count:16,regX:-38,
regY:-4},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleTableBack1_base.png"},a.rndFemaleTableFront1_body={images:["./animations1366/superb/rndFemaleTableFront1_body.png"],frames:{height:77,width:52,count:16,regX:-27,regY:-17},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleTableFront1_body_base.png"},a.rndFemaleTableFront1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:16,regX:0,
regY:0},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndFemaleTableFront1_pants_base.png"},a.rndMaleFrontTable1_body={images:["./animations1366/superb/rndMaleFrontTable1_body.png"],frames:{height:79,width:48,count:16,regX:-28,regY:-11},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleFrontTable1_body_base.png"},a.rndMaleFrontTable1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:16,regX:0,regY:0},
animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleFrontTable1_pants_base.png"},a.rndMaleFrontTable2_body={images:["./animations1366/superb/rndMaleFrontTable2_body.png"],frames:{height:62,width:55,count:16,regX:-28,regY:-14},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleFrontTable2_body_base.png"},a.rndMaleFrontTable2_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:16,regX:0,regY:0},animations:{loop:[0,
15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleFrontTable2_pants_base.png"},a.rndMaleTableBack1={images:["./animations1366/superb/rndMaleTableBack1.png"],frames:{height:67,width:52,count:16,regX:-37,regY:-5},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndMaleTableBack1_base.png"},a.rndMaleTableBack2={images:["./animations1366/superb/rndMaleTableBack2.png"],frames:{height:73,width:53,count:16,regX:-37,regY:0},animations:{loop:[0,15]},targetFPS:{loop:10},
baseImage:"./animations1366/superb/rndMaleTableBack2_base.png"},a.notepadBackC1_body={images:["./animations1366/notepadBackC1_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC1_body_base.png"},a.notepadBackC2_body={images:["./animations1366/notepadBackC2_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,
37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC2_body_base.png"},a.notepadBackC3_body={images:["./animations1366/notepadBackC3_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC3_body_base.png"},a.notepadBackC4_body={images:["./animations1366/notepadBackC4_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,
0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC4_body_base.png"},a.notepadBackC5_body={images:["./animations1366/notepadBackC5_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC5_body_base.png"},a.notepadBackC6_body={images:["./animations1366/notepadBackC6_body.png"],frames:{height:41,width:59,count:38,
regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC6_body_base.png"},a.notepadBackC7_body={images:["./animations1366/notepadBackC7_body.png"],frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC7_body_base.png"},a.notepadBackC8_body={images:["./animations1366/notepadBackC8_body.png"],
frames:{height:41,width:59,count:38,regX:-21,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC8_body_base.png"},a.notepadBackC9_body={images:["./animations1366/notepadBackC9_body.png"],frames:{height:38,width:36,count:38,regX:-42,regY:-31},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC9_body_base.png"},a.notepadBackC10_body={images:["./animations1366/notepadBackC10_body.png"],
frames:{height:38,width:37,count:38,regX:-41,regY:-31},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC10_body_base.png"},a.notepadBackC11_body={images:["./animations1366/notepadBackC11_body.png"],frames:{height:38,width:36,count:38,regX:-41,regY:-31},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC11_body_base.png"},a.notepadBackC12_body={images:["./animations1366/notepadBackC12_body.png"],
frames:{height:41,width:59,count:38,regX:-19,regY:-28},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC12_body_base.png"},a.notepadBackC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:38,regX:0,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC1_chair_base.png"},a.notepadBackC1_hand={images:["./animations1366/notepadBackC1_hands.png"],
frames:{height:44,width:56,count:38,regX:-6,regY:-22},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10}},a.notepadBackC4_hand={images:["./animations1366/notepadBackC4_hands.png"],frames:{height:44,width:56,count:38,regX:-6,regY:-22},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10}},a.notepadBackC5_hand={images:["./animations1366/notepadBackC5_hands.png"],frames:{height:44,width:56,count:38,regX:-6,regY:-22},animations:{start:[0,
0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10}},a.notepadBackC9_hand={images:["./animations1366/notepadBackC9_hands.png"],frames:{height:48,width:63,count:38,regX:-5,regY:-22},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC9_hands_base.png"},a.notepadBackC10_hand={images:["./animations1366/notepadBackC10_hands.png"],frames:{height:48,width:63,count:38,regX:-5,regY:-22},animations:{start:[0,0],loop:[0,37],
end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC10_hands_base.png"},a.notepadBackC12_hand={images:["./animations1366/notepadBackC12_hands.png"],frames:{height:48,width:63,count:38,regX:-5,regY:-22},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC12_hands_base.png"},a.notepadBackC1_head={images:["./animations1366/notepadBackC1_head.png"],frames:{height:43,width:46,count:38,regX:-32,
regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC1_head_base.png"},a.notepadBackC2_head={images:["./animations1366/notepadBackC2_head.png"],frames:{height:46,width:45,count:38,regX:-33,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC2_head_base.png"},a.notepadBackC3_head={images:["./animations1366/notepadBackC3_head.png"],frames:{height:45,
width:47,count:38,regX:-31,regY:-2},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC3_head_base.png"},a.notepadBackC4_head={images:["./animations1366/notepadBackC4_head.png"],frames:{height:45,width:48,count:38,regX:-31,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC4_head_base.png"},a.notepadBackC5_head={images:["./animations1366/notepadBackC5_head.png"],
frames:{height:44,width:45,count:38,regX:-33,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC5_head_base.png"},a.notepadBackC6_head={images:["./animations1366/notepadBackC6_head.png"],frames:{height:43,width:48,count:38,regX:-32,regY:-3},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC6_head_base.png"},a.notepadBackC7_head={images:["./animations1366/notepadBackC7_head.png"],
frames:{height:45,width:48,count:38,regX:-31,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC7_head_base.png"},a.notepadBackC8_head={images:["./animations1366/notepadBackC8_head.png"],frames:{height:40,width:47,count:38,regX:-31,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC8_head_base.png"},a.notepadBackC9_head={images:["./animations1366/notepadBackC9_head.png"],
frames:{height:51,width:52,count:38,regX:-33,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC9_head_base.png"},a.notepadBackC10_head={images:["./animations1366/notepadBackC10_head.png"],frames:{height:51,width:52,count:38,regX:-33,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC10_head_base.png"},a.notepadBackC11_head={images:["./animations1366/notepadBackC11_head.png"],
frames:{height:51,width:48,count:38,regX:-33,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC11_head_base.png"},a.notepadBackC12_head={images:["./animations1366/notepadBackC12_head.png"],frames:{height:51,width:50,count:38,regX:-31,regY:-5},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC12_head_base.png"},a.notepadBackC1_pants={images:["./animations1366/empty_sheet.png"],
frames:{height:1,width:1,count:38,regX:0,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC1_pants_base.png"},a.notepadBackC9_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:38,regX:0,regY:0},animations:{start:[0,0],loop:[0,37],end:[37,37]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/notepadBackC9_pants_base.png"},a.notepadImage={images:["./animations1366/notepadImage.png"],
frames:{regY:0,height:107,regX:0,width:107,count:1},animations:{all:[0,0]},targetFPS:{all:7}},a.notepadFrontC1_body={images:["./animations1366/superb/notepadFrontC1_body.png"],frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_body_base.png"},a.notepadFrontC2_body={images:["./animations1366/superb/notepadFrontC2_body.png"],frames:{height:48,width:60,count:39,regX:-29,
regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC2_body_base.png"},a.notepadFrontC3_body={images:["./animations1366/superb/notepadFrontC3_body.png"],frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC3_body_base.png"},a.notepadFrontC4_body={images:["./animations1366/superb/notepadFrontC4_body.png"],
frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC4_body_base.png"},a.notepadFrontC5_body={images:["./animations1366/superb/notepadFrontC5_body.png"],frames:{height:48,width:62,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC5_body_base.png"},a.notepadFrontC6_body=
{images:["./animations1366/superb/notepadFrontC6_body.png"],frames:{height:48,width:62,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC6_body_base.png"},a.notepadFrontC7_body={images:["./animations1366/superb/notepadFrontC7_body.png"],frames:{height:48,width:62,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC7_body_base.png"},
a.notepadFrontC8_body={images:["./animations1366/superb/notepadFrontC8_body.png"],frames:{height:48,width:62,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC8_body_base.png"},a.notepadFrontC9_body={images:["./animations1366/superb/notepadFrontC9_body.png"],frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,
end:10},baseImage:"./animations1366/superb/notepadFrontC9_body_base.png"},a.notepadFrontC10_body={images:["./animations1366/superb/notepadFrontC10_body.png"],frames:{height:48,width:60,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC10_body_base.png"},a.notepadFrontC11_body={images:["./animations1366/superb/notepadFrontC11_body.png"],frames:{height:44,width:45,count:39,regX:-28,regY:-38},
animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC11_body_base.png"},a.notepadFrontC12_body={images:["./animations1366/superb/notepadFrontC12_body.png"],frames:{height:44,width:44,count:39,regX:-29,regY:-38},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC12_body_base.png"},a.notepadFrontC1_chair={images:["./animations1366/superb/notepadFrontC1_chair.png"],
frames:{height:55,width:67,count:39,regX:-11,regY:-47},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_chair_base.png"},a.notepadFrontC1_hand={images:["./animations1366/superb/notepadFrontC1_hands.png"],frames:{height:57,width:66,count:39,regX:-41,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_hands_base.png"},a.notepadFrontC4_hand=
{images:["./animations1366/superb/notepadFrontC4_hands.png"],frames:{height:57,width:66,count:39,regX:-41,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC4_hands_base.png"},a.notepadFrontC5_hand={images:["./animations1366/superb/notepadFrontC5_hands.png"],frames:{height:57,width:66,count:39,regX:-41,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC5_hands_base.png"},
a.notepadFrontC9_hand={images:["./animations1366/superb/notepadFrontC9_hands.png"],frames:{height:55,width:76,count:39,regX:-31,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC9_hands_base.png"},a.notepadFrontC10_hand={images:["./animations1366/superb/notepadFrontC10_hands.png"],frames:{height:55,width:76,count:39,regX:-31,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,
end:10},baseImage:"./animations1366/superb/notepadFrontC10_hands_base.png"},a.notepadFrontC12_hand={images:["./animations1366/superb/notepadFrontC12_hands.png"],frames:{height:55,width:76,count:39,regX:-31,regY:-37},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC12_hands_base.png"},a.notepadFrontC1_head={images:["./animations1366/superb/notepadFrontC1_head.png"],frames:{height:42,width:45,count:39,regX:-29,regY:-8},
animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_head_base.png"},a.notepadFrontC2_head={images:["./animations1366/superb/notepadFrontC2_head.png"],frames:{height:43,width:47,count:39,regX:-28,regY:-7},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC2_head_base.png"},a.notepadFrontC3_head={images:["./animations1366/superb/notepadFrontC3_head.png"],
frames:{height:41,width:43,count:39,regX:-29,regY:-9},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC3_head_base.png"},a.notepadFrontC5_head={images:["./animations1366/superb/notepadFrontC4_head.png"],frames:{height:42,width:44,count:39,regX:-29,regY:-8},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC4_head_base.png"},a.notepadFrontC4_head=
{images:["./animations1366/superb/notepadFrontC5_head.png"],frames:{height:41,width:45,count:39,regX:-31,regY:-9},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC5_head_base.png"},a.notepadFrontC6_head={images:["./animations1366/superb/notepadFrontC6_head.png"],frames:{height:45,width:43,count:39,regX:-31,regY:-4},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC6_head_base.png"},
a.notepadFrontC8_head={images:["./animations1366/superb/notepadFrontC7_head.png"],frames:{height:42,width:45,count:39,regX:-29,regY:-8},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC7_head_base.png"},a.notepadFrontC7_head={images:["./animations1366/superb/notepadFrontC8_head.png"],frames:{height:43,width:47,count:39,regX:-30,regY:-7},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},
baseImage:"./animations1366/superb/notepadFrontC8_head_base.png"},a.notepadFrontC9_head={images:["./animations1366/superb/notepadFrontC9_head.png"],frames:{height:46,width:47,count:39,regX:-25,regY:-7},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC9_head_base.png"},a.notepadFrontC10_head={images:["./animations1366/superb/notepadFrontC10_head.png"],frames:{height:44,width:43,count:39,regX:-31,regY:-8},animations:{start:[0,
0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC10_head_base.png"},a.notepadFrontC11_head={images:["./animations1366/superb/notepadFrontC11_head.png"],frames:{height:42,width:41,count:39,regX:-31,regY:-10},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC11_head_base.png"},a.notepadFrontC12_head={images:["./animations1366/superb/notepadFrontC12_head.png"],
frames:{height:43,width:43,count:39,regX:-30,regY:-10},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC12_head_base.png"},a.notepadFrontC1_pants={images:["./animations1366/superb/notepadFrontC1_pants.png"],frames:{height:31,width:46,count:39,regX:-31,regY:-71},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC1_pants_base.png"},a.notepadFrontC9_pants=
{images:["./animations1366/superb/notepadFrontC9_pants.png"],frames:{height:27,width:39,count:39,regX:-31,regY:-74},animations:{start:[0,0],loop:[0,38],end:[38,38]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/notepadFrontC9_pants_base.png"},a.teaCupImage={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:1,regX:0,regY:0},animations:{all:[0,0]},targetFPS:{all:7},baseImage:"./animations1366/superb/teacup.png"},a.teaCupImageLevel2={images:["./animations1366/empty_sheet.png"],
frames:{height:1,width:1,count:1,regX:0,regY:0},animations:{all:[0,0]},targetFPS:{all:7},baseImage:"./animations1366/superb/teacupLevel2.png"},a.pong={images:["./animations1366/pong.png"],frames:{height:77,regX:-16,count:60,regY:-14,width:77},animations:{all:[0,59]},targetFPS:{all:10},baseImage:"./animations1366/pong_base.png"},a.idleBackC1_body={images:["./animations1366/idleBackC1_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC1_body_base.png"},a.idleBackC2_body={images:["./animations1366/idleBackC2_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC2_body_base.png"},a.idleBackC3_body={images:["./animations1366/idleBackC3_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC3_body_base.png"},a.idleBackC4_body={images:["./animations1366/idleBackC4_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC4_body_base.png"},a.idleBackC5_body={images:["./animations1366/idleBackC5_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC5_body_base.png"},a.idleBackC6_body={images:["./animations1366/idleBackC6_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC6_body_base.png"},a.idleBackC7_body={images:["./animations1366/idleBackC7_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC7_body_base.png"},a.idleBackC8_body={images:["./animations1366/idleBackC8_body.png"],frames:{height:37,width:53,count:11,regX:-32,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC8_body_base.png"},a.idleBackC9_body={images:["./animations1366/idleBackC9_body.png"],frames:{height:39,width:36,count:11,regX:-47,regY:-31},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,
loop:5,end:20},baseImage:"./animations1366/idleBackC9_body_base.png"},a.idleBackC10_body={images:["./animations1366/idleBackC10_body.png"],frames:{height:39,width:36,count:11,regX:-47,regY:-31},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC10_body_base.png"},a.idleBackC11_body={images:["./animations1366/idleBackC11_body.png"],frames:{height:39,width:36,count:11,regX:-47,regY:-31},animations:{start:[0,9],loop:[10,10],end:[9,
0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC11_body_base.png"},a.idleBackC12_body={images:["./animations1366/idleBackC12_body.png"],frames:{height:39,width:50,count:11,regX:-33,regY:-31},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC12_body_base.png"},a.idleBackC1_chair={images:["./animations1366/idleBackC1_chair.png"],frames:{height:44,width:59,count:11,regX:-35,regY:-44},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC1_chair_base.png"},a.idleBackC1_hand={images:["./animations1366/idleBackC1_hands.png"],frames:{height:25,width:36,count:11,regX:-26,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC4_hand={images:["./animations1366/idleBackC4_hands.png"],frames:{height:25,width:36,count:11,regX:-26,regY:-33},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC5_hand={images:["./animations1366/idleBackC5_hands.png"],frames:{height:25,width:36,count:11,regX:-26,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC5_hands_base.png"},a.idleBackC9_hand={images:["./animations1366/idleBackC9_hands.png"],frames:{height:33,width:43,count:11,regX:-28,regY:-33},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC10_hand={images:["./animations1366/idleBackC10_hands.png"],frames:{height:33,width:43,count:11,regX:-28,regY:-33},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC12_hand={images:["./animations1366/idleBackC12_hands.png"],frames:{height:33,width:43,count:11,regX:-28,regY:-33},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleBackC1_head={images:["./animations1366/idleBackC1_head.png"],frames:{height:41,width:44,count:11,regX:-44,regY:-5},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC1_head_base.png"},a.idleBackC2_head={images:["./animations1366/idleBackC2_head.png"],frames:{height:46,width:44,count:11,regX:-44,regY:0},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC2_head_base.png"},a.idleBackC3_head={images:["./animations1366/idleBackC3_head.png"],frames:{height:44,width:45,count:11,regX:-44,regY:-2},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC3_head_base.png"},a.idleBackC4_head={images:["./animations1366/idleBackC4_head.png"],frames:{height:44,width:47,count:11,regX:-44,regY:0},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC4_head_base.png"},a.idleBackC5_head={images:["./animations1366/idleBackC5_head.png"],frames:{height:44,width:44,count:11,regX:-44,regY:-4},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC5_head_base.png"},a.idleBackC6_head={images:["./animations1366/idleBackC6_head.png"],frames:{height:43,width:47,count:11,regX:-44,regY:-2},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC6_head_base.png"},a.idleBackC7_head={images:["./animations1366/idleBackC7_head.png"],frames:{height:44,width:48,count:11,regX:-44,regY:0},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC7_head_base.png"},a.idleBackC8_head={images:["./animations1366/idleBackC8_head.png"],frames:{height:41,width:45,count:11,regX:-43,regY:-4},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC8_head_base.png"},a.idleBackC9_head={images:["./animations1366/idleBackC9_head.png"],frames:{height:52,width:49,count:11,regX:-43,regY:-5},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC9_head_base.png"},a.idleBackC10_head={images:["./animations1366/idleBackC10_head.png"],frames:{height:53,width:49,count:11,regX:-43,regY:-5},animations:{start:[0,
9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC10_head_base.png"},a.idleBackC11_head={images:["./animations1366/idleBackC11_head.png"],frames:{height:53,width:47,count:11,regX:-43,regY:-5},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC11_head_base.png"},a.idleBackC12_head={images:["./animations1366/idleBackC12_head.png"],frames:{height:53,width:48,count:11,regX:-42,regY:-4},
animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC12_head_base.png"},a.idleBackC1_pants={images:["./animations1366/idleBackC1_pants.png"],frames:{height:34,width:43,count:11,regX:-23,regY:-58},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC1_pants_base.png"},a.idleBackC9_pants={images:["./animations1366/idleBackC9_pants.png"],frames:{height:32,width:45,count:11,
regX:-21,regY:-64},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/idleBackC9_pants_base.png"},a.idleFrontC1_body={images:["./animations1366/superb/idleFrontC1_body.png"],frames:{height:48,width:51,count:11,regX:-25,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC1_body_base.png"},a.idleFrontC2_body={images:["./animations1366/superb/idleFrontC2_body.png"],
frames:{height:49,width:52,count:11,regX:-25,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC2_body_base.png"},a.idleFrontC3_body={images:["./animations1366/superb/idleFrontC3_body.png"],frames:{height:48,width:52,count:11,regX:-25,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC3_body_base.png"},a.idleFrontC4_body={images:["./animations1366/superb/idleFrontC4_body.png"],
frames:{height:49,width:51,count:11,regX:-25,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC4_body_base.png"},a.idleFrontC5_body={images:["./animations1366/superb/idleFrontC5_body.png"],frames:{height:48,width:50,count:11,regX:-26,regY:-39},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC5_body_base.png"},a.idleFrontC6_body={images:["./animations1366/superb/idleFrontC6_body.png"],
frames:{height:48,width:50,count:11,regX:-26,regY:-39},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC6_body_base.png"},a.idleFrontC7_body={images:["./animations1366/superb/idleFrontC7_body.png"],frames:{height:48,width:50,count:11,regX:-26,regY:-39},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC7_body_base.png"},a.idleFrontC8_body={images:["./animations1366/superb/idleFrontC8_body.png"],
frames:{height:49,width:50,count:11,regX:-26,regY:-38},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC8_body_base.png"},a.idleFrontC9_body={images:["./animations1366/superb/idleFrontC9_body.png"],frames:{height:46,width:48,count:11,regX:-26,regY:-40},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC9_body_base.png"},a.idleFrontC10_body={images:["./animations1366/superb/idleFrontC10_body.png"],
frames:{height:46,width:48,count:11,regX:-26,regY:-40},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC10_body_base.png"},a.idleFrontC11_body={images:["./animations1366/superb/idleFrontC11_body.png"],frames:{height:42,width:39,count:11,regX:-24,regY:-40},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC11_body_base.png"},a.idleFrontC12_body=
{images:["./animations1366/superb/idleFrontC12_body.png"],frames:{height:42,width:38,count:11,regX:-26,regY:-40},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC12_body_base.png"},a.idleFrontC1_chair={images:["./animations1366/superb/idleFrontC1_chair.png"],frames:{height:42,width:40,count:11,regX:-24,regY:-48},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC1_chair_base.png"},
a.idleFrontC1_hand={images:["./animations1366/superb/idleFrontC1_hands.png"],frames:{height:29,width:38,count:11,regX:-46,regY:-63},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleFrontC4_hand={images:["./animations1366/superb/idleFrontC4_hands.png"],frames:{height:29,width:38,count:11,regX:-46,regY:-63},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},
a.idleFrontC5_hand={images:["./animations1366/superb/idleFrontC5_hands.png"],frames:{height:29,width:38,count:11,regX:-46,regY:-63},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleFrontC9_hand={images:["./animations1366/superb/idleFrontC9_hands.png"],frames:{height:38,width:54,count:11,regX:-28,regY:-52},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},
a.idleFrontC10_hand={images:["./animations1366/superb/idleFrontC10_hands.png"],frames:{height:38,width:54,count:11,regX:-28,regY:-52},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},a.idleFrontC12_hand={images:["./animations1366/superb/idleFrontC12_hands.png"],frames:{height:38,width:54,count:11,regX:-28,regY:-52},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/empty_base.png"},
a.idleFrontC1_head={images:["./animations1366/superb/idleFrontC1_head.png"],frames:{height:40,width:42,count:11,regX:-21,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC1_head_base.png"},a.idleFrontC2_head={images:["./animations1366/superb/idleFrontC2_head.png"],frames:{height:41,width:43,count:11,regX:-21,regY:-8},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC2_head_base.png"},
a.idleFrontC3_head={images:["./animations1366/superb/idleFrontC3_head.png"],frames:{height:39,width:40,count:11,regX:-22,regY:-10},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC3_head_base.png"},a.idleFrontC5_head={images:["./animations1366/superb/idleFrontC4_head.png"],frames:{height:40,width:41,count:11,regX:-22,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC4_head_base.png"},
a.idleFrontC4_head={images:["./animations1366/superb/idleFrontC5_head.png"],frames:{height:40,width:41,count:11,regX:-24,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC5_head_base.png"},a.idleFrontC6_head={images:["./animations1366/superb/idleFrontC6_head.png"],frames:{height:45,width:41,count:11,regX:-23,regY:-4},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC6_head_base.png"},
a.idleFrontC8_head={images:["./animations1366/superb/idleFrontC7_head.png"],frames:{height:40,width:42,count:11,regX:-22,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC7_head_base.png"},a.idleFrontC7_head={images:["./animations1366/superb/idleFrontC8_head.png"],frames:{height:43,width:44,count:11,regX:-22,regY:-6},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC8_head_base.png"},
a.idleFrontC9_head={images:["./animations1366/superb/idleFrontC9_head.png"],frames:{height:45,width:42,count:11,regX:-20,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC9_head_base.png"},a.idleFrontC11_head={images:["./animations1366/superb/idleFrontC10_head.png"],frames:{height:42,width:38,count:11,regX:-24,regY:-10},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC10_head_base.png"},
a.idleFrontC10_head={images:["./animations1366/superb/idleFrontC11_head.png"],frames:{height:43,width:40,count:11,regX:-24,regY:-9},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC11_head_base.png"},a.idleFrontC12_head={images:["./animations1366/superb/idleFrontC12_head.png"],frames:{height:44,width:40,count:11,regX:-23,regY:-10},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC12_head_base.png"},
a.idleFrontC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:11,regX:0,regY:0},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC1_pants_base.png"},a.idleFrontC9_pants={images:["./animations1366/superb/idleFrontC9_pants.png"],frames:{height:25,width:35,count:11,regX:-32,regY:-76},animations:{start:[0,9],loop:[10,10],end:[9,0]},targetFPS:{start:20,loop:5,end:20},baseImage:"./animations1366/superb/idleFrontC9_pants_base.png"},
a.typingBackC1_body={images:["./animations1366/typingBackC1_body.png"],frames:{height:34,width:46,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_body_base.png"},a.typingBackC2_body={images:["./animations1366/typingBackC2_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC2_body_base.png"},
a.typingBackC3_body={images:["./animations1366/typingBackC3_body.png"],frames:{height:34,width:46,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC3_body_base.png"},a.typingBackC4_body={images:["./animations1366/typingBackC4_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC4_body_base.png"},
a.typingBackC5_body={images:["./animations1366/typingBackC5_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC5_body_base.png"},a.typingBackC6_body={images:["./animations1366/typingBackC6_body.png"],frames:{height:34,width:46,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC6_body_base.png"},
a.typingBackC7_body={images:["./animations1366/typingBackC7_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC7_body_base.png"},a.typingBackC8_body={images:["./animations1366/typingBackC8_body.png"],frames:{height:34,width:48,count:17,regX:-32,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC8_body_base.png"},
a.typingBackC9_body={images:["./animations1366/typingBackC9_body.png"],frames:{height:17,width:31,count:17,regX:-47,regY:-40},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC9_body_base.png"},a.typingBackC10_body={images:["./animations1366/typingBackC10_body.png"],frames:{height:19,width:31,count:17,regX:-47,regY:-39},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC10_body_base.png"},
a.typingBackC11_body={images:["./animations1366/typingBackC11_body.png"],frames:{height:18,width:31,count:17,regX:-47,regY:-39},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC11_body_base.png"},a.typingBackC12_body={images:["./animations1366/typingBackC12_body.png"],frames:{height:34,width:46,count:17,regX:-32,regY:-32},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC12_body_base.png"},
a.typingBackC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:17,regX:0,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_chair_base.png"},a.typingBackC1_hand={images:["./animations1366/typingBackC1_hands.png"],frames:{height:26,width:29,count:17,regX:-25,regY:-32},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_hands_base.png"},
a.typingBackC4_hand={images:["./animations1366/typingBackC4_hands.png"],frames:{height:26,width:29,count:17,regX:-25,regY:-32},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC4_hands_base.png"},a.typingBackC5_hand={images:["./animations1366/typingBackC5_hands.png"],frames:{height:26,width:29,count:17,regX:-25,regY:-32},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC5_hands_base.png"},
a.typingBackC9_hand={images:["./animations1366/typingBackC9_hands.png"],frames:{height:33,width:40,count:17,regX:-26,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC9_hands_base.png"},a.typingBackC10_hand={images:["./animations1366/typingBackC10_hands.png"],frames:{height:33,width:40,count:17,regX:-26,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC10_hands_base.png"},
a.typingBackC12_hand={images:["./animations1366/typingBackC12_hands.png"],frames:{height:33,width:40,count:17,regX:-26,regY:-33},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC12_hands_base.png"},a.typingBackC1_head={images:["./animations1366/typingBackC1_head.png"],frames:{height:40,width:35,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_head_base.png"},
a.typingBackC2_head={images:["./animations1366/typingBackC2_head.png"],frames:{height:45,width:34,count:17,regX:-44,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC2_head_base.png"},a.typingBackC3_head={images:["./animations1366/typingBackC3_head.png"],frames:{height:43,width:34,count:17,regX:-44,regY:-2},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC3_head_base.png"},
a.typingBackC4_head={images:["./animations1366/typingBackC4_head.png"],frames:{height:43,width:36,count:17,regX:-43,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC4_head_base.png"},a.typingBackC5_head={images:["./animations1366/typingBackC5_head.png"],frames:{height:43,width:35,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC5_head_base.png"},
a.typingBackC6_head={images:["./animations1366/typingBackC6_head.png"],frames:{height:41,width:36,count:17,regX:-44,regY:-3},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC6_head_base.png"},a.typingBackC7_head={images:["./animations1366/typingBackC7_head.png"],frames:{height:43,width:37,count:17,regX:-43,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC7_head_base.png"},
a.typingBackC8_head={images:["./animations1366/typingBackC8_head.png"],frames:{height:39,width:36,count:17,regX:-42,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC8_head_base.png"},a.typingBackC9_head={images:["./animations1366/typingBackC9_head.png"],frames:{height:50,width:41,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC9_head_base.png"},
a.typingBackC10_head={images:["./animations1366/typingBackC10_head.png"],frames:{height:50,width:41,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC10_head_base.png"},a.typingBackC11_head={images:["./animations1366/typingBackC11_head.png"],frames:{height:51,width:38,count:17,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC11_head_base.png"},
a.typingBackC12_head={images:["./animations1366/typingBackC12_head.png"],frames:{height:51,width:39,count:17,regX:-42,regY:-4},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC12_head_base.png"},a.typingBackC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:17,regX:0,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC1_pants_base.png"},
a.typingBackC9_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:17,regX:0,regY:0},animations:{start:[0,0],loop:[0,16],end:[16,16]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/typingBackC9_pants_base.png"},a.typingFrontC1_body={images:["./animations1366/superb/typingFrontC1_body.png"],frames:{height:44,width:48,count:10,regX:-29,regY:-41},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC1_body_base.png"},
a.typingFrontC2_body={images:["./animations1366/superb/typingFrontC2_body.png"],frames:{height:43,width:48,count:10,regX:-29,regY:-42},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC2_body_base.png"},a.typingFrontC3_body={images:["./animations1366/superb/typingFrontC3_body.png"],frames:{height:43,width:48,count:10,regX:-29,regY:-42},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC3_body_base.png"},
a.typingFrontC4_body={images:["./animations1366/superb/typingFrontC4_body.png"],frames:{height:44,width:48,count:10,regX:-29,regY:-41},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC4_body_base.png"},a.typingFrontC5_body={images:["./animations1366/superb/typingFrontC5_body.png"],frames:{height:44,width:47,count:10,regX:-29,regY:-41},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC5_body_base.png"},
a.typingFrontC6_body={images:["./animations1366/superb/typingFrontC6_body.png"],frames:{height:43,width:47,count:10,regX:-29,regY:-42},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC6_body_base.png"},a.typingFrontC7_body={images:["./animations1366/superb/typingFrontC7_body.png"],frames:{height:44,width:47,count:10,regX:-29,regY:-41},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC7_body_base.png"},
a.typingFrontC8_body={images:["./animations1366/superb/typingFrontC8_body.png"],frames:{height:43,width:47,count:10,regX:-29,regY:-42},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC8_body_base.png"},a.typingFrontC9_body={images:["./animations1366/superb/typingFrontC9_body.png"],frames:{height:42,width:46,count:10,regX:-29,regY:-43},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC9_body_base.png"},
a.typingFrontC10_body={images:["./animations1366/superb/typingFrontC10_body.png"],frames:{height:41,width:46,count:10,regX:-29,regY:-44},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC10_body_base.png"},a.typingFrontC11_body={images:["./animations1366/superb/typingFrontC11_body.png"],frames:{height:38,width:35,count:10,regX:-28,regY:-44},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},
baseImage:"./animations1366/superb/typingFrontC11_body_base.png"},a.typingFrontC12_body={images:["./animations1366/superb/typingFrontC12_body.png"],frames:{height:38,width:35,count:10,regX:-29,regY:-44},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC12_body_base.png"},a.typingFrontC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:10,regX:0,regY:0},animations:{start:[0,0],loop:[0,9],
end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC1_chair_base.png"},a.typingFrontC1_hand={images:["./animations1366/superb/typingFrontC1_hands.png"],frames:{height:28,width:36,count:10,regX:-49,regY:-64},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/empty_base.png"},a.typingFrontC4_hand={images:["./animations1366/superb/typingFrontC4_hands.png"],frames:{height:28,width:36,count:10,regX:-49,
regY:-64},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/empty_base.png"},a.typingFrontC5_hand={images:["./animations1366/superb/typingFrontC5_hands.png"],frames:{height:28,width:36,count:10,regX:-49,regY:-64},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/empty_base.png"},a.typingFrontC9_hand={images:["./animations1366/superb/typingFrontC9_hands.png"],frames:{height:37,width:52,
count:10,regX:-31,regY:-53},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC9_hands_base.png"},a.typingFrontC10_hand={images:["./animations1366/superb/typingFrontC10_hands.png"],frames:{height:37,width:52,count:10,regX:-31,regY:-53},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC10_hands_base.png"},a.typingFrontC12_hand={images:["./animations1366/superb/typingFrontC12_hands.png"],
frames:{height:37,width:52,count:10,regX:-31,regY:-53},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC12_hands_base.png"},a.typingFrontC1_head={images:["./animations1366/superb/typingFrontC1_head.png"],frames:{height:40,width:35,count:10,regX:-29,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC1_head_base.png"},a.typingFrontC2_head=
{images:["./animations1366/superb/typingFrontC2_head.png"],frames:{height:41,width:36,count:10,regX:-29,regY:-8},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC2_head_base.png"},a.typingFrontC3_head={images:["./animations1366/superb/typingFrontC3_head.png"],frames:{height:39,width:32,count:10,regX:-30,regY:-10},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC3_head_base.png"},
a.typingFrontC5_head={images:["./animations1366/superb/typingFrontC4_head.png"],frames:{height:40,width:33,count:10,regX:-30,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC4_head_base.png"},a.typingFrontC4_head={images:["./animations1366/superb/typingFrontC5_head.png"],frames:{height:39,width:34,count:10,regX:-31,regY:-10},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC5_head_base.png"},
a.typingFrontC6_head={images:["./animations1366/superb/typingFrontC6_head.png"],frames:{height:45,width:33,count:10,regX:-31,regY:-4},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC6_head_base.png"},a.typingFrontC8_head={images:["./animations1366/superb/typingFrontC7_head.png"],frames:{height:40,width:34,count:10,regX:-30,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC7_head_base.png"},
a.typingFrontC7_head={images:["./animations1366/superb/typingFrontC8_head.png"],frames:{height:42,width:36,count:10,regX:-30,regY:-7},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC8_head_base.png"},a.typingFrontC9_head={images:["./animations1366/superb/typingFrontC9_head.png"],frames:{height:44,width:36,count:10,regX:-26,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC9_head_base.png"},
a.typingFrontC10_head={images:["./animations1366/superb/typingFrontC10_head.png"],frames:{height:43,width:33,count:10,regX:-31,regY:-9},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC10_head_base.png"},a.typingFrontC11_head={images:["./animations1366/superb/typingFrontC11_head.png"],frames:{height:42,width:32,count:10,regX:-31,regY:-10},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},
baseImage:"./animations1366/superb/typingFrontC11_head_base.png"},a.typingFrontC12_head={images:["./animations1366/superb/typingFrontC12_head.png"],frames:{height:42,width:33,count:10,regX:-30,regY:-11},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC12_head_base.png"},a.typingFrontC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:10,regX:0,regY:0},animations:{start:[0,0],loop:[0,9],
end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC1_pants_base.png"},a.typingFrontC9_pants={images:["./animations1366/superb/typingFrontC9_pants.png"],frames:{height:5,width:27,count:10,regX:-33,regY:-77},animations:{start:[0,0],loop:[0,9],end:[9,9]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/typingFrontC9_pants_base.png"},a.thinkingFrontC1_body={images:["./animations1366/superb/thinkingFrontC1_body.png"],frames:{height:58,width:54,
count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_body_base.png"},a.thinkingFrontC2_body={images:["./animations1366/superb/thinkingFrontC2_body.png"],frames:{height:59,width:53,count:34,regX:-29,regY:-27},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC2_body_base.png"},a.thinkingFrontC3_body={images:["./animations1366/superb/thinkingFrontC3_body.png"],
frames:{height:58,width:53,count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC3_body_base.png"},a.thinkingFrontC4_body={images:["./animations1366/superb/thinkingFrontC4_body.png"],frames:{height:59,width:53,count:34,regX:-29,regY:-27},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC4_body_base.png"},a.thinkingFrontC5_body=
{images:["./animations1366/superb/thinkingFrontC5_body.png"],frames:{height:58,width:53,count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC5_body_base.png"},a.thinkingFrontC6_body={images:["./animations1366/superb/thinkingFrontC6_body.png"],frames:{height:59,width:53,count:34,regX:-29,regY:-27},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC6_body_base.png"},
a.thinkingFrontC7_body={images:["./animations1366/superb/thinkingFrontC7_body.png"],frames:{height:58,width:53,count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC7_body_base.png"},a.thinkingFrontC8_body={images:["./animations1366/superb/thinkingFrontC8_body.png"],frames:{height:58,width:53,count:34,regX:-29,regY:-28},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,
end:10},baseImage:"./animations1366/superb/thinkingFrontC8_body_base.png"},a.thinkingFrontC9_body={images:["./animations1366/superb/thinkingFrontC9_body.png"],frames:{height:56,width:52,count:34,regX:-29,regY:-29},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC9_body_base.png"},a.thinkingFrontC10_body={images:["./animations1366/superb/thinkingFrontC10_body.png"],frames:{height:56,width:50,count:34,regX:-31,regY:-29},
animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC10_body_base.png"},a.thinkingFrontC11_body={images:["./animations1366/superb/thinkingFrontC11_body.png"],frames:{height:41,width:40,count:34,regX:-28,regY:-39},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC11_body_base.png"},a.thinkingFrontC12_body={images:["./animations1366/superb/thinkingFrontC12_body.png"],
frames:{height:42,width:39,count:34,regX:-31,regY:-38},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC12_body_base.png"},a.thinkingFrontC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_chair_base.png"},a.thinkingFrontC1_hand=
{images:["./animations1366/superb/thinkingFrontC1_hands.png"],frames:{height:75,width:51,count:34,regX:-41,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_hands_base.png"},a.thinkingFrontC4_hand={images:["./animations1366/superb/thinkingFrontC4_hands.png"],frames:{height:75,width:51,count:34,regX:-41,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC4_hands_base.png"},
a.thinkingFrontC5_hand={images:["./animations1366/superb/thinkingFrontC5_hands.png"],frames:{height:75,width:51,count:34,regX:-41,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC5_hands_base.png"},a.thinkingFrontC9_hand={images:["./animations1366/superb/thinkingFrontC9_hands.png"],frames:{height:70,width:59,count:34,regX:-31,regY:-21},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,
loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC9_hands_base.png"},a.thinkingFrontC10_hand={images:["./animations1366/superb/thinkingFrontC10_hands.png"],frames:{height:70,width:59,count:34,regX:-31,regY:-21},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC10_hands_base.png"},a.thinkingFrontC12_hand={images:["./animations1366/superb/thinkingFrontC12_hands.png"],frames:{height:70,width:59,count:34,
regX:-31,regY:-21},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC12_hands_base.png"},a.thinkingFrontC1_head={images:["./animations1366/superb/thinkingFrontC1_head.png"],frames:{height:40,width:37,count:34,regX:-26,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_head_base.png"},a.thinkingFrontC2_head={images:["./animations1366/superb/thinkingFrontC2_head.png"],
frames:{height:41,width:38,count:34,regX:-26,regY:-8},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC2_head_base.png"},a.thinkingFrontC3_head={images:["./animations1366/superb/thinkingFrontC3_head.png"],frames:{height:39,width:35,count:34,regX:-27,regY:-10},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC3_head_base.png"},a.thinkingFrontC5_head=
{images:["./animations1366/superb/thinkingFrontC4_head.png"],frames:{height:40,width:36,count:34,regX:-27,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC4_head_base.png"},a.thinkingFrontC4_head={images:["./animations1366/superb/thinkingFrontC5_head.png"],frames:{height:40,width:36,count:34,regX:-29,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC5_head_base.png"},
a.thinkingFrontC6_head={images:["./animations1366/superb/thinkingFrontC6_head.png"],frames:{height:45,width:36,count:34,regX:-28,regY:-4},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC6_head_base.png"},a.thinkingFrontC8_head={images:["./animations1366/superb/thinkingFrontC7_head.png"],frames:{height:40,width:37,count:34,regX:-27,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,
end:10},baseImage:"./animations1366/superb/thinkingFrontC7_head_base.png"},a.thinkingFrontC7_head={images:["./animations1366/superb/thinkingFrontC8_head.png"],frames:{height:43,width:39,count:34,regX:-27,regY:-6},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC8_head_base.png"},a.thinkingFrontC9_head={images:["./animations1366/superb/thinkingFrontC9_head.png"],frames:{height:45,width:38,count:34,regX:-25,regY:-8},
animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC9_head_base.png"},a.thinkingFrontC10_head={images:["./animations1366/superb/thinkingFrontC10_head.png"],frames:{height:43,width:33,count:34,regX:-31,regY:-9},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC10_head_base.png"},a.thinkingFrontC11_head={images:["./animations1366/superb/thinkingFrontC11_head.png"],
frames:{height:42,width:32,count:34,regX:-31,regY:-10},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC11_head_base.png"},a.thinkingFrontC12_head={images:["./animations1366/superb/thinkingFrontC12_head.png"],frames:{height:42,width:34,count:34,regX:-30,regY:-11},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC12_head_base.png"},
a.thinkingFrontC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC1_pants_base.png"},a.thinkingFrontC9_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/superb/thinkingFrontC9_pants_base.png"},
a.thinkingBackC1_body={images:["./animations1366/thinkingBackC1_body.png"],frames:{height:49,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_body_base.png"},a.thinkingBackC2_body={images:["./animations1366/thinkingBackC2_body.png"],frames:{height:50,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC2_body_base.png"},
a.thinkingBackC3_body={images:["./animations1366/thinkingBackC3_body.png"],frames:{height:50,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC3_body_base.png"},a.thinkingBackC4_body={images:["./animations1366/thinkingBackC4_body.png"],frames:{height:50,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC4_body_base.png"},
a.thinkingBackC5_body={images:["./animations1366/thinkingBackC5_body.png"],frames:{height:48,width:49,count:34,regX:-31,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC5_body_base.png"},a.thinkingBackC6_body={images:["./animations1366/thinkingBackC6_body.png"],frames:{height:48,width:49,count:34,regX:-31,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC6_body_base.png"},
a.thinkingBackC7_body={images:["./animations1366/thinkingBackC7_body.png"],frames:{height:50,width:49,count:34,regX:-31,regY:-17},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC7_body_base.png"},a.thinkingBackC8_body={images:["./animations1366/thinkingBackC8_body.png"],frames:{height:48,width:49,count:34,regX:-31,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC8_body_base.png"},
a.thinkingBackC9_body={images:["./animations1366/thinkingBackC9_body.png"],frames:{height:27,width:32,count:34,regX:-46,regY:-35},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC9_body_base.png"},a.thinkingBackC10_body={images:["./animations1366/thinkingBackC10_body.png"],frames:{height:22,width:32,count:34,regX:-46,regY:-35},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC10_body_base.png"},
a.thinkingBackC11_body={images:["./animations1366/thinkingBackC11_body.png"],frames:{height:22,width:32,count:34,regX:-46,regY:-35},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC11_body_base.png"},a.thinkingBackC12_body={images:["./animations1366/thinkingBackC12_body.png"],frames:{height:48,width:46,count:34,regX:-32,regY:-18},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC12_body_base.png"},
a.thinkingBackC1_chair={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_chair_base.png"},a.thinkingBackC1_hand={images:["./animations1366/thinkingBackC1_hands.png"],frames:{height:46,width:45,count:34,regX:-26,regY:-11},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_hands_base.png"},
a.thinkingBackC4_hand={images:["./animations1366/thinkingBackC4_hands.png"],frames:{height:46,width:45,count:34,regX:-26,regY:-11},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC4_hands_base.png"},a.thinkingBackC5_hand={images:["./animations1366/thinkingBackC5_hands.png"],frames:{height:46,width:45,count:34,regX:-26,regY:-11},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC5_hands_base.png"},
a.thinkingBackC9_hand={images:["./animations1366/thinkingBackC9_hands.png"],frames:{height:54,width:41,count:34,regX:-27,regY:-12},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC9_hands_base.png"},a.thinkingBackC10_hand={images:["./animations1366/thinkingBackC10_hands.png"],frames:{height:54,width:41,count:34,regX:-27,regY:-12},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC10_hands_base.png"},
a.thinkingBackC12_hand={images:["./animations1366/thinkingBackC12_hands.png"],frames:{height:54,width:41,count:34,regX:-27,regY:-12},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC12_hands_base.png"},a.thinkingBackC1_head={images:["./animations1366/thinkingBackC1_head.png"],frames:{height:40,width:35,count:34,regX:-44,regY:-5},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_head_base.png"},
a.thinkingBackC2_head={images:["./animations1366/thinkingBackC2_head.png"],frames:{height:46,width:35,count:34,regX:-44,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC2_head_base.png"},a.thinkingBackC3_head={images:["./animations1366/thinkingBackC3_head.png"],frames:{height:44,width:37,count:34,regX:-44,regY:-2},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC3_head_base.png"},
a.thinkingBackC4_head={images:["./animations1366/thinkingBackC4_head.png"],frames:{height:43,width:37,count:34,regX:-44,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC4_head_base.png"},a.thinkingBackC5_head={images:["./animations1366/thinkingBackC5_head.png"],frames:{height:44,width:35,count:34,regX:-44,regY:-4},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC5_head_base.png"},
a.thinkingBackC6_head={images:["./animations1366/thinkingBackC6_head.png"],frames:{height:41,width:37,count:34,regX:-44,regY:-3},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC6_head_base.png"},a.thinkingBackC7_head={images:["./animations1366/thinkingBackC7_head.png"],frames:{height:44,width:38,count:34,regX:-44,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC7_head_base.png"},
a.thinkingBackC8_head={images:["./animations1366/thinkingBackC8_head.png"],frames:{height:40,width:36,count:34,regX:-43,regY:-4},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC8_head_base.png"},a.thinkingBackC9_head={images:["./animations1366/thinkingBackC9_head.png"],frames:{height:52,width:42,count:34,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC9_head_base.png"},
a.thinkingBackC10_head={images:["./animations1366/thinkingBackC10_head.png"],frames:{height:53,width:42,count:34,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC10_head_base.png"},a.thinkingBackC11_head={images:["./animations1366/thinkingBackC11_head.png"],frames:{height:53,width:40,count:34,regX:-43,regY:-5},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC11_head_base.png"},
a.thinkingBackC12_head={images:["./animations1366/thinkingBackC12_head.png"],frames:{height:53,width:41,count:34,regX:-42,regY:-4},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC12_head_base.png"},a.thinkingBackC1_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC1_pants_base.png"},
a.thinkingBackC9_pants={images:["./animations1366/empty_sheet.png"],frames:{height:1,width:1,count:34,regX:0,regY:0},animations:{start:[0,0],loop:[0,33],end:[33,33]},targetFPS:{start:10,loop:10,end:10},baseImage:"./animations1366/thinkingBackC9_pants_base.png"},a.airCon={images:["./animations1366/superb/airCon.png"],frames:{height:37,width:55,count:21,regX:-210,regY:-218},animations:{loop:[0,20]},targetFPS:{loop:10},baseImage:"./animations1366/superb/airCon_base.png"},a.waterCooler={images:["./animations1366/superb/waterCooler.png"],
frames:{height:20,width:8,count:16,regX:-20,regY:-32},animations:{loop:[0,15]},targetFPS:{loop:10},baseImage:"./animations1366/superb/waterCooler_base.png"},a.printer={images:["./animations1366/superb/printer.png"],frames:{height:24,width:29,count:41,regX:-32,regY:-48},animations:{loop:[0,40]},targetFPS:{loop:10},baseImage:"./animations1366/superb/printer_base.png"},a.rndPrinterLeftScreen={images:["./animations1366/superb/rndPrinterLeftScreen.png"],frames:{height:72,width:101,count:30,regX:-10,regY:-36},
animations:{loop:[0,29]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndPrinterLeftScreen_base.png"},a.rndPrinterRightScreen={images:["./animations1366/superb/rndPrinterRightScreen.png"],frames:{height:97,width:100,count:30,regX:-22,regY:-9},animations:{loop:[0,29]},targetFPS:{loop:10},baseImage:"./animations1366/superb/rndPrinterRightScreen_base.png"}):(a.typingScreenL1={images:["./animations/typingScreenL1.png"],frames:{regY:0,height:60,regX:0,width:44,count:46},animations:{loop:[0,45]},
targetFPS:{loop:7}},a.typingScreenL2={images:["./animations/superb/typingScreenL2.png"],frames:{regY:-6,height:74,regX:-18,width:51,count:54},animations:{loop:[0,53]},targetFPS:{loop:30},baseImage:"./animations/superb/typingScreenL2_base.png"},a.typingScreenL3={images:["./animations/superb/typingScreenL3.png"],frames:{regY:-24,height:55,regX:-39,width:44,count:56},animations:{loop:[0,55]},targetFPS:{loop:15},baseImage:"./animations/superb/typingScreenL3_base.png"},a.typingScreenL4={images:["./animations/superb/typingScreenL4.png"],
frames:{height:92,width:74,count:250,regX:-0,regY:-0},animations:{loop:[0,249]},targetFPS:{loop:15},baseImage:"./animations/superb/typingScreenL4_base.png"},a.hwLabScreenWall={images:"./animations/superb/hwLabScreenWall_0.png ./animations/superb/hwLabScreenWall_1.png ./animations/superb/hwLabScreenWall_2.png ./animations/superb/hwLabScreenWall_3.png ./animations/superb/hwLabScreenWall_4.png ./animations/superb/hwLabScreenWall_5.png".split(" "),frames:{height:407,width:546,count:90,regX:-22,regY:-123},
animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/hwLabScreenWall_base.png"},a.hwTV={images:"./animations/superb/hwTV_0.png ./animations/superb/hwTV_1.png ./animations/superb/hwTV_2.png ./animations/superb/hwTV_3.png ./animations/superb/hwTV_4.png ./animations/superb/hwTV_5.png".split(" "),frames:{height:343,width:289,count:182,regX:-20,regY:-35},animations:{loop:[0,181]},targetFPS:{loop:30},baseImage:"./animations/superb/hwTV_base.png"},a.hwFrontFemale1={images:["./animations/superb/hwFrontFemale1.png"],
frames:{height:232,width:75,count:90,regX:-45,regY:-13},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontFemale1_base.png"},a.hwFrontFemale2={images:["./animations/superb/hwFrontFemale2.png"],frames:{height:226,width:75,count:90,regX:-45,regY:-19},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontFemale2_base.png"},a.hwFrontFemale4={images:["./animations/superb/hwFrontFemale4.png"],frames:{height:226,width:85,count:31,regX:-34,regY:-19},
animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontFemale4_base.png"},a.hwBackFemale1={images:["./animations/superb/hwBackFemale1.png"],frames:{height:225,width:68,count:31,regX:-40,regY:-19},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackFemale1_base.png"},a.hwBackFemale2={images:["./animations/superb/hwBackFemale2.png"],frames:{height:224,width:68,count:31,regX:-40,regY:-20},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackFemale2_base.png"},
a.hwBackFemale3={images:["./animations/superb/hwBackFemale3.png"],frames:{height:110,width:90,count:31,regX:-41,regY:-18},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackFemale3_base.png"},a.hwBackFemale4={images:["./animations/superb/hwBackFemale4.png"],frames:{height:108,width:92,count:31,regX:-40,regY:-20},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackFemale4_base.png"},a.hwFrontMale2={images:["./animations/superb/hwFrontMale2.png"],
frames:{height:227,width:81,count:90,regX:-46,regY:-19},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontMale2_base.png"},a.hwFrontMale3={images:["./animations/superb/hwFrontMale3.png"],frames:{height:220,width:93,count:31,regX:-28,regY:-26},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontMale3_base.png"},a.hwFrontMale4={images:["./animations/superb/hwFrontMale4.png"],frames:{height:227,width:93,count:31,regX:-28,regY:-19},animations:{loop:[0,
30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwFrontMale4_base.png"},a.hwBackMale1={images:["./animations/superb/hwBackMale1.png"],frames:{height:226,width:79,count:31,regX:-37,regY:-21},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackMale1_base.png"},a.hwBackMale2={images:["./animations/superb/hwBackMale2.png"],frames:{height:113,width:101,count:31,regX:-37,regY:-21},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/hwBackMale2_base.png"},
a.rndActor1={images:["./animations/superb/rndActor1.png"],frames:{height:227,width:133,count:31,regX:-9,regY:-23},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/rndActor1_base.png"},a.rndFemaleBoardBack1={images:["./animations/superb/rndFemaleBoardBack1.png"],frames:{height:227,width:89,count:31,regX:-41,regY:-20},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/rndFemaleBoardBack1_base.png"},a.rndMaleBoardFront1={images:["./animations/superb/rndMaleBoardFront1.png"],
frames:{height:235,width:125,count:46,regX:-19,regY:-12},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleBoardFront1_base.png"},a.rndFemaleTypingBack1={images:["./animations/superb/rndFemaleTypingBack1.png"],frames:{height:224,width:96,count:51,regX:-31,regY:-26},animations:{loop:[0,50]},targetFPS:{loop:30},baseImage:"./animations/superb/rndFemaleTypingBack1_base.png"},a.rndMaleTypingBack1={images:["./animations/superb/rndMaleTypingBack1.png"],frames:{height:233,
width:99,count:51,regX:-23,regY:-17},animations:{loop:[0,50]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleTypingBack1_base.png"},a.rndOperator1={images:["./animations/superb/rndOperator1.png"],frames:{height:218,width:100,count:31,regX:-24,regY:-27},animations:{loop:[0,30]},targetFPS:{loop:30},baseImage:"./animations/superb/rndOperator1_base.png"},a.rndFemaleTableBack1={images:["./animations/superb/rndFemaleTableBack1.png"],frames:{height:121,width:101,count:46,regX:-70,regY:-6},animations:{loop:[0,
45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndFemaleTableBack1_base.png"},a.rndFemaleTableFront1_body={images:["./animations/superb/rndFemaleTableFront1_body.png"],frames:{height:143,width:98,count:46,regX:-49,regY:-32},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndFemaleTableFront1_body_base.png"},a.rndFemaleTableFront1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:46,regX:0,regY:0},animations:{loop:[0,45]},targetFPS:{loop:30},
baseImage:"./animations/superb/rndFemaleTableFront1_pants_base.png"},a.rndMaleFrontTable1_body={images:["./animations/superb/rndMaleFrontTable1_body.png"],frames:{height:148,width:90,count:46,regX:-51,regY:-21},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleFrontTable1_body_base.png"},a.rndMaleFrontTable1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:46,regX:0,regY:0},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleFrontTable1_pants_base.png"},
a.rndMaleFrontTable2_body={images:["./animations/superb/rndMaleFrontTable2_body.png"],frames:{height:117,width:105,count:92,regX:-51,regY:-25},animations:{loop:[0,91]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleFrontTable2_body_base.png"},a.rndMaleFrontTable2_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:92,regX:0,regY:0},animations:{loop:[0,91]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleFrontTable2_pants_base.png"},a.rndMaleTableBack1=
{images:["./animations/superb/rndMaleTableBack1.png"],frames:{height:125,width:96,count:92,regX:-69,regY:-9},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleTableBack1_base.png"},a.rndMaleTableBack2={images:["./animations/superb/rndMaleTableBack2.png"],frames:{height:136,width:101,count:46,regX:-68,regY:0},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/rndMaleTableBack2_base.png"},a.notepadBackC1_body={images:["./animations/notepadBackC1_body.png"],
frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC1_body_base.png"},a.notepadBackC2_body={images:["./animations/notepadBackC2_body.png"],frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC2_body_base.png"},a.notepadBackC3_body={images:["./animations/notepadBackC3_body.png"],
frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC3_body_base.png"},a.notepadBackC4_body={images:["./animations/notepadBackC4_body.png"],frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC4_body_base.png"},a.notepadBackC5_body={images:["./animations/notepadBackC5_body.png"],
frames:{height:71,width:105,count:113,regX:-42,regY:-55},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC5_body_base.png"},a.notepadBackC6_body={images:["./animations/notepadBackC6_body.png"],frames:{height:71,width:105,count:113,regX:-42,regY:-55},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC6_body_base.png"},a.notepadBackC7_body={images:["./animations/notepadBackC7_body.png"],
frames:{height:70,width:106,count:113,regX:-41,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC7_body_base.png"},a.notepadBackC8_body={images:["./animations/notepadBackC8_body.png"],frames:{height:70,width:105,count:113,regX:-42,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC8_body_base.png"},a.notepadBackC9_body={images:["./animations/notepadBackC9_body.png"],
frames:{height:67,width:61,count:113,regX:-81,regY:-61},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC9_body_base.png"},a.notepadBackC10_body={images:["./animations/notepadBackC10_body.png"],frames:{height:67,width:61,count:113,regX:-81,regY:-61},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC10_body_base.png"},a.notepadBackC11_body={images:["./animations/notepadBackC11_body.png"],
frames:{height:67,width:60,count:113,regX:-81,regY:-61},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC11_body_base.png"},a.notepadBackC12_body={images:["./animations/notepadBackC12_body.png"],frames:{height:72,width:105,count:113,regX:-37,regY:-56},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC12_body_base.png"},a.notepadBackC1_chair={images:["./animations/empty_sheet.png"],
frames:{height:1,width:1,count:113,regX:0,regY:0},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC1_chair_base.png"},a.notepadBackC1_hand={images:["./animations/notepadBackC1_hands.png"],frames:{height:77,width:100,count:113,regX:-14,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadBackC4_hand={images:["./animations/notepadBackC4_hands.png"],frames:{height:77,width:100,
count:113,regX:-14,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadBackC5_hand={images:["./animations/notepadBackC5_hands.png"],frames:{height:77,width:100,count:113,regX:-14,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadBackC9_hand={images:["./animations/notepadBackC9_hands.png"],frames:{height:84,width:114,count:113,regX:-11,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,
112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC9_hands_base.png"},a.notepadBackC10_hand={images:["./animations/notepadBackC10_hands.png"],frames:{height:84,width:115,count:113,regX:-10,regY:-44},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC10_hands_base.png"},a.notepadBackC12_hand={images:["./animations/notepadBackC12_hands.png"],frames:{height:84,width:114,count:113,regX:-11,regY:-44},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC12_hands_base.png"},a.notepadBackC1_head={images:["./animations/notepadBackC1_head.png"],frames:{height:76,width:80,count:113,regX:-63,regY:-11},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC1_head_base.png"},a.notepadBackC2_head={images:["./animations/notepadBackC2_head.png"],frames:{height:81,width:78,count:113,regX:-64,
regY:-2},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC2_head_base.png"},a.notepadBackC3_head={images:["./animations/notepadBackC3_head.png"],frames:{height:78,width:81,count:113,regX:-62,regY:-7},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC3_head_base.png"},a.notepadBackC4_head={images:["./animations/notepadBackC4_head.png"],frames:{height:78,
width:83,count:113,regX:-62,regY:-3},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC4_head_base.png"},a.notepadBackC5_head={images:["./animations/notepadBackC5_head.png"],frames:{height:76,width:78,count:113,regX:-64,regY:-12},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC5_head_base.png"},a.notepadBackC6_head={images:["./animations/notepadBackC6_head.png"],
frames:{height:75,width:82,count:113,regX:-63,regY:-8},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC6_head_base.png"},a.notepadBackC7_head={images:["./animations/notepadBackC7_head.png"],frames:{height:78,width:84,count:113,regX:-62,regY:-3},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC7_head_base.png"},a.notepadBackC8_head={images:["./animations/notepadBackC8_head.png"],
frames:{height:75,width:81,count:113,regX:-62,regY:-12},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC8_head_base.png"},a.notepadBackC9_head={images:["./animations/notepadBackC9_head.png"],frames:{height:92,width:91,count:113,regX:-65,regY:-12},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC9_head_base.png"},a.notepadBackC10_head={images:["./animations/notepadBackC10_head.png"],
frames:{height:91,width:91,count:113,regX:-65,regY:-13},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC10_head_base.png"},a.notepadBackC11_head={images:["./animations/notepadBackC11_head.png"],frames:{height:91,width:84,count:113,regX:-64,regY:-13},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC11_head_base.png"},a.notepadBackC12_head={images:["./animations/notepadBackC12_head.png"],
frames:{height:91,width:87,count:113,regX:-61,regY:-12},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC12_head_base.png"},a.notepadBackC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:113,regX:0,regY:0},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC1_pants_base.png"},a.notepadBackC9_pants={images:["./animations/empty_sheet.png"],
frames:{height:1,width:1,count:113,regX:0,regY:0},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/notepadBackC9_pants_base.png"},a.notepadImage={images:["./animations/notepadImage.png"],frames:{regY:0,height:200,regX:0,width:200,count:1},animations:{all:[0,0]},targetFPS:{all:7}},a.notepadFrontC1_body={images:["./animations/superb/notepadFrontC1_body.png"],frames:{height:84,width:109,count:113,regX:-57,regY:-74},animations:{start:[0,0],
loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC1_body_base.png"},a.notepadFrontC2_body={images:["./animations/superb/notepadFrontC2_body.png"],frames:{height:85,width:110,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC2_body_base.png"},a.notepadFrontC3_body={images:["./animations/superb/notepadFrontC3_body.png"],frames:{height:84,
width:110,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC3_body_base.png"},a.notepadFrontC4_body={images:["./animations/superb/notepadFrontC4_body.png"],frames:{height:85,width:110,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC4_body_base.png"},a.notepadFrontC5_body={images:["./animations/superb/notepadFrontC5_body.png"],
frames:{height:84,width:110,count:113,regX:-57,regY:-75},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC5_body_base.png"},a.notepadFrontC6_body={images:["./animations/superb/notepadFrontC6_body.png"],frames:{height:84,width:110,count:113,regX:-57,regY:-75},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC6_body_base.png"},a.notepadFrontC7_body=
{images:["./animations/superb/notepadFrontC7_body.png"],frames:{height:84,width:110,count:113,regX:-57,regY:-75},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC7_body_base.png"},a.notepadFrontC8_body={images:["./animations/superb/notepadFrontC8_body.png"],frames:{height:85,width:110,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC8_body_base.png"},
a.notepadFrontC9_body={images:["./animations/superb/notepadFrontC9_body.png"],frames:{height:84,width:107,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC9_body_base.png"},a.notepadFrontC10_body={images:["./animations/superb/notepadFrontC10_body.png"],frames:{height:84,width:107,count:113,regX:-57,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,
end:30},baseImage:"./animations/superb/notepadFrontC10_body_base.png"},a.notepadFrontC11_body={images:["./animations/superb/notepadFrontC11_body.png"],frames:{height:77,width:79,count:113,regX:-55,regY:-74},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC11_body_base.png"},a.notepadFrontC12_body={images:["./animations/superb/notepadFrontC12_body.png"],frames:{height:76,width:77,count:113,regX:-58,regY:-74},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC12_body_base.png"},a.notepadFrontC1_chair={images:["./animations/superb/notepadFrontC1_chair.png"],frames:{height:96,width:121,count:113,regX:-21,regY:-91},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC1_chair_base.png"},a.notepadFrontC1_hand={images:["./animations/superb/notepadFrontC1_hands.png"],frames:{height:100,
width:118,count:113,regX:-81,regY:-72},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadFrontC4_hand={images:["./animations/superb/notepadFrontC4_hands.png"],frames:{height:100,width:118,count:113,regX:-81,regY:-72},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadFrontC5_hand={images:["./animations/superb/notepadFrontC5_hands.png"],frames:{height:100,width:118,count:113,regX:-81,regY:-72},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30}},a.notepadFrontC9_hand={images:["./animations/superb/notepadFrontC9_hands.png"],frames:{height:97,width:139,count:113,regX:-60,regY:-72},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC9_hands_base.png"},a.notepadFrontC10_hand={images:["./animations/superb/notepadFrontC10_hands.png"],frames:{height:97,width:139,count:113,regX:-60,regY:-72},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC10_hands_base.png"},a.notepadFrontC12_hand={images:["./animations/superb/notepadFrontC12_hands.png"],frames:{height:97,width:139,count:113,regX:-60,regY:-72},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC12_hands_base.png"},a.notepadFrontC1_head={images:["./animations/superb/notepadFrontC1_head.png"],frames:{height:71,
width:79,count:113,regX:-56,regY:-18},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC1_head_base.png"},a.notepadFrontC2_head={images:["./animations/superb/notepadFrontC2_head.png"],frames:{height:73,width:83,count:113,regX:-55,regY:-16},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC2_head_base.png"},a.notepadFrontC3_head={images:["./animations/superb/notepadFrontC3_head.png"],
frames:{height:68,width:74,count:113,regX:-58,regY:-21},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC3_head_base.png"},a.notepadFrontC4_head={images:["./animations/superb/notepadFrontC4_head.png"],frames:{height:70,width:77,count:113,regX:-61,regY:-20},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC4_head_base.png"},a.notepadFrontC5_head=
{images:["./animations/superb/notepadFrontC5_head.png"],frames:{height:72,width:75,count:113,regX:-58,regY:-18},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC5_head_base.png"},a.notepadFrontC6_head={images:["./animations/superb/notepadFrontC6_head.png"],frames:{height:78,width:76,count:113,regX:-60,regY:-11},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC6_head_base.png"},
a.notepadFrontC7_head={images:["./animations/superb/notepadFrontC7_head.png"],frames:{height:73,width:81,count:113,regX:-59,regY:-16},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC7_head_base.png"},a.notepadFrontC8_head={images:["./animations/superb/notepadFrontC8_head.png"],frames:{height:72,width:77,count:113,regX:-58,regY:-18},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},
baseImage:"./animations/superb/notepadFrontC8_head_base.png"},a.notepadFrontC9_head={images:["./animations/superb/notepadFrontC9_head.png"],frames:{height:78,width:83,count:113,regX:-49,regY:-17},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC9_head_base.png"},a.notepadFrontC10_head={images:["./animations/superb/notepadFrontC10_head.png"],frames:{height:77,width:74,count:113,regX:-61,regY:-18},animations:{start:[0,
0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC10_head_base.png"},a.notepadFrontC11_head={images:["./animations/superb/notepadFrontC11_head.png"],frames:{height:74,width:72,count:113,regX:-60,regY:-21},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC11_head_base.png"},a.notepadFrontC12_head={images:["./animations/superb/notepadFrontC12_head.png"],frames:{height:74,
width:74,count:113,regX:-58,regY:-21},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC12_head_base.png"},a.notepadFrontC1_pants={images:["./animations/superb/notepadFrontC1_pants.png"],frames:{height:51,width:79,count:113,regX:-62,regY:-136},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC1_pants_base.png"},a.notepadFrontC9_pants={images:["./animations/superb/notepadFrontC9_pants.png"],
frames:{height:44,width:66,count:113,regX:-62,regY:-142},animations:{start:[0,0],loop:[0,112],end:[112,112]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/notepadFrontC9_pants_base.png"},a.teaCupImage={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:1,regX:0,regY:0},animations:{all:[0,0]},targetFPS:{all:7},baseImage:"./animations/superb/teacup.png"},a.teaCupImageLevel2={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:1,regX:0,regY:0},
animations:{all:[0,0]},targetFPS:{all:7},baseImage:"./animations/superb/teacupLevel2.png"},a.pong={images:["./animations/pong.png"],frames:{height:146,regX:-29,count:120,regY:-26,width:147},animations:{all:[0,119]},targetFPS:{all:20},baseImage:"./animations/pong_base.png"},a.idleBackC1_body={images:["./animations/idleBackC1_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_body_base.png"},
a.idleBackC2_body={images:["./animations/idleBackC2_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC2_body_base.png"},a.idleBackC3_body={images:["./animations/idleBackC3_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC3_body_base.png"},
a.idleBackC4_body={images:["./animations/idleBackC4_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC4_body_base.png"},a.idleBackC5_body={images:["./animations/idleBackC5_body.png"],frames:{height:61,width:93,count:30,regX:-64,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC5_body_base.png"},
a.idleBackC6_body={images:["./animations/idleBackC6_body.png"],frames:{height:61,width:93,count:30,regX:-64,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC6_body_base.png"},a.idleBackC7_body={images:["./animations/idleBackC7_body.png"],frames:{height:61,width:94,count:30,regX:-63,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC7_body_base.png"},
a.idleBackC8_body={images:["./animations/idleBackC8_body.png"],frames:{height:61,width:93,count:30,regX:-64,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC8_body_base.png"},a.idleBackC9_body={images:["./animations/idleBackC9_body.png"],frames:{height:65,width:61,count:30,regX:-91,regY:-62},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC9_body_base.png"},
a.idleBackC10_body={images:["./animations/idleBackC10_body.png"],frames:{height:65,width:61,count:30,regX:-90,regY:-62},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC10_body_base.png"},a.idleBackC11_body={images:["./animations/idleBackC11_body.png"],frames:{height:65,width:61,count:30,regX:-91,regY:-62},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC11_body_base.png"},
a.idleBackC12_body={images:["./animations/idleBackC12_body.png"],frames:{height:65,width:87,count:30,regX:-64,regY:-62},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC12_body_base.png"},a.idleBackC1_chair={images:["./animations/idleBackC1_chair.png"],frames:{height:74,width:104,count:30,regX:-68,regY:-86},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_chair_base.png"},
a.idleBackC1_hand={images:["./animations/idleBackC1_hands.png"],frames:{height:39,width:61,count:30,regX:-52,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_hands_base.png"},a.idleBackC4_hand={images:["./animations/idleBackC4_hands.png"],frames:{height:39,width:60,count:30,regX:-52,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC4_hands_base.png"},
a.idleBackC5_hand={images:["./animations/idleBackC5_hands.png"],frames:{height:39,width:60,count:30,regX:-52,regY:-65},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC5_hands_base.png"},a.idleBackC9_hand={images:["./animations/idleBackC9_hands.png"],frames:{height:55,width:75,count:30,regX:-54,regY:-64},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC9_hands_base.png"},
a.idleBackC10_hand={images:["./animations/idleBackC10_hands.png"],frames:{height:55,width:75,count:30,regX:-54,regY:-64},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC10_hands_base.png"},a.idleBackC12_hand={images:["./animations/idleBackC12_hands.png"],frames:{height:55,width:75,count:30,regX:-54,regY:-64},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC12_hands_base.png"},
a.idleBackC1_head={images:["./animations/idleBackC1_head.png"],frames:{height:72,width:77,count:30,regX:-85,regY:-12},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_head_base.png"},a.idleBackC2_head={images:["./animations/idleBackC2_head.png"],frames:{height:84,width:77,count:30,regX:-85,regY:-1},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC2_head_base.png"},
a.idleBackC3_head={images:["./animations/idleBackC3_head.png"],frames:{height:78,width:81,count:30,regX:-85,regY:-7},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC3_head_base.png"},a.idleBackC4_head={images:["./animations/idleBackC4_head.png"],frames:{height:76,width:83,count:30,regX:-85,regY:-3},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC4_head_base.png"},
a.idleBackC5_head={images:["./animations/idleBackC5_head.png"],frames:{height:76,width:77,count:30,regX:-85,regY:-11},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC5_head_base.png"},a.idleBackC6_head={images:["./animations/idleBackC6_head.png"],frames:{height:74,width:81,count:30,regX:-85,regY:-8},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC6_head_base.png"},
a.idleBackC7_head={images:["./animations/idleBackC7_head.png"],frames:{height:77,width:84,count:30,regX:-85,regY:-3},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC7_head_base.png"},a.idleBackC8_head={images:["./animations/idleBackC8_head.png"],frames:{height:75,width:79,count:30,regX:-83,regY:-11},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC8_head_base.png"},
a.idleBackC9_head={images:["./animations/idleBackC9_head.png"],frames:{height:91,width:84,count:30,regX:-85,regY:-12},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC9_head_base.png"},a.idleBackC10_head={images:["./animations/idleBackC10_head.png"],frames:{height:92,width:84,count:30,regX:-85,regY:-12},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC10_head_base.png"},
a.idleBackC11_head={images:["./animations/idleBackC11_head.png"],frames:{height:92,width:80,count:30,regX:-85,regY:-12},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC11_head_base.png"},a.idleBackC12_head={images:["./animations/idleBackC12_head.png"],frames:{height:92,width:83,count:30,regX:-82,regY:-10},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC12_head_base.png"},
a.idleBackC1_pants={images:["./animations/idleBackC1_pants.png"],frames:{height:59,width:82,count:30,regX:-40,regY:-111},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC1_pants_base.png"},a.idleBackC9_pants={images:["./animations/idleBackC9_pants.png"],frames:{height:56,width:79,count:30,regX:-42,regY:-121},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/idleBackC9_pants_base.png"},
a.idleFrontC1_body={images:["./animations/superb/idleFrontC1_body.png"],frames:{height:83,width:90,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_body_base.png"},a.idleFrontC2_body={images:["./animations/superb/idleFrontC2_body.png"],frames:{height:85,width:91,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC2_body_base.png"},
a.idleFrontC3_body={images:["./animations/superb/idleFrontC3_body.png"],frames:{height:84,width:90,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC3_body_base.png"},a.idleFrontC4_body={images:["./animations/superb/idleFrontC4_body.png"],frames:{height:85,width:91,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC4_body_base.png"},
a.idleFrontC5_body={images:["./animations/superb/idleFrontC5_body.png"],frames:{height:84,width:91,count:30,regX:-50,regY:-76},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC5_body_base.png"},a.idleFrontC6_body={images:["./animations/superb/idleFrontC6_body.png"],frames:{height:84,width:90,count:30,regX:-51,regY:-76},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC6_body_base.png"},
a.idleFrontC7_body={images:["./animations/superb/idleFrontC7_body.png"],frames:{height:84,width:91,count:30,regX:-50,regY:-76},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC7_body_base.png"},a.idleFrontC8_body={images:["./animations/superb/idleFrontC8_body.png"],frames:{height:85,width:91,count:30,regX:-50,regY:-75},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC8_body_base.png"},
a.idleFrontC9_body={images:["./animations/superb/idleFrontC9_body.png"],frames:{height:80,width:85,count:30,regX:-51,regY:-78},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC9_body_base.png"},a.idleFrontC10_body={images:["./animations/superb/idleFrontC10_body.png"],frames:{height:81,width:85,count:30,regX:-51,regY:-77},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC10_body_base.png"},
a.idleFrontC11_body={images:["./animations/superb/idleFrontC11_body.png"],frames:{height:73,width:67,count:30,regX:-48,regY:-78},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC11_body_base.png"},a.idleFrontC12_body={images:["./animations/superb/idleFrontC12_body.png"],frames:{height:73,width:65,count:30,regX:-51,regY:-78},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC12_body_base.png"},
a.idleFrontC1_chair={images:["./animations/superb/idleFrontC1_chair.png"],frames:{height:71,width:67,count:30,regX:-48,regY:-92},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_chair_base.png"},a.idleFrontC1_hand={images:["./animations/superb/idleFrontC1_hands.png"],frames:{height:46,width:64,count:30,regX:-89,regY:-122},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_hands_base.png"},
a.idleFrontC4_hand={images:["./animations/superb/idleFrontC4_hands.png"],frames:{height:46,width:64,count:30,regX:-89,regY:-122},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC4_hands_base.png"},a.idleFrontC5_hand={images:["./animations/superb/idleFrontC5_hands.png"],frames:{height:46,width:64,count:30,regX:-89,regY:-122},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC5_hands_base.png"},
a.idleFrontC9_hand={images:["./animations/superb/idleFrontC9_hands.png"],frames:{height:66,width:96,count:30,regX:-54,regY:-100},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC9_hands_base.png"},a.idleFrontC10_hand={images:["./animations/superb/idleFrontC10_hands.png"],frames:{height:66,width:96,count:30,regX:-54,regY:-100},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC10_hands_base.png"},
a.idleFrontC12_hand={images:["./animations/superb/idleFrontC12_hands.png"],frames:{height:66,width:96,count:30,regX:-54,regY:-100},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC12_hands_base.png"},a.idleFrontC1_head={images:["./animations/superb/idleFrontC1_head.png"],frames:{height:69,width:73,count:30,regX:-42,regY:-19},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_head_base.png"},
a.idleFrontC2_head={images:["./animations/superb/idleFrontC2_head.png"],frames:{height:70,width:76,count:30,regX:-41,regY:-18},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC2_head_base.png"},a.idleFrontC3_head={images:["./animations/superb/idleFrontC3_head.png"],frames:{height:66,width:68,count:30,regX:-44,regY:-22},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC3_head_base.png"},
a.idleFrontC4_head={images:["./animations/superb/idleFrontC4_head.png"],frames:{height:69,width:71,count:30,regX:-47,regY:-20},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC4_head_base.png"},a.idleFrontC5_head={images:["./animations/superb/idleFrontC5_head.png"],frames:{height:69,width:69,count:30,regX:-45,regY:-20},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC5_head_base.png"},
a.idleFrontC6_head={images:["./animations/superb/idleFrontC6_head.png"],frames:{height:78,width:69,count:30,regX:-46,regY:-10},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC6_head_base.png"},a.idleFrontC7_head={images:["./animations/superb/idleFrontC7_head.png"],frames:{height:73,width:75,count:30,regX:-44,regY:-15},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC7_head_base.png"},
a.idleFrontC8_head={images:["./animations/superb/idleFrontC8_head.png"],frames:{height:70,width:72,count:30,regX:-44,regY:-19},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC8_head_base.png"},a.idleFrontC9_head={images:["./animations/superb/idleFrontC9_head.png"],frames:{height:79,width:73,count:30,regX:-40,regY:-20},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC9_head_base.png"},
a.idleFrontC10_head={images:["./animations/superb/idleFrontC10_head.png"],frames:{height:74,width:69,count:30,regX:-47,regY:-20},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC10_head_base.png"},a.idleFrontC11_head={images:["./animations/superb/idleFrontC11_head.png"],frames:{height:72,width:66,count:30,regX:-47,regY:-22},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC11_head_base.png"},
a.idleFrontC12_head={images:["./animations/superb/idleFrontC12_head.png"],frames:{height:77,width:69,count:30,regX:-46,regY:-22},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC12_head_base.png"},a.idleFrontC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:30,regX:0,regY:0},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC1_pants_base.png"},
a.idleFrontC9_pants={images:["./animations/superb/idleFrontC9_pants.png"],frames:{height:41,width:63,count:30,regX:-62,regY:-154},animations:{start:[0,28],loop:[29,29],end:[28,0]},targetFPS:{start:60,loop:15,end:60},baseImage:"./animations/superb/idleFrontC9_pants_base.png"},a.typingBackC1_body={images:["./animations/typingBackC1_body.png"],frames:{height:56,width:84,count:51,regX:-63,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_body_base.png"},
a.typingBackC2_body={images:["./animations/typingBackC2_body.png"],frames:{height:56,width:85,count:51,regX:-62,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC2_body_base.png"},a.typingBackC3_body={images:["./animations/typingBackC3_body.png"],frames:{height:56,width:85,count:51,regX:-62,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC3_body_base.png"},
a.typingBackC4_body={images:["./animations/typingBackC4_body.png"],frames:{height:56,width:85,count:51,regX:-62,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC4_body_base.png"},a.typingBackC5_body={images:["./animations/typingBackC5_body.png"],frames:{height:56,width:84,count:51,regX:-63,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC5_body_base.png"},
a.typingBackC6_body={images:["./animations/typingBackC6_body.png"],frames:{height:56,width:84,count:51,regX:-63,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC6_body_base.png"},a.typingBackC7_body={images:["./animations/typingBackC7_body.png"],frames:{height:56,width:85,count:51,regX:-62,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC7_body_base.png"},
a.typingBackC8_body={images:["./animations/typingBackC8_body.png"],frames:{height:56,width:84,count:51,regX:-63,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC8_body_base.png"},a.typingBackC9_body={images:["./animations/typingBackC9_body.png"],frames:{height:26,width:51,count:51,regX:-91,regY:-77},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC9_body_base.png"},
a.typingBackC10_body={images:["./animations/typingBackC10_body.png"],frames:{height:26,width:52,count:51,regX:-90,regY:-77},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC10_body_base.png"},a.typingBackC11_body={images:["./animations/typingBackC11_body.png"],frames:{height:27,width:52,count:51,regX:-90,regY:-77},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC11_body_base.png"},
a.typingBackC12_body={images:["./animations/typingBackC12_body.png"],frames:{height:56,width:79,count:51,regX:-63,regY:-64},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC12_body_base.png"},a.typingBackC1_chair={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:51,regX:0,regY:0},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_chair_base.png"},
a.typingBackC1_hand={images:["./animations/typingBackC1_hands.png"],frames:{height:41,width:50,count:51,regX:-49,regY:-63},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_hands_base.png"},a.typingBackC4_hand={images:["./animations/typingBackC4_hands.png"],frames:{height:41,width:50,count:51,regX:-49,regY:-63},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC4_hands_base.png"},
a.typingBackC5_hand={images:["./animations/typingBackC5_hands.png"],frames:{height:41,width:50,count:51,regX:-49,regY:-63},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC5_hands_base.png"},a.typingBackC9_hand={images:["./animations/typingBackC9_hands.png"],frames:{height:54,width:68,count:51,regX:-52,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC9_hands_base.png"},
a.typingBackC10_hand={images:["./animations/typingBackC10_hands.png"],frames:{height:54,width:68,count:51,regX:-52,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC10_hands_base.png"},a.typingBackC12_hand={images:["./animations/typingBackC12_hands.png"],frames:{height:54,width:68,count:51,regX:-52,regY:-65},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC12_hands_base.png"},
a.typingBackC1_head={images:["./animations/typingBackC1_head.png"],frames:{height:70,width:58,count:51,regX:-85,regY:-13},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_head_base.png"},a.typingBackC2_head={images:["./animations/typingBackC2_head.png"],frames:{height:80,width:58,count:51,regX:-85,regY:-2},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC2_head_base.png"},
a.typingBackC3_head={images:["./animations/typingBackC3_head.png"],frames:{height:75,width:59,count:51,regX:-85,regY:-7},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC3_head_base.png"},a.typingBackC4_head={images:["./animations/typingBackC4_head.png"],frames:{height:75,width:61,count:51,regX:-85,regY:-3},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC4_head_base.png"},
a.typingBackC5_head={images:["./animations/typingBackC5_head.png"],frames:{height:74,width:58,count:51,regX:-85,regY:-12},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC5_head_base.png"},a.typingBackC6_head={images:["./animations/typingBackC6_head.png"],frames:{height:71,width:61,count:51,regX:-85,regY:-8},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC6_head_base.png"},
a.typingBackC7_head={images:["./animations/typingBackC7_head.png"],frames:{height:75,width:61,count:51,regX:-85,regY:-3},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC7_head_base.png"},a.typingBackC8_head={images:["./animations/typingBackC8_head.png"],frames:{height:74,width:62,count:51,regX:-82,regY:-11},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC8_head_base.png"},
a.typingBackC9_head={images:["./animations/typingBackC9_head.png"],frames:{height:90,width:70,count:51,regX:-84,regY:-12},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC9_head_base.png"},a.typingBackC10_head={images:["./animations/typingBackC10_head.png"],frames:{height:90,width:70,count:51,regX:-84,regY:-12},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC10_head_base.png"},
a.typingBackC11_head={images:["./animations/typingBackC11_head.png"],frames:{height:88,width:65,count:51,regX:-84,regY:-13},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC11_head_base.png"},a.typingBackC12_head={images:["./animations/typingBackC12_head.png"],frames:{height:89,width:66,count:51,regX:-82,regY:-11},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC12_head_base.png"},
a.typingBackC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:51,regX:0,regY:0},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC1_pants_base.png"},a.typingBackC9_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:51,regX:0,regY:0},animations:{start:[0,0],loop:[0,50],end:[50,50]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/typingBackC9_pants_base.png"},a.typingFrontC1_body=
{images:["./animations/superb/typingFrontC1_body.png"],frames:{height:75,width:84,count:30,regX:-57,regY:-80},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_body_base.png"},a.typingFrontC2_body={images:["./animations/superb/typingFrontC2_body.png"],frames:{height:75,width:85,count:30,regX:-56,regY:-82},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC2_body_base.png"},
a.typingFrontC3_body={images:["./animations/superb/typingFrontC3_body.png"],frames:{height:75,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC3_body_base.png"},a.typingFrontC4_body={images:["./animations/superb/typingFrontC4_body.png"],frames:{height:76,width:86,count:30,regX:-56,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC4_body_base.png"},
a.typingFrontC5_body={images:["./animations/superb/typingFrontC5_body.png"],frames:{height:76,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC5_body_base.png"},a.typingFrontC6_body={images:["./animations/superb/typingFrontC6_body.png"],frames:{height:76,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC6_body_base.png"},
a.typingFrontC7_body={images:["./animations/superb/typingFrontC7_body.png"],frames:{height:76,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC7_body_base.png"},a.typingFrontC8_body={images:["./animations/superb/typingFrontC8_body.png"],frames:{height:76,width:85,count:30,regX:-57,regY:-81},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC8_body_base.png"},
a.typingFrontC9_body={images:["./animations/superb/typingFrontC9_body.png"],frames:{height:70,width:80,count:30,regX:-57,regY:-85},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC9_body_base.png"},a.typingFrontC10_body={images:["./animations/superb/typingFrontC10_body.png"],frames:{height:69,width:80,count:30,regX:-57,regY:-86},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC10_body_base.png"},
a.typingFrontC11_body={images:["./animations/superb/typingFrontC11_body.png"],frames:{height:62,width:62,count:30,regX:-54,regY:-87},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC11_body_base.png"},a.typingFrontC12_body={images:["./animations/superb/typingFrontC12_body.png"],frames:{height:65,width:58,count:30,regX:-58,regY:-84},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC12_body_base.png"},
a.typingFrontC1_chair={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:30,regX:0,regY:0},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_chair_base.png"},a.typingFrontC1_hand={images:["./animations/superb/typingFrontC1_hands.png"],frames:{height:46,width:62,count:30,regX:-94,regY:-122},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_hands_base.png"},
a.typingFrontC4_hand={images:["./animations/superb/typingFrontC4_hands.png"],frames:{height:46,width:62,count:30,regX:-94,regY:-122},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC4_hands_base.png"},a.typingFrontC5_hand={images:["./animations/superb/typingFrontC5_hands.png"],frames:{height:46,width:62,count:30,regX:-94,regY:-122},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC5_hands_base.png"},
a.typingFrontC9_hand={images:["./animations/superb/typingFrontC9_hands.png"],frames:{height:62,width:92,count:30,regX:-60,regY:-103},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC9_hands_base.png"},a.typingFrontC10_hand={images:["./animations/superb/typingFrontC10_hands.png"],frames:{height:62,width:92,count:30,regX:-60,regY:-103},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC10_hands_base.png"},
a.typingFrontC12_hand={images:["./animations/superb/typingFrontC12_hands.png"],frames:{height:62,width:92,count:30,regX:-60,regY:-103},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC12_hands_base.png"},a.typingFrontC1_head={images:["./animations/superb/typingFrontC1_head.png"],frames:{height:69,width:58,count:30,regX:-57,regY:-19},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_head_base.png"},
a.typingFrontC2_head={images:["./animations/superb/typingFrontC2_head.png"],frames:{height:70,width:61,count:30,regX:-57,regY:-18},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC2_head_base.png"},a.typingFrontC3_head={images:["./animations/superb/typingFrontC3_head.png"],frames:{height:66,width:53,count:30,regX:-59,regY:-22},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC3_head_base.png"},
a.typingFrontC4_head={images:["./animations/superb/typingFrontC4_head.png"],frames:{height:68,width:57,count:30,regX:-62,regY:-21},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC4_head_base.png"},a.typingFrontC5_head={images:["./animations/superb/typingFrontC5_head.png"],frames:{height:69,width:56,count:30,regX:-59,regY:-20},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC5_head_base.png"},
a.typingFrontC6_head={images:["./animations/superb/typingFrontC6_head.png"],frames:{height:77,width:55,count:30,regX:-61,regY:-11},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC6_head_base.png"},a.typingFrontC7_head={images:["./animations/superb/typingFrontC7_head.png"],frames:{height:72,width:60,count:30,regX:-60,regY:-16},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC7_head_base.png"},
a.typingFrontC8_head={images:["./animations/superb/typingFrontC8_head.png"],frames:{height:69,width:58,count:30,regX:-59,regY:-20},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC8_head_base.png"},a.typingFrontC9_head={images:["./animations/superb/typingFrontC9_head.png"],frames:{height:76,width:65,count:30,regX:-49,regY:-19},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC9_head_base.png"},
a.typingFrontC10_head={images:["./animations/superb/typingFrontC10_head.png"],frames:{height:74,width:54,count:30,regX:-62,regY:-20},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC10_head_base.png"},a.typingFrontC11_head={images:["./animations/superb/typingFrontC11_head.png"],frames:{height:71,width:53,count:30,regX:-61,regY:-23},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC11_head_base.png"},
a.typingFrontC12_head={images:["./animations/superb/typingFrontC12_head.png"],frames:{height:73,width:58,count:30,regX:-58,regY:-22},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC12_head_base.png"},a.typingFrontC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:30,regX:0,regY:0},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC1_pants_base.png"},
a.typingFrontC9_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:30,regX:0,regY:0},animations:{start:[0,0],loop:[0,29],end:[29,29]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/typingFrontC9_pants_base.png"},a.thinkingFrontC1_body={images:["./animations/superb/thinkingFrontC1_body.png"],frames:{height:103,width:97,count:100,regX:-57,regY:-54},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_body_base.png"},
a.thinkingFrontC2_body={images:["./animations/superb/thinkingFrontC2_body.png"],frames:{height:105,width:98,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC2_body_base.png"},a.thinkingFrontC3_body={images:["./animations/superb/thinkingFrontC3_body.png"],frames:{height:105,width:97,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},
baseImage:"./animations/superb/thinkingFrontC3_body_base.png"},a.thinkingFrontC4_body={images:["./animations/superb/thinkingFrontC4_body.png"],frames:{height:105,width:97,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC4_body_base.png"},a.thinkingFrontC5_body={images:["./animations/superb/thinkingFrontC5_body.png"],frames:{height:106,width:98,count:100,regX:-57,regY:-53},animations:{start:[0,
0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC5_body_base.png"},a.thinkingFrontC6_body={images:["./animations/superb/thinkingFrontC6_body.png"],frames:{height:106,width:98,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC6_body_base.png"},a.thinkingFrontC7_body={images:["./animations/superb/thinkingFrontC7_body.png"],frames:{height:105,
width:97,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC7_body_base.png"},a.thinkingFrontC8_body={images:["./animations/superb/thinkingFrontC8_body.png"],frames:{height:105,width:98,count:100,regX:-57,regY:-53},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC8_body_base.png"},a.thinkingFrontC9_body={images:["./animations/superb/thinkingFrontC9_body.png"],
frames:{height:101,width:94,count:100,regX:-58,regY:-56},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC9_body_base.png"},a.thinkingFrontC10_body={images:["./animations/superb/thinkingFrontC10_body.png"],frames:{height:101,width:94,count:100,regX:-58,regY:-56},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC10_body_base.png"},a.thinkingFrontC11_body=
{images:["./animations/superb/thinkingFrontC11_body.png"],frames:{height:73,width:70,count:100,regX:-55,regY:-76},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC11_body_base.png"},a.thinkingFrontC12_body={images:["./animations/superb/thinkingFrontC12_body.png"],frames:{height:73,width:70,count:100,regX:-58,regY:-75},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC12_body_base.png"},
a.thinkingFrontC1_chair={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_chair_base.png"},a.thinkingFrontC1_hand={images:["./animations/superb/thinkingFrontC1_hands.png"],frames:{height:136,width:90,count:100,regX:-80,regY:-34},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_hands_base.png"},
a.thinkingFrontC4_hand={images:["./animations/superb/thinkingFrontC4_hands.png"],frames:{height:136,width:90,count:100,regX:-80,regY:-34},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC4_hands_base.png"},a.thinkingFrontC5_hand={images:["./animations/superb/thinkingFrontC5_hands.png"],frames:{height:136,width:90,count:100,regX:-80,regY:-34},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,
end:30},baseImage:"./animations/superb/thinkingFrontC5_hands_base.png"},a.thinkingFrontC9_hand={images:["./animations/superb/thinkingFrontC9_hands.png"],frames:{height:129,width:107,count:100,regX:-60,regY:-38},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC9_hands_base.png"},a.thinkingFrontC10_hand={images:["./animations/superb/thinkingFrontC10_hands.png"],frames:{height:129,width:107,count:100,regX:-60,regY:-38},
animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC10_hands_base.png"},a.thinkingFrontC12_hand={images:["./animations/superb/thinkingFrontC12_hands.png"],frames:{height:129,width:106,count:100,regX:-61,regY:-38},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC12_hands_base.png"},a.thinkingFrontC1_head={images:["./animations/superb/thinkingFrontC1_head.png"],
frames:{height:68,width:63,count:100,regX:-52,regY:-20},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_head_base.png"},a.thinkingFrontC2_head={images:["./animations/superb/thinkingFrontC2_head.png"],frames:{height:70,width:67,count:100,regX:-50,regY:-18},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC2_head_base.png"},a.thinkingFrontC3_head=
{images:["./animations/superb/thinkingFrontC3_head.png"],frames:{height:66,width:59,count:100,regX:-53,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC3_head_base.png"},a.thinkingFrontC4_head={images:["./animations/superb/thinkingFrontC4_head.png"],frames:{height:69,width:61,count:100,regX:-57,regY:-20},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC4_head_base.png"},
a.thinkingFrontC5_head={images:["./animations/superb/thinkingFrontC5_head.png"],frames:{height:69,width:60,count:100,regX:-54,regY:-20},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC5_head_base.png"},a.thinkingFrontC6_head={images:["./animations/superb/thinkingFrontC6_head.png"],frames:{height:78,width:60,count:100,regX:-55,regY:-10},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},
baseImage:"./animations/superb/thinkingFrontC6_head_base.png"},a.thinkingFrontC7_head={images:["./animations/superb/thinkingFrontC7_head.png"],frames:{height:73,width:66,count:100,regX:-53,regY:-15},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC7_head_base.png"},a.thinkingFrontC8_head={images:["./animations/superb/thinkingFrontC8_head.png"],frames:{height:69,width:63,count:100,regX:-53,regY:-20},animations:{start:[0,
0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC8_head_base.png"},a.thinkingFrontC9_head={images:["./animations/superb/thinkingFrontC9_head.png"],frames:{height:76,width:66,count:100,regX:-49,regY:-19},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC9_head_base.png"},a.thinkingFrontC10_head={images:["./animations/superb/thinkingFrontC10_head.png"],frames:{height:74,
width:56,count:100,regX:-61,regY:-20},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC10_head_base.png"},a.thinkingFrontC11_head={images:["./animations/superb/thinkingFrontC11_head.png"],frames:{height:72,width:55,count:100,regX:-60,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC11_head_base.png"},a.thinkingFrontC12_head={images:["./animations/superb/thinkingFrontC12_head.png"],
frames:{height:73,width:58,count:100,regX:-58,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC12_head_base.png"},a.thinkingFrontC1_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC1_pants_base.png"},a.thinkingFrontC9_pants={images:["./animations/empty_sheet.png"],
frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/superb/thinkingFrontC9_pants_base.png"},a.thinkingBackC1_body={images:["./animations/thinkingBackC1_body.png"],frames:{height:86,width:87,count:100,regX:-60,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_body_base.png"},a.thinkingBackC2_body={images:["./animations/thinkingBackC2_body.png"],
frames:{height:86,width:89,count:100,regX:-58,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC2_body_base.png"},a.thinkingBackC3_body={images:["./animations/thinkingBackC3_body.png"],frames:{height:86,width:88,count:100,regX:-59,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC3_body_base.png"},a.thinkingBackC4_body={images:["./animations/thinkingBackC4_body.png"],
frames:{height:86,width:88,count:100,regX:-59,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC4_body_base.png"},a.thinkingBackC5_body={images:["./animations/thinkingBackC5_body.png"],frames:{height:86,width:87,count:100,regX:-60,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC5_body_base.png"},a.thinkingBackC6_body={images:["./animations/thinkingBackC6_body.png"],
frames:{height:86,width:87,count:100,regX:-60,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC6_body_base.png"},a.thinkingBackC7_body={images:["./animations/thinkingBackC7_body.png"],frames:{height:86,width:87,count:100,regX:-59,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC7_body_base.png"},a.thinkingBackC8_body={images:["./animations/thinkingBackC8_body.png"],
frames:{height:86,width:87,count:100,regX:-60,regY:-35},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC8_body_base.png"},a.thinkingBackC9_body={images:["./animations/thinkingBackC9_body.png"],frames:{height:74,width:90,count:100,regX:-52,regY:-69},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC9_body_base.png"},a.thinkingBackC10_body={images:["./animations/thinkingBackC10_body.png"],
frames:{height:35,width:52,count:100,regX:-90,regY:-69},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC10_body_base.png"},a.thinkingBackC11_body={images:["./animations/thinkingBackC11_body.png"],frames:{height:35,width:52,count:100,regX:-90,regY:-69},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC11_body_base.png"},a.thinkingBackC12_body={images:["./animations/thinkingBackC12_body.png"],
frames:{height:83,width:80,count:100,regX:-62,regY:-36},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC12_body_base.png"},a.thinkingBackC1_chair={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_chair_base.png"},a.thinkingBackC1_hand={images:["./animations/thinkingBackC1_hands.png"],
frames:{height:80,width:77,count:100,regX:-52,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_hands_base.png"},a.thinkingBackC4_hand={images:["./animations/thinkingBackC4_hands.png"],frames:{height:80,width:77,count:100,regX:-52,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC4_hands_base.png"},a.thinkingBackC5_hand={images:["./animations/thinkingBackC5_hands.png"],
frames:{height:80,width:77,count:100,regX:-52,regY:-22},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC5_hands_base.png"},a.thinkingBackC9_hand={images:["./animations/thinkingBackC9_hands.png"],frames:{height:95,width:72,count:100,regX:-54,regY:-24},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC9_hands_base.png"},a.thinkingBackC10_hand={images:["./animations/thinkingBackC10_hands.png"],
frames:{height:95,width:72,count:100,regX:-54,regY:-24},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC10_hands_base.png"},a.thinkingBackC12_hand={images:["./animations/thinkingBackC12_hands.png"],frames:{height:95,width:72,count:100,regX:-54,regY:-24},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC12_hands_base.png"},a.thinkingBackC1_head={images:["./animations/thinkingBackC1_head.png"],
frames:{height:71,width:60,count:100,regX:-85,regY:-13},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_head_base.png"},a.thinkingBackC2_head={images:["./animations/thinkingBackC2_head.png"],frames:{height:82,width:60,count:100,regX:-85,regY:-1},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC2_head_base.png"},a.thinkingBackC3_head={images:["./animations/thinkingBackC3_head.png"],
frames:{height:76,width:63,count:100,regX:-85,regY:-7},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC3_head_base.png"},a.thinkingBackC4_head={images:["./animations/thinkingBackC4_head.png"],frames:{height:75,width:65,count:100,regX:-85,regY:-3},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC4_head_base.png"},a.thinkingBackC5_head={images:["./animations/thinkingBackC5_head.png"],
frames:{height:75,width:60,count:100,regX:-85,regY:-11},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC5_head_base.png"},a.thinkingBackC6_head={images:["./animations/thinkingBackC6_head.png"],frames:{height:72,width:64,count:100,regX:-85,regY:-8},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC6_head_base.png"},a.thinkingBackC7_head={images:["./animations/thinkingBackC7_head.png"],
frames:{height:76,width:66,count:100,regX:-85,regY:-3},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC7_head_base.png"},a.thinkingBackC8_head={images:["./animations/thinkingBackC8_head.png"],frames:{height:74,width:62,count:100,regX:-83,regY:-11},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC8_head_base.png"},a.thinkingBackC9_head={images:["./animations/thinkingBackC9_head.png"],
frames:{height:95,width:71,count:100,regX:-85,regY:-11},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC9_head_base.png"},a.thinkingBackC10_head={images:["./animations/thinkingBackC10_head.png"],frames:{height:95,width:71,count:100,regX:-85,regY:-12},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC10_head_base.png"},a.thinkingBackC11_head={images:["./animations/thinkingBackC11_head.png"],
frames:{height:93,width:67,count:100,regX:-85,regY:-12},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC11_head_base.png"},a.thinkingBackC12_head={images:["./animations/thinkingBackC12_head.png"],frames:{height:94,width:70,count:100,regX:-82,regY:-10},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC12_head_base.png"},a.thinkingBackC1_pants={images:["./animations/empty_sheet.png"],
frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC1_pants_base.png"},a.thinkingBackC9_pants={images:["./animations/empty_sheet.png"],frames:{height:1,width:1,count:100,regX:0,regY:0},animations:{start:[0,0],loop:[0,99],end:[99,99]},targetFPS:{start:30,loop:30,end:30},baseImage:"./animations/thinkingBackC9_pants_base.png"},a.airCon={images:["./animations/superb/airCon.png"],frames:{height:68,
width:105,count:62,regX:-392,regY:-410},animations:{loop:[0,61]},targetFPS:{loop:30},baseImage:"./animations/superb/airCon_base.png"},a.waterCooler={images:["./animations/superb/waterCooler.png"],frames:{height:37,width:16,count:46,regX:-40,regY:-65},animations:{loop:[0,45]},targetFPS:{loop:30},baseImage:"./animations/superb/waterCooler_base.png"},a.printer={images:["./animations/superb/printer.png"],frames:{height:50,width:58,count:121,regX:-58,regY:-86},animations:{loop:[0,120]},targetFPS:{loop:30},
baseImage:"./animations/superb/printer_base.png"},a.rndPrinterLeftScreen={images:["./animations/superb/rndPrinterLeftScreen.png"],frames:{height:133,width:187,count:90,regX:-19,regY:-68},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/rndPrinterLeftScreen_base.png"},a.rndPrinterRightScreen={images:["./animations/superb/rndPrinterRightScreen.png"],frames:{height:181,width:186,count:90,regX:-42,regY:-16},animations:{loop:[0,89]},targetFPS:{loop:30},baseImage:"./animations/superb/rndPrinterRightScreen_base.png"})})();
"use strict";
var BitmapAnimationFactory={createAnimation:function(a,b,c,d,f){var g,k=CanvasManager.globalScale;switch(a){case "thinking":g=BitmapAnimationFactory.createThinkingAnimation(b,c,d,f);g.scaleX=k;g.scaleY=k;break;case "typing":g=BitmapAnimationFactory.createTypingAnimation(b,c,d,f);g.scaleX=k;g.scaleY=k;break;case "sitBack":g=BitmapAnimationFactory.createIdleAnimation(b,c,d,f);g.scaleX=k;g.scaleY=k;break;case "drawNotepad":g=BitmapAnimationFactory.createNotepadAnimation(b,c,d,f);g.scaleX=k;g.scaleY=
k;break;case "screen":g=BitmapAnimationFactory.createScreenAnimation(b,c)}return g},createTeaCupAnimation:function(a){return 2===GameManager.company.currentLevel?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.teaCupImageLevel2),a):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.teaCupImage),a)},createScreenAnimation:function(a,b){var c=CanvasManager.globalScale;if(b===CharacterOrientation.NW){if(1===GameManager.company.currentLevel){var d=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.typingScreenL1),
a);d.x=VisualsManager.toScreenCoordinates(12,c);d.scaleX=c;d.scaleY=c;return d}if(2===GameManager.company.currentLevel)return d=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.typingScreenL2),a),d.x=VisualsManager.toScreenCoordinates(-1,c),d.y=VisualsManager.toScreenCoordinates(-17,c),d.scaleX=c,d.scaleY=c,d;if(3===GameManager.company.currentLevel)return d=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.typingScreenL3),a),d.x=VisualsManager.toScreenCoordinates(-16,c),d.y=VisualsManager.toScreenCoordinates(-35,
c),d.scaleX=c,d.scaleY=c,d;if(4===GameManager.company.currentLevel)return d=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.typingScreenL4),a),d.x=VisualsManager.toScreenCoordinates(-4,c),d.y=VisualsManager.toScreenCoordinates(-39,c),d.scaleX=c,d.scaleY=c,d}},createThinkingAnimation:function(a,b,c,d){return this._createAnimation(a,b,c,d,"thinking")},createNotepadAnimation:function(a,b,c,d){return this._createAnimation(a,b,c,d,"notepad")},createIdleAnimation:function(a,b,c,d){return this._createAnimation(a,
b,c,d,"idle")},createTypingAnimation:function(a,b,c,d){return this._createAnimation(a,b,c,d,"typing")},_createAnimation:function(a,b,c,d,f){b===CharacterOrientation.NW?(b=new CompositeBitmapAnimation,b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC1_chair"]),a)),8<d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC9_pants"]),a)):b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC1_pants"]),a)),4===
d||7===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC4_hand"]),a)):5===d||8===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC5_hand"]),a)):9===d||11===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC9_hand"]),a)):10===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC10_hand"]),a)):12===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+
"BackC12_hand"]),a)):b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC1_hand"]),a)),void 0===c&&(c=1),b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC"+c+"_body"]),a)),void 0===d&&(d=1),b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"BackC"+d+"_head"]),a))):(b=new CompositeBitmapAnimation,b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC1_chair"]),a)),8<d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+
"FrontC9_pants"]),a)):b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC1_pants"]),a)),4===d||7===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC4_hand"]),a)):5===d||8===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC5_hand"]),a)):9===d||11===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC9_hand"]),a)):10===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+
"FrontC10_hand"]),a)):12===d?b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC12_hand"]),a)):b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC1_hand"]),a)),void 0===c&&(c=1),b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC"+c+"_body"]),a)),void 0===d&&(d=1),b.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets[f+"FrontC"+d+"_head"]),a)));return b}},BitmapAnimationX=function(a,
b){this.speedFactor=1;b&&(this.speedFactor=b);createjs.BitmapAnimation.apply(this,arguments);this.targetFPS=a.targetFPS;a.baseImage&&(!0===GameFlags.SLOWDOWN_BASEIMAGE?window.setTimeout(function(b){b.baseImage=new Image;b.baseImage.src=a.baseImage},500,this):(this.baseImage=new Image,this.baseImage.src=a.baseImage))};
(function(){BitmapAnimationX.prototype=new createjs.BitmapAnimation;var a=BitmapAnimationX.prototype;a.setAlpha=function(a){this.alpha=a};a.setPaused=function(a){this.paused=a};a.saveState=function(){var a={};a.currentFrame=this.currentAnimationFrame;a.currentAnimation=this.currentAnimation;a.storyBoard=this.currentStoryBoard;a.paused=this.paused;a.alpha=this.alpha;return a};a.loadState=function(a){a&&(this.currentStoryBoard=a.storyBoard,this.currentAnimationFrame=a.currentFrame,this._animation=this.spriteSheet.getAnimation(a.currentAnimation),
this.currentAnimation=a.currentAnimation,this._normalizeFrame(),this.paused=a.paused,this.alpha=a.alpha)};a.playStoryBoard=function(a){(this.currentStoryBoard=a)&&a.length?(a=a[0],"#stop"==a?this._stopAnimation():this.gotoAndPlay(a)):this.stop()};a._stopAnimation=function(){var a=this._animation.frames.last();this.gotoAndStop(a)};a.onAnimationEnd=function(a,c){if(this.currentStoryBoard&&0<this.currentStoryBoard.length&&(this.currentStoryBoard.splice(0,1),0<this.currentStoryBoard.length)){var d=this.currentStoryBoard[0];
"#stop"==d?this._stopAnimation():this.gotoAndPlay(d)}if(this.onAnimationEnded&&this.currentStoryBoard&&(0==this.currentStoryBoard.length||1==this.currentStoryBoard.length&&"#stop"===this.currentStoryBoard[0]))this.onAnimationEnded(a,c)};a._tick=function(){if(!this.paused&&this._lastFrameTime&&this._animation){var a=GameManager.gameTime-this._lastFrameTime;this.onFire&&(a*=2);a=Math.floor(a*this.speedFactor/(1E3/this.targetFPS[this._animation.name]));if(0<a){for(var c=0;c<a;c++)this._advanceCount++,
this.advance();this._lastFrameTime=GameManager.gameTime}}else this._lastFrameTime=GameManager.gameTime};a.draw=function(a,c,d,f){if(this.DisplayObject_draw(a,c))return!0;this._normalizeFrame();var g=this.spriteSheet.getFrame(this.currentFrame);if(null==g){if(10<f)return;this.spriteSheet._calculateFrames();return this.draw(a,c,d,f?++f:1)}c=g.rect;if(this.baseImage)return this.baseImage.complete&&g.image.complete&&(this.cachedFrame||(this.cachedFrame=document.createElement("canvas"),this.cachedFrame.width=
this.baseImage.naturalWidth,this.cachedFrame.height=this.baseImage.naturalHeight),this.cachedFrame.frameNr!==this.currentFrame&&(d=this.cachedFrame.getContext("2d"),d.clearRect(0,0,this.cachedFrame.width,this.cachedFrame.height),d.drawImage(this.baseImage,0,0),d.drawImage(g.image,c.x,c.y,c.width,c.height,-g.regX,-g.regY,c.width,c.height),this.cachedFrame.frameNr=this.currentFrame),this.cachedFrame&&0<this.cachedFrame.width&&0<this.cachedFrame.height&&a.drawImage(this.cachedFrame,0,0)),!0;g.image.complete&&
a.drawImage(g.image,c.x,c.y,c.width,c.height,-g.regX,-g.regY,c.width,c.height);return!0}})();CharacterNameVisual=function(a){createjs.Container.apply(this,arguments);this.character=a;this.init()};
(function(){CharacterNameVisual.prototype=new createjs.Container;CharacterNameVisual.prototype.init=function(){this.removeAllChildren();var a=0===this.character.id?"":this.character.name,b=VisualsManager.toScreenCoordinates(280,CanvasManager.globalScaleIgnoringLowResBackground),c=24;do var d="bold {0}pt {1}".format(c,"Segoe UI"),d=new createjs.Text(a,d,"black"),c=c-2;while(d.getMeasuredWidth()>b&&10<c);b=c/32;c=createjs.Graphics.getHSL(0,0,34);d=this.character.flags.expert?"{0}({1})".format(""!=a?
"\n":"",Missions.getMissionWithId(this.character.flags.expert).name):"";d=new createjs.Text(a+d,"bold 32pt {0}".format("Segoe UI"),c);d.textAlign="center";d.textBaseline="alphabetical";this.addChildAt(d,0);this.scaleX=b*CanvasManager.globalScale;this.scaleY=b*CanvasManager.globalScale;switch(this.character.getOrientation()){case CharacterOrientation.NW:this.skewY=-30;this.skewX=-60;this.x=VisualsManager.toScreenCoordinates(170,CanvasManager.globalScale);this.y=VisualsManager.toScreenCoordinates(230,
CanvasManager.globalScale);break;case CharacterOrientation.SE:this.skewY=-30,this.skewX=-60,this.x=VisualsManager.toScreenCoordinates(-50,CanvasManager.globalScale),this.y=VisualsManager.toScreenCoordinates(90,CanvasManager.globalScale)}}})();var CompositeBitmapAnimation=function(a){this._internalAnimations=[]};
(function(){CompositeBitmapAnimation.prototype=new createjs.DisplayObject;var a=CompositeBitmapAnimation.prototype;a.isVisible=function(){return 0<this._internalAnimations[0].alpha};a.addAnimation=function(a){if(0<this._internalAnimations.length){if(this._internalAnimations[0].speedFactor!=a.speedFactor)throw"invalid speedFactor for CompositeBitmapAnimation";}else{var c=this;a.onAnimationEnded=function(a,b){c.onAnimationEnd(a,b)}}this._internalAnimations.push(a)};a.setAlpha=function(a){for(var c=
0;c<this._internalAnimations.length;c++)this._internalAnimations[c].setAlpha(a)};a.isAllLoaded=function(){for(var a=0,c=this._internalAnimations.length;a<c;a++)if(this._internalAnimations[a].baseImage&&!this._internalAnimations[a].baseImage.complete||!this._internalAnimations[a].spriteSheet.complete)return!1;return this.overlay&&(this.overlay.deskImage&&!this.overlay.deskImage.complete||this.overlay.keyBoardImage&&!this.overlay.keyBoardImage.complete||this.overlay.pcImage&&!this.overlay.pcImage.complete)?
!1:!0};a.setPaused=function(a){this.paused=a;for(var c=0;c<this._internalAnimations.length;c++)this._internalAnimations[c].setPaused(a)};a.saveState=function(){var a={};a.currentFrame=this._internalAnimations[0].currentAnimationFrame;a.currentAnimation=this._internalAnimations[0].currentAnimation;a.storyBoard=this._internalAnimations[0].currentStoryBoard;a.paused=this._internalAnimations[0].paused;a.alpha=this._internalAnimations[0].alpha;return a};a.loadState=function(a){if(a)for(var c=0;c<this._internalAnimations.length;c++){this._internalAnimations[c].currentStoryBoard=
a.storyBoard;this._internalAnimations[c].currentAnimationFrame=a.currentFrame;var d=this._internalAnimations[c].spriteSheet.getAnimation(a.currentAnimation);this._internalAnimations[c]._animation=d;this._internalAnimations[c].currentAnimation=a.currentAnimation;if(this._internalAnimations[c].currentStoryBoard)for(var f=this._internalAnimations[c].currentStoryBoard,g=0;g<f.length;g++)(d=this._internalAnimations[c].spriteSheet._animations.first(function(a){return a===f[g]}))||(f[g]="loop");if(this._internalAnimations[c].currentAnimation){var k=
this._internalAnimations[c].currentAnimation,d=this._internalAnimations[c].spriteSheet._animations.first(function(a){return a===k});d||(this._internalAnimations[c].currentAnimation="loop",this._internalAnimations[c]._animation=this._internalAnimations[c].spriteSheet.getAnimation(this._internalAnimations[c].currentAnimation),this._internalAnimations[c].currentAnimationFrame=0)}this._internalAnimations[c]._normalizeFrame();this._internalAnimations[c].paused=a.paused;this._internalAnimations[c].alpha=
a.alpha}};a.stop=function(){for(var a=0;a<this._internalAnimations.length;a++)this._internalAnimations[a].stop()};a.gotoAndPlay=function(a){for(var c=0;c<this._internalAnimations.length;c++)this._internalAnimations[c].gotoAndPlay(a)};a.gotoAndStop=function(a){for(var c=0;c<this._internalAnimations.length;c++)this._internalAnimations[c].gotoAndStop(a)};a.playStoryBoard=function(a){for(var c=0;c<this._internalAnimations.length;c++)if((this._internalAnimations[c].currentStoryBoard=a)&&a.length){var d=
a[0];"#stop"==d?this._internalAnimations[c]._stopAnimation():this._internalAnimations[c].gotoAndPlay(d)}else this._internalAnimations[c].stop()};a._stopAnimation=function(){for(var a=0;a<this._internalAnimations.length;a++){var c=this._internalAnimations[a]._animation.frames.last();this._internalAnimations[a].gotoAndStop(c)}};a.onAnimationEnd=function(a,c){if(this.onAnimationEnded&&(0==a.currentStoryBoard.length||1==a.currentStoryBoard.length&&"#stop"===a.currentStoryBoard[0]))this.onAnimationEnded(a,
c)};a._tick=function(){for(var a=0;a<this._internalAnimations.length;a++)this._internalAnimations[a]._tick()};a.draw=function(a,c){var d=this._internalAnimations[0].currentFrame;if(!this.isAllLoaded()||void 0===this._internalAnimations[0].baseImage)return!0;this.cachedFrame||(this.cachedFrame=document.createElement("canvas"),this.cachedFrame.width=this._internalAnimations[0].baseImage.naturalWidth,this.cachedFrame.height=this._internalAnimations[0].baseImage.naturalHeight);if(this.cachedFrame.frameNr!==
d){var f=this.cachedFrame.getContext("2d");f.clearRect(0,0,this.cachedFrame.width,this.cachedFrame.height);for(var g=0,k=this._internalAnimations.length;g<k;g++)this._internalAnimations[g].currentFrame=this._internalAnimations[0].currentFrame,this._internalAnimations[g].currentAnimationFrame=this._internalAnimations[0].currentAnimationFrame,this._internalAnimations[g]._animation=this._internalAnimations[0]._animation,this._internalAnimations[g].draw(f,c,void 0),(1===g&&2<k||1===k||0===g&&2===k)&&
this.overlay&&(this.overlay.deskImage&&f.drawImage(this.overlay.deskImage,0,0),this.overlay.keyBoardImage&&f.drawImage(this.overlay.keyBoardImage,0,0));this.overlay&&this.overlay.pcImage&&f.drawImage(this.overlay.pcImage,0,0);this.cachedFrame.frameNr=d}this.cachedFrame&&0<this.cachedFrame.width&&0<this.cachedFrame.height&&a.drawImage(this.cachedFrame,this.x,this.y);return!0}})();
var GameStatusBar=function(){this.initialize();this.width=300;this.textContainerHeight=this.height=80;this.mainShape=new createjs.Shape;this.addChild(this.mainShape);this.gameName=new createjs.Text;this.gameName.textBaseline="middle";this.addChild(this.gameName);this.gameDetailText=new createjs.Text("","12pt Segoe UI","black");this.gameDetailText.textAlign="center";this.gameDetailText.textBaseline="alphabetic";this.gameDetailText.text="No project".localize();this.gameDetailText.x=this.width/2;this.gameDetailText.y=
this.textContainerHeight/2+10;this.gameDetailText.lineHeight=this.gameDetailText.getMeasuredLineHeight();this.addChild(this.gameDetailText);this.progressBar=new ProgressBarVisual;this.progressBar.height=20;this.progressBar.width=this.width-60;this.progressBar.x=30;this.progressBar.y=this.textContainerHeight-25;this.progressBar.alpha=0;this.addChild(this.progressBar);this.stateText=new createjs.Text("","10pt Segoe UI","DimGray");this.stateText.x=this.width/2;this.stateText.y=this.textContainerHeight-
11;this.stateText.textAlign="center";this.stateText.textBaseline="alphabetic";this.addChild(this.stateText);var a=this.textContainerHeight/2-30;this.designPoints=new PointsDisplayVisual(DESIGN_POINTS_COLOR,"black","Design".localize());this.designPoints.x=-30;this.designPoints.y=a;this.addChild(this.designPoints);this.technologyPoints=new PointsDisplayVisual(TECHNOLOGY_POINTS_COLOR,"black","Technology".localize());this.technologyPoints.x=this.width-30;this.technologyPoints.y=a;this.addChild(this.technologyPoints);
this.bugs=new PointsDisplayVisual(BUGS_COLOR,"black","Bugs".localize());this.bugs.x=this.x-120;this.bugs.y=0;this.bugs.size=100;this.addChild(this.bugs);this.enginePoints=new PointsDisplayVisual(TECHNOLOGY_POINTS_COLOR,"black","Remaining".localize("label for visual which shows 'points remaining'"));this.enginePoints.x=this.width/2-this.enginePoints.size/4;this.enginePoints.y=this.textContainerHeight+5;this.enginePoints.alpha=0;this.addChild(this.enginePoints);this.hypePoints=new HypePointsVisual;
this.hypePoints.x=this.width/2-this.hypePoints.width/2;this.hypePoints.y=this.textContainerHeight;this.hypePoints.alpha=0;this.addChildAt(this.hypePoints,0);this.isInvalid=!0};
(function(){GameStatusBar.prototype=new createjs.Container;var a=GameStatusBar.prototype;a.reset=function(){this.finishEngine()};a.startDevelopment=function(){createjs.Tween.get(this.designPoints).to({alpha:1},400);createjs.Tween.get(this.technologyPoints).to({alpha:1},400);createjs.Tween.get(this.bugs).to({alpha:1},400);createjs.Tween.get(this.gameName).to({alpha:1},400);this.stateText.shadow=null;this.stateText.color="DimGray";createjs.Tween.get(this.stateText).to({alpha:1},400)};a.startEngine=
function(){createjs.Tween.get(this.designPoints).to({alpha:0},400);createjs.Tween.get(this.technologyPoints).to({alpha:0},400);createjs.Tween.get(this.bugs).to({alpha:0},400);createjs.Tween.get(this.enginePoints).to({alpha:1},400);this.updateGameNameText(GameManager.currentEngineDev.name);this.gameDetailText.text="Custom Game Engine".localize();createjs.Tween.get(this.gameName).to({alpha:1},400)};a.startContract=function(){var a=GameManager.currentContract;createjs.Tween.get(this.designPoints).to({alpha:1},
400);createjs.Tween.get(this.technologyPoints).to({alpha:1},400);createjs.Tween.get(this.bugs).to({alpha:0},400);this.updateGameNameText(a.name);this.gameDetailText.text="Contract".localize();this.stateText.text="Time Left".localize("label for progressbar");this.stateText.shadow=null;this.stateText.color="DimGray";createjs.Tween.get(this.stateText).to({alpha:1},400);createjs.Tween.get(this.gameName).to({alpha:1},400)};a.finishContract=function(){this.endDevelopment()};a.finishEngine=function(){this.enginePoints.alpha=
0;this.endDevelopment()};a.endDevelopment=function(){this.designPoints.alpha=0.2;this.technologyPoints.alpha=0.2;this.bugs.alpha=0.2;this.gameName.alpha=0;this.stateText.alpha=0;this.progressBar.alpha=0;this.hypePoints.alpha=0;this.gameDetailText.text="No Project".localize();this.designPoints.updatePoints(0);this.technologyPoints.updatePoints(0);this.bugs.updatePoints(0);this.updateProgress(!1);GameManager.spawnedPoints=0};a.onTick=function(){this.isInvalid&&(this.redraw(),this.isInvalid=!1)};a.updateProgress=
function(a,c,d){d||(d=400);!a||isNaN(a)?1===this.progressBar.alpha&&(createjs.Tween.get(this.progressBar).to({alpha:0},d),this.stateText.shadow=null,this.stateText.color="DimGray"):(c&&0<a?createjs.Tween.get(this.progressBar).to({progress:a},d):this.progressBar.progress=a,0===this.progressBar.alpha&&(createjs.Tween.get(this.progressBar).to({alpha:1},d),this.stateText.color="white",this.stateText.shadow=new createjs.Shadow("black",0,0,2)))};a.updateStatusMessage=function(a){this.stateText.text=a;this.stateText.lineHeight||
(this.stateText.lineHeight=this.stateText.getMeasuredLineHeight());0===this.stateText.alpha&&createjs.Tween.get(this.stateText).to({alpha:1},400)};a.updateHypePoints=function(a){this.hypePoints.points!=a&&(this.hypePoints.points=a,this.hypePoints.updateText("Hype {0}".localize("hype {0} points").format(a)));0===this.hypePoints.alpha&&createjs.Tween.get(this.hypePoints).to({alpha:1},400)};a.getGlobalLocationOfPointsDisplay=function(a){a="t"===a?this.technologyPoints:"e"===a?this.enginePoints:"b"===
a?this.bugs:this.designPoints;return this.localToGlobal(a.x+a.size/4,a.y+a.size/4)};a.pulsePointsDisplay=function(a,c){("t"===a?this.technologyPoints:"e"===a?this.enginePoints:"b"===a||"br"===a?this.bugs:this.designPoints).pulse(c)};a.updateGameNameText=function(a){var c=this.children.indexOf(this.gameName);this.removeChild(this.gameName);var d=24;do var f="{0}pt Segoe UI".format(d),f=new createjs.Text(a,f,"black"),d=d-2;while(f.getMeasuredWidth()>this.width&&10<d);f.textAlign="center";f.textBaseline=
"middle";f.lineHeight=f.getMeasuredLineHeight();f.y=this.textContainerHeight/4;f.x=30+(this.width-60)/2;f.maxWidth=this.width-60;this.gameName=f;this.addChildAt(this.gameName,c)};a.updateGameName=function(){var a=GameManager.company.currentGame;a&&a.topic&&a.genre&&(this.updateGameNameText(a.title),this.gameDetailText.text=a.topic.name+" / "+a.genre.name,a.secondGenre&&(this.gameDetailText.text+="-"+a.secondGenre.name))};a.updatePoints=function(){var a=GameManager.company.currentGame;a?(this.designPoints.updatePoints(a.designPoints),
this.technologyPoints.updatePoints(a.technologyPoints),this.bugs.updatePoints(a.bugs)):GameManager.currentEngineDev?this.enginePoints.updatePoints(GameManager.currentEngineDev.remainingPointsDisplay):GameManager.currentContract&&(a=GameManager.currentContract,this.designPoints.updatePoints(a.visualDRemaining),this.technologyPoints.updatePoints(a.visualTRemaining))};a.redraw=function(){var a=this.mainShape.graphics;a.beginFill(createjs.Graphics.getRGB(255,255,255,0.8));a.beginStroke("black");a.setStrokeStyle(1);
a.drawRoundRect(0,0,this.width,this.textContainerHeight,14.3);a.closePath()}})();var LevelOverlay=function(a){this.centerOverlay=new createjs.Container;this.leftOverlay=new createjs.Container;this.rightOverlay=new createjs.Container;this.company=a;this.initAnimations();a.levelOverlay&&this.loadState(a.levelOverlay)};
(function(){var a=LevelOverlay.prototype;a.initAnimations=function(){var a=GameManager.company.currentLevel,c=CanvasManager.globalScale;if(2===a||3===a)this.airConAnimation1=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.airCon)),this.airConAnimation1.scaleX=c,this.airConAnimation1.scaleY=c,this.airConAnimation1.x=VisualsManager.toScreenCoordinates(84,c),this.airConAnimation1.y=VisualsManager.toScreenCoordinates(-2,c),this.airConAnimation2=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.airCon)),
this.airConAnimation2.scaleX=c,this.airConAnimation2.scaleY=c,this.airConAnimation2.x=VisualsManager.toScreenCoordinates(406,c),this.airConAnimation2.y=VisualsManager.toScreenCoordinates(-188,c);1<a&&(this.waterCoolerAnimation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.waterCooler)),this.waterCoolerAnimation.scaleX=c,this.waterCoolerAnimation.scaleY=c);4===a&&(GameManager.company.flags.hwLabUnlocked&&(this.hwLabScreenWallAnimation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwLabScreenWall)),
this.hwLabScreenWallAnimation.scaleX=c,this.hwLabScreenWallAnimation.scaleY=c,this.hwLabScreenWallAnimation.x=VisualsManager.toScreenCoordinates(503,c),this.hwLabScreenWallAnimation.y=VisualsManager.toScreenCoordinates(182,c),this.hwLabTVAnimation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwTV)),this.hwLabTVAnimation.scaleX=c,this.hwLabTVAnimation.scaleY=c,this.hwLabTVAnimation.x=VisualsManager.toScreenCoordinates(2298,c),this.hwLabTVAnimation.y=VisualsManager.toScreenCoordinates(788,
c),this.hwLabTVAnimationCenter=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwTV)),this.hwLabTVAnimationCenter.scaleX=c,this.hwLabTVAnimationCenter.scaleY=c,this.hwLabTVAnimationCenter.x=VisualsManager.toScreenCoordinates(-262,c),this.hwLabTVAnimationCenter.y=VisualsManager.toScreenCoordinates(788,c)),GameManager.company.flags.rndLabUnlocked&&(this.printerAnimation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.printer)),this.printerAnimation.scaleX=c,this.printerAnimation.scaleY=
c,this.printerAnimation.x=VisualsManager.toScreenCoordinates(608,c),this.printerAnimation.y=VisualsManager.toScreenCoordinates(435,c),this.rndPrinterLeftScreen=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndPrinterLeftScreen)),this.rndPrinterLeftScreen.scaleX=c,this.rndPrinterLeftScreen.scaleY=c,this.rndPrinterLeftScreen.x=VisualsManager.toScreenCoordinates(395,c),this.rndPrinterLeftScreen.y=VisualsManager.toScreenCoordinates(311,c),this.rndPrinterRightScreen=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndPrinterRightScreen)),
this.rndPrinterRightScreen.scaleX=c,this.rndPrinterRightScreen.scaleY=c,this.rndPrinterRightScreen.x=VisualsManager.toScreenCoordinates(747,c),this.rndPrinterRightScreen.y=VisualsManager.toScreenCoordinates(311,c)));var d=this,a=GameManager.company.currentLevel;4===a&&(GameManager.company.flags.hwLabUnlocked&&(this.leftOverlay.addChild(this.hwLabScreenWallAnimation),this.leftOverlay.addChild(this.hwLabTVAnimation),this.centerOverlay.addChild(this.hwLabTVAnimationCenter)),GameManager.company.flags.rndLabUnlocked&&
(this.rightOverlay.addChild(this.rndPrinterLeftScreen),this.rightOverlay.addChild(this.rndPrinterRightScreen),this.rightOverlay.addChild(this.printerAnimation)));if(2===a||3===a)this.centerOverlay.addChild(this.airConAnimation1),this.centerOverlay.addChild(this.airConAnimation2),this.airConAnimation1.onAnimationEnded=function(a,b){d.endedAnimation.call(d,a,b,"airConAnimation1")},this.airConAnimation2.onAnimationEnded=function(a,b){d.endedAnimation.call(d,a,b,"airConAnimation2")};1<a&&(4===a?(this.waterCoolerAnimation.x=
1541/VisualsManager.Divisor*c,this.waterCoolerAnimation.y=440/VisualsManager.Divisor*c):(this.waterCoolerAnimation.x=1501/VisualsManager.Divisor*c,this.waterCoolerAnimation.y=211/VisualsManager.Divisor*c),this.centerOverlay.addChild(this.waterCoolerAnimation),this.waterCoolerAnimation.onAnimationEnded=function(a,b){d.endedAnimation.call(d,a,b,"waterCoolerAnimation")});this.airConAnimation1&&(this.airConAnimation1.gotoAndStop("loop"),this.airConAnimation2.gotoAndStop("loop"),this.airConAnimation1.setAlpha(0),
this.airConAnimation2.setAlpha(0));this.waterCoolerAnimation&&(this.waterCoolerAnimation.gotoAndStop("loop"),this.waterCoolerAnimation.setAlpha(1));this.hwLabScreenWallAnimation&&(this.hwLabScreenWallAnimation.gotoAndStop("loop"),this.hwLabScreenWallAnimation.setAlpha(0),this.hwLabTVAnimation.gotoAndStop("loop"),this.hwLabTVAnimation.setAlpha(0),this.hwLabTVAnimationCenter.gotoAndStop("loop"),this.hwLabTVAnimationCenter.setAlpha(0));this.printerAnimation&&(this.printerAnimation.gotoAndStop("loop"),
this.printerAnimation.setAlpha(0),this.rndPrinterLeftScreen.gotoAndStop("loop"),this.rndPrinterLeftScreen.setAlpha(0),this.rndPrinterRightScreen.gotoAndStop("loop"),this.rndPrinterRightScreen.setAlpha(0))};a.startAirCon1=function(){this.airConAnimation1&&(this.airConAnimation1.setAlpha(1),this.airConAnimation1.playStoryBoard(["loop"]))};a.startHwLabScreenWall=function(){this.hwLabScreenWallAnimation.paused&&(this.hwLabScreenWallAnimation.setAlpha(1),this.hwLabScreenWallAnimation.playStoryBoard(["loop"]))};
a.stopHwLabScreenWall=function(){this.hwLabScreenWallAnimation.paused||(this.hwLabScreenWallAnimation.setAlpha(0),this.hwLabScreenWallAnimation.paused=!0)};a.starthwLabTV=function(){this.hwLabTVAnimation.paused&&(this.hwLabTVAnimation.setAlpha(1),this.hwLabTVAnimation.playStoryBoard(["loop"]),this.hwLabTVAnimationCenter.setAlpha(1),this.hwLabTVAnimationCenter.playStoryBoard(["loop"]))};a.stophwLabTV=function(){this.hwLabTVAnimation.paused||(this.hwLabTVAnimation.setAlpha(0),this.hwLabTVAnimation.paused=
!0,this.hwLabTVAnimationCenter.setAlpha(0),this.hwLabTVAnimationCenter.paused=!0)};a.startPrinter=function(){this.printerAnimation.paused&&(this.printerAnimation.setAlpha(1),this.printerAnimation.playStoryBoard(["loop"]))};a.stopPrinter=function(){this.printerAnimation.paused||(this.printerAnimation.setAlpha(0),this.printerAnimation.paused=!0)};a.startRndPrinterLeftScreen=function(){this.rndPrinterLeftScreen.paused&&(this.rndPrinterLeftScreen.setAlpha(1),this.rndPrinterLeftScreen.playStoryBoard(["loop"]))};
a.stopRndPrinterLeftScreen=function(){this.rndPrinterLeftScreen.paused||(this.rndPrinterLeftScreen.setAlpha(0),this.rndPrinterLeftScreen.paused=!0)};a.startRndPrinterRightScreen=function(){this.rndPrinterRightScreen.paused&&(this.rndPrinterRightScreen.setAlpha(1),this.rndPrinterRightScreen.playStoryBoard(["loop"]))};a.stopRndPrinterRightScreen=function(){this.rndPrinterRightScreen.paused||(this.rndPrinterRightScreen.setAlpha(0),this.rndPrinterRightScreen.paused=!0)};a.startAirCon2=function(){this.airConAnimation2&&
(this.airConAnimation2.setAlpha(1),this.airConAnimation2.playStoryBoard(["loop"]))};a.startWaterCooler=function(){this.waterCoolerAnimation&&!0===this.waterCoolerAnimation.paused&&this.waterCoolerAnimation.playStoryBoard(["loop"])};a.endedAnimation=function(a,c,d){"loop"===a.currentAnimation&&"airConAnimation1"!==d&&"airConAnimation2"!==d&&"waterCoolerAnimation"===d&&this.waterCoolerAnimation.gotoAndStop("loop")};a.saveState=function(){var a={};this.airConAnimation1&&(a.airConAnimation1=this.airConAnimation1.saveState());
this.airConAnimation2&&(a.airConAnimation2=this.airConAnimation2.saveState());this.waterCoolerAnimation&&(a.waterCoolerAnimation=this.waterCoolerAnimation.saveState());this.hwLabScreenWallAnimation&&(a.hwLabScreenWallAnimation=this.hwLabScreenWallAnimation.saveState());this.hwLabTVAnimation&&(a.hwLabTVnimation=this.hwLabTVAnimation.saveState());this.printerAnimation&&(a.printerAnimation=this.printerAnimation.saveState());this.rndPrinterLeftScreen&&(a.rndPrinterLeftScreen=this.rndPrinterLeftScreen.saveState());
this.rndPrinterRightScreen&&(a.rndPrinterRightScreen=this.rndPrinterRightScreen.saveState());return a};a.loadState=function(a){if(a){if(2===GameManager.company.currentLevel||3===GameManager.company.currentLevel)this.airConAnimation1.loadState(a.airConAnimation1),this.airConAnimation2.loadState(a.airConAnimation2);1<GameManager.company.currentLevel&&this.waterCoolerAnimation.loadState(a.waterCoolerAnimation);4===GameManager.company.currentLevel&&GameManager.company.flags.hwLabUnlocked&&(this.hwLabScreenWallAnimation.loadState(a.hwLabScreenWallAnimation),
this.hwLabTVAnimation.loadState(a.hwLabTVnimation),this.hwLabTVAnimationCenter.loadState(a.hwLabTVnimation));4===GameManager.company.currentLevel&&GameManager.company.flags.rndLabUnlocked&&(this.printerAnimation.loadState(a.printerAnimation),this.rndPrinterLeftScreen.loadState(a.rndPrinterLeftScreen),this.rndPrinterRightScreen.loadState(a.rndPrinterRightScreen))}}})();
var PointsDisplayVisual=function(a,b,c){this.initialize();this.innerContainer=new createjs.Container;this.mainShape=new createjs.Shape;this.innerContainer.addChild(this.mainShape);this.text=new createjs.Text("0","14pt Segoe UI",b);this.text.textAlign="center";this.text.textBaseline="middle";this.text.lineHeight=this.text.getMeasuredLineHeight();SettingsGameplay.isTextCacheEnabled()?(this.text.cache(-50,-50,100,100),this.textIsCached=!0):(this.text.uncache(),this.textIsCached=!1);this.innerContainer.addChild(this.text);
this.points=0;this.size=120;this.addChild(this.innerContainer);this.color=a;this.captionBorder=new createjs.Shape;this.innerContainer.addChild(this.captionBorder);this.captionText=new createjs.Text(c,"10pt Segoe UI",b);this.captionText.textBaseline="alphabetic";this.captionText.direction="rtl";this.captionText.lineHeight=this.captionText.getMeasuredLineHeight();this.captionText.lineWidth=this.captionText.getMeasuredWidth();this.innerContainer.addChild(this.captionText);this.isInvalid=!0};
(function(){PointsDisplayVisual.prototype=new createjs.Container;var a=PointsDisplayVisual.prototype;a.updatePoints=function(a){this.points=a};a.pulse=function(a){var c=new createjs.Shape;c.alpha=0;var d=c.graphics;d.clear();var f=this.size/4;d.beginRadialGradientFill([this.color,this.color,this.color,"white",this.color,"transparent"],[0,0.8,0.85,0.86,0.9,1],f,f,0,f,f,f);d.drawEllipse(0,0,this.size/2,this.size/2);d.closePath();this.addChildAt(c,0);d=0.4*this.size/4;c.scaleX=1.4;c.scaleY=1.4;c.x=-d;
c.y=-d;createjs.Tween.get(c).to({alpha:0.8},100).wait(200).to({alpha:0},100);createjs.Tween.get(c).to({scaleX:1,scaleY:1,x:0,y:0},400).call(function(){c.parent.removeChild(c);a&&a()})};a.onTick=function(){this.isInvalid&&(this.drawMainShape(),this.text.y=this.size/4,this.text.x=this.size/4);this.text.text!=Math.floor(this.points)&&(this.text.text=Math.floor(this.points),SettingsGameplay.isTextCacheEnabled()?(this.textIsCached||(this.text.cache(-50,-50,100,100),this.textIsCached=!0),this.text.updateCache()):
this.text.uncache());this.isInvalid=!1};a.drawMainShape=function(){var a=this.mainShape.graphics;a.clear();a.beginFill(this.color);a.setStrokeStyle(2);a.beginStroke("black");a.drawEllipse(0,0,this.size/2,this.size/2);a.closePath();var c=this.captionText.lineWidth||this.captionText.getMeasuredWidth(),d=this.captionText.lineHeight||this.captionText.getMeasuredLineHeight(),a=this.captionBorder.graphics;a.clear();a.beginFill(this.color);a.setStrokeStyle(1);a.beginStroke("black");var f=this.size/4-c/2,
g=this.size/2+5;a.drawRoundRect(f-5,g,c+10,d+10,2);a.closePath();0===this.captionText.cacheID&&(this.captionText.x=f,this.captionText.y=g+10+d/2,SettingsGameplay.isTextCacheEnabled()?this.captionText.cache(0,-15,100,25):this.captionText.uncache())}})();var ProgressBarVisual=function(){this.initialize()};
(function(){ProgressBarVisual.prototype=new createjs.Shape;var a=ProgressBarVisual.prototype;a.width=100;a.height=20;a.progress=0;a.color="darkblue";a.isHorizontal=!0;a.onTick=function(){if(0!=this.alpha){var a=this.width,c=this.height,d=this.graphics;d.clear();d.beginFill("#A0A0A0");d.drawRoundRect(0,0,a,c,2);d.beginFill(this.color);var f=1,a=a-2,c=c-2;if(this.isHorizontal)a*=this.progress.clamp(0,1);else var g=c*this.progress.clamp(0,1),f=c-g+1,c=g;d.drawRoundRect(1,f,a,c,2);d.closePath()}}})();
var CharacterOverlay=function(a){this.initialize();this.character=a;this.speedFactor=0.8+0.2*this.character.speedFactor;this.initAnimations();this.progressBar=new ProgressBarVisual;this.progressBar.alpha=0;this.progressBar.y=VisualsManager.toScreenCoordinates(-30);this.addChild(this.progressBar);this.efficiencyBar=new ProgressBarVisual;this.efficiencyBar.alpha=1>a.efficiency?1:0;this.efficiencyBar.progress=0.3;this.efficiencyBar.width=12;this.efficiencyBar.height=70;this.efficiencyBar.isHorizontal=
!1;this.efficiencyBar.x-=VisualsManager.toScreenCoordinates(30);this.addChild(this.efficiencyBar);this.boostVisual=new CircularProgressVisual;this.boostVisual.radius=20;this.boostVisual.x=VisualsManager.toScreenCoordinates(166,CanvasManager.globalScale);this.boostVisual.y=VisualsManager.toScreenCoordinates(5,CanvasManager.globalScale);this.boostVisual.alpha=0.8;this.addChild(this.boostVisual);a.visualData&&this.loadState(a.visualData);a.onFire&&this.setOnFire(!0)};
(function(){var a=CharacterOverlay;a.prototype=new createjs.Container;a=a.prototype;a.saySomething=function(a,c,d,f){void 0===d&&(d=0);f||(f="black");c||(c=800);var g=new createjs.Container;g.x=25;g.y=-25+d;a=new createjs.Text(a,"18pt Arial",f);a.textBaseline="top";f=a.getMeasuredWidth();var k=a.getMeasuredLineHeight(),l=new createjs.Shape,h=l.graphics;h.beginFill(createjs.Graphics.getRGB(255,255,255,0.8));h.beginStroke("black");h.setStrokeStyle(1);h.drawRoundRect(-4,-4,f+8,k+8,5);h.closePath();g.addChild(l);
g.addChild(a);g.alpha=0;this.addChild(g);var m=this;a=c/6;createjs.Tween.get(g).to({y:-60+d},c);createjs.Tween.get(g).to({alpha:1},a).wait(c-2*a).to({alpha:0,x:35},a).call(function(){m.removeChild(g)})};a._getSpawnPointOrigin=function(){return this.character.getOrientation()===CharacterOrientation.NW?{x:25,y:-10}:{x:130,y:90}};a.spawnBugRemovePoint=function(a,c,d,f){f||(f=0);c=new MersenneTwister(a);var g=new createjs.Shape;g.alpha=0;var k=this._getSpawnPointOrigin();g.x=k.x+10*c.random()*c.randomSign();
g.y=k.y-40+-20*c.random();g.regX=5;g.regY=5;g.scaleX=0;g.scaleY=0;var l=g.graphics;l.beginFill(BUGS_COLOR);l.beginStroke("black");l.setStrokeStyle(0.5);l.drawCircle(5,5,10);l.closePath();this.addChild(g);var h=this,l=d/8;d/=2;var m=GameManager.gameId;GameManager.increaseSpawnedPoints();var n=[],p=this;n.push(createjs.Tween.get(g).wait(f).to({y:k.y-80-60*c.random()},d,createjs.Ease.backIn).call(function(){m==GameManager.gameId&&(GameManager.decreaseBugs(1),VisualsManager.updatePoints(),1==GameManager.company.flags.currentZone&&
Sound.playSoundOnce("bugDecrease",0.2),p.character.removeSpawnedPoint(a),GameManager.decreaseSpawnedPoints(),VisualsManager.pulsePointsDisplay("br"))}));n.push(createjs.Tween.get(g).wait(f).to({alpha:1},l).wait(d-2*l).to({alpha:0},l).call(function(){h.removeChild(g)}));n.push(createjs.Tween.get(g).wait(f).to({scaleX:1,scaleY:1},2*l,createjs.Ease.backOut));return n};a.spawnPoint=function(a,c,d,f){f||(f=0);if(!this.spawnPointVisuals||this.spawnPointVisuals.gameId!=GameManager.gameId)this.spawnPointVisuals=
{gameId:GameManager.gameId};else if(GameFlags.GROUP_POINTS&&c in this.spawnPointVisuals){var g=this.spawnPointVisuals[c];if(g){g.weight++;d=g.targetScaleX;f=g.targetScaleY;g.targetScaleX=Math.min(2,d+0.2);g.targetScaleY=Math.min(2,f+0.2);var k=createjs.Tween.get(g);k.isScaleTween=!0;k.set({scaleX:d,scaleY:f}).to({scaleX:g.targetScaleX,scaleY:g.targetScaleY},100);g.ids.push(a);g.textShape||(g.textShape=new createjs.Text(g.weight,"10pt Segoe UI","black"),g.textShape.textAlign="center",g.textShape.textBaseline=
"middle",g.textShape.x=5,g.textShape.y=4,g.addChild(g.textShape));g.textShape.text=g.weight;GameManager.increaseSpawnedPoints();return[k]}}k=new MersenneTwister(a);g=new createjs.Container;g.alpha=0;var l=this._getSpawnPointOrigin();l.x+=this.x;l.y+=this.y;g.x=l.x+10*k.random()*k.randomSign();g.y=l.y+-20*k.random();g.regX=5;g.regY=5;g.scaleX=0;g.scaleY=0;g.targetScaleX=1;g.targetScaleY=1;var h="t"===c||"e"===c?TECHNOLOGY_POINTS_COLOR:"d"===c?DESIGN_POINTS_COLOR:"b"===c?BUGS_COLOR:RESEARCH_POINTS_COLOR;
1==GameManager.company.flags.currentZone&&Sound.playSpawnSound(c);var m=new createjs.Shape;g.addChild(m);m=m.graphics;m.beginFill(h);m.beginStroke("black");m.setStrokeStyle(0.5);m.drawCircle(5,5,10);m.closePath();CanvasManager.characterStage.addChild(g);g.weight=1;g.ids=[a];this.spawnPointVisuals[c]=g;var n=CanvasManager.characterStage;a=VisualsManager.getGlobalLocationOfPointsDisplay(c);var h=d/8,m=d/2,p=GameManager.gameId;GameManager.increaseSpawnedPoints();var q=[],s=this;q.push(createjs.Tween.get(g).wait(f).to({y:l.y-
80-20*k.random()},m,createjs.Ease.backOut).call(function(){delete s.spawnPointVisuals[c]}).to({x:a.x,y:a.y},d-m,createjs.Ease.quadIn).call(function(){if(p==GameManager.gameId){var a=g.weight;VisualsManager.pulsePointsDisplay(c);"t"===c?GameManager.company.currentGame?GameManager.company.currentGame.technologyPoints+=a:GameManager.currentContract&&(GameManager.currentContract.visualTRemaining-=a):"d"===c?GameManager.company.currentGame?GameManager.company.currentGame.designPoints+=a:GameManager.currentContract&&
(GameManager.currentContract.visualDRemaining-=a):"r"===c?GameManager.company.researchPoints+=a:"e"===c?GameManager.increaseDisplayEnginePoints(s.character,a):"b"===c&&GameManager.company.currentGame&&(GameManager.company.currentGame.bugs+=a);1==GameManager.company.flags.currentZone&&Sound.playSpawnSound(c,!0);VisualsManager.updatePoints();for(a=0;a<g.ids.length;a++)s.character.removeSpawnedPoint(g.ids[a]),GameManager.decreaseSpawnedPoints();"r"!=c&&GameManager.currentFeature&&"preparation"!=GameManager.currentFeature.id&&
Tutorial.gamePoints()}}));q.push(createjs.Tween.get(g).wait(f).to({alpha:1},h).wait(d-2*h).to({alpha:0},h).call(function(){n.removeChild(g)}));q.push(createjs.Tween.get(g).wait(f).to({scaleX:1,scaleY:1},2*h,createjs.Ease.backOut));return q};a.startResearching=function(){if(1!=this.progressBar.alpha&&(createjs.Tween.get(this.progressBar).to({alpha:1},400),this.character.currentResearch.isTraining)){var a=this.character.currentResearch,c=Training.getAllTrainings().first(function(c){return c.id===a.id});
a.isSkillTraining=c&&c.isSkillTraining;a.isSkillTraining&&(this.animateTrainingProgress(),this.trainingOverlay.fadeIn(1200))}};a.finishResearching=function(){createjs.Tween.get(this.progressBar).to({alpha:0},400);this.trainingOverlay.fadeOut(1200)};a.onTick=function(){this.character.state===CharacterState.Researching&&(this.progressBar.progress=this.character.currentResearch.progress,this.progressBar.color=this.character.currentResearch.progressColor?this.character.currentResearch.progressColor:"research"==
this.character.currentResearch.type?"darkblue":"lightgreen");var a=this.character.efficiency;1!=a?(this.efficiencyBar.progress=a,this.efficiencyBar.color=createjs.Graphics.getHSL(80*a,100,50),this.efficiencyBar.alpha=(this.efficiencyBar.alpha+0.01).clamp(0,0.8)):0!=this.efficiencyBar.alpha&&(this.efficiencyBar.alpha=(this.efficiencyBar.alpha-0.01).clamp(0,1))};a.initAnimations=function(){var a=CanvasManager.globalScale;if(this.character.getOrientation()===CharacterOrientation.NW){var c=BitmapAnimationFactory.createAnimation("screen",
this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);c&&this.addChild(c);this.screenAnimation=c}c=BitmapAnimationFactory.createAnimation("typing",this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);c.overlay=this;this.addChild(c);this.typingAnimation=c;c=BitmapAnimationFactory.createAnimation("thinking",this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);
c.overlay=this;this.addChild(c);this.thinkingAnimation=c;c=BitmapAnimationFactory.createAnimation("sitBack",this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);c.overlay=this;this.addChild(c);this.sitBackAnimation=c;c=BitmapAnimationFactory.createAnimation("drawNotepad",this.speedFactor,this.character.getOrientation(),this.character.flags.body,this.character.flags.head);c.overlay=this;this.addChild(c);this.drawNotepadAnimation=c;c="";c=this.character.getOrientation()==
CharacterOrientation.NW?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.notepadImage),this.speedFactor):BitmapAnimationFactory.createTeaCupAnimation(this.speedFactor);c.overlay=this;c.scaleX=a;c.scaleY=a;this.addChild(c);this.notepadImage=c;var d=this;this.typingAnimation.onAnimationEnded=function(a,b){d.endedAnimation.call(d,a,b,"typing")};this.thinkingAnimation.onAnimationEnded=function(a,b){d.endedAnimation.call(d,a,b,"thinking")};this.sitBackAnimation.onAnimationEnded=function(a,b){d.endedAnimation.call(d,
a,b,"sitBack")};this.drawNotepadAnimation.onAnimationEnded=function(a,b){d.endedAnimation.call(d,a,b,"drawNotepad")};1===GameManager.company.currentLevel&&(c=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.pong)),c.x=VisualsManager.toScreenCoordinates(1321,a)-VisualsManager.toScreenCoordinates(1039,a),c.y=VisualsManager.toScreenCoordinates(261,a)-VisualsManager.toScreenCoordinates(539,a),c.scaleX=a,c.scaleY=a,this.addChild(c),this.pongAnimation=c);this.notepadImage.gotoAndStop("all");
this.sitBackAnimation.gotoAndStop("loop");this.screenAnimation&&this.screenAnimation.gotoAndStop("loop");this.pongAnimation&&this.pongAnimation.gotoAndStop("all");this.typingAnimation.setAlpha(0);this.thinkingAnimation.setAlpha(0);this.sitBackAnimation.setAlpha(1);this.drawNotepadAnimation.setAlpha(0);this.refreshName()};a.refreshName=function(){var a=new CharacterNameVisual(this.character);a.alpha=0.7;this.characterNameVisual&&this.removeChild(this.characterNameVisual);this.characterNameVisual=a;
this.addChildAt(this.characterNameVisual,0)};a.endedAnimation=function(a,c,d){"loop"===a.currentAnimation?this.character.loopEnded():null===a.currentAnimation&&a.paused||"end"===a.currentAnimation?this.character.animationEnded(d):!0===a.paused?this.character.loopEnded():"sitBack"===d&&"start"===c&&null!=a.currentStoryBoard&&0===a.currentStoryBoard.length&&this.sitBackAnimation.playStoryBoard(["loop"])};a.removeAllAnimation=function(){this.typingAnimation.setAlpha(0);this.thinkingAnimation.setAlpha(0);
this.sitBackAnimation.setAlpha(0);this.drawNotepadAnimation.setAlpha(0);this.notepadImage.setAlpha(1);this.screenAnimation&&this.screenAnimation.setPaused(!0);this.typingAnimation.stop();this.thinkingAnimation.stop();this.sitBackAnimation.stop();this.drawNotepadAnimation.stop()};a.startThinking=function(){this.removeAllAnimation();this.thinkingAnimation.setAlpha(1);this.thinkingAnimation.playStoryBoard(["start","loop"])};a.continueThinking=function(){this.thinkingAnimation.setPaused(!1)};a.endThinking=
function(){this.thinkingAnimation.playStoryBoard(["end","#stop"])};a.startDrawNotepad=function(){this.removeAllAnimation();this.notepadImage.setAlpha(0);this.drawNotepadAnimation.setAlpha(1);this.drawNotepadAnimation.playStoryBoard(["start","loop"])};a.continueDrawNotepad=function(){this.drawNotepadAnimation.setPaused(!1)};a.endDrawNotepad=function(){this.drawNotepadAnimation.playStoryBoard(["end","#stop"])};a.startSitBack=function(){this.removeAllAnimation();this.sitBackAnimation.setAlpha(1);this.sitBackAnimation.playStoryBoard(["start",
"loop"])};a.startSitBackLoop=function(){this.removeAllAnimation();this.sitBackAnimation.setAlpha(1);this.sitBackAnimation.playStoryBoard(["loop"])};a.continueSitBack=function(){this.sitBackAnimation.setPaused(!1)};a.endSitBack=function(){this.sitBackAnimation.playStoryBoard(["end","#stop"])};a.startTyping=function(){this.removeAllAnimation();this.screenAnimation&&this.screenAnimation.setPaused(!1);this.typingAnimation.setAlpha(1);this.typingAnimation.playStoryBoard(["start","loop"])};a.continueTyping=
function(){this.screenAnimation&&this.screenAnimation.setPaused(!1);this.typingAnimation.setPaused(!1)};a.endTyping=function(){this.screenAnimation&&this.screenAnimation.stop();this.typingAnimation.playStoryBoard(["end","#stop"])};a.playPong=function(){if(this.pongAnimation&&this.pongAnimation.paused){this.pongAnimation.playStoryBoard(["all","#stop"]);var a=GameManager.gameId,c=function(){a==GameManager.gameId&&1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("ping",0.5)},d=function(){a==
GameManager.gameId&&1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("pong",0.5)};createjs.Tween.get(this).wait(500).call(c).wait(720).call(d).wait(650).call(c).wait(1100).call(d).wait(300).call(c).wait(850).call(c).wait(500).call(d).wait(650).call(c).wait(1100).call(d).wait(200).call(c).wait(2E3).call(function(){Achievements.activate(Achievements.lvl1EasterEgg);GameManager.checkAchievements()});ghg4.ghg5("pong played")}};a.saveState=function(){var a={};a.typingAnimation=this.typingAnimation.saveState();
this.screenAnimation&&(a.screenAnimation=this.screenAnimation.saveState());a.thinkingAnimation=this.thinkingAnimation.saveState();a.sitBackAnimation=this.sitBackAnimation.saveState();a.drawNotepadAnimation=this.drawNotepadAnimation.saveState();a.notepadImage=this.notepadImage.saveState();this.pongAnimation&&(a.pong=this.pongAnimation.saveState());this.character.state===CharacterState.Researching&&(a.currentTraining=this.currentTrainingState);return a};a.loadState=function(a){a&&(this.typingAnimation.loadState(a.typingAnimation),
this.screenAnimation&&this.screenAnimation.loadState(a.screenAnimation),this.thinkingAnimation.loadState(a.thinkingAnimation),this.sitBackAnimation.loadState(a.sitBackAnimation),this.drawNotepadAnimation.loadState(a.drawNotepadAnimation),this.notepadImage.loadState(a.notepadImage),this.pongAnimation&&this.pongAnimation.loadState(a.pongAnimation),a.currentTraining&&(this.currentTrainingState=a.currentTraining))};a.resumeTraining=function(){if(void 0==this.currentTrainingState)this.character.currentResearch&&
this.character.currentResearch.isSkillTraining&&this.trainingOverlay.show();else if(this.character.currentResearch&&this.character.currentResearch.isSkillTraining){var a=this.currentTrainingState;this.animateTrainingProgress(a.updates);var c=GameManager.gameTime-a.start;this.trainingTweens.forEach(function(a){a.setPosition(c)});this.trainingOverlay.show()}};a.setOnFire=function(a){a?(this.typingAnimation.onFire=!0,this.screenAnimation&&(this.screenAnimation.onFire=!0),this.thinkingAnimation.onFire=
!0,this.sitBackAnimation.onFire=!0,this.drawNotepadAnimation.onFire=!0,this.notepadImage.onFire=!0,this.pongAnimation&&(this.pongAnimation.onFire=!0)):(this.typingAnimation.onFire=void 0,this.screenAnimation&&(this.screenAnimation.onFire=void 0),this.thinkingAnimation.onFire=void 0,this.sitBackAnimation.onFire=void 0,this.drawNotepadAnimation.onFire=void 0,this.notepadImage.onFire=void 0,this.pongAnimation&&(this.pongAnimation.onFire=void 0))};GameManager.addTickListener(function(a){VisualsManager.characterOverlays.forEach(function(a){a.character.state==
CharacterState.Researching&&a.trainingOverlay&&a.trainingTweens&&a.trainingTweens.forEach(function(a){a=a._target;void 0!=a.gamedev_text_int&&a.text(Math.floor(a.gamedev_text_int));void 0!=a.gamedev_yTilt&&a.css("transform","rotateY({0}deg)".format(a.gamedev_yTilt))})})},!0);a.animateTrainingProgress=function(a){if(this.trainingOverlay){for(var c=this.trainingOverlay,d=[],f=[{p:this.character.designFactor,t:"d"},{p:this.character.technologyFactor,t:"t"},{p:this.character.speedFactor,t:"s"},{p:this.character.researchFactor,
t:"r"}],g=0;g<f.length;g++){var k=f[g],l=c.find(".training{0}.trainingColumnRight".format(k.t.toUpperCase()));if(void 0==l.gamedev_text_int){var h=Math.floor(500*k.p);l.text(h);a&&(l=a.first(function(a){return a.t===k.t}))&&(l.o=h)}}if(a){if(0<a.length){1==GameManager.company.flags.currentZone&&Sound.playSoundOnce("trainingProgress",0.1);for(var m=this,g=0;g<a.length;g++){var n=GameManager.gameId;(function(a){var b=c.find(".trainingGain.training{0}".format(a.t.toUpperCase()));b.text("+"+a.p);void 0===
b.gamedev_yTilt&&(b.gamedev_yTilt=90);d.push(createjs.Tween.get(b).to({gamedev_yTilt:0},400,createjs.Ease.bounceOut).wait(800).to({gamedev_yTilt:90},400));b=c.find(".training{0}.trainingColumnRight".format(a.t.toUpperCase()));void 0===b.gamedev_text_int&&(b.gamedev_text_int=a.o);var f=createjs.Tween.get(b).wait(200).to({gamedev_text_int:a.o+a.p},500);f.call(function(){n==GameManager.gameId&&(m.character.applyTrainingUpdate(a),-1!=m.trainingTweens.indexOf(f)&&m.trainingTweens.remove(f))});d.push(f)})(a[g])}}this.currentTrainingState=
{updates:a,start:GameManager.gameTime}}this.trainingTweens=d}}})();var ProjectWorkerVisual=function(a){this.state={progressF:0};this.efficiency=0;createjs.Container.apply(this,arguments);this.init();this.visualData=a};
(function(){var a=ProjectWorkerVisual;a.prototype=new createjs.Container;a=a.prototype;a.init=function(){this.alpha=0;this.efficiencyBar=new ProgressBarVisual;this.efficiencyBar.alpha=1>this.efficiency?1:0;this.efficiencyBar.progress=0.3;this.efficiencyBar.width=12;this.efficiencyBar.height=70;this.efficiencyBar.isHorizontal=!1;this.efficiencyBar.x-=30/VisualsManager.Divisor;this.scaleY=this.scaleX=CanvasManager.globalScale;this.addChild(this.efficiencyBar)};a.save=function(){var a={};a.id=this.id;
a.alpha=this.alpha;a.progress=this.efficiencyBar.progress;a.efficiencyBarAlpha=this.efficiencyBar.alpha;a.state=this.state;a.efficiency=this.efficiency;a.zone=this.zone;a.visualData=this.animation.saveState();return a};a.load=function(){this.visualData&&(this.zone=this.visualData.zone,this.setPosition(this.visualData.id),this.alpha=this.visualData.alpha,void 0!=this.visualData.efficiencyBarAlpha&&(this.efficiencyBar.alpha=this.visualData.efficiencyBarAlpha),this.efficiencyBar.progress=this.visualData.progress,
this.state=this.visualData.state,this.efficiency=this.visualData.efficiency,this.loadAnimations(),this.animation.loadState(this.visualData.visualData))};a.loadAnimations=function(){var a=200,b=150,f=250;PlatformShim.ISLOWRES&&(a=107,b=80,f=133);var g=CanvasManager.globalScale;0===this.id?this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontFemale1),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleTypingBack1),1):1===this.id?this.animation=
0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackMale2),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleTypingBack1),1):2===this.id?this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackFemale2),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndOperator1),1):3===this.id?this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackMale1),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndActor1),
1):4===this.id?0===this.zone?(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontMale2),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-552/VisualsManager.Divisor*g,this.y-746/VisualsManager.Divisor*g,b,f,ResourceKeys.hwDesk2)}):this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleBoardBack1),1):5===this.id?0===this.zone?(this.animation=new CompositeBitmapAnimation,
this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontMale3),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-998/VisualsManager.Divisor*g,this.y-486/VisualsManager.Divisor*g,b,f,ResourceKeys.hwDesk1)}):this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleTableBack1),1):6===this.id?0===this.zone?this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackFemale3),1):(this.animation=new CompositeBitmapAnimation,
this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleFrontTable1_pants),1)),this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleFrontTable1_body),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-735/VisualsManager.Divisor*g,this.y-600/VisualsManager.Divisor*g,a,a,ResourceKeys.rndDesk1)}):7===this.id?this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackFemale4),
1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleTableBack1),1):8===this.id?0===this.zone?(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontFemale2),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-552/VisualsManager.Divisor*g,this.y-746/VisualsManager.Divisor*g,b,f,ResourceKeys.hwDesk2)}):this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleTableBack2),
1):9===this.id?0===this.zone?(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontMale4),1)),this.animation.overlay={deskImage:this.getSubImage(this.x-552/VisualsManager.Divisor*g,this.y-746/VisualsManager.Divisor*g,b,f,ResourceKeys.hwDesk2)}):(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleTableFront1_pants),1)),this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndFemaleTableFront1_body),
1)),this.animation.overlay={deskImage:this.getSubImage(this.x-1043/VisualsManager.Divisor*g,this.y-765/VisualsManager.Divisor*g,a,a,ResourceKeys.rndDesk2)}):10===this.id?0===this.zone?this.animation=new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwFrontFemale4),1):(this.animation=new CompositeBitmapAnimation,this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleFrontTable2_pants),1)),this.animation.addAnimation(new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleFrontTable2_body),
1)),this.animation.overlay={deskImage:this.getSubImage(this.x-1043/VisualsManager.Divisor*g,this.y-765/VisualsManager.Divisor*g,a,a,ResourceKeys.rndDesk2)}):this.animation=0===this.zone?new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.hwBackFemale1),1):new BitmapAnimationX(new SpriteSheetX(AnimationSpriteSheets.rndMaleBoardFront1),1);this.animation.gotoAndPlay("loop");this.animation.setAlpha(1);this.addChild(this.animation)};a.getSubImage=function(a,b,f,g,k){var l=document.createElement("canvas");
l.width=f;l.height=g;l.getContext("2d").drawImage(GameDev.ResourceManager.resources[k],-a/CanvasManager.globalScale,-b/CanvasManager.globalScale);a=new Image;a.src=l.toDataURL("image/png");return a};a.setPosition=function(a){this.id=a;0===this.zone?this.setHwLabPosition():this.setRndLabPosition()};a.setHwLabPosition=function(){var a=CanvasManager.globalScale;0===this.id?(this.x=1860*a,this.y=920*a):1===this.id?(this.x=1720*a,this.y=940*a):2===this.id?(this.x=1400*a,this.y=820*a):3===this.id?(this.x=
770*a,this.y=850*a):4===this.id?(this.x=1300*a,this.y=980*a):5===this.id?(this.x=1240*a,this.y=530*a):6===this.id?(this.x=1100*a,this.y=640*a):7===this.id?(this.x=1100*a,this.y=1040*a):8===this.id?(this.x=800*a,this.y=670*a):9===this.id?(this.x=1100*a,this.y=850*a):10===this.id?(this.x=1788*a,this.y=850*a):(this.x=2100*a,this.y=1102*a);this.x/=VisualsManager.Divisor;this.y/=VisualsManager.Divisor};a.setRndLabPosition=function(){var a=CanvasManager.globalScale;0===this.id?(this.x=820*a,this.y=420*
a):1===this.id?(this.x=420*a,this.y=420*a):2===this.id?(this.x=1620*a,this.y=900*a):3===this.id?(this.x=1830*a,this.y=770*a):4===this.id?(this.x=1520*a,this.y=510*a):5===this.id?(this.x=1080*a,this.y=955*a):11===this.id?(this.x=1250*a,this.y=470*a):6===this.id?(this.x=960*a,this.y=560*a):7===this.id?(this.x=1370*a,this.y=790*a):8===this.id?(this.x=810*a,this.y=800*a):9===this.id?(this.x=1100*a,this.y=790*a):10===this.id&&(this.x=1258*a,this.y=700*a);this.x/=VisualsManager.Divisor;this.y/=VisualsManager.Divisor};
a.tick=function(){this.lastUpdate||(this.lastUpdate=GameManager.gameTime);var a=GameManager.gameTime-this.lastUpdate;if(!(0>=a)){var b=this.getAffordanceFactor();1>b&&(b*=2);b*=a/22E3;this.efficiency=(this.efficiency+b).clamp(0,1);this.animation.speedFactor!=this.efficiency&&(this.animation.speedFactor=this.efficiency);0<this.efficiency&&1>this.alpha&&(this.alpha+=0.02,0.9<this.alpha&&(2===this.zone?0===this.id?VisualsManager.levelOverlay.startRndPrinterRightScreen():1===this.id?VisualsManager.levelOverlay.startRndPrinterLeftScreen():
2===this.id&&VisualsManager.levelOverlay.startPrinter():0===this.zone&&(0===this.id?VisualsManager.levelOverlay.starthwLabTV():2===this.id&&VisualsManager.levelOverlay.startHwLabScreenWall())));0===this.efficiency&&0<this.alpha&&(this.alpha-=0.02,0.9>this.alpha&&(2===this.zone?0===this.id?VisualsManager.levelOverlay.stopRndPrinterRightScreen():1===this.id?VisualsManager.levelOverlay.stopRndPrinterLeftScreen():2===this.id&&VisualsManager.levelOverlay.stopPrinter():0===this.zone&&(0===this.id?VisualsManager.levelOverlay.stophwLabTV():
2===this.id&&VisualsManager.levelOverlay.stopHwLabScreenWall())));1!=this.efficiency?(this.efficiencyBar.progress=this.efficiency,this.efficiencyBar.color=createjs.Graphics.getHSL(80*this.efficiency,100,50),this.efficiencyBar.alpha=(this.efficiencyBar.alpha+0.01).clamp(0,0.8)):0!=this.efficiencyBar.alpha&&(this.efficiencyBar.alpha=(this.efficiencyBar.alpha-0.01).clamp(0,1));this._doWork(a);this.lastUpdate=GameManager.gameTime}};a._doWork=function(a){var b;b=a/1E3*1*this.efficiency;a=this.getCurrentProject();
var f=GameManager.company.licencedPlatforms.filter(function(a){return!0===a.isCustom&&0<a.maintenancePoints&&1E6*a.unitsSold*Sales.consoleUnitPrice>a.currentSalesCash});a||0!==f.length&&2!==this.zone||(b/=7);this.state.progressF+=b;b=Math.floor(this.state.progressF);0<b&&(this.state.progressF-=b);for(var g=0;g<b;g++){var k=a&&0<a.remainingPoints;if(0===this.zone&&0<f.length)for(var l=f.length-1;0<=l;l--)if(0<f[l].maintenancePoints){f[l].maintenancePoints--;f[l].repairPoints++;0===f[l].maintenancePoints&&
f[l].unitsSold===Math.floor(f[l].currentSalesCash/Sales.consoleUnitPrice)?UI.removeMaintenanceCard(f[l]):(UI.updateRepairPoints(f[l]),UI.updateMaintenanceCard(f[l]));this._spawnPoint("t");return}k&&(a.remainingPoints--,k=a.startPoints-a.remainingPoints,a.progress=0==k?0:k/a.startPoints,0>=a.remainingPoints&&GameManager.finishProject(a));var h;2==this.zone?(h=a?"d":"r","r"===h&&(GameManager.company.researchPoints++,VisualsManager.pulsePointsDisplay(h),VisualsManager.updatePoints()),a&&a.id===Research.AAAMarketingCampaign.id&&
(GameManager.company.currentGame?GameManager.company.currentGame.hypePoints+=100/a.startPoints:GameManager.finishProject(a))):0===this.zone&&(h="t",a&&a.id===Research.AAACustomHardware.id&&(GameManager.company.currentGame?GameManager.company.currentGame.hypePoints+=50/a.startPoints:GameManager.finishProject(a)));this._spawnPoint(h)}};var b=new MersenneTwister(0);a._spawnPoint=function(a){var d=new createjs.Shape;d.alpha=0;d.x=20*b.random()*b.randomSign();d.y=-20*b.random();d.regX=5;d.regY=5;d.scaleX=
0;d.scaleY=0;var f="t"===a||"e"===a?TECHNOLOGY_POINTS_COLOR:"d"===a?DESIGN_POINTS_COLOR:"b"===a?BUGS_COLOR:RESEARCH_POINTS_COLOR;this.zone==GameManager.company.flags.currentZone&&Sound.playSpawnSound(a);a=d.graphics;a.beginFill(f);a.beginStroke("black");a.setStrokeStyle(0.5);a.drawCircle(5,5,10);a.closePath();this.addChild(d);var g=this,f=[];f.push(createjs.Tween.get(d).to({y:-80-60*b.random()},600,createjs.Ease.backIn));f.push(createjs.Tween.get(d).to({alpha:1},150).wait(300).to({alpha:0},150).call(function(){g.removeChild(d)}));
f.push(createjs.Tween.get(d).to({scaleX:1,scaleY:1},300,createjs.Ease.backOut))}})();IsometricCompanyNameVisual=function(){createjs.Container.apply(this,arguments)};
(function(){IsometricCompanyNameVisual.prototype=new createjs.Container;IsometricCompanyNameVisual.prototype.updateVisual=function(a){this.removeAllChildren();var b=GameManager.company.name,c=VisualsManager.toScreenCoordinates(600,CanvasManager.globalScaleIgnoringLowResBackground),d=54;do var f="{0}pt {1}".format(d,"Calibri"),f=new createjs.Text(b,f,"black"),d=d-2;while(f.getMeasuredWidth()>c&&10<d);for(var c=d/32,d=a?1:5,g=0;g<d;g++)f=createjs.Graphics.getHSL(0,0,0==g?70:60/g),a&&(f=createjs.Graphics.getHSL(0,
0,41)),f=new createjs.Text(b,"32pt {0}".format("Calibri"),f),f.textAlign="center",f.textBaseline="alphabetical",f.x+=1*g,f.y-=1*g,this.addChildAt(f,0);this.skewY=30;this.scaleX=c*CanvasManager.globalScale;this.scaleY=c*CanvasManager.globalScale;this.alpha=a?0.8:1}})();
var HypePointsVisual=function(){this.initialize();this.width=150;this.height=30;this.border=new createjs.Shape;this.addChild(this.border);this.text=new createjs.Text("Hype 400","14pt Segoe UI","white");this.text.textAlign="center";this.text.textBaseline="middle";this.text.x=this.width/2;this.text.y=this.height/2-2;this.text.maxWidth=this.width-10;this.addChild(this.text);this._redraw()};
(function(){var a=HypePointsVisual;a.prototype=new createjs.Container;a=a.prototype;a.updateText=function(a){this.text.text=a};a._redraw=function(){var a=this.width,c=this.height,d=this.border.graphics;d.clear();var f=createjs.Graphics.getRGB(204,0,51,0.7);d.beginFill(f);d.setStrokeStyle(2);d.beginStroke("black");d.drawRoundRect(0,0,a,c,2);d.closePath()}})();
var CircularProgressVisual=function(){this.maxValue=this.angleArc=360;this.minValue=0;this.bgColor="red";this.fgColor="blue";this.radius=20;this.lineWidth=10;this.updateValue(0);this.startAngle=1.5*Math.PI;createjs.Shape.apply(this,arguments)};
(function(){CircularProgressVisual.prototype=new createjs.Shape;var a=CircularProgressVisual.prototype;a.onTick=function(){this.invalid&&(this._redraw(),this.invalid=!1)};a.invalidate=function(){this.invalid=!0};a.updateValue=function(a){this.value=a;this.endAngle=0===a||360===a?this.startAngle:(this.value-90)/180*Math.PI};var b=2*Math.PI;a._redraw=function(){var a=this.graphics;a.clear();a.setStrokeStyle(this.lineWidth);this.bgColor&&(a.beginStroke(this.bgColor),a.arc(this.radius,this.radius,this.radius,
0,b));a.beginStroke(this.fgColor);a.arc(this.radius,this.radius,this.radius,this.startAngle,this.endAngle)}})();var TopicsSerializer={};(function(){TopicsSerializer.load=function(a){return Topics.topics.first(function(b){return b.id===a.id})};TopicsSerializer.save=function(a){var b={};b.id=a.id;return b}})();var EnginePartsSerializer={};
(function(){EnginePartsSerializer.load=function(a){return Research.getAllItems().first(function(b){return b.id===a.id})};EnginePartsSerializer.save=function(a){var b={};b.id=a.id;return b}})();var EngineSerializer={};
(function(){EngineSerializer.load=function(a){var b={};$.extend(b,a);b.parts=a.parts.map(function(a){return EnginePartsSerializer.load(a)}).filter(function(a){return a});return b};EngineSerializer.save=function(a){var b={};$.extend(b,a);b.parts=a.parts.map(function(a){return EnginePartsSerializer.save(a)});return b}})();var FeatureSerializer={};
(function(){FeatureSerializer.load=function(a){var b=Research.getAllItems().first(function(b){return b.id===a.id});if(b)return void 0!=a.experience&&(b.experience=a.experience),b};FeatureSerializer.save=function(a){var b={};b.id=a.id;void 0!=a.experience&&(b.experience=a.experience);return b}})();var PlatformsSerializer={};
(function(){PlatformsSerializer.load=function(a){return a.isCustom?a:Platforms.allPlatforms.first(function(b){return b.id===a.id})};PlatformsSerializer.save=function(a){if(a.isCustom)return a;var b={};b.id=a.id;return b}})();var CompanyFeatureSerializer={};
(function(){CompanyFeatureSerializer.load=function(a){var b={};b.id=a.id;b.lastUpdate=a.lastUpdate;b.progress=a.progress;b.type=a.type;a.missionType&&(b.missionType=a.missionType);a.duration&&(b.duration=a.duration);return b};CompanyFeatureSerializer.save=function(a){var b={};b.id=a.id;b.lastUpdate=a.lastUpdate;b.progress=a.progress;b.type=a.type;a.missionType&&(b.missionType=a.missionType);a.duration&&(b.duration=a.duration);return b}})();var SpawnedPointsSerializer={};
(function(){SpawnedPointsSerializer.load=function(a){var b={};b.duration=a.duration;b.id=a.id;b.type=a.type;b.gameTime=a.gameTime;b.delay=a.delay;return b};SpawnedPointsSerializer.save=function(a){var b={};b.duration=a.duration;b.id=a.id;b.type=a.type;b.gameTime=a.gameTime;b.delay=a.delay;return b}})();var LevelCalculator={};
(function(){var a=LevelCalculator,b=[350,900,1600,2400,3400,4400,5500,7E3,9500,14E3,2E4,36E3,6E4,1E5];a.getEnginePartLevel=function(a,b){return this.getLevel(this.getFeatureExperience(a,b))};a.getFeatureExperience=function(a,b){return Research.getAllItems().first(function(a){return a.id===b}).experience};a.getFeatureLevel=function(a,b){var f;try{f=this.getLevel(this.getFeatureExperience(a,b))}catch(g){f=0}return f};a.getMissionLevel=function(a){a=a.id?a:Missions.getMissionWithId(a);return this.getLevel(a.experience)};
a.getLevelBonusFactor=function(b){b=a.getLevel(b);return 1===b?1:1+(b-1)/10*0.5};a.getXpForLevel=function(a){var d=Math.floor(a),f=a-d,g=1==d?0:b.length<a?b.last():b[a-2];5>a&&0!=f&&(g+=(1==d+1?0:b.length<a?b.last():b[a-2])*f);return g};a.getLevel=function(a){if(GameFlags.ghg6&&void 0===a)throw"no experience provided";var d=b.last(function(b){return a>=b}),d=b.indexOf(d);return-1==d?1:d+2};a.getLevelFractional=function(b){var d=a.getLevel(b);b=a.getProgressToNextLevel(b);return d+b/100};a.getProgressToNextLevel=
function(b){var d=a.getXpToNextLevel(b),f=a.getLevel(b),f=a.getXpForLevel(f);return 0==d-f?0:(b-f)/(d-f)*100};a.getProgressToLevel=function(b,d){var f=a.getXpForLevel(b),g=0;1<b&&(g=a.getXpForLevel(b-1));return((d-g)/(f-g)*100).clamp(0,100)};a.getXpToNextLevel=function(c){c=a.getLevel(c);return b.length<=c?b.last():b[c-1]}})();var UpdateNotifications={};
(function(){var a=UpdateNotifications;a.showFullGameIsAvailable=function(){var a=$("#fullGameAvailable");a.find(".okButton").clickExcl(function(){var a=DataStore.getValue("full-game-uri");if(PlatformShim.ISWIN8){var b=new Windows.Foundation.Uri(a);Windows.System.Launcher.launchUriAsync(b).then(function(b){b?ghg4.ghg5("navigate-to-full-game",{url:a,success:!0}):(ghg4.ghg5("navigate-to-full-game",{url:a,success:!1}),Windows.UI.Popups.MessageDialog("It seems that something went wrong when trying to go to the Store page for the full app.\nPlease try again and if the issue persists please contact support@greenheartgames.com or search for Game Dev Tycoon manually on the Windows Store.",
"Store Error").showAsync())})}else PlatformShim.openUrlExternal(a)});ghg4.ghg5("showing full game available message");a.gdDialog({zIndex:7500,popout:!0,close:!0})};a.checkAndShowNotifications=function(){if(!Steam){var a=GameManager.getSaveGames();if(!a||!a.length)DataStore.setValue("shown-udate-notification-v1",!0);else if(!DataStore.getValue("shown-udate-notification-v1")){var c=$("#appUpdateNotificationV1");c.find(".okButton").clickExclOnce(function(){DataStore.setValue("shown-udate-notification-v1",
!0);c.dialog("close")});c.gdDialog({zIndex:7500})}}}})();var SavegameMigrator={};
(function(){function a(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(-0.5*a*d+3*d*d+-3.5*a+2*d)}function b(a,b,c,d){a=a(d,0,1,1);return b+(c-b)*a}SavegameMigrator.migrate=function(a){if(GameManager.VERSION==a.version)return a;if(1==a.version){var b=new Company(a.company.name);b.currentLevel=1;a.company=$.extend(!0,b,a.company);for(b=0;b<a.company.gameLog.length;b++)for(var n=a.company.gameLog[b],p=0;p<n.missionLog.length;p++)"finishing"===n.missionLog[p]&&(n.missionLog[p]="BugFixing");b=a.company.staff[0];
b.id=0;b.name=PlatformShim.getUserName();a.company.currentGame&&(a.company.currentGame.bugs=0);$.extend(a.uiSettings,UI.createDefaultUISettings());a.currentHwProject||(a.currentHwProject=[]);a.currentRnDProject||(a.currentRnDProject=[]);a.currentResearches||(a.currentResearches=[],a.currentResearch&&(a.currentResearch.staffId=a.company.staff[0].id,a.currentResearches.push(a.currentResearch),a.currentResearch=null));isNaN(a.company.cash)&&(a.company.cash=0);a.company.activeNotifications.insertAt(0,
{header:"Warning",text:"This savegame has been imported from a preview version of Game Dev Tycoon. You can try to continue this game but we *strongly recommend* that you start a new game. We have made many changes to the game since the first preview and you might run into issues if you continue this save game."});c(a,1,2);a.version=2}2==a.version&&(a=d(a));3==a.version&&(a.flags.gameLengthModifier=1,c(a,3,4),a.version=4);4==a.version&&(!PlatformShim.ISWIN8&&a.company&&(b=a.company.activeNotifications)&&
0<b.length&&"{SupportGreenheartGames}"===b[0].header&&b.splice(0,1),c(a,4,5),a.version=5);if(5==a.version){f(a,"mBox Next","mBox One");if(b=a.company.scheduledStoriesShown)for(n=0;n<b.length;n++)"mboxNext"==b[n]&&(b[n]="mboxOne");n=a.company.gameLog;for(b=0;b<n.length;b++)g(n[b]);n=a.company.trashedGames;for(b=0;b<n.length;b++)g(n[b]);(b=a.company.currentGame)&&g(b);k(a);l(a);a.company.activeNotifications.insertAt(0,{header:"Updated Version",text:"This save game has been imported from an older version of Game Dev Tycoon. We have re-balanced the game, added new consoles, increased the story-line (runs for 35 years) and added a couple of new features. You should be able to continue this save game without issues but if you want to get the full re-worked experience, please consider starting a new game."});
c(a,5,6);a.version=6}if(6==a.version){if(a.company&&a.company.licencedPlatforms)for(b=0;b<a.company.licencedPlatforms.length;b++)n=a.company.licencedPlatforms[b],n.isCustom&&(n.genreWeightings=n.ghg7,delete n.ghg7,n.audienceWeightings=n.ghg8,delete n.ghg8);c(a,6,7);a.version=7}if(a.version!=GameManager.VERSION)throw"unable to load game - could not upgrade to latest file version";return a};var c=function(a,b,c){var d=PlatformShim.getVersion();GameFlags.ghg6&&(d+=";GameFlags.DEBUG");a.upgradeHistory||
(a.upgradeHistory=[]);a.upgradeHistory.push({from:b,to:c,"is-win-8-version":PlatformShim.ISWIN8,"app-version":d,date:(new Date).toISOString()})},d=function(d){if(d.currentHwProject&&0===d.currentHwProject.pointsCost){var f;f=1E7+d.currentHwProject.features.sum(function(a){return 100*Research.getEngineCost(General.getFeature(a))});var g=b(a,1,20,d.currentHwProject.qF),g=Math.floor(g);f+=1E6*g;d.company.cash+=f;d.company.cashLog.push({amount:f,label:d.currentHwProject.name+" refund"});d.currentHwProject=
void 0;d.company.activeNotifications.insertAt(0,{header:"Warning",text:"We have identified that a console project in this save game was not making any progress. This was caused by a bug in the previous version. We have fixed this bug in the version you are running now but you will need to start a new console project. The costs for the old project have been refunded."})}f=d.company.activeNotifications.filter(function(a){return"{Training}"===a.header||"{Research}"===a.header});for(g=0;g<f.length;g++)d.company.activeNotifications.remove(f[g]);
if(f=d.company.activeNotifications.concat(d.company.notifications).first(function(a){return"airCon1Callback"===a.sourceId}))d.company.activeNotifications.first(function(a){return"airCon1Callback"===a.sourceId})?d.company.activeNotifications.remove(f):d.company.notifications.remove(f),isNan(f.weeksUntilFired)&&(f.weeksUntilFired=0),d.company.flags.airCon1=!0,d.company.flags.airCon1Declined=d.company.currentWeek+f.weeksUntilFired,f=void 0;else if(f=d.company.activeNotifications.concat(d.company.notifications).first(function(a){return"airCon2Callback"===
a.sourceId}))d.company.activeNotifications.first(function(a){return"airCon2Callback"===a.sourceId})?d.company.activeNotifications.remove(f):d.company.notifications.remove(f),isNan(f.weeksUntilFired)&&(f.weeksUntilFired=0),d.company.flags.airCon2=!0,d.company.flags.airCon2Declined=d.company.currentWeek+f.weeksUntilFired,f=void 0;c(d,2,3);d.version=3;return d},f=function(a,b,c){a=a.company;var d=a.flags,f=function(a){if(a)for(var d=0;d<a.length;d++)a[d]&&(a[d]==b?a[d]=c:a[d].id==b?a[d].id=c:a[d].platform==
b&&(a[d].platform=c))};d&&d.contractspublisher&&f(d.contractspublisher.platforms);f(a.licencedPlatforms);f(a.availablePlatforms);f(a.gameLog)},g=function(a){a.platforms=[];a.platforms.push({id:a.platform});a.platform=void 0},k=function(a){var b=["Mouse","Joystick","Controller","Steering Wheel"],c=a.company.researchCompleted.count(function(a){return b.first(function(b){return a==b})});1<=c&&a.company.researchCompleted.push(Research.GameTutorials.id);2<=c&&a.company.researchCompleted.push(Research.BetterUI.id);
a.company.researchCompleted.push(Research.mono.id)},l=function(a){a.company.gameLog.concat(a.company.trashedGames).forEach(function(a){"Startups"==a.topic&&(a.topic="Business")});a.company.currentGame&&a.company.currentGame.topic&&"Startups"==a.company.currentGame.topic&&(a.company.currentGame.topic="Business");var b=a.company.topics.first(function(a){return"Startups"==a.id});b&&(a.company.topics.splice(a.company.topics.indexOf(b),1),a.company.topics.some(function(a){return"Business"==a.id})?a.company.researchPoints+=
10:a.company.topics.push({id:"Business"}));a.company.flags.contractspublisher&&(b=function(a){if(a)for(var b=0;b<a.length;b++)"Startups"==a[b]&&(a[b]="Business")},b(a.company.flags.contractspublisher.topics),b(a.company.flags.contractspublisher.researchedTopics))}})();var SupportPacks={};
(function(){var a=SupportPacks,b;a.getPacks=function(a){b?a(b):GameManager.ghg3().loadListingInformationAsync().done(function(d){b=d;a(b)},function(a){})};a.hasBought=function(a){return GameManager.ghg3().licenseInformation.productLicenses.lookup(a)};a.buy=function(b,d){GameManager.ghg3().requestProductPurchaseAsync(b,!0).done(function(f){f&&(a.hasBought(b)?(ghg4.ghg5("feature purchased",{id:b}),Achievements.activate(Achievements.supporter2),GameManager.checkAchievements(),d&&d()):(ghg4.ghg5("feature purchase unsuccessful"),
Windows.UI.Popups.MessageDialog("It seems that something went wrong when purchasing this feature pack.\nPlease close the app and try again later.\n If the issue persists please contact\n\nsupport@greenheartgames.com","purchase not validated").showAsync()))},function(a){Windows.UI.Popups.MessageDialog("It seems that something went wrong when trying to purchase this feature pack.\nPlease close the app and try again later.\n If the issue persists please contact\n\nsupport@greenheartgames.com","Store Error").showAsync()})}})();
var ghg4={};ANALYTICS_ENABLED=!1;
(function(){var a=ghg4,b;a.init=function(){if(ANALYTICS_ENABLED){PlatformShim.ISWIN8&&GameManager.ghg3().licenseInformation.addEventListener("licensechanged",function(){});try{b=LocalyticsSession(PlatformShim.ISWIN8?"a81d66cf7ac434d5db026f5-02cfbbe2-3c4e-11e2-685f-00ef75f32667":GameFlags.ghg7?"41c2fa766702efda9d050cf-4cbeae62-ac6f-11e2-8796-005cf8cbabd8":GameFlags.G782?"9c7a8f4b73c5b371e62dd52-6f5ec11e-ac6f-11e2-8798-005cf8cbabd8":"81926045ae9a704f220ff42-cadd95fa-d7af-11e2-0f20-004a77f8b47f",{polling:!1}),
b.open(),b.upload(),a.ghg5("system-info",{platform:navigator.platform,cpuClass:navigator.cpuClass,userLanguage:navigator.userLanguage,"is-steam":GameFlags.IS_STEAM}),document.addEventListener("visibilitychange",function(a){try{var c=document.visibilityState;"visible"==c?(b.open(),b.upload()):"hidden"==c&&(b.close(),b.upload())}catch(g){}},!1)}catch(c){}$(document).on("click","a",function(a){try{if(a&&a.srcElement){var b=$(a.srcElement).attr("href");"#"!=b&&(PlatformShim.ISWIN8||(PlatformShim.openUrlExternal(b),
a.preventDefault()),ghg4.ghg5("clicked link",{href:b}))}}catch(c){}})}};a.ghg5=function(a,d){if(ANALYTICS_ENABLED)try{b.tagEvent(a,d)}catch(f){}}})();var UpdateChecker={};
(function(){function a(a){if("string"!=typeof a)return null;var b=a.split(".");a=parseInt(b[0]);var c=parseInt(b[1]),b=parseInt(b[2]);return isNaN(a)||isNaN(c)||isNaN(b)?null:{major:a,minor:c,patch:b}}var b=UpdateChecker;b.VERSION="1.5.11";b.checkForUpdate=function(){if(!GameFlags.IS_STEAM){try{var b=a("1.5.11")}catch(f){b=null}if(b){try{require("nw.gui").App.clearCache()}catch(g){}var k=navigator.platform;if(k=k.startsWith("Win")?"win":k.startsWith("Mac")?"mac":k.startsWith("linux")?"linux":null){var l=
"http://www.greenheartgames.com/utils/releases/gdt/lite/"+k;GameFlags.ghg7||(l="http://www.greenheartgames.com/utils/releases/gdt/"+k);$.get(l,function(f){if(-1!=f.indexOf(";")){f=f.split(";");try{var g=a(f[0])}catch(k){g=null}g&&g&&b&&(g.major>b.major||g.major==b.major&&(g.minor>b.minor||g.minor==b.minor&&g.patch>b.patch))&&c(f[1])}})}else ghg4.ghg5("check-update-error",{msg:"unknown platform"})}else PlatformShim.alert("version not valid: 1.5.11")}};var c=function(a){var b=$("#upateNotificationWindow");
b.find(".updateButton").clickExclOnce(function(){Sound.click();PlatformShim.openUrlExternal(a);b.dialog("close")});b.gdDialog({zIndex:15E3,popout:!0,close:!0})};b.checkForUpdate()})();
if(GameFlags.IS_STEAM&&Steam&&Steam.isAvailable()){var Greenworks={};(function(){function a(a,b){b?setTimeout(function(){$("#greenworksLoadingProgress").html(a)},b):$("#greenworksLoadingProgress").html(a)}function b(b,c){a(b);console.log(b);!0===c&&t()}function c(a){var c=[];if("undefined"==typeof C)return c;for(var d=C.readdirSync(a),f=0;f<d.length;f++){var g=d[f];0<=g.lastIndexOf("/")&&g.substring(g.lastIndexOf("/")+1);g=x?x.resolve(a+"/"+g):a+"/"+g;try{C.statSync(g).isFile()||c.push(g)}catch(h){b(h,
!1)}}return c}function d(a,b){if(b){var c=x?x.resolve(a+"/package.json"):a+"/package.json";return C.writeFileSync(c,JSON.stringify(b,null,4))}}function f(a){a=a.replaceAll("\\","/");return a.substr(a.lastIndexOf("/")+1)}function g(a){a=f(a);return 0<=a.lastIndexOf(".")?a.substr(0,a.lastIndexOf(".")):a}function k(a){var b=x?x.resolve(a):a;return 0<=b.lastIndexOf("/")?a.substr(b.lastIndexOf("/")+1):a.substr(b.lastIndexOf("\\")+1)}function l(a){"file:///"!=a.substring(0,8)&&(a="file:///"+a);return a}
function h(a){v.onGoing=!0;if(C.existsSync(a)){C.readdirSync(a).forEach(function(c,d){v.onGoing=!0;var f=a+"/"+c;C.lstatSync(f).isDirectory()?h(f):C.unlinkSync(f,function(a){a&&b(a,!1)})});var c=0,d=function(f){try{v.onGoing=!0,C.rmdirSync(f)}catch(g){v.onGoing=!0,C.rmdir(f,function(g){if(g){if(("EBUSY"===g.code||"ENOTEMPTY"===g.code)&&c<B)return c++,setTimeout(function(){d(a)},1E3);"EBUSY"===g.code||"ENOTEMPTY"===g.code?console.log("Warning: Could not remove the folder "+f+", because it is currently locked by GDT. Don't worry, this folder will be deleted on the next start. You can ignore this warning."):
b(g,!1)}})}};a!==F&&d(a)}}function m(a){C.existsSync(a)&&C.unlink(a,function(a){a&&b(a,!1)})}function n(b,d){if(d>=b.length)t();else{v.onGoing=!0;var l=b[d],m=A+"/"+f(l.fileName);C.existsSync(m)||(D.push(l),n(d+1));var p=g(m),q=x?x.join(F,p):F+"/"+p;C.existsSync(q)||mkdirP.sync(q);a("Preparing "+b[d].title+" "+Math.round((d+1)/b.length/2*100+50)+"%");G.Utils.extractArchive(m,q,"",function(){v.onGoing=!0;var a=H;v.onGoing=!0;var f=c(q),f=k(f[0]),l=x?x.join(q,f):q+"/"+f,p=x?x.join(a,f):a+"/"+f,p=g(m),
p=p.substr(0,p.indexOf("_")),p=f.substr(0,p.length+1)!=p+"_"?x?x.join(a,p+"_"+f):a+"/"+p+"_"+f:x?x.join(a,f):a+"/"+f;(b[d].hasChanged||b[d].isNew)&&h(p);G.Utils.move(l,p);n(b,d+1)},function(a){v.onGoing=!0;D.push(l);n(b,d+1)})}}function p(a){var b=[];a&&a.items&&(b=a.items);if(a=b){for(var d=c(H+"/"),l=[],p="",q=0;q<d.length;q++){p=k(d[q]);if(0<a.length)for(var r=0;r<a.length;r++)if(g(a[r].fileName).toLowerCase()==p.toLowerCase()){p="";break}0<p.length&&l.push(f(p))}a=l}else a=[];if(0<a.length)for(l=
l="",d=0;d<a.length;d++){v.onGoing=!0;l=A+"/"+a[d]+".zip";m(l);if(l=v.readPackageJsonAsObject(H+"/"+a[d]))ModSupport.disableMod({id:l.id,active:!0}),DataStore.commit&&DataStore.commit();l=H+"/"+a[d];l=x?x.resolve(l):l;h(l)}0<b.length?n(b,0):t()}function q(a){b(a,!0)}function s(b){var c="";b&&(b.reason&&(c+="("+b.reason+") "),c+=b.value&&"undefined"!=b.value?Math.round(b.value/2)+"%":"0%");a(c);v.onGoing=!0}function t(){if(!v.skipped&&!v.finished){ModSupport.init();v.onGoing=!0;if(0<D.length){for(var a=
"The following workshop mods could not be found, extracted or loaded:".localize()+"<br><br>",b=0;b<D.length;b++)a+=D[b].title+"<br>"+D[b].fileName+"<br><br>";CustomAlert.warn(a)}v.finished=!0;$("#greenworksLoading").remove();h(F)}}function r(){try{v.onGoing=!0,C.existsSync(A)||mkdirP.sync(A),C.existsSync(H)||mkdirP.sync(H),C.existsSync(F)||mkdirP.sync(F)}catch(a){b(a,!1)}}function u(a,b,c,d){var f=l(a),h=g(a),k=new Image;k.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");
a.width=120;a.height=120;f.fillStyle="#000000";f.globalAlpha=0;f.fillRect(0,0,120,120);f.globalAlpha=1;var g=document.createElement("canvas"),l=g.getContext("2d");g.width=this.width;g.height=this.height;var m=this.height/this.width*120;l.drawImage(k,0,0);z(g,this.width,this.height,120,m);f.drawImage(g,0.5*a.width-0.5*g.width,0.5*a.height-0.5*g.height);var a=a.toDataURL("image/png"),a=a.replace("data:image/png;base64,",""),a=new Buffer(a,"base64"),n=b+"/"+h+"-Thumbnail.png";C.writeFile(n,a,function(a){a?
d&&d(a):c&&c(n)})};k.src=f}function z(a,b,c,d,f){Date.now();for(var g=a.getContext("2d").getImageData(0,0,b,c),h=a.getContext("2d").getImageData(0,0,d,f),g=g.data,k=h.data,l=b/d,m=c/f,n=Math.ceil(l/2),p=Math.ceil(m/2),q=0;q<f;q++)for(var r=0;r<d;r++){for(var s=4*(r+q*d),t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=(q+0.5)*m,B=Math.floor(q*m);B<(q+1)*m;B++)for(var D=(r+0.5)*l,C=Math.abs(A-(B+0.5))/p,C=C*C,F=Math.floor(r*l);F<(r+1)*l;F++){var E=Math.abs(D-(F+0.5))/n,t=Math.sqrt(C+E*E);-1<=t&&1>=t&&(t=2*t*t*t-3*t*
t+1,0<t&&(E=4*(F+B*b),z+=t*g[E+3],v+=t,255>g[E+3]&&(t=t*g[E+3]/250),w+=t*g[E],x+=t*g[E+1],y+=t*g[E+2],u+=t))}k[s]=w/u;k[s+1]=x/u;k[s+2]=y/u;k[s+3]=z/v}a.getContext("2d").clearRect(0,0,Math.max(b,d),Math.max(c,f));a.width=d;a.height=f;a.getContext("2d").putImageData(h,0,0)}function w(a,c,d){a=$.extend({outputFile:"",folder:"",name:"",image:"",desc:""},a);G.Utils.createArchive(a.outputFile,a.folder,"",9,function(){G.ugcPublish(a.outputFile,a.name,a.desc,a.image,function(a){d&&d(a)},function(a){c&&c(a)},
function(a){c&&c("Please wait...".localize())})},function(a){c&&c(e);b(a,!1)})}function y(a,c,d){a=$.extend({name:"",desc:"",image:"",folder:"",publishedFileId:0,outputFile:""},a);var f=function(b){G.ugcPublishUpdate(a.publishedFileId,b,a.name,a.desc,a.image,function(a){d&&d()},function(a){c&&c(a)},function(a){c&&c("Please wait...".localize())})};""!=a.folder.trim()?G.Utils.createArchive(a.outputFile,a.folder,"",9,function(){f(a.outputFile)},function(a){c&&c(a);b(a,!1)}):f("")}var B=10,v=Greenworks,
x=require("path"),E=x?x.dirname(process.execPath):"";-1<E.lastIndexOf("/Contents/Frameworks/node-webkit")&&(E=E.substr(0,E.lastIndexOf("/Contents/Frameworks/node-webkit"))+"/Contents/Resources/app.nw");var A=x?x.resolve(E+"/ugc/"):"./ugc/",H=x?x.resolve(E+"/mods_ws/"):"./mods_ws/",F=x?x.resolve(E+"/temp/"):"./temp/",C=require("fs"),G=Steam.api,D=[];v.extractFilename=function(a,b){return b?g(a):f(a)};v.showOverlay=function(){v.available&&(0<arguments.length?G.ugcShowOverlay(arguments[0]):G.ugcShowOverlay())};
v.createArchiveAndPublish=function(a,c,g){if(v.available){a=$.extend({name:"",desc:"",image:"",folder:"",createImage:!0,updateJson:!0},a);var h=G.getSteamId(),l=k(a.folder),m=""+h.accountId,l=h.isValid?l.substr(0,m.length+1)!=m+"_"?x.join(F,(h.isValid?m+"_":"")+k(a.folder)+".zip"):x.join(F,k(a.folder)+".zip"):x.join(F,+k(a.folder)+".zip"),n=x?x.resolve(l):l,p=x?x.resolve(a.folder):a.folder,q="undefined"!==typeof v.readPackageJsonAsObject(p)?v.readPackageJsonAsObject(p):void 0;a.updateJson=a.updateJson&&
"undefined"!==typeof q;!0===a.updateJson&&(q.name=a.name,q.description=a.desc);r();!0===a.createImage&&a.image&&""!=a.image.trim()?u(a.image,p,function(b){!0===a.updateJson&&(q.image=f(b),d(p,q));w({outputFile:n,folder:p,name:a.name,desc:a.desc,image:a.image},c,g)},function(a){c&&c(e);b(a,!1)}):(!0===a.updateJson&&d(p,q),w({outputFile:n,folder:p,name:a.name,desc:a.desc,image:a.image},c,g))}};v.createArchiveAndPublishUpdate=function(a,c,g){if(v.available){a=$.extend({name:"",desc:"",image:"",pid:"",
folder:"",createImage:!0,updateJson:!0},a);var h=G.getSteamId(),l=""+h.accountId,m="",n="",p="";""!=a.folder.trim()&&(m=k(a.folder),m=h.isValid?m.substr(0,l.length+1)!=l+"_"?x.join(F,(h.isValid?l+"_":"")+k(a.folder)+".zip"):x.join(F,k(a.folder)+".zip"):x.join(F,+k(a.folder)+".zip"),n=x?x.resolve(m):m,p=x?x.resolve(a.folder):a.folder);var q="undefined"!==typeof v.readPackageJsonAsObject(p)?v.readPackageJsonAsObject(p):void 0;a.updateJson=a.updateJson&&"undefined"!==typeof q;!0===a.updateJson&&(q.name=
a.name,q.description=a.desc);r();!0===a.createImage&&""!=a.image.trim()&&""!=a.folder.trim()?u(a.image,p,function(b){!0===a.updateJson&&(q.image=f(b),d(p,q));y({name:a.name,desc:a.desc,image:a.image,folder:p,publishedFileId:a.pid,outputFile:n},c,g)},function(a){c&&c(e);b(a,!1)}):(!0===a.updateJson&&d(p,q),y({name:a.name,desc:a.desc,image:a.image,folder:p,publishedFileId:a.pid,outputFile:n},c,g))}};v.getPublishedItems=function(a){v.available&&G.ugcGetUserItems(0,0,3,function(b){a&&a(b.items)},function(a){},
function(a){})};v.onGoing=!1;v.finished=!1;v.skipped=!1;v.skipVisible=!1;v.skipSync=function(){t();v.skipped=!0};v.checkIfOngoing=function(){if(!v.finished){if(v.onGoing)v.onGoing=!1;else if(!v.skipVisible){var a=$("#skipSyncButton");a&&(a.show().removeClass("hidden").addClass("show"),v.skipVisible=!0)}setTimeout(v.checkIfOngoing,2E3)}};v.synchronize=function(){try{setTimeout(v.checkIfOngoing,2E3),D=[],h(F),r(),v.available?G.ugcSynchronizeItems(A,p,q,s):t()}catch(a){b(a,!0)}};v.unsubscribe=function(a,
b,c){v.available&&G.ugcUnsubscribe(a,function(a){b(a)},function(a){c(a)})};v.readPackageJsonAsObject=function(a){a=x?x.resolve(a+"/package.json"):a+"/package.json";if(C.existsSync(a)){var b=C.readFileSync(a,"utf8"),b=b.replace(/^\uFEFF/,"");try{return JSON.parse(b)}catch(c){b=C.readFileSync(a,"utf16le"),b=b.replace(/^\uFEFF/,"")}try{return JSON.parse(b)}catch(d){b=C.readFileSync(a,"ascii")}try{return JSON.parse(b)}catch(f){console.log("Could not parse JSON at "+a+". The system reported: "+f)}}};v.available=
!1;x&&C&&mkdirP&&G?v.available=G.initAPI():b("Greenworks requirements missing!".localize(),!0)})()};
