Well, the way I currently have it, is that every turn a unit enters a particular terrain type (Desert, Jungle, Snow, or Ocean, specifically) it gains a promotion that has some kind of attrition effect (Desert, Snow and Ocean deal damage, Jungle might cause the unit to get lost), and should a unit be born in a city on or adjacent to that terrain, the unit is born with a natural immunity, but you've covered that in a way that means I don't have to use the UnitSetXY event. However, when on Desert, the unit is reprieved from the promotion if they enter Flood Plains or an Oasis, and in Jungle they are reprieved if they are adjacent to a river or coast. I think your functions cover the former, but I'm not sure about the latter, as Rivers are a fake feature, IIRC, and so might not be effected by LocationUnitFreePromotion. At any rate, this will speed up production time splendidly