﻿#Build Pleasure Dome

### Devise Pleasure Dome ###
mpo_pleasure_dome_decision = {
    picture = {
        reference = "gfx/interface/illustrations/event_scenes/mpo_city_steppe.dds"
    }
	decision_group_type = nomad_minor
	sort_order = 80

	is_shown = {
		has_mpo_dlc_trigger = yes
        OR = {
	       	government_has_flag = government_is_nomadic
            has_trait = nomadic_philosophy
        }
        NOT = { has_global_variable = devised_pleasure_dome }
        culture = {
            OR = {
                has_cultural_pillar = heritage_mongolic
                has_cultural_pillar = heritage_turkic
				has_cultural_pillar = heritage_hunnic
				has_cultural_pillar = heritage_magyar
            }
        }
	}

	is_valid_showing_failures_only = {
		custom_tooltip = {
			text = mpo_pleasure_dome_no_barony_tt
			any_held_title = {
				tier = tier_barony
				title_province = {
                    has_special_building_slot = no
                }
				is_capital_barony = yes
				holder = root
				is_leased_out = no
                title_province = { geographical_region = world_steppe }
			}
		}
	}

	is_valid = {
		prestige_level >= very_high_prestige_level
		highest_held_title_tier >= tier_empire
        trigger_if = {
            limit = {
                government_has_flag = government_is_nomadic
            }
            custom_tooltip = {
		    	text = dominate_title_trigger_dominance_4
		    	OR = {
		    		has_realm_law = nomadic_authority_5
		    		has_realm_law = nomadic_authority_4
		    	}
		    }
        }
		trigger_if = {
            limit = {
                government_has_flag = government_is_steppe_admin
            }
            custom_tooltip = {
		    	text = mpo_pleasure_dome_decision_steppe_admin
		    	OR = {
		    		has_realm_law = meritocratic_bureaucracy_2
		    		has_realm_law = meritocratic_bureaucracy_3
		    	}
		    }
        }
	}

	cost = {
		treasury_or_gold = {
			value = massive_treasury_or_gold_value
		}
		prestige = massive_prestige_value
		herd = {
            value = 0
            if = {
                limit = {
                    government_has_flag = government_is_nomadic
                }
                add = 2000
            }
        }
        influence = {
            value = 0
            if = {
                limit = {
                    government_has_flag = government_is_steppe_admin
                }
                add = 700
            }
        }
	}

    widget = {
        controller = create_holy_order
        barony_valid = {
            trigger_if = {
                limit = { exists = this }
                title_province = {
                    has_special_building_slot = no
                }
                is_capital_barony = yes
                holder = scope:ruler
                is_leased_out = no
            }
        }
    }
    effect = {
        send_interface_toast = {
            type = event_toast_effect_good
            title = mpo_pleasure_dome_slot_added.toast
            
            if = { 
                limit = { exists = scope:barony }
                custom_tooltip = {
                    text = mpo_add_pleasure_dome_effect_tt
                    scope:barony.title_province = { add_special_building = pleasure_dome }
                }
            }
        }
        custom_description_no_bullet = { text = mpo_pleasure_dome_barony_decision_tt }
        
        set_global_variable = {
            name = devised_pleasure_dome
            value = yes
        }
    }
	
	ai_check_interval_by_tier = {
		barony = 0
		county = 0
		duchy = 0
		kingdom = 0
		empire = 60
		hegemony = 60
	}
    ai_potential = {
        is_at_war = no
		gold >= 1500
    }
    ai_will_do = {
        base = 100
    }
}

# Expand the Steppe
# List is as follows:
#
## Western Steppe expansion regions:
#	ghw_region_anatolia
#	custom_eastern_balkans
#	ghw_region_northern_russia
#	ghw_region_southern_russia
#	custom_hungary
#	ghw_region_poland
#	ghw_region_baltic
# 	dlc_mpo_steppe_caucasus_expansion
## Central Steppe expansion regions:
#	world_transoxiana
#	world_khorasan
#	dlc_mpo_steppe_persia_expansion
#	dlc_mpo_steppe_siberia_further_expansion
## Eastern Steppe expansion regions:
#	dlc_mpo_steppe_hexi_tarim_expansion
#	dlc_mpo_steppe_north_china_expansion
#	dlc_mpo_steppe_central_china_expansion
#	world_asia_korea
#	world_asia_japan

