﻿on_game_start_after_lobby = {
	on_actions = {
		deaden_wedding_notices
	}
}

deaden_wedding_notices = {
	effect = {
		set_global_variable = {
			name = start_wedding_notices
			value = yes
			days = 30
		} 
	}
}

on_marriage = {
	on_actions = {
		zgc_finalize_wedding_event_on_action
	}
}

zgc_finalize_wedding_event_on_action = {
	effect = {
		if = {
			limit = {
				is_ai = no
				NOR = {
					has_variable = promised_grand_wedding_marriage_countdown
					exists = var:promised_grand_wedding_marriage_countdown.betrothed
				}
			}
			zgc_determine_wedding_end_relationship_event_from_compatibility_effect = yes
		}
		else_if = {
			limit = {
				is_ai = yes
				NOR = {
					has_variable = promised_grand_wedding_marriage_countdown
					exists = var:promised_grand_wedding_marriage_countdown.betrothed
				}
			}
			zgc_determine_wedding_end_relationship_event_from_compatibility_effect_ai = yes
		}
	}		
}