Verbessere Logik zur Berechnung von Reputation und Ehezufriedenheit: Aktualisiere die Kategorien und täglichen Deltas für Reputation und Ehezufriedenheit basierend auf Standsgruppen, um die Auswirkungen von Liebschaften präziser darzustellen. Füge Dokumentation zu Standsgruppen und deren Effekten hinzu.
All checks were successful
Deploy yourpart (blue-green) / deploy (push) Successful in 1m31s
All checks were successful
Deploy yourpart (blue-green) / deploy (push) Successful in 1m31s
This commit is contained in:
@@ -1332,33 +1332,24 @@ fn visibility_young_penalty(min_age_years: i32, visibility: i32) -> f64 {
|
||||
fn lover_status_category(title1: &str, title2: &str) -> u8 {
|
||||
let t1 = title_group(title1);
|
||||
let t2 = title_group(title2);
|
||||
let max_group = t1.max(t2);
|
||||
// Vereinfacht: 0 -> "niedrig", 1 -> "mittel", 2+ -> "hoch"
|
||||
if max_group >= 2 {
|
||||
2 // hoch (knight, baron, count, ruler, etc.)
|
||||
} else if max_group == 1 {
|
||||
1 // mittel (townlord, by, landlord)
|
||||
} else {
|
||||
0 // niedrig (noncivil, civil, sir)
|
||||
}
|
||||
t1.max(t2) // 0 = niedrig, 1 = mittel, 2 = hoch, 3 = höchst
|
||||
}
|
||||
|
||||
/// Berechnet tägl. Reputations-Delta basierend auf Stand, Sichtbarkeit und Status der Liebschaft.
|
||||
/// Regel:
|
||||
/// - Hoher Stand: +Reputation (unabhängig von Sichtbarkeit)
|
||||
/// - Mittlerer Stand: +Reputation wenn heimlich/diskret, -Reputation wenn öffentlich
|
||||
/// - Niedriger Stand: neutral wenn heimlich, -Reputation wenn öffentlich
|
||||
/// - Stand 3 (Höchst): +0.75/Tag (sehr positiv)
|
||||
/// - Stand 2 (Hoch): +0.5/Tag (positiv)
|
||||
/// - Stand 1 (Mittel): +0.3 wenn heimlich, -0.4 wenn öffentlich
|
||||
/// - Stand 0 (Niedrig): 0 wenn heimlich, -0.5 wenn öffentlich
|
||||
fn calculate_lover_reputation_delta(l: &LoverData) -> f64 {
|
||||
let category = lover_status_category(&l.title1_tr, &l.title2_tr);
|
||||
let is_public = l.visibility >= 60; // öffentlich wenn hohe Sichtbarkeit
|
||||
|
||||
match category {
|
||||
2 => {
|
||||
// Hoher Stand: immer +0,5 pro Tag (positiv)
|
||||
0.5
|
||||
}
|
||||
3 => 0.75, // Höchst: sehr positiv
|
||||
2 => 0.5, // Hoch: positiv
|
||||
1 => {
|
||||
// Mittlerer Stand: heimlich +0,3, öffentlich -0,4
|
||||
// Mittel: heimlich +0,3, öffentlich -0,4
|
||||
if is_public {
|
||||
-0.4
|
||||
} else {
|
||||
@@ -1366,7 +1357,7 @@ fn calculate_lover_reputation_delta(l: &LoverData) -> f64 {
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// Niedriger Stand: heimlich/diskret 0, öffentlich -0,5
|
||||
// Niedrig: heimlich/diskret 0, öffentlich -0,5
|
||||
if is_public {
|
||||
-0.5
|
||||
} else {
|
||||
@@ -1378,20 +1369,19 @@ fn calculate_lover_reputation_delta(l: &LoverData) -> f64 {
|
||||
|
||||
/// Berechnet tägl. Ehezufriedenheits-Delta für Ehe-Partner, wenn dieser eine Liebschaft hat.
|
||||
/// Regel:
|
||||
/// - Hoher Stand: +Zufriedenheit (sogar öffentliche Liebschaften sind akzeptabel)
|
||||
/// - Mittlerer Stand: +Zufriedenheit wenn heimlich, -Zufriedenheit wenn öffentlich
|
||||
/// - Niedriger Stand: neutral wenn heimlich, -Zufriedenheit wenn öffentlich
|
||||
/// - Stand 3 (Höchst): +2/Tag (sehr gesellschaftlich akzeptiert)
|
||||
/// - Stand 2 (Hoch): +1/Tag (gesellschaftlich akzeptiert)
|
||||
/// - Stand 1 (Mittel): 0 wenn heimlich, -2 wenn öffentlich
|
||||
/// - Stand 0 (Niedrig): 0 wenn heimlich, -1 wenn öffentlich
|
||||
fn calculate_lover_marriage_satisfaction_delta(l: &LoverData) -> i32 {
|
||||
let category = lover_status_category(&l.title1_tr, &l.title2_tr);
|
||||
let is_public = l.visibility >= 60;
|
||||
|
||||
match category {
|
||||
2 => {
|
||||
// Hoher Stand: +1 pro Tag (Liebschaft ist gesellschaftlich akzeptabel/vorteilhaft)
|
||||
1
|
||||
}
|
||||
3 => 2, // Höchst: +2 pro Tag (sehr positiv)
|
||||
2 => 1, // Hoch: +1 pro Tag
|
||||
1 => {
|
||||
// Mittlerer Stand: +0 wenn heimlich, -2 wenn öffentlich (Skandal)
|
||||
// Mittel: +0 wenn heimlich, -2 wenn öffentlich (Skandal)
|
||||
if is_public {
|
||||
-2
|
||||
} else {
|
||||
@@ -1399,7 +1389,7 @@ fn calculate_lover_marriage_satisfaction_delta(l: &LoverData) -> i32 {
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// Niedriger Stand: 0 wenn heimlich, -1 wenn öffentlich
|
||||
// Niedrig: 0 wenn heimlich, -1 wenn öffentlich
|
||||
if is_public {
|
||||
-1
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user