In this thread we can collect hardcoded functions and how they work.
Today Iearned:
SpendMoney(Alias, Amount, Reason)
does work differently for AI dynasties. Instead of losing the full amount of money, they indeed only lose Amount*(0.8-DifficultyLevel*0.1)
To avoid that you would need to make it so:
If DynastyIsAI(Alias) then
SpendMoney(Alias, (Amount*(10/(8-DifficultyLevel))), Reason)
else
SpendMoney(Alias, Amount, Reason)
end
This was probably done to boost the rather weak AI, but you should really know that to balance things correctly. As it is, this hardcoded change in behavior might actualy lead to money inflation, because on highest difficulty it spawns 60 percent (!) additional money everytime the AI buys something.
Thus I consider it bad design and a bug