ET_era_decisions = {
    ET_getNextEraFocusTree = {
        icon = GFX_ET_decision_NewEra

        is_good = yes

        available = {
            date > 1945.01.01
            ET_in_new_era = yes
        }

        visible = {
            ET_is_era_avalible_country = yes
        }

        fire_only_once = no
        cost = 0

        complete_effect = {
            ET_set_new_era_effect = yes
        }

        ai_will_do = {
            base = 100
        }
    }
}

political_actions = {
    ET_surrender_to_germany = { # FIXME: Disabled
        icon = GFX_ET_decision_Surrender

        priority = 10

        available = {
            date > 1945.01.01
            NOT = { original_tag = GER }

            OR = {
                has_war_support < 0.30
                surrender_progress > 0.05
            }

            # Following nation have fallen
            OR = { # SOV
                NOT = { country_exists = SOV }
                SOV = { NOT = { has_government = communism } }
                SOV = { has_capitulated = yes }
            }
        
            # THIS has no land in main land europe
            ET_has_any_land_in_mainland_europe = No

            OR = { # Special Nation Cases
                AND = { # USA is faction leader
                    original_tag = USA
                    is_faction_leader = yes
                    OR =  {
                        NOT = { country_exists = ENG }
                        ENG = { NOT = { has_government = democratic } }
                        ENG = { has_capitulated = yes }
                    }

                }
                AND = { # UK is faction leader
                    original_tag = ENG
                    is_faction_leader = yes
                    NOT = { has_country_leader = { character = ENG_winston_churchill } }
                }
                AND = { # Any one else is faction leader
                    NOT = { original_tag = USA }
                    NOT = { original_tag = ENG }
                    is_faction_leader = yes
                }
            }
        }

        visible = {
            always = no # DISABLED
            date > 1941.01.01 # Show 41
            
            ET_in_new_era = no
            has_war_with = GER
            is_faction_leader = yes

            NOT = { original_tag = SOV }
        }

        fire_only_once = no
        cost = 100

        complete_effect = {
            if = { # Tool tip ET_Surrender_to_GER_tt
                limit = { GER = { is_in_faction = yes } }
                custom_effect_tooltip = ET_Surrender_to_GER_tt
            }
            else = {
                custom_effect_tooltip = ET_Surrender_to_GER_noFaction_tt
            }

            hidden_effect = {
                set_global_flag = ET_flag_global_allies_surrender_to_ger

                # German faction members and germany gain all occupied terretory.
                every_country = {
                    limit = { is_in_faction_with = GER }
                    every_controlled_state = {
                        limit = { is_controlled_by = PREV }
                        set_state_owner_to = PREV
                    }
                }
                white_peace = GER
            }
        }

        ai_will_do = {
            base = 0
            modifier = {
                date > 1952.06.01
                add = 100
            }
            modifier = {
                date > 1945.06.01
                has_war_support < 0.25
                add = 50
            }
        }
    }

    ET_surrender_the_pacific = { # FIXME: Disabled
        icon = GFX_ET_decision_Surrender

        priority = 10

        available = {
            date > 1945.01.01
            NOT = { original_tag = JAP }

            OR = {
                has_war_support < 0.30
                surrender_progress > 0.05
            }

            # Following nation have fallen
            OR = { # SOV
                NOT = { country_exists = SOV }
                SOV = { NOT = { has_government = communism } }
                SOV = { has_capitulated = yes }
            }
        
            ET_has_any_land_in_mainland_europe = No

            OR = { # Special Nation Cases
                AND = { # USA is faction leader
                    original_tag = USA
                    is_faction_leader = yes
                    OR =  {
                        NOT = { country_exists = ENG }
                        ENG = { NOT = { has_government = democratic } }
                        ENG = { has_capitulated = yes }
                    }

                }
                AND = { # Any one else is faction leader
                    NOT = { original_tag = USA }
                    is_faction_leader = yes
                }
            }
        }

        visible = {
            always = no # DISABLED
            date > 1941.01.01 # Show 41
            
            ET_in_new_era = no
            has_war_with = GER
            is_faction_leader = yes

            NOT = { original_tag = SOV }
        }

        fire_only_once = no
        cost = 100

        complete_effect = {
            if = {
                limit = {
                    original_tag = FRA
                }
                has_country_flag = ET_flag_country_FRA_abandon_asia
                has_global_flag = ET_flag_global_FRA_abandon_asia
            }
            if = {
                limit = {
                    original_tag = ENG
                }
                has_country_flag = ET_flag_country_ENG_abandon_asia
                has_global_flag = ET_flag_global_ENG_abandon_asia
            }
            if = {
                limit = {
                    original_tag = USA
                }
                has_country_flag = ET_flag_country_usa_surrender_to_jap
                has_global_flag = ET_flag_global_usa_surrender_to_jap
            }
            
        }

        ai_will_do = {
            base = 0
            modifier = {
                date > 1952.06.01
                add = 100
            }
            modifier = {
                date > 1945.06.01
                has_war_support < 0.25
                add = 50
            }
        }
    }

    ET_hold_elections = { # FIXME: Disabled
        icon = generic_political_discourse

        #priority = 10

        available = {
            OR = {
                AND = {
                    has_government = democratic
                    democratic < 0.25
                }
                AND = {
                    has_government = neutrality
                    neutrality < 0.25
                }
                AND = {
                    has_government = communism
                    communism < 0.25
                }
            }
            has_stability < 0.30
        }

        visible = {
            has_elections = yes
            at_war = no
            OR = {
                AND = {
                    has_government = democratic
                    democratic < 0.40
                }
                AND = {
                    has_government = neutrality
                    neutrality < 0.40
                }
                AND = {
                    has_government = communism
                    communism < 0.40
                }
            }
            has_stability < 0.50
        }

        fire_only_once = no
        days_remove = 14
        cost = 200

        complete_effect = {
            add_stability = 0.10
        }

        ai_will_do = { base = 0 }
    }

    ET_allow_elections = { # FIXME: Disabled
        icon = generic_political_discourse

        #priority = 10

        available = {
            OR = {
                AND = {
                    has_government = democratic
                    democratic > 0.25
                }
                AND = {
                    has_government = neutrality
                    neutrality > 0.25
                }
                AND = {
                    has_government = communism
                    communism < 0.25
                }
            }
            has_stability < 0.30
        }

        visible = {
            always = no # DISABLED
            at_war = no
            OR = {
                AND = {
                    has_government = democratic
                    democratic < 0.40
                }
                AND = {
                    has_government = neutrality
                    neutrality < 0.40
                }
                AND = {
                    has_government = communism
                    communism < 0.40
                }
            }
            has_elections = no
            has_stability < 0.50
        }

        fire_only_once = no
        days_remove = 30
        cost = 200

        complete_effect = {
            add_stability = 0.10
            has_elections = yes
        }

        ai_will_do = { base = 0 }
    }
}

