Fix typo in healthDrunkOfLife method and enhance health change logic in FalukantService; refactor health measures localization structure in English and German JSON files for better organization.
This commit is contained in:
@@ -213,7 +213,7 @@ class FalukantService extends BaseService {
|
||||
{ tr: "doctor", method: "healthDoctor", cost: 50 },
|
||||
{ tr: "witch", method: "healthWitch", cost: 500 },
|
||||
{ tr: "pill", method: "healthPill", cost: 5000 },
|
||||
{ tr: "drunkOfLife", method: "healthDruckOfLife", cost: 5000000 }
|
||||
{ tr: "drunkOfLife", method: "healthDrunkOfLife", cost: 5000000 }
|
||||
];
|
||||
|
||||
static RECURSIVE_REGION_SEARCH = `
|
||||
@@ -3189,8 +3189,19 @@ class FalukantService extends BaseService {
|
||||
}
|
||||
|
||||
async healthDrunkOfLife(user) {
|
||||
const raw = Math.floor(Math.random() * 26);
|
||||
return this.healthChange(user, raw);
|
||||
// Erfolgschance: 90%
|
||||
const success = Math.random() < 0.9;
|
||||
|
||||
let delta;
|
||||
if (success) {
|
||||
// Bei Erfolg: Gesundheit um 5-35% verbessern
|
||||
delta = Math.floor(Math.random() * 31) + 5; // 5-35
|
||||
} else {
|
||||
// Bei Misserfolg: Gesundheit um 1-10% verschlechtern
|
||||
delta = -(Math.floor(Math.random() * 10) + 1); // -1 bis -10
|
||||
}
|
||||
|
||||
return this.healthChange(user, delta);
|
||||
}
|
||||
|
||||
async getPoliticsOverview(hashedUserId) {
|
||||
|
||||
@@ -439,11 +439,13 @@
|
||||
"new nobility title": "Neuer Adelstitel",
|
||||
"partyOrder": "Fest bestellt",
|
||||
"renovation_all": "Haus komplett renoviert",
|
||||
"health.pill": "Gesundheitsmaßnahme: Tablette",
|
||||
"health.doctor": "Gesundheitsmaßnahme: Arztbesuch",
|
||||
"health.witch": "Gesundheitsmaßnahme: Hexe",
|
||||
"health.drunkOfLife": "Gesundheitsmaßnahme: Trunk des Lebens",
|
||||
"health.barber": "Gesundheitsmaßnahme: Barbier"
|
||||
"health": {
|
||||
"pill": "Gesundheitsmaßnahme: Tablette",
|
||||
"doctor": "Gesundheitsmaßnahme: Arztbesuch",
|
||||
"witch": "Gesundheitsmaßnahme: Hexe",
|
||||
"drunkOfLife": "Gesundheitsmaßnahme: Trunk des Lebens",
|
||||
"barber": "Gesundheitsmaßnahme: Barbier"
|
||||
}
|
||||
}
|
||||
},
|
||||
"newdirector": {
|
||||
|
||||
@@ -71,11 +71,13 @@
|
||||
"new nobility title": "New title of nobility",
|
||||
"partyOrder": "Party ordered",
|
||||
"renovation_all": "House fully renovated",
|
||||
"health.pill": "Health measure: pill",
|
||||
"health.doctor": "Health measure: doctor",
|
||||
"health.witch": "Health measure: witch",
|
||||
"health.drunkOfLife": "Health measure: elixir of life",
|
||||
"health.barber": "Health measure: barber"
|
||||
"health": {
|
||||
"pill": "Health measure: pill",
|
||||
"doctor": "Health measure: doctor",
|
||||
"witch": "Health measure: witch",
|
||||
"drunkOfLife": "Health measure: elixir of life",
|
||||
"barber": "Health measure: barber"
|
||||
}
|
||||
}
|
||||
},
|
||||
"newdirector": {
|
||||
|
||||
Reference in New Issue
Block a user