def onReligionSpread(self, argsList):
'Religion Has Spread to a City'
iReligion, iOwner, pSpreadCity = argsList
iCatholic = gc.getInfoTypeForString('RELIGION_CHRISTIANITY')
iProtestant = gc.getInfoTypeForString('RELIGION_PROTESTANTISM')
iJewish = gc.getInfoTypeForString('RELIGION_JUDAISM')
iHindu = gc.getInfoTypeForString('RELIGION_HINDUISM')
iPolytheism = gc.getInfoTypeForString('RELIGION_POLYTHEISM')
iIslam = gc.getInfoTypeForString('RELIGION_ISLAM')
player = PyPlayer(iOwner)
pPlayer = gc.getPlayer(iOwner)
iRandLoss = CyGame().getSorenRandNum(100, "Religion Loss")
if iReligion == iCatholic:
if (pSpreadCity.isHasReligion(iProtestant) and pSpreadCity.isHolyCityByType(iProtestant) == False):
if (iRandLoss <= 45):
pSpreadCity.setHasReligion(iProtestant, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Protestanen sind zur Heiligen Kirche zurückgekehrt!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iIslam) and pSpreadCity.isHolyCityByType(iIslam) == False):
if (iRandLoss <= 30):
pSpreadCity.setHasReligion(iIslam, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Muslime der Stadt sind katholisch geworden!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iHindu) and pSpreadCity.isHolyCityByType(iHindu) == False):
if (iRandLoss <= 45):
pSpreadCity.setHasReligion(iHindu, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Hindus sind zur Heiligen Kirche konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iJewish) and pSpreadCity.isHolyCityByType(iJewish) == False):
if (iRandLoss <= 50):
pSpreadCity.setHasReligion(iJewish, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Juden de Stadt sind jetzt katholisch!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iPolytheism) and pSpreadCity.isHolyCityByType(iPolytheism) == False):
if (iRandLoss <= 85):
pSpreadCity.setHasReligion(iPolytheism, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Heiden sind zur katholischen Kirche konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if iReligion == iProtestant:
if (pSpreadCity.isHasReligion(iIslam) and pSpreadCity.isHolyCityByType(iIslam) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iIslam, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Muslime sind protestantische Christen geworden!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Polytheism.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iHindu) and pSpreadCity.isHolyCityByType(iHindu) == False):
if (iRandLoss <= 40):
pSpreadCity.setHasReligion(iHindu, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Hindus habe Jesus anerkannt, aber nicht den Papst!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Polytheism.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iCatholic) and pSpreadCity.isHolyCityByType(iCatholic) == False):
if (iRandLoss <= 30):
pSpreadCity.setHasReligion(iCatholic, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Reformation! Die Kathoiken der Stadt sind Protestanten geworden!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Polytheism.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iJewish) and pSpreadCity.isHolyCityByType(iJewish) == False):
if (iRandLoss <= 50):
pSpreadCity.setHasReligion(iJewish, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Juden der Stadt sind evangelisch geworden!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Polytheism.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iPolytheism) and pSpreadCity.isHolyCityByType(iPolytheism) == False):
if (iRandLoss <= 70):
pSpreadCity.setHasReligion(iPolytheism, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Heiden sind zur evangelischen Kirche konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if iReligion == iPolytheism:
if (pSpreadCity.isHasReligion(iIslam) and pSpreadCity.isHolyCityByType(iIslam) == False):
if (iRandLoss <= 10):
pSpreadCity.setHasReligion(iIslam, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Muslime haben die Opfer an Zeus wiederaufgenommen!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iCatholic) and pSpreadCity.isHolyCityByType(iCatholic) == False):
if (iRandLoss <= 10):
pSpreadCity.setHasReligion(iCatholic, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Katholiken haben die Kulttempel wieder geöffnet!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iProtestant) and pSpreadCity.isHolyCityByType(iProtestant) == False):
if (iRandLoss <= 10):
pSpreadCity.setHasReligion(iProtestant, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Protestanen sind zum Heidentum konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iHindu) and pSpreadCity.isHolyCityByType(iHindu) == False):
if (iRandLoss <= 30):
pSpreadCity.setHasReligion(iHindu, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Hindus haben Zeus als König der Götter erkannt!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iJewish) and pSpreadCity.isHolyCityByType(iJewish) == False):
if (iRandLoss <= 15):
pSpreadCity.setHasReligion(iJewish, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Juden haben Zeus als König der Götter erkannt!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if iReligion == iIslam:
if (pSpreadCity.isHasReligion(iCatholic) and pSpreadCity.isHolyCityByType(iCatholic) == False):
if (iRandLoss <= 25):
pSpreadCity.setHasReligion(iIslam, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Katholiken sind Muslime geworden!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iProtestant) and pSpreadCity.isHolyCityByType(iProtestant) == False):
if (iRandLoss <= 25):
pSpreadCity.setHasReligion(iProtestant, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Protestanten sind Muslime geworden!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iHindu) and pSpreadCity.isHolyCityByType(iHindu) == False):
if (iRandLoss <= 45):
pSpreadCity.setHasReligion(iHindu, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Hindus sind zum Islam konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iPolytheism) and pSpreadCity.isHolyCityByType(iPolytheism) == False):
if (iRandLoss <= 80):
pSpreadCity.setHasReligion(iPolytheism, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Kultreligion macht Platz für den Islam!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iJewish) and pSpreadCity.isHolyCityByType(iJewish) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iJewish, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Muslime sind zum Judentum konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if iReligion == iJewish:
if (pSpreadCity.isHasReligion(iIslam) and pSpreadCity.isHolyCityByType(iIslam) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iIslam, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Muslime sind zum Judentum konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iCatholic) and pSpreadCity.isHolyCityByType(iCatholic) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iCatholic, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Katholiken sind zum Judentums konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iProtestant) and pSpreadCity.isHolyCityByType(iProtestant) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iPotestant, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Protestanen sind zum Judentum konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iHindu) and pSpreadCity.isHolyCityByType(iHindu) == False):
if (iRandLoss <= 30):
pSpreadCity.setHasReligion(iHindu, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Juden sind zum Hinduismus konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iPolytheism) and pSpreadCity.isHolyCityByType(iPolytheism) == False):
if (iRandLoss <= 80):
pSpreadCity.setHasReligion(iPolytheism, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Muslime haben die Opfer für Zeus wiederaufgenommen!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if iReligion == iHindu:
if (pSpreadCity.isHasReligion(iIslam) and pSpreadCity.isHolyCityByType(iIslam) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iIslam, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Juden sind zum Hinduismus konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iCatholic) and pSpreadCity.isHolyCityByType(iCatholic) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iCatholic, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Katholiken sind zum Hinduismus konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iProtestant) and pSpreadCity.isHolyCityByType(iProtestant) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iProtestant, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Protestanten sind zum Hinduismus konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iJewish) and pSpreadCity.isHolyCityByType(iJewish) == False):
if (iRandLoss <= 20):
pSpreadCity.setHasReligion(iJewish, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Juden sind zum Hinduismus konvertiert!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
if (pSpreadCity.isHasReligion(iPolytheism) and pSpreadCity.isHolyCityByType(iPolytheism) == False):
if (iRandLoss <= 40):
pSpreadCity.setHasReligion(iPolytheism, False, False, False)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Die Tempel werden dem Hinduismus neu geweiht!','AS2D_RELIGION_CONVERT',1,'Art/Interface/Buttons/Religions/Catholic.dds',ColorTypes(8),pSpreadCity.getX(),pSpreadCity.getY(),True,True)
CvUtil.pyPrint('%s has spread to Player %d Civilization %s city of %s'
%(gc.getReligionInfo(iReligion).getDescription(), iOwner, player.getCivilizationName(), pSpreadCity.getName()))