platyping
Sleeping Dragon
Thanks, fixed and updated
def onGreatPersonBorn(self, argsList):
'Unit Promoted'
pUnit, iPlayer, pCity = argsList
player = PyPlayer(iPlayer)
if pUnit.isNone() or pCity.isNone():
return
pPlayer = gc.getPlayer(iPlayer)
## Changdeokgung Start ##
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_CHANGDEOKGUNG")) == 1:
if pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_SCIENTIST"):
pCity.changeFreeSpecialistCount(s_Scientist, 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_PROPHET"):
pCity.changeFreeSpecialistCount(s_Priest, 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_ARTIST"):
pCity.changeFreeSpecialistCount(s_Artist, 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_MERCHANT"):
pCity.changeFreeSpecialistCount(s_Merchant, 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_ENGINEER"):
pCity.changeFreeSpecialistCount(s_Engineer, 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_GREAT_SPY"):
pCity.changeFreeSpecialistCount(s_Spy, 1)
## Tomb of Khalid ibn al-Walid Start ##
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_TOMB_OF_KHALID")) == 1:
if pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_GREAT_GENERAL"):
pPlayer.changeCombatExperience(pPlayer.greatPeopleThreshold(true) /5)
## Platyping Wonders End ##
[COLOR="Red"]if (not self.__LOG_GREATPERSON):[/COLOR]
return
CvUtil.pyPrint('A %s was born for %s in %s' %(pUnit.getName(), player.getCivilizationName(), pCity.getName()))
def onGreatPersonBorn(self, argsList):
'Unit Promoted'
pUnit, iPlayer, pCity = argsList
player = PyPlayer(iPlayer)
if pUnit.isNone() or pCity.isNone():
return
[COLOR="Red"] if (not self.__LOG_GREATPERSON):[/COLOR]
pPlayer = gc.getPlayer(iPlayer)
## Changdeokgung Start ##
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_CHANGDEOKGUNG")) == 1:
if pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_SCIENTIST"):
pCity.changeFreeSpecialistCount(gc.getInfoTypeForString("SPECIALIST_SCIENTIST"), 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_PROPHET"):
pCity.changeFreeSpecialistCount(gc.getInfoTypeForString("SPECIALIST_PRIEST"), 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_ARTIST"):
pCity.changeFreeSpecialistCount(gc.getInfoTypeForString("SPECIALIST_ARTIST"), 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_MERCHANT"):
pCity.changeFreeSpecialistCount(gc.getInfoTypeForString("SPECIALIST_MERCHANT"), 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_ENGINEER"):
pCity.changeFreeSpecialistCount(gc.getInfoTypeForString("SPECIALIST_ENGINEER"), 1)
elif pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_GREAT_SPY"):
pCity.changeFreeSpecialistCount(gc.getInfoTypeForString("SPECIALIST_SPY"), 1)
## Tomb of Khalid ibn al-Walid Start ##
if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_TOMB_OF_KHALID")) == 1:
if pUnit.getUnitType() == gc.getInfoTypeForString("UNIT_GREAT_GENERAL"):
pPlayer.changeCombatExperience(pPlayer.greatPeopleThreshold(true) /5)
## Platyping Wonders End ##
return
CvUtil.pyPrint('A %s was born for %s in %s' %(pUnit.getName(), player.getCivilizationName(), pCity.getName()))
Cannot literally "reduce" or "increase" tech cost via python.
What can be done is "adjust" the amount of research done of that tech.
For instance, if Satellites need 10,000 hammers to research, there is no way in python to adjust it so that you require 8000 instead.
What I can do is, when you have the wonder, add 2,000 to Satellites so that it is now 2000/10000 completed. Thus, in a sense, you require 8,000 to complete it now thanks to the wonder.
Of course, when the wonder is captured, then the 2000 is removed and added to the new owner, so now you need 10,000 to complete Satellites again.
But then, if you already completed Satellites when the wonder is captured, then the 2000 will not be removed, since it is stupid if you suddenly lose a tech due to the loss of the wonder.
In a sense, it will work similar to Newton's University or Large Hadron Collider
Checking the tech list, it seems that if you want it for religious techs, you will need a very early wonder though, since majority of religious techs are in ancient era. The last religious tech is Divine Right, so if the wonder is somewhere in Classical/Medieval Era, it may be pretty useless unless it grants like 50% to all or 1 free religious tech.
A cultural one or military one may make more sense, since there are more of those in late games.
If you are happy with the way it works, then choose the wonder and let me know.
Torre del Oro
Spoiler :![]()
Pretty much a cut and paste job from Newton.
Unlike Newton which is a built and forget style, for this wonder, the effects are adjusted to the new owner and taken away from old owner if the wonder is captured.
Yeah, I know it is made of stone. But since there are so many stone wonders, and this tower is named Tower of Gold, I guess it doesn't hurt
Artwork by Hrochland
if loopCity.getNumActiveBuilding(b_Matsumoto) == true: