Magic immune effects

Zongo

Warlord
Joined
Oct 11, 2007
Messages
161
Hi all,

I am trying to really understand what the promotion "magic immune" does. Reading the manual (outdated, patch k) one gets the following information.

One can't be targeted by any spell, either friend of foe. So one can't for instance be rusted, withered, hasted or healed. But can one get captured, poisoned, diseased or plagued? Can one get crazed or changed into a demon by a lair? Do worldspells like divine retribution or rituals like glory everlasting affect such a unit?

Furthermore, one is immune to all "special damage" types. So one is immune to fire, cold and lightning. What about death, unholy and holy?

I would really appreciate your wisdom on the topic.
 
I'm sure someone who knows the answers to your questions (not me) will answer them soon enough... but you should know that it's relatively simple to test it and find out for yourself. Just go into the WorldBuilder and create one unit with magic immune, and others who have the ability to create the various effects you want to see if work. For extra damage and other things that involve an element of randomness, you can create a whole column of magic immune units and compare the effect on them to a similar column of units without that promotion.
 
for captured, diseased, poisoned and plagued, those are not "spells" so you are normaly affected.
crazed also.

for the rest.. good questiosn.
 
They are immune to XML spells, but not all python spells. Cure Disease will not work on them, but if they are living units Heal still will.
 
They are immune to XML spells, but not all python spells. Cure Disease will not work on them, but if they are living units Heal still will.

How do I know which spells are XML and which are python?

Is it really true that capture, disease, poison and plague are not treated as spells, with respect to magic immunity?

It looks like a magic effect can be python or XML, but not all python or XML effects are magic effects. Shouldn't this "magic effect" property be clearly stated in the Civilopedia, for every effect and promotion? Possibly with the extra XML/python information? Or at least, can somebody post a chart, or a list?
 
They are probably meant to be immune to all spells, but Kael neglected to add checks in some python spells to make them not target magic immune units. The only real way to tell which spells are which is to look at the code itself. Spells that use python for their effects will have the <PyResult> tag filled in their CIV4SpellInfos.xml define. You then look up that spell in
CvSpellInterface.py, and see if it checks for resistance chances or magic immunity on the units it targets. I think that the doDamage function takes magic immunity into account too, as it does take into account who the caster is.

Units can be captured through the domination spell (which is a python spell but checks for a chance to resist and thus won't work on magic immune units as they have a 100% chance to resist), but capture through the command promotion is not a spell. Plague can be spread through Mary Morbus's spell Contagion (to which a magic immune unit is immune), or through combat with a unit with the Plague Carrier promotion (which is only Mary Morbus herself) or Athame promotion (a piece of equipment with which Yersinia, The 3rd Horseman, starts) which magic immunity will not stop. I don't think there is a spell that spreads disease, so magic immune units are still vulnerable to it.



Actually I think Magic Immune units can still be effected by some xml spells, namely those with the <BuffCasterOnly> tag like the one that Empyrean High Priests can use to get the Crown of Brillance promotion.

Even though Cure disease is an xml spell that will not work on magic immune units, they can still be healed by entering the tile with the Pool of Tears.
 
Thanks MagisterCultuum!

That magic behaviour sounds like classic exception list. I will try to identify the important elements...
 
Top Bottom