Hi,
i have a python function that determines a certain variable. based on the variable i want to change the commerce of a building, e.g.:
commerce = base commerce (as defined in the xml) + bonus (determined in python)
the bonus is calculated per city and per turn (i.e. iBonus might be 5 one turn and 2 the next). i just want to know what would be the way to implement that commerce change, e.g. would
work?
i don't want to use
because that would circumvent bonuses from other buildings that have a % modifier for that commerce type.
i have a python function that determines a certain variable. based on the variable i want to change the commerce of a building, e.g.:
commerce = base commerce (as defined in the xml) + bonus (determined in python)
the bonus is calculated per city and per turn (i.e. iBonus might be 5 one turn and 2 the next). i just want to know what would be the way to implement that commerce change, e.g. would
Code:
pCity.setBuildingCommerceChange(gc.getBuildingInfo(iBuilding).getBuildingClassType(), CommerceTypes.COMMERCE_GOLD, iBonus)
i don't want to use
Code:
pPlayer.changeGold(iBonus)