Update servant cost calculation and documentation: Adjust base servant cost formula to reflect a compressed time scale in Falukant, changing the calculation from a realistic monthly wage to an abstract maintenance value. Update implementation spec to clarify the new cost structure and time measurement for the external daemon.
This commit is contained in:
@@ -4519,7 +4519,10 @@ class FalukantService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
calculateServantMonthlyCost({ servantCount, servantQuality, servantPayLevel, houseType }) {
|
calculateServantMonthlyCost({ servantCount, servantQuality, servantPayLevel, houseType }) {
|
||||||
const basePerServant = Math.max(20, Math.round((Number(houseType?.cost || 0) / 1000) + 40));
|
// Falukant läuft stark zeitkomprimiert (1 Tag = 1 Jahr). Der "Monatslohn"
|
||||||
|
// ist deshalb bewusst ein abstrahierter Unterhaltswert pro Monatstick und
|
||||||
|
// kein realistischer Vollkostenlohn.
|
||||||
|
const basePerServant = Math.max(3, Math.round((Number(houseType?.cost || 0) / 10000) + 6));
|
||||||
const qualityFactor = 1 + ((Number(servantQuality || 50) - 50) / 200);
|
const qualityFactor = 1 + ((Number(servantQuality || 50) - 50) / 200);
|
||||||
const payFactor = this.getPayLevelMultiplier(servantPayLevel);
|
const payFactor = this.getPayLevelMultiplier(servantPayLevel);
|
||||||
return Math.round(servantCount * basePerServant * qualityFactor * payFactor * 100) / 100;
|
return Math.round(servantCount * basePerServant * qualityFactor * payFactor * 100) / 100;
|
||||||
|
|||||||
@@ -285,8 +285,16 @@ Wie Daily, zusätzlich:
|
|||||||
|
|
||||||
## 6.2 Monatskosten
|
## 6.2 Monatskosten
|
||||||
|
|
||||||
|
Änderungsnotiz für den externen Daemon:
|
||||||
|
|
||||||
|
- Falukant verwendet einen stark komprimierten Zeitmaßstab: `1 Tag = 1 Jahr`.
|
||||||
|
- Der Monatslauf des Daemons entspricht damit ungefähr einem 2-Stunden-Schritt.
|
||||||
|
- Dienerkosten dürfen deshalb nicht wie ein realistischer Vollmonatslohn skaliert werden.
|
||||||
|
- Der hier definierte Monatswert ist ein abstrahierter Unterhalts- und Bindungsbetrag pro Monatstick.
|
||||||
|
- Die Datenbank ist für diese Änderung bereits vorbereitet; es sind keine zusätzlichen DB-Anpassungen nötig.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
basePerServant = max(20, round((houseType.cost / 1000) + 40))
|
basePerServant = max(3, round((houseType.cost / 10000) + 6))
|
||||||
qualityFactor = 1 + ((servantQuality - 50) / 200)
|
qualityFactor = 1 + ((servantQuality - 50) / 200)
|
||||||
payFactor(low) = 0.8
|
payFactor(low) = 0.8
|
||||||
payFactor(normal) = 1.0
|
payFactor(normal) = 1.0
|
||||||
@@ -454,7 +462,7 @@ Bereits vorgesehen:
|
|||||||
"servantSummary": {
|
"servantSummary": {
|
||||||
"expectedMin": 3,
|
"expectedMin": 3,
|
||||||
"expectedMax": 6,
|
"expectedMax": 6,
|
||||||
"monthlyCost": 925.4,
|
"monthlyCost": 98.1,
|
||||||
"staffingState": "fitting",
|
"staffingState": "fitting",
|
||||||
"orderState": "stable"
|
"orderState": "stable"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user