Implement increasing costs.

This commit is contained in:
Kevin Dungs
2014-08-02 15:42:18 +02:00
parent 358238a1f9
commit 92d0435f18
3 changed files with 6 additions and 2 deletions
+2
View File
@@ -62,6 +62,7 @@
item.research = function () {
if (lab.research(this.cost, this.reputation)) {
this.level++;
this.cost = Math.round(this.cost * this.cost_increase);
}
};
});
@@ -78,6 +79,7 @@
worker.hire = function() {
if (lab.buy(this.cost)) {
this.hired++;
this.cost = Math.round(this.cost * this.cost_increase);
}
};
});
+2
View File
@@ -4,6 +4,7 @@
"description": "The W-Boson is the carrier boson of the weak force.",
"reputation": 1,
"cost": 10,
"cost_increase": 1.2,
"histogram": {}
},
{
@@ -11,6 +12,7 @@
"description": "The Higgs-Boson...",
"reputation": 100,
"cost": 1000,
"cost_increase": 1.2,
"histogram": {}
}
]
+2 -2
View File
@@ -3,14 +3,14 @@
"name": "PhD Students",
"description": "Basically slaves, just with fewer rights.",
"cost": 100,
"sell": 80,
"cost_increase": 1.4,
"rate": 1
},
{
"name": "Postdocs",
"description": "Can get shit done for you.",
"cost": 1000,
"sell": 700,
"cost_increase": 1.4,
"rate": 10
}
]