### Expand The Steppe Decision ###
expand_the_steppe_decision = {
    picture = {
        reference = "gfx/interface/illustrations/event_scenes/mpo_raid_burning_asian.dds"
    }
    decision_group_type = nomad_major
	
	ai_check_interval_by_tier = {
		barony = 0
		county = 0
		duchy = 0
		kingdom = 8
		empire = 8
		hegemony = 8
	}

	title = expand_the_steppe_decision_generic

    desc = expand_the_steppe_decision_desc
    selection_tooltip = expand_the_steppe_decision_tooltip

	widget = {
		gui = "decision_view_widget_option_list_generic"
		controller = decision_option_list_controller
		decision_to_second_step_button = "SELECT_ACTION"
		show_from_start = yes


		# steppe_west potential regions
		item = {
			value = custom_eastern_balkans
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:custom_eastern_balkans
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_eastern_balkans_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = custom_eastern_balkans
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = custom_eastern_balkans
	                }
				}
			}
			localization = custom_eastern_balkans
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = ghw_region_northern_russia
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:ghw_region_northern_russia
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_northern_russia_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = ghw_region_northern_russia
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = ghw_region_northern_russia
	                }
				}
			}
			localization = ghw_region_northern_russia
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = ghw_region_southern_russia
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:ghw_region_southern_russia
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_southern_russia_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = ghw_region_southern_russia
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = ghw_region_southern_russia
	                }
				}
			}
			localization = ghw_region_southern_russia
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = dlc_mpo_steppe_caucasus_expansion
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:dlc_mpo_steppe_caucasus_expansion
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_caucasus_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = dlc_mpo_steppe_caucasus_expansion
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = dlc_mpo_steppe_caucasus_expansion
	                }
				}
			}
			localization = dlc_mpo_steppe_caucasus_expansion
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = ghw_region_poland
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:ghw_region_poland
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_poland_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = ghw_region_poland
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = ghw_region_poland
	                }
				}
			}
			localization = ghw_region_poland
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 2137
			}
		}
		item = {
			value = custom_hungary
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:custom_hungary
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_hungary_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = custom_hungary
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = custom_hungary
	                }
				}
			}
			localization = custom_hungary
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = ghw_region_anatolia
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:ghw_region_anatolia
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_anatolia_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = ghw_region_anatolia
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = ghw_region_anatolia
	                }
				}
			}
			localization = ghw_region_anatolia
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = ghw_region_baltic
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:ghw_region_baltic
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_baltics_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = ghw_region_baltic
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = ghw_region_baltic
	                }
				}
			}
			localization = ghw_region_baltic
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}

		# steppe_central potential regions
		item = {
			value = world_transoxiana
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:world_transoxiana
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_transoxiana_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = world_transoxiana
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = world_transoxiana
	                }
				}
			}
			localization = world_transoxiana
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = dlc_mpo_steppe_siberia_further_expansion
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:dlc_mpo_steppe_siberia_further_expansion
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_siberia_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = dlc_mpo_steppe_siberia_further_expansion
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = dlc_mpo_steppe_siberia_further_expansion
	                }
				}
			}
			localization = dlc_mpo_steppe_siberia_further_expansion
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 0 #Tribes of the North
			}
		}
		item = {
			value = world_khorasan
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:world_khorasan
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_khorasan_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = world_khorasan
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = world_khorasan
	                }
				}
			}
			localization = world_khorasan
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = dlc_mpo_steppe_persia_expansion
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:dlc_mpo_steppe_persia_expansion
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_persia_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = dlc_mpo_steppe_persia_expansion
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = dlc_mpo_steppe_persia_expansion
	                }
				}
			}
			localization = dlc_mpo_steppe_persia_expansion
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}

		## Eastern Steppe

		item = {
			value = dlc_mpo_steppe_hexi_tarim_expansion
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:dlc_mpo_steppe_hexi_tarim_expansion
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_tarim_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = dlc_mpo_steppe_hexi_tarim_expansion
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = dlc_mpo_steppe_hexi_tarim_expansion
	                }
				}
			}
			localization = dlc_mpo_steppe_hexi_tarim_expansion
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = dlc_mpo_steppe_north_china_expansion
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:dlc_mpo_steppe_north_china_expansion
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_north_china_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = dlc_mpo_steppe_north_china_expansion
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = dlc_mpo_steppe_north_china_expansion
	                }
				}
			}
			localization = dlc_mpo_steppe_north_china_expansion
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = dlc_mpo_steppe_central_china_expansion
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	#region_is_adjacent = geographical_region:dlc_mpo_steppe_central_china_expansion
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_central_china_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = dlc_mpo_steppe_central_china_expansion
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = dlc_mpo_steppe_central_china_expansion
	                }
				}
			}
			localization = dlc_mpo_steppe_central_china_expansion
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = world_asia_korea
			is_shown = {
	            situation:the_great_steppe ?= {
	            	any_situation_sub_region = {
	                	region_is_adjacent = geographical_region:world_asia_korea
	                }
	            }
			}
			is_valid = {
				custom_tooltip = {
					text = custom_korea_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = world_asia_korea
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = world_asia_korea
	                }
				}
			}
			localization = world_asia_korea
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
		item = {
			value = world_asia_japan
			is_shown = {
				# there is no strait in Japan XD
				any_realm_province = {
					geographical_region = special_mongol_empire_blue_horde_region
				}
			}
			is_valid = {
				custom_tooltip = {
					text = custom_japan_expand_steppe_tt
					situation:the_great_steppe ?= {
	                    NOT = {
	                        any_situation_sub_region = {
	                            situation_sub_region_has_geographical_region = world_asia_japan
	                        }
	                    }
	                }
	                any_realm_province = {
	                    geographical_region = world_asia_japan
	                }
				}
			}
			localization = world_asia_japan
			icon = "gfx/interface/icons/message_feed/banner.dds"
			ai_chance = {
				value = 100
			}
		}
	}

    is_shown = {
        has_mpo_dlc_trigger = yes

        government_has_flag = government_is_nomadic

        OR = {
			great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_anatolia }
			great_steppe_not_in_sub_region_trigger = { REGION = custom_eastern_balkans }
			great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_northern_russia }
			great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_southern_russia }
			great_steppe_not_in_sub_region_trigger = { REGION = custom_hungary }
			great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_poland }
			great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_baltic }
			great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_caucasus_expansion }
			great_steppe_not_in_sub_region_trigger = { REGION = world_transoxiana }
			great_steppe_not_in_sub_region_trigger = { REGION = world_khorasan }
			great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_persia_expansion }
			great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_siberia_further_expansion }
			great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_hexi_tarim_expansion }
			great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_north_china_expansion }
			great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_central_china_expansion }
			great_steppe_not_in_sub_region_trigger = { REGION = world_asia_korea }
			great_steppe_not_in_sub_region_trigger = { REGION = world_asia_japan }
        }
    }

    is_valid = {
        is_independent_ruler = yes
        highest_held_title_tier >= tier_duchy

        trigger_if = {
        	limit = {
	    		scope:ghw_region_anatolia = yes
	    	}
		    completely_controls_region = ghw_region_anatolia
		}
        trigger_else_if = {
        	limit = {
	    		scope:custom_eastern_balkans = yes
	    	}
		    completely_controls_region = custom_eastern_balkans
		}
        trigger_else_if = {
        	limit = {
	    		scope:ghw_region_northern_russia = yes
	    	}
		    completely_controls_region = ghw_region_northern_russia
		}
        trigger_else_if = {
        	limit = {
	    		scope:ghw_region_southern_russia = yes
	    	}
		    completely_controls_region = ghw_region_southern_russia
		}
        trigger_else_if = {
        	limit = {
	    		scope:custom_hungary = yes
	    	}
		    completely_controls_region = custom_hungary
		}
        trigger_else_if = {
        	limit = {
	    		scope:ghw_region_poland = yes
	    	}
		    completely_controls_region = ghw_region_poland
		}
        trigger_else_if = {
        	limit = {
	    		scope:ghw_region_baltic = yes
	    	}
		    completely_controls_region = ghw_region_baltic
		}
        trigger_else_if = {
        	limit = {
	    		scope:dlc_mpo_steppe_caucasus_expansion = yes
	    	}
		    completely_controls_region = dlc_mpo_steppe_caucasus_expansion
		}

        trigger_else_if = {
        	limit = {
	    		scope:world_transoxiana = yes
	    	}
		    completely_controls_region = world_transoxiana
		}
        trigger_else_if = {
        	limit = {
	    		scope:world_khorasan = yes
	    	}
		    completely_controls_region = world_khorasan
		}
        trigger_else_if = {
        	limit = {
	    		scope:dlc_mpo_steppe_persia_expansion = yes
	    	}
		    completely_controls_region = dlc_mpo_steppe_persia_expansion
		}
        trigger_else_if = {
        	limit = {
	    		scope:dlc_mpo_steppe_siberia_further_expansion = yes
	    	}
		    completely_controls_region = dlc_mpo_steppe_siberia_further_expansion
		}

        trigger_else_if = {
        	limit = {
	    		scope:dlc_mpo_steppe_hexi_tarim_expansion = yes
	    	}
		    completely_controls_region = dlc_mpo_steppe_hexi_tarim_expansion
		}
        trigger_else_if = {
        	limit = {
	    		scope:dlc_mpo_steppe_north_china_expansion = yes
	    	}
		    completely_controls_region = dlc_mpo_steppe_north_china_expansion
		}
        trigger_else_if = {
        	limit = {
	    		scope:dlc_mpo_steppe_central_china_expansion = yes
	    	}
		    completely_controls_region = dlc_mpo_steppe_central_china_expansion
		}
        trigger_else_if = {
        	limit = {
	    		scope:world_asia_korea = yes
	    	}
		    completely_controls_region = world_asia_korea
		}
        trigger_else_if = {
        	limit = {
	    		scope:world_asia_japan = yes
	    	}
		    completely_controls_region = world_asia_japan
		}
        trigger_else = {
        	always = no
		}
    }

    cooldown = { years = 5 }

    is_valid_showing_failures_only = {
        trigger_if = {
            limit = {
                is_ai = no
            }
            NOT = { exists = involved_activity }
            NOT = { has_trait = infirm }
            is_available = yes
        }
        trigger_else = {
            is_imprisoned = no
            is_incapable = no
            is_alive = yes
            NOT = { has_trait = infirm }
        }
    }

    cost = {
        prestige = {
            value = {
                add = mpo_expand_steppe_prestige_cost
                #AI suck
                if = {
                    limit = {
                        is_ai = yes
                    }
                    multiply = 0.5
                }
            }
        }
    }

	effect = {
		# Send a toast to yourself, as a confirmation that the Steppe Expansion happened
		save_scope_as = steppe_expander
		send_interface_toast = {
			type = steppe_expansion_happened
			title = expand_the_steppe_decision_notification_toast
			left_icon = root
			expanding_steppe_effect = yes
			add_legitimacy = 150
		}
		hidden_effect = {
			# Send a notification to any other player in the Steppe
			every_player = {
				limit = {
					NOT = { this = root }

			    	any_character_situation = {
			    		situation:the_great_steppe ?= this
			    	}
				}
				send_interface_message = {
					type = steppe_expansion_happened
					title = expand_the_steppe_decision_notification_toast
					left_icon = root
					show_as_tooltip = {
						expanding_steppe_effect = yes
					}
				}
			}
		}
    }

    ai_will_do = {
        base = 1
    }
}

