diff --git a/common/scripted_triggers/20_health_triggers.txt b/common/scripted_triggers/20_health_triggers.txt index d799992c0e..6c7d9ad060 100644 --- a/common/scripted_triggers/20_health_triggers.txt +++ b/common/scripted_triggers/20_health_triggers.txt @@ -24,32 +24,44 @@ can_get_non_epidemic_disease_trigger = { #Diseases shouldn't stack. Don't add a # Will this character suffer age-related health issues, factoring how healthy they actually are vs. what their age is? age_ranked_health_vulnerability_threshold_trigger = { + # Warcraft - add flags here that should prevent characters from getting "infirm" + NOT = { + has_trait_with_flag = can_not_get_sick + } OR = { # If you're already having problems... has_trait = infirm # Otherwise, we check health crossed against age. + # Warcraft - we have to divide by the age multiplier to get effective age for paradox purposes + save_temporary_scope_value_as = { + name = temp_age + value = { + value = age + divide = racial_age_multiplier_value + } + } ## Characters that are this old are vulnerable regardless of health. - age >= 90 + scope:temp_age >= 90 ## Else, the higher your health is, the older you need to be to suffer age-related health problems. AND = { health <= good_health - age >= 80 + scope:temp_age >= 80 } AND = { health <= medium_health - age >= 70 + scope:temp_age >= 70 } AND = { health <= fine_health - age >= 60 + scope:temp_age >= 60 } AND = { health <= poor_health - age >= 50 + scope:temp_age >= 50 } AND = { health <= dying_health - age >= 40 + scope:temp_age >= 40 } } } diff --git a/events/health_events.txt b/events/health_events.txt index c7f4ade907..8f60b74dd9 100644 --- a/events/health_events.txt +++ b/events/health_events.txt @@ -10767,22 +10767,10 @@ health.7000 = { theme = physical_health trigger = { - NOT = { has_trait = infirm } - OR = { - # Warcraft - age >= age_50_value - - AND = { - # Warcraft - age >= age_30_value - - OR = { - has_trait = physique_bad - has_trait = spindly - has_trait = weak - } - } - } + NOT = { + has_trait = infirm + } + age_ranked_health_vulnerability_threshold_trigger = yes } weight_multiplier = { diff --git a/gui/window_character.gui b/gui/window_character.gui index 78f7c9e37c..2aff3b1dbb 100644 --- a/gui/window_character.gui +++ b/gui/window_character.gui @@ -784,7 +784,7 @@ window = { name = "character_age_2" raw_text = "???" default_format = "#low" - tooltip = "wc_unknown_birth" + tooltip = "wc_unknown_birth" #" [Character.GetAge] [Character.GetDeathOrBirthDateInfo]" fontsize = 20 align = nobaseline }