You can't just change the value of YieldTypes.YIELD_FOOD though, that's just the index of the food value, not the actual food value. You can't manipulate in-game variables such as food, hitpoints, etc directly, you have to do so through functions. The onCityDoTurn event gives you a city argument, so the second line in your example would have to be something like:
Code:
pCity.changeFood(Pycity.getFoodRate() * (getGoodHealth() - getBadHealth()) * 0.05)
Comment