namespace = easycheats_main

easycheats_main.1 = { # Modifiers
	type = country_event
	title = "easycheats_main.1.title"
	desc = "easycheats_main.1.desc"
	
	left_portrait = root.current_ruler
	
	picture = easycheats_main_bg

	option = {
		name = "easycheats_exit"

		ai_chance = { 
            factor = 100 
        }
    }
    
	option = {
		name = "easycheats_back_to_common"

        trigger_event = {
            id = easycheats_main.3
        }

		ai_chance = { 
            factor = 0 
        }
	}
    
    option = {
		name = "easycheats_main_all_on"

        trigger = {
            OR = {
                NOT = {
                    has_country_modifier = easy_cheats_technology
                }
                NOT = {
                    has_country_modifier = easy_cheats_government
                }
                NOT = {
                    has_country_modifier = easy_cheats_population
                }
                NOT = {
                    has_country_modifier = easy_cheats_happiness
                }
                NOT = {
                    has_country_modifier = easy_cheats_loyalty
                }
                NOT = {
                    has_country_modifier = easy_cheats_speed
                }
                NOT = {
                    has_country_modifier = easy_cheats_economy
                }
                NOT = {
                    has_country_modifier = easy_cheats_military
                }
                NOT = {
                    has_country_modifier = easy_cheats_food
                }                  
                NOT = {
                    any_owned_province = {
                        has_province_modifier = easy_cheats_provinces                        
                    } 
                }   
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_food
                }                
            }

            add_country_modifier = {
                name = easy_cheats_food
                duration = -1
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_technology
                }
            }
            add_country_modifier = {
                name = easy_cheats_technology
                duration = -1
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_government
                }
            }
            add_country_modifier = {
                name = easy_cheats_government
                duration = -1
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_population
                }
            }
            add_country_modifier = {
                name = easy_cheats_population
                duration = -1
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_happiness
                }
            }
            add_country_modifier = {
                name = easy_cheats_happiness
                duration = -1
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_loyalty
                }
            }
            add_country_modifier = {
                name = easy_cheats_loyalty
                duration = -1
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_speed
                }
            }
            add_country_modifier = {
                name = easy_cheats_speed
                duration = -1
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_economy
                }
            }
            add_country_modifier = {
                name = easy_cheats_economy
                duration = -1
            }
        }
        if = {
            limit = {
                NOT = {
                    has_country_modifier = easy_cheats_military
                }
            }
            add_country_modifier = {
                name = easy_cheats_military
                duration = -1
            }
        }
        every_owned_province = {
            limit = {
                NOT = {
                    has_province_modifier = easy_cheats_provinces
                }
            }            
            add_province_modifier = {
                name = easy_cheats_provinces
                duration = -1
            }
        }

        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_all_off"

        trigger = {
            OR = {
                has_country_modifier = easy_cheats_food
                has_country_modifier = easy_cheats_technology
                has_country_modifier = easy_cheats_government
                has_country_modifier = easy_cheats_population
                has_country_modifier = easy_cheats_happiness
                has_country_modifier = easy_cheats_loyalty
                has_country_modifier = easy_cheats_speed
                has_country_modifier = easy_cheats_economy
                has_country_modifier = easy_cheats_military                             
                any_owned_province = {
                    has_province_modifier = easy_cheats_provinces                        
                } 
            }
        }

        remove_country_modifier = easy_cheats_food
        remove_country_modifier = easy_cheats_all
        remove_country_modifier = easy_cheats_technology
        remove_country_modifier = easy_cheats_government
        remove_country_modifier = easy_cheats_population
        remove_country_modifier = easy_cheats_happiness
        remove_country_modifier = easy_cheats_loyalty
        remove_country_modifier = easy_cheats_speed
        remove_country_modifier = easy_cheats_economy
        remove_country_modifier = easy_cheats_military
        
        every_province = {
            limit = {
                has_province_modifier = easy_cheats_provinces
            }            
            remove_province_modifier = easy_cheats_provinces
        }
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_provinces_on"

        trigger = {
            any_owned_province = {                
                NOT = {
                    has_province_modifier = easy_cheats_provinces
                }
            }
        }

        every_owned_province = {
            limit = {
                NOT = {
                    has_province_modifier = easy_cheats_provinces
                }
            } 
            
            add_province_modifier = {
                name = easy_cheats_provinces
                duration = -1
            }	
        }
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_provinces_off"

        trigger = {
            any_province = {
                has_province_modifier = easy_cheats_provinces
            }
        }

        every_province = {
            limit = {
                has_province_modifier = easy_cheats_provinces
            }            
            remove_province_modifier = easy_cheats_provinces
        }
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
    }

    option = {
		name = "easycheats_main_population_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_population
            }
        }

        add_country_modifier = {
            name = easy_cheats_population
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_population_off"

        trigger = {
            has_country_modifier = easy_cheats_population
        }

        remove_country_modifier = easy_cheats_population
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
    }
    
    option = {
		name = "easycheats_main_food_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_food
            }
        }

        add_country_modifier = {
            name = easy_cheats_food
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_food_off"

        trigger = {
            has_country_modifier = easy_cheats_food
        }

        remove_country_modifier = easy_cheats_food
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_military_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_military
            }
        }

        add_country_modifier = {
            name = easy_cheats_military
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_military_off"

        trigger = {            
            has_country_modifier = easy_cheats_military
        }

        remove_country_modifier = easy_cheats_military
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_technology_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_technology
            }
        }

        add_country_modifier = {
            name = easy_cheats_technology
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_technology_off"

        trigger = {
            has_country_modifier = easy_cheats_technology
        }

        remove_country_modifier = easy_cheats_technology
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_government_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_government
            }
        }

        add_country_modifier = {
            name = easy_cheats_government
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_government_off"

        trigger = {
            has_country_modifier = easy_cheats_government
        }

        remove_country_modifier = easy_cheats_government
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}
    
    option = {
		name = "easycheats_main_happiness_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_happiness
            }
        }

        add_country_modifier = {
            name = easy_cheats_happiness
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_happiness_off"

        trigger = {
            has_country_modifier = easy_cheats_happiness
        }

        remove_country_modifier = easy_cheats_happiness
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}
    
    option = {
		name = "easycheats_main_loyalty_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_loyalty
            }
        }

        add_country_modifier = {
            name = easy_cheats_loyalty
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_loyalty_off"

        trigger = {
            has_country_modifier = easy_cheats_loyalty
        }

        remove_country_modifier = easy_cheats_loyalty
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_speed_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_speed
            }
        }

        add_country_modifier = {
            name = easy_cheats_speed
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_speed_off"

        trigger = {
            has_country_modifier = easy_cheats_speed
        }

        remove_country_modifier = easy_cheats_speed
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_economy_on"

        trigger = {
            NOT = {
                has_country_modifier = easy_cheats_economy
            }
        }

        add_country_modifier = {
            name = easy_cheats_economy
            duration = -1
        }	
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}

    option = {
		name = "easycheats_main_economy_off"

        trigger = {
            has_country_modifier = easy_cheats_economy
        }

        remove_country_modifier = easy_cheats_economy
        
        trigger_event = {
            id = easycheats_main.1
        }

		ai_chance = { 
            factor = 0 
        }
	}
}