# Can we generate sensible poems?
# Probably not, let's try.

namespace = poetry

poetry.0001 = {
	type = character_event
	orphan = yes
	desc = {
		# First line
		random_valid = {
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_first_and_second_lines = flag:set_one
					}
				}
				desc = first_line_text_set_1_A
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_first_and_second_lines = flag:set_one
					}
				}
				desc = first_line_text_set_1_B
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_first_and_second_lines = flag:set_two
					}
				}
				desc = first_line_text_set_2_A
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_first_and_second_lines = flag:set_two
					}
				}
				desc = first_line_text_set_2_B
			}
		}
		desc = poetry_line_break
		# Second line
		random_valid = {
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_first_and_second_lines = flag:set_one
					}
				}
				desc = second_line_text_set_1_A
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_first_and_second_lines = flag:set_one
					}
				}
				desc = second_line_text_set_1_B
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_first_and_second_lines = flag:set_two
					}
				}
				desc = second_line_text_set_2_A
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_first_and_second_lines = flag:set_two
					}
				}
				desc = second_line_text_set_2_B
			}
		}
		desc = poetry_line_break
		# Third line
		random_valid = {
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_third_and_fourth_lines = flag:set_one
					}
				}
				desc = third_line_text_set_1_A
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_third_and_fourth_lines = flag:set_one
					}
				}
				desc = third_line_text_set_1_B
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_third_and_fourth_lines = flag:set_two
					}
				}
				desc = third_line_text_set_2_A
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_third_and_fourth_lines = flag:set_two
					}
				}
				desc = third_line_text_set_2_B
			}
		}
		desc = poetry_line_break
		# Fourth line
		random_valid = {
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_third_and_fourth_lines = flag:set_one
					}
				}
				desc = fourth_line_text_set_1_A
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_third_and_fourth_lines = flag:set_one
					}
				}
				desc = fourth_line_text_set_1_B
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_third_and_fourth_lines = flag:set_two
					}
				}
				desc = fourth_line_text_set_2_A
			}
			triggered_desc = {
				trigger = {
					ROOT = {
						var:text_set_third_and_fourth_lines = flag:set_two
					}
				}
				desc = fourth_line_text_set_2_B
			}
		}
	}
	left_portrait = root
	theme = learning

	immediate = {
		# Roll for first and second line:
		random_list = {
			25 = {
				root = {
					set_variable = {
						name = text_set_first_and_second_lines
						value = flag:set_one
					}
				}
			}
			25 = {
				root = {
					set_variable = {
						name = text_set_first_and_second_lines
						value = flag:set_two
					}
				}
			}
		}

		# Roll for third and fourth lines:
		random_list = {
			25 = {
				root = {
					set_variable = {
						name = text_set_third_and_fourth_lines
						value = flag:set_one
					}
				}
			}
			25 = {
				root = {
					set_variable = {
						name = text_set_third_and_fourth_lines
						value = flag:set_two
					}
				}
			}
		}
	}

	option = {
		name = OK_BUTTON
	}
}


poetry.0002 = {
	type = character_event
	title = poetry.0002.t
	orphan = yes
	desc = {
		random_valid = {
			desc = 0002.blank_verse_line_1_A	
			desc = 0002.blank_verse_line_1_B	
			desc = 0002.blank_verse_line_1_C	
			desc = 0002.blank_verse_line_1_D	
		}
		desc = poetry_line_break
		random_valid = {
			desc = 0002.blank_verse_line_2_A	
			desc = 0002.blank_verse_line_2_B	
			desc = 0002.blank_verse_line_2_C	
			desc = 0002.blank_verse_line_2_D	
		}
		desc = poetry_line_break
		random_valid = {
			desc = 0002.blank_verse_line_3_A	
			desc = 0002.blank_verse_line_3_B	
			desc = 0002.blank_verse_line_3_C	
			desc = 0002.blank_verse_line_3_D	
		}
		desc = poetry_line_break
		random_valid = {
			desc = 0002.blank_verse_line_4_A	
			desc = 0002.blank_verse_line_4_B	
			desc = 0002.blank_verse_line_4_C	
			desc = 0002.blank_verse_line_4_D	
		}
	}
	theme = learning

	option = {
		name = OK_BUTTON
	}
}



# Blank verse with themed words

# Okay, so this should result in 4 lines, where each line is a relevant theme word.
# Theme word type (specific_noun_one, abstract_noun_one, etc.) is set by which custom('') text is asked for in loc.
# This means that if you want a single line to have the potential to get two different word types, you have to create a new "sub" random_valid choosing between two loc strings with identical text, but which asks for a different custom('') text.
# Poem responsibly.

poetry.0003 = {
	type = character_event
	title = poetry.0003.t
	orphan = yes
	desc = {
		triggered_desc = {
			trigger = { scope:recipient != scope:actor }
			desc = {
				desc = 0003.poetry_from
				desc = poetry_line_break
				desc = poetry_line_break
			}
		}
		random_valid = {
			desc = 0003.line_1_A	
			desc = 0003.line_1_B	
			#desc = 0003.line_1_C	
			#desc = 0003.line_1_D	
		}
		desc = poetry_line_break
		random_valid = {
			desc = 0003.line_2_A	
			desc = 0003.line_2_B	
			#desc = 0003.line_2_C	
			#desc = 0003.line_2_D	
		}
		desc = poetry_line_break
		random_valid = {
			desc = 0003.line_3_A	
			desc = 0003.line_3_B	
			#desc = 0003.line_3_C	
			#desc = 0003.line_3_D	
		}
		desc = poetry_line_break
		random_valid = {
			desc = 0003.line_4_A	
			desc = 0003.line_4_B	
			#desc = 0003.line_4_C	
			#desc = 0003.line_4_D	
		}
	}
	theme = learning

	immediate = {
		random_list = {
			25 = {
				set_variable = {
					name = poetry_theme
					value = flag:nobility
				}
			}
			25 = {
				set_variable = {
					name = poetry_theme
					value = flag:romance
				}
			}
		}
	}

	option = {
		name = OK_BUTTON
	}
}
