Skip to content

Commit

Permalink
Diffecence between effect and load
Browse files Browse the repository at this point in the history
  • Loading branch information
naoxink authored Aug 4, 2017
1 parent 411865e commit 685fbe7
Showing 1 changed file with 51 additions and 29 deletions.
80 changes: 51 additions & 29 deletions js/improvements.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var improvements = {
'help': 'You will be able to start another project at the same time',
'cost': 8000,
'investigationTime': 600000, // 10m
'effect': function(){
'load': function () {
var cloned = document.createElement('button')
cloned.innerText = 'Start project'
cloned.className = 'startProject'
Expand All @@ -13,26 +13,32 @@ var improvements = {
})
Core._('#projects-section').appendChild(cloned)
},
'inProgress': false
'effect': function(){ },
'inProgress': false,
'showing': false
},
'computacionalTech': {
'label': 'Research a new computacional technology',
'help': 'Increase the computer upgrade version up to 20',
'cost': 5000,
'investigationTime': 600000, // 10m
'load': function () {
Core.showImprovementButton('upgradeComputer')
Core.updateHUD()
},
'effect': function(){
Core.base.maxComputerVersion = 20
improvements.upgradeComputer.cost = improvements.upgradeComputer.cost + (Core.base.computerMultiplierCost * (Stats.computerVersion + 1))
Core.showImprovementButton('upgradeComputer')
Core.updateHUD()
},
'inProgress': false
'inProgress': false,
'showing': false
},
'autoStartProjects': {
'label': 'Project managers independency',
'help': 'Project Managers auto start projects',
'cost': 10000,
'investigationTime': 1800000, // 30m,
'load': function () { },
'effect': function(){
if(window.autoStartProjectsInterval){
clearInterval(window.autoStartProjectsInterval)
Expand Down Expand Up @@ -60,92 +66,95 @@ var improvements = {
}
}, 1000)
},
'inProgress': false
'inProgress': false,
'showing': false
},
'autoSaveOnProjectComplete': {
'label': 'Autosave on project complete',
'help': 'Save your stats each time a project is completed',
'cost': 100000,
'investigationTime': 900000, // 15m
'effect': function(){
// Unavailable
},
'inProgress': false
'load': function () { },
'effect': function(){ },
'inProgress': false,
'showing': false
},
'intranetCommandPrompt': {
'label': 'Intranet terminal',
'help': 'Smash your keys without control to get some money. Some people do that, why not you?',
'cost': 500,
'investigationTime': 60000, // 1m
'effect': function(){
'load': function () {
if(Core._('#command-prompt')) return false
terminal.init()
},
'inProgress': false
'effect': function(){ },
'inProgress': false,
'showing': false
},
'renewOffices': {
'label': 'Renew offices look',
'help': 'Renew your offices and create a better working environment to increase effectiveness',
'cost': 500000,
'investigationTime': 3600000, // 1h
'effect': function(){
// Unavailable
},
'inProgress': false
'load': function () { },
'effect': function(){ },
'inProgress': false,
'showing': false
},
'researchNewTorNetwork': {
'label': 'Research a new TOR Network',
'help': '',
'cost': 3000,
'investigationTime': 60000, // 1m
'load': function () { },
'effect': function(){
terminal.stats.torNetworkLevel++
this.cost += this.cost * 0.05 // Linear
this.investigationTime += 60000 // 1m más por cada nivel
Core.showImprovementButton('researchNewTorNetwork')
},
'inProgress': false
'inProgress': false,
'showing': false
},
'upgradeAV': {
'label': 'Upgrade antivirus system',
'help': '',
'cost': 600,
'investigationTime': 180000, // 3m
'load': function () { },
'effect': function(){
terminal.stats.virusDetectionLevel++
this.cost += this.cost * 0.05 // Linear
Core.showImprovementButton('upgradeAV')
},
'inProgress': false
'inProgress': false,
'showing': false
},
'upgradeToolkit': {
'label': 'Upgrade hacking toolkit',
'help': '',
'cost': 0,
'investigationTime': 600000, // 10m
'load': function () { },
'effect': function(){
terminal.stats.toolkitLevel++
this.investigationTime += this.investigationTime * 0.2
Core.showImprovementButton('upgradeToolkit')
},
'inProgress': false
'inProgress': false,
'showing': false
},
'upgradeComputer': {
'label': 'Upgrade computer',
'help': '',
'cost': 0,
'investigationTime': 10000, // 10s
'effect': function(){
var cost = this.cost
'load': function () {
if(Stats.computerVersion <= Core.base.maxComputerVersion){
Stats.computerVersion++
if(Stats.computerVersion === 1 && !Shop.items.devmx300.owned){
Core.showImprovementButton('intranetCommandPrompt')
}
Core.base.moneyIncPerPulse += Core.base.moneyIncPerPulse * (Stats.computerVersion / 100)
Core.base.pulseDuration -= 10
Core.base.projectTimeReductionPercent += 0.3
this.cost = cost + (Core.base.computerMultiplierCost * (Stats.computerVersion + 1))
if(Core.base.maxComputerVersion < Stats.computerVersion + 1){
if(!Core.hasImprovement('computacionalTech')){
Core.showImprovementButton('computacionalTech')
Expand All @@ -157,19 +166,32 @@ var improvements = {
}else{
Core.showImprovementButton('upgradeComputer')
}
Core.updateHUD()
}
},
'effect': function(){
var cost = this.cost
if(Stats.computerVersion <= Core.base.maxComputerVersion){
Stats.computerVersion++
Core.base.moneyIncPerPulse += Core.base.moneyIncPerPulse * (Stats.computerVersion / 100)
Core.base.pulseDuration -= 10
Core.base.projectTimeReductionPercent += 0.3
this.cost = cost + (Core.base.computerMultiplierCost * (Stats.computerVersion + 1))
}
Core.updateHUD()
},
'inProgress': false
'inProgress': false,
'showing': false
},
'personalBussinessWebsite': {
'label': 'Create your own personal bussiness website',
'help': 'Creating this website will help to increase trust with your clients',
'cost': 1000,
'investigationTime': 3600000, // 1h
'load': function () { },
'effect': function(){
Core.base.minOscilatingValue += 5
},
'inProgress': false
'inProgress': false,
'showing': false
},
}

0 comments on commit 685fbe7

Please sign in to comment.