mirror of
https://github.com/wassname/cardsforscience.git
synced 2026-07-19 11:22:03 +08:00
Introducing Reputation-type upgrade
This commit is contained in:
+11
-2
@@ -17,11 +17,14 @@
|
||||
detector: {
|
||||
rate: 1
|
||||
},
|
||||
factor: {
|
||||
rate: 5
|
||||
},
|
||||
data: 0,
|
||||
reputation: 0,
|
||||
money: 0,
|
||||
getGrant: function () {
|
||||
this.money += this.reputation * 5; // TODO: adjust factor
|
||||
this.money += this.reputation * this.factor.rate; // TODO: adjust factor, 5
|
||||
},
|
||||
acquire: function(amount) {
|
||||
this.data += amount;
|
||||
@@ -85,7 +88,10 @@
|
||||
upgrade.getReceiver = function() {
|
||||
if (this.type === "detector") {
|
||||
return lab.detector;
|
||||
} else {
|
||||
} else if (this.type === "reputation"){
|
||||
return lab.factor;
|
||||
}
|
||||
else {
|
||||
var context;
|
||||
if (this.type === "research") { context = research; }
|
||||
else if (this.type === "hr") { context = workers; }
|
||||
@@ -102,6 +108,9 @@
|
||||
if (this.type === "detector") {
|
||||
return true;
|
||||
}
|
||||
if (this.type === "reputation") {
|
||||
return true;
|
||||
}
|
||||
var rec = this.getReceiver();
|
||||
if (this.type === "research") {
|
||||
return rec.level > 0;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
{
|
||||
"name": "01",
|
||||
"message": "Nobody knows you.",
|
||||
},
|
||||
{
|
||||
"name": "02",
|
||||
"message": "If you were working in McDonalds, you were more successfull.",
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -4,7 +4,7 @@
|
||||
"description": "The W-Boson is the carrier boson of the weak force.",
|
||||
"reputation": 1,
|
||||
"cost": 10,
|
||||
"cost_increase": 1.3,
|
||||
"cost_increase": 1.4,
|
||||
"image": "assets/W.png"
|
||||
},
|
||||
{
|
||||
@@ -12,7 +12,7 @@
|
||||
"description": "The Z-Boson.",
|
||||
"reputation": 5,
|
||||
"cost": 100,
|
||||
"cost_increase": 1.35,
|
||||
"cost_increase": 1.45,
|
||||
"image": "assets/Z.png"
|
||||
},
|
||||
{
|
||||
@@ -20,7 +20,7 @@
|
||||
"description": "The top-Quark.",
|
||||
"reputation": 50,
|
||||
"cost": 2000,
|
||||
"cost_increase": 1.4,
|
||||
"cost_increase": 1.5,
|
||||
"image": "assets/t.png"
|
||||
},
|
||||
{
|
||||
@@ -28,7 +28,7 @@
|
||||
"description": "They are slightly slower than speed (yes, really...), and on top of that they're oscillating.",
|
||||
"reputation": 100,
|
||||
"cost": 25000,
|
||||
"cost_increase": 1.45,
|
||||
"cost_increase": 1.55,
|
||||
"image": "assets/nu.png"
|
||||
},
|
||||
{
|
||||
@@ -36,7 +36,7 @@
|
||||
"description": "The Higgs-Boson...",
|
||||
"reputation": 200,
|
||||
"cost": 50000,
|
||||
"cost_increase": 1.5,
|
||||
"cost_increase": 1.6,
|
||||
"image": "assets/H.png"
|
||||
},
|
||||
{
|
||||
|
||||
+74
-14
@@ -111,13 +111,13 @@
|
||||
},
|
||||
{
|
||||
"name": "New gadgets",
|
||||
"description": "Your Research Fellows get new techs. They will produce 1.4 times more data.",
|
||||
"description": "Your Research Fellows get new techs. They will produce 1.2 times more data.",
|
||||
"cost": 800000,
|
||||
"used": false,
|
||||
"type": "hr",
|
||||
"receiver": "Research Fellows",
|
||||
"property": "rate",
|
||||
"factor": 1.4,
|
||||
"factor": 1.2,
|
||||
"constant": 0,
|
||||
"image": "assets/gadget.png"
|
||||
},
|
||||
@@ -150,75 +150,75 @@
|
||||
|
||||
{
|
||||
"name": "Accelerator upgrade",
|
||||
"description": "Increases the luminosity (you get 2 times more data with clicks).",
|
||||
"description": "Increases the luminosity (you get 3 times more data with clicks).",
|
||||
"cost": 1000,
|
||||
"used": false,
|
||||
"type": "detector",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 2,
|
||||
"factor": 3,
|
||||
"constant": 0,
|
||||
"image": "assets/energy.png"
|
||||
},
|
||||
{
|
||||
"name": "Accelerator upgrade 2",
|
||||
"description": "Increases the luminosity (you get 2 times more data with clicks).",
|
||||
"description": "Increases the luminosity (you get 3 times more data with clicks).",
|
||||
"cost": 10000,
|
||||
"used": false,
|
||||
"type": "detector",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 2,
|
||||
"factor": 3,
|
||||
"constant": 0,
|
||||
"image": "assets/energy.png"
|
||||
},
|
||||
{
|
||||
"name": "Accelerator upgrade 3",
|
||||
"description": "Increases the luminosity (you get 2 times more data with clicks).",
|
||||
"description": "Increases the luminosity (you get 3 times more data with clicks).",
|
||||
"cost": 100000,
|
||||
"used": false,
|
||||
"type": "detector",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 2,
|
||||
"factor": 3,
|
||||
"constant": 0,
|
||||
"image": "assets/energy.png"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Detector upgrade",
|
||||
"description": "Your amazing detector works with better efficiency (you get +2 data with clicks).",
|
||||
"description": "Your amazing detector works with better efficiency (you get +4 data with clicks).",
|
||||
"cost": 500,
|
||||
"used": false,
|
||||
"type": "detector",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 1,
|
||||
"constant": 2,
|
||||
"constant": 4,
|
||||
"image": "assets/efficiency.png"
|
||||
},
|
||||
{
|
||||
"name": "Detector upgrade 2",
|
||||
"description": "Your amazing detector works with better efficiency (you get +6 data with clicks).",
|
||||
"description": "Your amazing detector works with better efficiency (you get +12 data with clicks).",
|
||||
"cost": 5000,
|
||||
"used": false,
|
||||
"type": "detector",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 1,
|
||||
"constant": 6,
|
||||
"constant": 12,
|
||||
"image": "assets/efficiency.png"
|
||||
},
|
||||
{
|
||||
"name": "Detector upgrade 3",
|
||||
"description": "Your amazing detector works with better efficiency (you get +24 data with clicks).",
|
||||
"description": "Your amazing detector works with better efficiency (you get +42 data with clicks).",
|
||||
"cost": 50000,
|
||||
"used": false,
|
||||
"type": "detector",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 0,
|
||||
"constant": 24,
|
||||
"constant": 42,
|
||||
"image": "assets/efficiency.png"
|
||||
},
|
||||
|
||||
@@ -281,5 +281,65 @@
|
||||
"factor": 1.2,
|
||||
"constant": 1,
|
||||
"image": "assets/propaganda.png"
|
||||
},
|
||||
{
|
||||
"name": "Science is cool!! lvl 1",
|
||||
"description": "Because your science is so popular, you get 1.1 times more money for your reputation.",
|
||||
"cost": 1000,
|
||||
"used": false,
|
||||
"type": "reputation",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 1.1,
|
||||
"constant": 0,
|
||||
"image": "assets/budget.png"
|
||||
},
|
||||
{
|
||||
"name": "Science is cool!! lvl 2",
|
||||
"description": "Because your science is so popular, you get 1.1 times more money for your reputation.",
|
||||
"cost": 10000,
|
||||
"used": false,
|
||||
"type": "reputation",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 1.1,
|
||||
"constant": 0,
|
||||
"image": "assets/budget.png"
|
||||
},
|
||||
{
|
||||
"name": "Science is cool!! lvl 3",
|
||||
"description": "Because your science is so popular, you get 1.1 times more money for your reputation.",
|
||||
"cost": 100000,
|
||||
"used": false,
|
||||
"type": "reputation",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 1.1,
|
||||
"constant": 0,
|
||||
"image": "assets/budget.png"
|
||||
},
|
||||
{
|
||||
"name": "Science is cool!! lvl 4",
|
||||
"description": "Because your science is so popular, you get 1.1 times more money for your reputation.",
|
||||
"cost": 1000000,
|
||||
"used": false,
|
||||
"type": "reputation",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 1.1,
|
||||
"constant": 0,
|
||||
"image": "assets/budget.png"
|
||||
},
|
||||
{
|
||||
"name": "Science is cool!! lvl 5",
|
||||
"description": "Because your science is so popular, you get 1.1 times more money for your reputation.",
|
||||
"cost": 10000000,
|
||||
"used": false,
|
||||
"type": "reputation",
|
||||
"receiver": "",
|
||||
"property": "rate",
|
||||
"factor": 1.1,
|
||||
"constant": 0,
|
||||
"image": "assets/budget.png"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user