#Important to put HIGHEST first
GER_mefo_bills_level_up = {
	if = {
		limit = { has_idea = GER_mefo_bills_17 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_17
			add_idea = GER_mefo_bills_18
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_16 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_16
			add_idea = GER_mefo_bills_17
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_15 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_15
			add_idea = GER_mefo_bills_16
		}		
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_14 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_14
			add_idea = GER_mefo_bills_15
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_13 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_13
			add_idea = GER_mefo_bills_14
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_12 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_12
			add_idea = GER_mefo_bills_13
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_11 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_11
			add_idea = GER_mefo_bills_12
		}		
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_10 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_10
			add_idea = GER_mefo_bills_11
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_9 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_9
			add_idea = GER_mefo_bills_10
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_8 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_8
			add_idea = GER_mefo_bills_9
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_7 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_7
			add_idea = GER_mefo_bills_8
		}		
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_6 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_6
			add_idea = GER_mefo_bills_7
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_5 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_5
			add_idea = GER_mefo_bills_6
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_4 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_4
			add_idea = GER_mefo_bills_5
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_3 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_3
			add_idea = GER_mefo_bills_4
		}		
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_2 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_2
			add_idea = GER_mefo_bills_3
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_1 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_1
			add_idea = GER_mefo_bills_2
		}
	}
}

#Important to put HIGHEST first
GER_remove_mefo_bills = {
	if = {
		limit = { has_idea = GER_mefo_bills_1 }
		remove_ideas = GER_mefo_bills_1
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_2 }
		remove_ideas = GER_mefo_bills_2
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_3 }
		remove_ideas = GER_mefo_bills_3
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_4 }
		remove_ideas = GER_mefo_bills_4
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_5 }
		remove_ideas = GER_mefo_bills_5
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_6 }
		remove_ideas = GER_mefo_bills_6
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_7 }
		remove_ideas = GER_mefo_bills_7
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_8 }
		remove_ideas = GER_mefo_bills_8
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_9 }
		remove_ideas = GER_mefo_bills_9
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_10 }
		remove_ideas = GER_mefo_bills_10
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_11 }
		remove_ideas = GER_mefo_bills_11
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_12 }
		remove_ideas = GER_mefo_bills_12
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_13 }
		remove_ideas = GER_mefo_bills_13
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_14 }
		remove_ideas = GER_mefo_bills_14
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_15 }
		remove_ideas = GER_mefo_bills_15
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_16 }
		remove_ideas = GER_mefo_bills_16
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_17 }
		remove_ideas = GER_mefo_bills_17
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_18 }
		remove_ideas = GER_mefo_bills_18
	}
}

# Like the level up effect except it runs in reverse
# For use when annexing the gold reserves of Austria, Czechoslovakia and Yugoslavia

GER_mefo_bills_level_down = {
	if = {
		limit = { has_idea = GER_mefo_bills_2 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_2
			add_idea = GER_mefo_bills_1
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_3 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_3
			add_idea = GER_mefo_bills_2
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_4 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_4
			add_idea = GER_mefo_bills_3
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_5 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_5
			add_idea = GER_mefo_bills_4
		}		
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_6 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_6
			add_idea = GER_mefo_bills_5
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_7 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_7
			add_idea = GER_mefo_bills_6
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_8 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_8
			add_idea = GER_mefo_bills_7
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_9 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_9
			add_idea = GER_mefo_bills_8
		}		
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_10 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_10
			add_idea = GER_mefo_bills_9
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_11 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_11
			add_idea = GER_mefo_bills_10
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_12 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_12
			add_idea = GER_mefo_bills_11
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_13 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_13
			add_idea = GER_mefo_bills_12
		}		
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_14 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_14
			add_idea = GER_mefo_bills_13
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_15 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_15
			add_idea = GER_mefo_bills_14
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_16 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_16
			add_idea = GER_mefo_bills_15
		}
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_17 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_17
			add_idea = GER_mefo_bills_16
		}		
	}
	else_if = {
		limit = { has_idea = GER_mefo_bills_18 }
		swap_ideas = {
			remove_idea = GER_mefo_bills_18
			add_idea = GER_mefo_bills_17
		}
	}
}