namespace = NEOW_travel_event

NEOW_travel_event.0001 = { # Zone Rouge Death Zone
    type = character_event
    title = NEOW_travel_event.0001.t
    desc = NEOW_travel_event.0001.desc
    theme = travel_danger

    left_portrait = {
        character = root.current_travel_plan.travel_leader
        animation = thinking
    }

    right_portrait = {
        character = root
        animation = worry
    }

    cooldown = { days = 10 }

    trigger = {
        is_travelling = yes
        is_location_valid_for_travel_event_on_land = yes
        location = {
            barony = { has_building_with_flag = { flag = travel_point_of_interest_zone_rouge }}
        }
    }

    immediate = {
        play_music_cue = "mx_cue_negative"
    }

    option = { #You get lost
        name = NEOW_travel_event.0001.a
        random_list = {
            50 = {
                modifier = {
                    has_trait = paranoid
                    add = 5
                }
                modifier = {
                    has_trait = patient
                    add = 5
                }
                modifier = {
                    has_trait = strong
                    add = 5
                }
                modifier = {
                    has_trait = craven
                    add = 10
                }
                modifier = {
                    has_trait = lifestyle_traveler
                    add = 10
                }
                modifier = {
                    has_trait = shrewd
                    add = 20
                }
                modifier = {
                    has_trait = adventurer
                    add = 35
                }
                modifier = {
                    has_trait = intellect_good_1
                    factor = 1.1
                }
                modifier = {
                    has_trait = intellect_good_2
                    factor = 1.25
                }
                modifier = {
                    has_trait = intellect_good_3
                    factor = 1.5
                }
                modifier = {
                    has_trait = physique_good_1
                    factor = 1.1
                }
                modifier = {
                    has_trait = physique_good_2
                    factor = 1.25
                }
                modifier = {
                    has_trait = physique_good_3
                    factor = 1.5
                }
                modifier = {
                    culture = {
                        OR = {
                            has_cultural_pillar = heritage_mosellic
                            has_cultural_pillar = heritage_west_germanic
                            has_cultural_pillar = heritage_central_germanic
                            has_cultural_pillar = heritage_french
                            has_cultural_pillar = heritage_anglo_frisian
                            has_cultural_pillar = heritage_brythonic
                            has_cultural_pillar = heritage_rhaeto_helvetic
                        }
                    }
                    factor = 2
                }
                custom_tooltip = {
                    text = travel.zr_safe
                }
                send_interface_toast = {
                    title = travel.zr_survived
                    left_icon = root
                    stress_impact = {
                        diligent = minor_stress_impact_loss
                        brave = medium_stress_impact_loss
                        impatient = major_stress_impact_loss
                        lazy = minor_stress_impact_gain
                        craven = medium_stress_impact_gain
                        patient = major_stress_impact_gain
                    }
                }
            }

            30 = {
                modifier = {
                    has_trait = brave
                    add = 2
                }
                modifier = {
                    has_trait = impatient
                    add = 5
                }
                modifier = {
                    has_trait = fickle
                    add = 5
                }
                modifier = {
                    has_trait = spindly
                    add = 5
                }
                modifier = {
                    has_trait = weak
                    add = 5
                }
                modifier = {
                    has_trait = bleeder
                    add = 10
                }
                modifier = {
                    has_trait = dull
                    add = 10
                }
                modifier = {
                    has_trait = intellect_bad_1
                    factor = 1.1
                }
                modifier = {
                    has_trait = intellect_bad_2
                    factor = 1.25
                }
                modifier = {
                    has_trait = intellect_bad_3
                    factor = 1.5
                }
                modifier = {
                    has_trait = physique_bad_1
                    factor = 1.1
                }
                modifier = {
                    has_trait = physique_bad_2
                    factor = 1.25
                }
                modifier = {
                    has_trait = physique_bad_3
                    factor = 1.5
                }
                send_interface_toast = {
                    title = travel.zr_survived
                    left_icon = root
                    if = {
                        limit = {
                            has_trait = wounded_3
                        }
                        title = travel.zr_death
                        custom_tooltip = {
                            text = travel.zr_death
                        }
                        death = {
                            death_reason = death_mine_explosion
                        }
                    }
                    else_if = {
                        limit = {
                            has_trait = wounded_2
                        }
                        custom_tooltip = {
                            text = travel.zr_very_badly_wounded
                        }
                        stress_impact = {
                            brave = minor_stress_impact_loss
                            impatient = medium_stress_impact_loss
                            craven = minor_stress_impact_gain
                            patient = medium_stress_impact_gain
                        }
                        change_trait_rank = {
			                trait = wounded
			                rank = 1
			                max = 3
		                }
                    }
                    else_if = {
                        limit = {
                            has_trait = wounded_1
                        }
                        custom_tooltip = {
                            text = travel.zr_badly_wounded
                        }
                        stress_impact = {
                            diligent = minor_stress_impact_loss
                            brave = medium_stress_impact_loss
                            impatient = major_stress_impact_loss
                            lazy = minor_stress_impact_gain
                            craven = medium_stress_impact_gain
                            patient = major_stress_impact_gain
                        }
                        change_trait_rank = {
			                trait = wounded
			                rank = 1
			                max = 3
		                }
                    }
                    else = {
                        custom_tooltip = {
                            text = travel.zr_wounded
                        }
                        stress_impact = {
                            diligent = minor_stress_impact_loss
                            brave = medium_stress_impact_loss
                            impatient = major_stress_impact_loss
                            lazy = minor_stress_impact_gain
                            craven = medium_stress_impact_gain
                            patient = major_stress_impact_gain
                        }
                        add_trait = wounded_1
                    }
                }
            }

            15 = {
                modifier = {
                    has_trait = brave
                    add = 2
                }
                modifier = {
                    has_trait = impatient
                    add = 5
                }
                modifier = {
                    has_trait = fickle
                    add = 5
                }
                modifier = {
                    has_trait = spindly
                    add = 5
                }
                modifier = {
                    has_trait = weak
                    add = 15
                }
                modifier = {
                    has_trait = bleeder
                    add = 20
                }
                modifier = {
                    has_trait = dull
                    add = 10
                }
                modifier = {
                    has_trait = intellect_bad_1
                    factor = 1.1
                }
                modifier = {
                    has_trait = intellect_bad_2
                    factor = 1.25
                }
                modifier = {
                    has_trait = intellect_bad_3
                    factor = 1.5
                }
                modifier = {
                    has_trait = physique_bad_1
                    factor = 1.1
                }
                modifier = {
                    has_trait = physique_bad_2
                    factor = 1.25
                }
                modifier = {
                    has_trait = physique_bad_3
                    factor = 1.5
                }
                send_interface_toast = {
                    title = travel.zr_survived
                    left_icon = root
                    if = {
                        limit = {
                            has_trait = wounded_3
                        }
                        title = travel.zr_death
                        custom_tooltip = {
                            text = travel.zr_death
                        }
                        death = {
                            death_reason = death_mine_explosion
                        }
                    }
                    else_if = {
                        limit = {
                            has_trait = wounded_2
                        }
                        title = travel.zr_death
                        custom_tooltip = {
                            text = travel.zr_death
                        }
                        death = {
                            death_reason = death_mine_explosion
                        }
                    }
                    else_if = {
                        limit = {
                            has_trait = wounded_1
                        }
                        title = travel.zr_very_badly_wounded
                        custom_tooltip = {
                            text = travel.zr_very_badly_wounded
                        }
                        stress_impact = {
                            brave = minor_stress_impact_loss
                            impatient = medium_stress_impact_loss
                            craven = minor_stress_impact_gain
                            patient = medium_stress_impact_gain
                        }
                        change_trait_rank = {
			                trait = wounded
			                rank = 2
			                max = 3
		                }
                    }
                    else = {
                        title = travel.zr_badly_wounded
                        custom_tooltip = {
                            text = travel.zr_badly_wounded
                        }
                        stress_impact = {
                            diligent = minor_stress_impact_loss
                            brave = medium_stress_impact_loss
                            impatient = major_stress_impact_loss
                            lazy = minor_stress_impact_gain
                            craven = medium_stress_impact_gain
                            patient = major_stress_impact_gain
                        }
                        add_trait = wounded_2
                    }
                }
            }

            5 = {
                modifier = {
                    has_trait = brave
                    add = 10
                }
                modifier = {
                    has_trait = impatient
                    add = 5
                }
                modifier = {
                    has_trait = fickle
                    add = 5
                }
                modifier = {
                    has_trait = spindly
                    add = 5
                }
                modifier = {
                    has_trait = weak
                    add = 20
                }
                modifier = {
                    has_trait = bleeder
                    add = 50
                }
                modifier = {
                    has_trait = dull
                    add = 20
                }
                modifier = {
                    has_trait = intellect_bad_1
                    factor = 1.1
                }
                modifier = {
                    has_trait = intellect_bad_2
                    factor = 1.25
                }
                modifier = {
                    has_trait = intellect_bad_3
                    factor = 1.5
                }
                modifier = {
                    has_trait = physique_bad_1
                    factor = 1.1
                }
                modifier = {
                    has_trait = physique_bad_2
                    factor = 1.25
                }
                modifier = {
                    has_trait = physique_bad_3
                    factor = 1.5
                }
                custom_tooltip = {
                    text = travel.zr_death
                }
                send_interface_toast = {
                    title = travel.zr_death
                    left_icon = root
                    death = {
                        death_reason = death_mine_explosion
                    }
                }
            }
        }
        ai_chance = {
            base = 20
        }
    }
    option = { #You find a better way
        name = NEOW_travel_event.0001.b
        trigger = {
            OR = {
                has_trait = adventurer
                has_trait_xp = {
					trait = lifestyle_traveler 
					track = danger 
					value >= 90
				}
            }
        }
        custom_tooltip = {
            text = travel.zr_escaped
        }
        stress_impact = {
            brave = minor_stress_impact_gain
            impatient = medium_stress_impact_gain
            craven = minor_stress_impact_loss
            patient = medium_stress_impact_loss
        }
        add_prestige = 150
        send_interface_toast = {
            title = travel.zr_survived
            left_icon = root
        }
        current_travel_plan = {
			delay_travel_plan = {
				days = 7
			}
		}
        ai_chance = {
            base = 100
        }
    }

    option = { #You take the losses and turn back
        name = NEOW_travel_event.0001.c
        custom_tooltip = {
            text = travel.zr_escaped_long_way
        }
        stress_impact = {
            diligent = minor_stress_impact_gain
            brave = medium_stress_impact_gain
            impatient = major_stress_impact_gain
            lazy = minor_stress_impact_loss
            craven = medium_stress_impact_loss
            patient = major_stress_impact_loss
        }
        add_prestige = -150
        send_interface_toast = {
            title = travel.zr_survived
            left_icon = root
        }
        current_travel_plan = {
			delay_travel_plan = {
				months = 1
			}
		}
        ai_chance = {
            base = 80
        }
    }
}