Skip to content

Commit

Permalink
Merge branch 'master' into russian-adaptation
Browse files Browse the repository at this point in the history
  • Loading branch information
MoffKadir committed Nov 22, 2023
2 parents 98661ea + 8d7308d commit 3d4c866
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
24 changes: 18 additions & 6 deletions common/scripted_triggers/20_health_triggers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down
20 changes: 4 additions & 16 deletions events/health_events.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion gui/window_character.gui
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3d4c866

Please sign in to comment.