Offensive spells affecting friendly units.

By on February 7, 2011 12:03:19 PM from Elemental Forums Elemental Forums

mqpiffle

Join Date 10/2010
+44

Is there any way to set an offensive spell so it can also affect friendly units if they happen to be caught in the area of effect?

I happen to think fireballs and earthquakes should also affect those hapless allies who don't fully realize the explosive powers of their magically inclined companions and wander too deep into enemy lines too quickly.

 

EDIT: Specifically thinking about tactical spell right now, but insight on strategic spells works too.  Thanks.

EDIT2: I've been experimenting and I've found some cool xml configurations that affect targeting etc.  Will post later with results.

EDIT3:OK.  Here are two XML configurations which produced some interesting results.  Don't know if these workarounds are potentially buggy, but they seem useful at this point, if you're interested in spells which could possibly affect one's allies negatively:

CONFIG 1:  Include only SpellType, leave out SpellClass and SpellTargetType. For example:

<SpellDef InternalName="FireballSpell">
    <UsefulInMP>0</UsefulInMP>
    <DisplayName>Fireball</DisplayName>
    <!--blah blah blah -->
    <Range>8</Range>
    <Radius>1</Radius>
    <SpellLevel>1</SpellLevel>
    <RequiredStat>UnitStat_Intelligence, 25</RequiredStat>
    <SpellType>Tactical</SpellType>
    <IsResistable>1</IsResistable>
    <CastTime>1</CastTime>

This results in ANY unit or square being able to be targeted and ALL units in the AoE being affected.  The only drawback to this method is that no damage numbers are posted on the HUD, only something like +Fireball +Fireball.  Units are affected appropriately however, and will take damage if it is a damage dealing spell.

 

CONFIG 2: Include SpellType and SpellClass, leave out SpellTargetType.  For example:

<SpellDef InternalName="FireballSpell">
    <UsefulInMP>0</UsefulInMP>
    <DisplayName>Fireball</DisplayName>
    <!-- blah blah blah -->
    <Range>8</Range>
    <Radius>1</Radius>
    <SpellLevel>1</SpellLevel>
    <RequiredStat>UnitStat_Intelligence, 25</RequiredStat>
    <SpellType>Tactical</SpellType>
    <SpellClass>Offensive</SpellClass>
    <IsResistable>1</IsResistable>
    <CastTime>1</CastTime>

This results in any unit or square being able to be targeted EXCEPT the spell caster and ALL units in the AoE being affected.  The damage numbers are shown correctly.  I have only attempted this with the sovereign as the spell caster, so I'm not 100% sure whether it's the caster who can't be a target, or the sovereign.

Locked Post 1 Reply +1
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
February 8, 2011 4:42:36 PM from Elemental Forums Elemental Forums

This is great.  I'll play around with it.   Thanks for posting.

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108433  walnut3   Server Load Time: 00:00:00.0000094   Page Render Time: