﻿# Called from code once a year for all characters, at a random point that year (individually for each character)
# Root is the character
random_yearly_everyone_pulse = {
	on_actions = {
		BWLAG_random_yearly_everyone_pulse_obese
		BWLAG_random_yearly_everyone_pulse_malnourished
	}
}

BWLAG_random_yearly_everyone_pulse_obese = {
	trigger = {
		OR = {
			has_character_modifier = obese_modifier
			current_weight > 50
			AND = {
				has_character_flag = BWLAG_has_been_pregnant_in_the_last_2_years
				current_weight > 70
			}
		}
		is_adult = yes
		NOR = {
			AND = {
				has_character_modifier = BWLaG_loves_food_modifier
				has_trait = comfort_eater
				has_trait = gluttonous
			}
			has_character_flag = BWLAG_fix_self_cooldown
		}
		NOT = {
			AND = {
				has_trait = inappetetic
				has_trait = reclusive
			}
			
		}
	}
	events = {
		BWLaG_fix_yourself.0001
	}
}

BWLAG_random_yearly_everyone_pulse_malnourished = {
	trigger = {
		OR = {
			has_character_modifier = malnourished_modifier
			current_weight < -50
		}
		is_adult = yes
		BWLaG_has_health_issue = no
		NOR = {
			has_character_flag = BWLaG_paranoid_blocks_malnourised_event
			has_character_flag = BWLAG_fix_self_cooldown
		}
	}
	events = {
		BWLaG_fix_yourself.0002
	}
}