enefel 1.0.111 → 1.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/moral.js +15 -3
- package/package.json +1 -1
- package/stadium.js +6 -0
package/moral.js
CHANGED
|
@@ -12,6 +12,18 @@ function getMalusFromMoral(moral) {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
function getColorFromMoral(moral) {
|
|
16
|
+
if (moral < 20) {
|
|
17
|
+
return "#ff0000";
|
|
18
|
+
} else if (moral < 40) {
|
|
19
|
+
return "#ff7b00";
|
|
20
|
+
} else if (moral < 60) {
|
|
21
|
+
return "#ffcc00";
|
|
22
|
+
} else if (moral < 80) {
|
|
23
|
+
return "#ffff00";
|
|
24
|
+
} else {
|
|
25
|
+
return "#00FF00";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = { getColorFromMoral, getMalusFromMoral };
|
package/package.json
CHANGED
package/stadium.js
CHANGED
|
@@ -84,6 +84,11 @@ const minHeight = 11;
|
|
|
84
84
|
const maxHeight = 15;
|
|
85
85
|
const priceSize = 20;
|
|
86
86
|
const COACH_REROLL_COST = 50;
|
|
87
|
+
const STORE_COST = 50;
|
|
88
|
+
|
|
89
|
+
const getStoreCost = (team) => {
|
|
90
|
+
return STORE_COST * (team.stadiumStore + 1);
|
|
91
|
+
};
|
|
87
92
|
|
|
88
93
|
const getRerollCoachCost = (team) => {
|
|
89
94
|
return COACH_REROLL_COST * (team.rerollCoach + 1);
|
|
@@ -255,6 +260,7 @@ function splitList(w, s) {
|
|
|
255
260
|
}
|
|
256
261
|
|
|
257
262
|
module.exports = {
|
|
263
|
+
getStoreCost,
|
|
258
264
|
addCenterZone,
|
|
259
265
|
getRerollCoachCost,
|
|
260
266
|
getStadiumCapacity,
|