namespace = marx_events

# Marx Spawns
marx_events.1 = {
	type = country_event

	title = marx_events.1.t
	desc = marx_events.1.d
	flavor = marx_events.1.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_russian_serfs.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/russian_serfs"

	icon = "gfx/interface/icons/event_icons/event_newspaper.dds"

	duration = 3

	trigger = {
		has_technology_researched = socialism
		NOT = { has_global_variable = marx_happened }
	}

	immediate = {
		set_global_variable = {
			name = marx_happened
		}
	}

	option = { #support socialism not marx
		name = marx_events.1.a
		default_option = yes
		ig:ig_trade_unions = {
			add_modifier = {
				name = modifier_supported_marx
				months = normal_modifier_time
			}
		}
	}

	option = { #promote him / marxista porque me va la marxa
		name = marx_events.1.b
		ig:ig_trade_unions = {
			add_modifier = {
				name = modifier_promoted_marx
				months = normal_modifier_time
			}
		}
		random_list = {
			95 = {
				trigger = {
					country_is_in_europe = no
				}
				create_character = {
					#role = politician # Remove this line
					ig_leader = yes
					interest_group = ig_trade_unions
					female = no
					ideology = ideology_communist
					traits = {
						direct
						persistent
					}
				}
			}
			95 = {
				trigger = {
					country_is_in_europe = yes
				}
				create_character = {
					first_name = Karl_Heinrich
					last_name = Marx
					#role = politician # Remove this line
					ig_leader = yes
					interest_group = ig_trade_unions
					female = no
					dna = dna_karl_marx
					ideology = ideology_communist
					religion = rel:jewish
					traits = {
						direct
						persistent
					}
				}
			}
			5 = {
				modifier = {
					if = {
						limit = {
							OR = {
								ruler = {
									has_ideology = ideology_feminist
								}
								ig:ig_trade_unions = {
									leader = {
										OR = {
											has_ideology = ideology_feminist
											is_female = yes
										}
									}
								}
							}
						}
						add = 10
					}
					if = {
						limit = {
							has_law = law_type:law_women_in_the_workplace
						}
						add = 5
					}
					if = {
						limit = {
							has_law = law_type:law_womens_suffrage
						}
						add = 5
					}
				}
				create_character = { #Karla Marx
					#role = politician # Remove this line
					ig_leader = yes
					interest_group = ig_trade_unions
					female = yes
					ideology = ideology_communist
					traits = {
						direct
						persistent
					}
				}
			}
			5 = {
				trigger = {
					capital = { state_region = s:STATE_AVALON }
				}
				create_character = {
					first_name = Charlie # howdy
					last_name = Marx
					ig_leader = yes
					interest_group = ig_trade_unions
					female = no
					dna = dna_karl_marx
					ideology = ideology_communist
					religion = rel:jewish
					traits = {
						direct
						persistent
					}
				}
			}
			1 = {
				trigger = {
					capital = { state_region = s:STATE_ESTONIA } 
				}
				create_character = {
					first_name = Kras
					last_name = Masov
					ig_leader = yes
					interest_group = ig_trade_unions
					female = no
					ideology = ideology_communist
					traits = {
						direct
						persistent
					}
				}
			}
		}
	}

	option = { #get rid of this man
		name = marx_events.1.c
		ig:ig_trade_unions = {
			add_modifier = {
				name = modifier_ditched_marx
				months = normal_modifier_time
			}
		}
	}
}