economy_decisions = {
    # Vanilla overwrite
    seize_some_trains_woo = { #repeating train seize

        visible = { 
            num_of_factories < 60
        }
        
        available = {
            has_equipment = { train_equipment < 101 }
            OR = {
                has_tech = basic_train
                has_tech = 50_train
                has_tech = 60_train
                has_tech = 70_train
                has_tech = 80_train
                has_tech = 90_train
            }
        }
        
        days_remove = 180

        ai_will_do = {
            base = 0
            modifier = {
                add = 1
                has_stability > 0.74
            }
        }

        complete_effect = {
            if = {
                limit = { has_tech = 90_train }
                add_equipment_to_stockpile = {
                    type = train_equipment_8
                    amount = 15
                }
            }
            else_if = {
                limit = { has_tech = 80_train }
                add_equipment_to_stockpile = {
                    type = train_equipment_7
                    amount = 15
                }
            }
            else_if = {
                limit = { has_tech = 70_train }
                add_equipment_to_stockpile = {
                    type = train_equipment_6
                    amount = 15
                }
            }
            else_if = {
                limit = { has_tech = 60_train }
                add_equipment_to_stockpile = {
                    type = train_equipment_5
                    amount = 15
                }
            }
            else_if = {
                limit = { has_tech = 50_train }
                add_equipment_to_stockpile = {
                    type = train_equipment_4
                    amount = 15
                }
            }
            else_if = {
                limit = { has_tech = basic_train }
                add_equipment_to_stockpile = {
                    type = train_equipment_1
                    amount = 15
                }
            }
            else = {
                add_equipment_to_stockpile = {
                    type = train_equipment
                    amount = 15
                }
            }
            add_stability = -0.05
        }
    }            
}