nothing for onImprovementPillaged?

naf4ever

Dread Lord
Joined
Feb 8, 2003
Messages
405
Location
Southeast Washington State
I noticed there's no event i can interrupt when something gets pillaged.... Hmm is there a workaround for this? What i mean is does anyone know if onImprovementBuilt actually gets triggered when something gets pillaged, but that maybe the game actually considers pillaging to be the same thing as building. But a sort of reverse-building?
 
naf4ever said:
I noticed there's no event i can interrupt when something gets pillaged.... Hmm is there a workaround for this? What i mean is does anyone know if onImprovementBuilt actually gets triggered when something gets pillaged, but that maybe the game actually considers pillaging to be the same thing as building. But a sort of reverse-building?

I used the SDK to do this. I wanted to change the bonus type when the improvement was pillaged so i added the following section to the pillage() event in CvUnit:

CvUnit CvUnit:: pillage()

Added:

Code:
        if (pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_BODY") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_CHAOS") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_CREATION") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_DEATH") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_DIMENSIONAL") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_EARTH") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_ENCHANTMENT") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_ENTROPY") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_FIRE") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_LAW") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_LIFE") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_METAMAGIC") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_MIND") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_NATURE") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_SPIRIT") ||
            pPlot->getBonusType((TeamTypes)-1) == (BonusTypes)GC.getInfoTypeForString("BONUS_MANA_WATER"))
        {
            pPlot->setBonusType((BonusTypes)GC.getInfoTypeForString("BONUS_MANA"));
        }
 
Back
Top Bottom