zti_rasshirenie_platsdarma = {	
	zti_zahvat_sosedei = {
		icon = generic_political_discourse
		targets = { ZAX ZJF ZHK }
		available = {
			has_government = democratic
			FROM = {
				exists = yes
				is_neighbor_of = ROOT
                NOT = {
				    has_government = democratic
					has_war_with = ROOT
					is_in_faction_with = ROOT
					is_puppet_of = ROOT
				}				
			}
		}
		fire_only_once = yes		
		cost = 50
		complete_effect = {
			every_state = {
				limit = { is_core_of = FROM }				
				add_claim_by = ROOT
			}
			create_wargoal = {
				type = annex_everything
				target = FROM					
			}
		}
		ai_will_do = {
            base = 0
			modifier = {
				add = 5
				strength_ratio = {
					tag = FROM
					ratio > 0.6
				}
			}
		}
	}
}
ZTI_ateism = {				
	zti_bolshe_shkol = {
		icon = generic_political_discourse	
		cost = 0
		complete_effect = {
		}
    }	
	zti_universitety_dlya_vseh = {
		icon = generic_political_discourse
		cost = 0
		complete_effect = {
		}
    }
    zti_nauchniy_podhod = {
		icon = generic_political_discourse	
		cost = 0
		complete_effect = {
		}
    }
    zti_zapret_na_vse_religii = {
		icon = generic_political_discourse	
		cost = 0
		complete_effect = {
		}
    }
    zti_programma_po_izyatiyu_oruzhiya = {
		icon = generic_political_discourse	
		cost = 0
		complete_effect = {
		}
    }
    zti_nezhelatelnye_lichnosti = {
		icon = generic_political_discourse	
		cost = 0
		complete_effect = {
		}
    }
    zti_arest_fanatikov = {
		icon = generic_political_discourse		
		cost = 0
		complete_effect = {
		}
    }
    zti_zamenit_bogov = {
		icon = generic_political_discourse	
		cost = 0
		complete_effect = {
		}
    }
    zti_filosofskie_debaty = {
		icon = generic_political_discourse		
		cost = 0
		complete_effect = {
		}
    }
    zti_unichtozhenie_hramov = {
		icon = generic_political_discourse	
		cost = 0
		complete_effect = {
		}
    }
}
ZTI_sunnism = {		
    zti_rasprotranenie_sunnisma = {
		icon = GFX_zti_rasprotranenie_sunnisma_icon
        available = {
            political_power_daily > 0.3
            has_war = no
            has_stability > 0.5
        }
        state_target = yes
        target_array = controlled_states #
        target_trigger = {
            FROM = {
                CONTROLLER = {
                    tag = ROOT
                }
                check_variable = {
                    var = religion_var
                    value = 15
                    compare = not_equals
                }               
            }       
        }         
        days_remove = 120 
		visible = {
			has_completed_focus = zti_ne_tolko_v_chikisime	   	
		}       
        fire_only_once = no		
		cost = 60
        on_map_mode = map_only
        modifier = {
            political_power_gain = -0.3
        }
        complete_effect = {
            add_stability = -0.01
            FROM = {
                add_dynamic_modifier = {
                    modifier = ar_religiozn_separatism
                    days = 140
                }
            }
        }
		remove_effect = {
            FROM = {
                set_variable = { religion_var = 15 }
            }
            if = {
				limit = {
					FROM = {
						NOT = {
							is_core_of = ZTI
						}				
					}
				}
				FROM = {
					add_core_of = ZTI
				}				
			}
			if = {
				limit = {
					FROM = {
						state_population  > 40000						
					}
				}
				FROM = {
					add_manpower = -24520
					add_to_variable = { global.jertvy_voin = 24520 }
				}
				
			}
			else_if = {
				limit = {
					FROM = {
						state_population  > 8000
						state_population  < 40000
					}
				}
				FROM = {
					add_manpower = -5411
					add_to_variable = { global.jertvy_voin = 5411 }
				}
			}
		}
    }
}
ZTI_katolicism = {	
    zti_rasprotranenie_katolicisma = {
	    icon = GFX_zti_rasprotranenie_katolicisma_icon
        available = {
            political_power_daily > 0.3
            has_war = no
            has_stability > 0.5
        }
        state_target = yes
        target_array = controlled_states #
        target_trigger = {
            FROM = {
                CONTROLLER = {
                    tag = ROOT
                }
                check_variable = {
                    var = religion_var
                    value = 2
                    compare = not_equals
                }                  
            }       
        }         
        days_remove = 120  
		visible = {
			has_completed_focus = zti_ne_tolko_v_chikisime	    	
		}       
        fire_only_once = no		
		cost = 60
        on_map_mode = map_only
        modifier = {
            political_power_gain = -0.3
        }
        complete_effect = {
            add_stability = -0.01  
            FROM = {
                add_dynamic_modifier = {
                    modifier = ar_religiozn_separatism
                    days = 140
                }
            }			
        }
		remove_effect = {
            FROM = {
                set_variable = { religion_var = 2 }
            }
			custom_effect_tooltip = region_teper_katholic_tt
            if = {
				limit = {
					FROM = {
						NOT = {
							is_core_of = ZTI
						}				
					}
				}
				FROM = {
					add_core_of = ZTI
				}				
			}
			if = {
				limit = {
					FROM = {
						state_population  > 40000						
					}
				}
				FROM = {
					add_manpower = -24520
					add_to_variable = { global.jertvy_voin = 24520 }
				}
				
			}
			else_if = {
				limit = {
					FROM = {
						state_population  > 8000
						state_population  < 40000
					}
				}
				FROM = {
					add_manpower = -5411
					add_to_variable = { global.jertvy_voin = 5411 }
				}
			}
		}
    }       	
}
ZTI_sintoism = {		
    zti_rasprotranenie_sintoisma = {
		icon = GFX_zti_rasprotranenie_sintoisma_icon
        available = {
            political_power_daily > 0.3
            has_war = no
            has_stability > 0.5
        }
        state_target = yes
        target_array = controlled_states #
        target_trigger = {
            FROM = {
                CONTROLLER = {
                    tag = ROOT
                }
                check_variable = {
                    var = religion_var
                    value = 30
                    compare = not_equals
                }                   
            }       
        }         
        days_remove = 120  
		visible = {
			has_completed_focus = zti_ne_tolko_v_chikisime	     	
		}       
        fire_only_once = no		
		cost = 60
        on_map_mode = map_only
        modifier = {
            political_power_gain = -0.3
        }
        complete_effect = {
            add_stability = -0.01 
            FROM = {
                add_dynamic_modifier = {
                    modifier = ar_religiozn_separatism
                    days = 140
                }
            }        
        }
		remove_effect = {
            FROM = {
                set_variable = { religion_var = 30 }
            }
            if = {
				limit = {
					FROM = {
						NOT = {
							is_core_of = ZTI
						}				
					}
				}
				FROM = {
					add_core_of = ZTI
				}				
			}
			if = {
				limit = {
					FROM = {
						state_population  > 40000						
					}
				}
				FROM = {
					add_manpower = -24520
					add_to_variable = { global.jertvy_voin = 24520 }
				}				
			}
			else_if = {
				limit = {
					FROM = {
						state_population  > 8000
						state_population  < 40000
					}
				}
				FROM = {
					add_manpower = -5411
					add_to_variable = { global.jertvy_voin = 5411 }
				}
			}
		}
    }    
}
zti_adzumskaya_konfederatsiya = {     
	zti_umenshenie_avtonomii = {
		icon = zti_propaganda_campaigns
		days_remove = 120
		cost = 20		
		available = {
			FROM = {
				is_subject_of = ROOT
			}		
			political_power_daily > 0.5			
		}
		target_array = subjects
		target_trigger = {
			FROM = {
				is_subject_of = ROOT
			}
		}
		complete_effect = {
			FROM = { add_timed_idea = { idea = xma_intagr_marionetki days = 120 } }
		}
		modifier = {
			political_power_cost = 0.5
		}
		ai_will_do = {
			factor = 50
		}
	}
	zti_polnaya_integratsiya = {
		icon = GFX_decision_eng_trade_unions_demand
		days_remove = 20
		cost = 30		
		available = {
			FROM = {
				is_subject_of = ROOT				
				compare_autonomy_progress_ratio < 0.5
			}
			FROM = {
				compare_autonomy_state < autonomy_puppet
			}			
			political_power_daily > 0.5			
		}
		target_array = subjects
		target_trigger = {
			FROM = {
				is_subject_of = ROOT
			}
		}
		remove_effect = {
			FROM = { country_event = { id = erie.66 } }
		}
		modifier = {
			political_power_cost = 0.5
		}
		ai_will_do = {
			factor = 50
		}
	}
}
zti_natsionalizatsiya_zemel = {		
	zti_core_states = {
		icon = generic_decision
        state_target = yes
        target_array = controlled_states 
        target_trigger = {
            FROM = {
                CONTROLLER = {
                    tag = ROOT
                }
				OR = {
                    is_core_of = ZSG
                    is_core_of = ZLS
                    is_core_of = ZTR					
				}
                NOT = {
				    is_core_of = ROOT
                }				
            }       
        }         
        days_remove = 50 
		available = {
            FROM = {
			    is_fully_controlled_by = ROOT
			}
        }    
        fire_only_once = no		
		cost = 25
        on_map_mode = map_only
        remove_effect = {
		    FROM = {
				add_core_of = ROOT			
			}
		}
	} 
} 
zti_beregovaya_zheleznaya_doroga = {
	zti_zheleznaya_doroga = {
		icon = generic_political_discourse
		cost = 50
		ai_will_do = {
			factor = 5
			modifier = {
				factor = 45
			}			
		}
		days_remove = 150
		remove_effect = {
			build_railway = {
            level = 1
            build_only_on_allied = yes
            controller_priority = {
                base = 1
                modifier = {
                    tag = ZTI
                    add = 2
                }
            }
            fallback = yes
            path = { 7069 11943 1102 7203 12857 8111 8038 7978 5012 4920 10875 7992 }
                start_province = 7069
                target_province = 7992
            } 
		}      
	}
} 
zti_voennaya_operatsiya_v_algarvii = {
    zti_vosstanie_separatistov = {
		icon = generic_civil_support
		cancel_trigger = {
			179 = {
			    NOT = {
			        has_dynamic_modifier = { modifier = zti_algarvian_revolters_dynamic_modifier }
				}
			}
		}
		days_mission_timeout = 180
		activation = {
			179 = {
			    has_dynamic_modifier = { modifier = zti_algarvian_revolters_dynamic_modifier }
			}
		}	
		fixed_random_seed = no
		is_good = no
		timeout_effect = {
		    complete_national_focus = zti_na_poroge_kraha
		}
	}
	zti_nachat_likvidatsiyu_separatistov = {
		icon = generic_oppression		
		available = {
		    179 = {
			    has_dynamic_modifier = { modifier = zti_algarvian_revolters_dynamic_modifier }
			}
			divisions_in_state = {
				state = 179	
				size > 5
			}
		}
		highlight_states = {
            highlight_state_targets = {
			    state = 179
		    } 
        }
		custom_cost_trigger = {
            command_power > 24
			has_equipment = {
                infantry_equipment > 249
            }
        }
        custom_cost_text = decision_cost_cp_25_ie_250
		ai_will_do = {
			factor = 0
			modifier = {
				add = 200
				divisions_in_state = {
					state = 179	
					size > 4
				}
			}
		}
		visible = {
		    NOT = { has_active_mission = zti_likvidatsiya_separatistov }
			179 = {
			    has_dynamic_modifier = { modifier = zti_algarvian_revolters_dynamic_modifier }
			}
		}
		is_good = yes
		complete_effect = {
			activate_mission = zti_likvidatsiya_separatistov
			custom_effect_tooltip = MAN_pacify_bandits_mission_explanation
		}
	}  
	zti_likvidatsiya_separatistov = {
		icon = generic_civil_support
		available = {
			always = no
		}
		days_mission_timeout = MAN_main_control_timer?180
		activation = {
			always = no 
		}
		cancel_trigger = {
			divisions_in_state = {
				state = 179	
				size < 5
			}
		}
		highlight_states = {
            highlight_state_targets = {
			    state = 179
		    } 
        }
		is_good = yes
		timeout_effect = {
			custom_effect_tooltip = zti_likvidatsiya_separatistov
			army_experience = 10
			country_event = taitseo.9 
		}
	}
}
zti_liga_svobody_faction = {
	zti_liga_svobody_priglashenie_na_pablic = {
		#targets = { BHR QAT SAU OMA YEM IRQ SYR LEB ISR PAL }
		targets_dynamic = yes
		on_map_mode = map_and_decisions_view
		target_array = global.countries
		target_trigger = {
			FROM = {
				has_government = democratic
				is_in_faction = no
				is_puppet = no
				has_opinion = {
					target = ZTI
					value > 50
				}
			}
		}
		icon = suck_my_big_penis
		cost = 20
		complete_effect = {
			FROM = {
				#add_to_faction = FROM
				country_event = taitseo.45
			}
		}
	}
}
zti_iskorenit_ugrozu_category = {
	zti_iskorenit_ugrozu_decision = {
		#target_root_trigger = {
		#	has_completed_focus = zti_iskorenit_ugrozu
		#}
		#targets = { BHR QAT SAU OMA YEM IRQ SYR LEB ISR PAL }
		targets_dynamic = yes
		target_array = global.countries
		target_trigger = {
			FROM = {
				NOT = {
					is_ally_with = ZTI
					is_puppet_of = ZTI
				}
				FROM = {
					any_owned_state = {
						OR = {
							is_on_continent = north_america
							is_on_continent = south_america
							is_on_continent = africa
						}
					}
				}
			}
		}
		icon = my_icon
		cost = 50
		#war_with_target_on_complete = yes
		complete_effect = {
			create_wargoal = {
				target = FROM
				type = annex_everything
			}
		}
	}
}           
zti_federatsiya_dlya_vseh_category = {
	zti_federatsiya_dlya_vseh_decision = {
		state_target = yes
		#target_root_trigger = {
		#	has_completed_focus = my_focus
		#}
		target_array = ZTI.controlled_states
		target_trigger = {
			FROM = {
				is_owned_by = ZTI
				NOT = {
					is_core_of = ZTI
				}
			}
		}
		on_map_mode = map_and_decisions_view
		icon = my_icon
		cost = 70
		days_remove = 80
		remove_effect = {
			FROM = {
				add_core_of = ZTI
			}
		}
	}
}     											