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) {
|
||||
|
||||
Reference in New Issue
Block a user