Heal/Dmg Ability

pablo1517

New Member
Reaction score
1
I need some ability that is able to heal or dmg units, it depends on whether unit is friend or enemy. But not Holy Light because that works only on undead etc. Is there anything like that in WE already?
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
Triggering it won't be very difficult.
Example:

Code:
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Scales of Doom
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Target unit of ability being cast)) is an ally of (Owner of (Triggering unit))) Equal to True
            Then - Actions
                Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 100.00)
            Else - Actions
                Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 100.00 damage of attack type Spells and damage type Normal
 

Genkora

Frog blast the vent core!
Reaction score
92
Triggering it won't be very difficult.
Example:

Code:
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Scales of Doom
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Target unit of ability being cast)) is an ally of (Owner of (Triggering unit))) Equal to True
            Then - Actions
                Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 100.00)
            Else - Actions
                Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 100.00 damage of attack type Spells and damage type Normal

That would work, but not if you wanted the ability to have multiple levels. If you wanted that, you would need some arithmetic to multiply the 100 or whatever number you want by the ability level.

Code:
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Real((Level of Shadow Strike for (Triggering unit)))) x 100.00) damage of attack type Spells and damage type Normal

put that in your code to increase the damage done. You can change it around so that instead of damage it's health.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top