EventChanged this version
Rise of Target Country

The increasingly autonomous Muslim community have found a champion in the renegade prince Target Character who is said to be distantly related to the Country Adjective ruling family. Target Character has not only declared the independence of the Target Country Adjective Target Country Flavor Rank, but also seeks to seize the throne of Country for himself. Bound by our many struggles, there is little that we can do while Target Country gathers its strength.
SunnismReligionimmediateDefinitionin_game/events/disaster/decline_of_majapahit.txt:633
634type = country_event
635category = disaster_event
636title = decline_of_majapahit.102.title Rise of Target Country
637desc = decline_of_majapahit.102.desc The increasingly autonomous Muslim community have found a champion in the renegade prince Target Character who is said to be distantly related to the Country Adjective ruling family. Target Character has not only declared the independence of the Target Country Adjective Target Country Flavor Rank, but also seeks to seize the throne of Country for himself. Bound by our many struggles, there is little that we can do while Target Country gathers its strength.
638outcome = neutral
639image = "gfx/interface/illustrations/disaster/death_of_hayan_wuruk.dds"
641fire_only_once = yes
643immediate = {
644area:java_area = {
645every_location_in_area = {
650add_to_list = list_of_demak_locations
}
}
654if = {
655limit = {
656list_size = {
657name = list_of_demak_locations
658value <= 3
}
}
661ordered_province = {
662order_by = "religion_percentage(religion:sunni)"
663max = 3
664every_location_in_province = {
665add_to_list = list_of_demak_locations
}
}
}
670ordered_in_list = {
671list = list_of_demak_locations
672order_by = pop_size
673max = 1
674save_scope_as = target_location
}
677if = {
678limit = {
679location:demak = {
680is_in_list = list_of_demak_locations
}
}
683location:demak = {
684save_scope_as = target_location
}
}
688scope:target_location = {
696create_country_from_location = {
697reforms = {
mandala_system
}
701define_unique_country_tag = DEM
702hidden_effect = {
703change_country_flag = DEM
704change_country_name = DEM
705change_country_adjective = DEM_ADJ
706change_country_color = map_DEM
}
709save_scope_as = target_country
}
}
713every_in_list = {
714list = list_of_demak_locations
715change_location_owner = scope:target_country
}
718scope:target_country = {
719ruler = {
720save_scope_as = target_character
}
}
}