AdjustDefendingUnit in Spells
Does anyone know if AdjustDefendingUnit modifiers work when used in spells? I just can't seem to get this spell to function properly:
- <SpellDef InternalName="Consecration">
- <DisplayName>Consecration</DisplayName>
- <Description>Defending units in target city gain +10 Magic Resistance.</Description>
- <Image>BG_Spell_CityDefense.png</Image>
- <IconFG>Enchant_Defenses.png</IconFG>
- <IconColor>145,255,172</IconColor>
- <Range>3</Range>
- <SpellLevel>3</SpellLevel>
- <SoundFX>Spell_EnchantLand_01</SoundFX>
- <SpellType>Strategic</SpellType>
- <SpellClass>Defensive</SpellClass>
- <SpellTargetType>FriendlyCity</SpellTargetType>
- <ValidTerrainCategory>Land</ValidTerrainCategory>
- <ValidTerrainCategory>Beach</ValidTerrainCategory>
- <ValidTerrainCategory>Forest</ValidTerrainCategory>
- <ValidTerrainCategory>City</ValidTerrainCategory>
- <CastTime>1</CastTime>
- <RequiredStat>UnitStat_Intelligence, 32</RequiredStat>
- <SpellResourceCost>
- <Resource>Mana</Resource>
- <Amount>64</Amount>
- </SpellResourceCost>
- <SpellResourceCost>
- <Resource>Mana</Resource>
- <Amount>1</Amount>
- <PerTurn>1</PerTurn>
- </SpellResourceCost>
- <SpellDefEffect>
- <EffectName>Enchant_Defenses</EffectName>
- <LocalPosition>0,50,0</LocalPosition>
- <EffectScale>1.5</EffectScale>
- <EffectDelay>0.0</EffectDelay>
- <SnapToTerrain>1</SnapToTerrain>
- </SpellDefEffect>
- <GameModifier InternalName="Consecration_MagicResist">
- <Type>City</Type>
- <Attribute>AdjustDefendingUnit</Attribute>
- <StrVal>UnitStat_MagicResist</StrVal>
- <Operator>+</Operator>
- <Value>10.0</Value>
- <PerTurn>1</PerTurn>
- <Duration>-1</Duration>
- </GameModifier>
- </SpellDef>