Thanks for the advice. I just looked and it's event driven, not adaptable.I'm no modder, so no idea if it'll help, and you may have already tried this, but you can look into how Unique City-States handles conditional removal of promotions.
I could write a lua function in fact but I find it silly to write (probably less well) the same function as the dll.

.
.
Combat Strength Outside of Friendly Territory, It disappears for all units of the Renaissance era and later, except the Almogàvers.
/+2
and then the orientation of the bonuses will come from the number of identical rooms. If you have 5 "Pati dels Tarongers" you will have a +5
Science on all Llotja. For
Food per Llotja to each Llotja, a roundabout way of supporting the growth of cities and therefore the number of specialists but I want to try a little more like that.