##Paiza decisions

#Starting decision, establish the system 
### Establish Paiza System ###
mpo_establish_paiza_system_decision = {
    picture = {
        reference = "gfx/interface/illustrations/event_scenes/mpo_rural_village_asian.dds"
    }
    decision_group_type = nomad_major
    sort_order = 80

    is_shown = {
		has_mpo_dlc_trigger = yes
        government_has_flag = government_is_nomadic
        NOT = { has_character_flag = established_paiza_system }
		exists = situation:the_great_steppe
		OR = {
            has_realm_law = nomadic_authority_2
            has_realm_law = nomadic_authority_3
			has_realm_law = nomadic_authority_4
			has_realm_law = nomadic_authority_5
		}
    }

    is_valid = {
        culture ?= {
            has_innovation = innovation_ledger
        }
        is_independent_ruler = yes
        custom_tooltip = {
			text = mpo_establish_paiza_system_decision_is_gurkhan
			exists = situation:the_great_steppe
			this = situation:the_great_steppe.situation_top_herd
		}
		OR = {
			has_realm_law = nomadic_authority_4
			has_realm_law = nomadic_authority_5
		}    
    }

    is_valid_showing_failures_only = {
        trigger_if = {
            limit = {
                exists = global_var:global_established_paiza_system
            }
            custom_tooltip = {
                text = mpo_establish_paiza_system_decision.paiza_recently_established
                subject = global_var:global_established_paiza_system
                NAND = {  
                    global_var:global_established_paiza_system ?= {
                        is_alive = yes
                        has_realm_law = nomadic_authority_5
                    }
                }
            }
        }
    }

	cost = {
        gold = {
            value = 0
            if = {
                limit = {
                    has_treasury = no
                }
                add = massive_prestige_value
           }
        }

        treasury = {
            value = 0
            if = {
                limit = {
                    has_treasury = yes
                }
                add = 250
            }
        }

        herd = {
            value = 2000
        }
    }


    effect = {
        add_character_flag = established_paiza_system
        set_global_variable = {
            name = global_established_paiza_system
            value = root
            years = 8
        }
        custom_tooltip = mpo_establish_paiza_system_decision.grant_paiza_interaction_unlocked
        custom_tooltip = mpo_establish_paiza_system_decision.request_paiza_interaction_unlocked
        custom_tooltip = mpo_establish_paiza_system_decision.paiza_obedient
        custom_tooltip = mpo_establish_paiza_system_decision.call_for_merchants_decision_unlocked
        custom_tooltip = mpo_establish_paiza_system_decision.leverage_khan_authority_unlocked
        custom_tooltip = mpo_establish_paiza_system_decision.paiza_abuse_authority_unlocked

        if = { #populating the world with paizas
            limit = {
                is_ai = yes
            }
            ai_paiza_giveaway_effect = yes
            ai_paiza_giveaway_effect = yes
            ai_paiza_giveaway_effect = yes
            ai_paiza_giveaway_effect = yes
        }
        
        trigger_event = mpo_decisions_events.0099
    }
	
	ai_check_interval_by_tier = {
		barony = 0
		county = 0
		duchy = 0
		kingdom = 10
		empire = 10
		hegemony = 10
	}

    ai_will_do = { 
        base = 100
    }
}