Absorption Spell problems

Kingdom

New Member
Reaction score
0
I've been trying to crack this spell for about 3 days now... I've searched the forums for similar spells but i could only find spells that didn't work the way i want to, or spells that were done on JASS, and i need them on GUI. :banghead:

Well, pretty much what i need is an absorption spell that can be cast on any friendly unit... Now, i've tried several approaches to this and wasn't able to make them work the way i want to.

First i've tried the usual approach, the unit takes damage and it's instantly healed afterwards. But this results in the problem that if the unit takes more damage than it's own health pool, it will die before it can get healed. Since this is kinda the idea of the map, this won't do :thdown:.

So i've figured i had to use some kind of spell to mitigate all the damage, and then do the math using "Trigger - Add to PW Damage <gen> the event (Unit - PlayerClass[(Integer A)] Takes damage)" and only damage the player with the remaining damage.
Now the only spell i know that can do this is the mana shield. The problem is that the mana shield must be activated by the target and cannot be cast by another player. So the only way that i can do this is actually adding Mana Shield to the target and making him activate the spell... this however results on another problem, that the unit actually has to stop to activate the Mana Shield, thus resulting on all the original actions of the unit to be cancelled, and this won't do either :thdown:.

Now, the question is, how do i get this to work or how to i complety mitigate the damage from the unit?

Thanks in advance!
 

Angel_Island

Much long, many time, wow
Reaction score
56
Try these triggers. It's an Apothic Shield from DotA that i have created. If you dont want the damage, just remove it.
Trigger:
  • Apothic Shield Pick Units
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Unit Group - Add all units of (Units in (Playable map area)) to TempGroup
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Trigger - Add to Apothic Shield Break &lt;gen&gt; the event (Unit - (Picked unit) Takes damage)

Trigger:
  • Apothic Shield Add Units
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is in TempGroup) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to ImpetusGroup
      • Trigger - Add to Apothic Shield Break &lt;gen&gt; the event (Unit - (Triggering unit) Takes damage)

Trigger:
  • Apothic Shield Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Apothic Shield
    • Actions
      • Set ApothicShieldDamage = 0.00
      • Set ApothicShieldCaster = (Triggering unit)

Trigger:
  • Apothic Shield Break
    • Events
    • Conditions
      • ((Triggering unit) has buff Apothic Shield) Equal to True
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
      • Set ApothicShieldDamage = (ApothicShieldDamage + (Damage taken))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ApothicShieldDamage Greater than or equal to (50.00 + (50.00 x (Real((Level of Apothic Shield for ApothicShieldCaster)))))
        • Then - Actions
          • Unit - Remove Apothic Shield buff from (Triggering unit)
          • Set ApothicShieldDamagedUnitPos = (Position of (Triggering unit))
          • Set ApothicShieldGroup = (Units within 600.00 of ApothicShieldDamagedUnitPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((Matching unit) Not equal to (Triggering unit)))))
          • Unit Group - Pick every unit in ApothicShieldGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause ApothicShieldCaster to damage (Picked unit), dealing (50.00 + (50.00 x (Real((Level of Apothic Shield for ApothicShieldCaster))))) damage of attack type Hero and damage type Normal
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
          • Unit - Cause (Damage source) to damage (Triggering unit), dealing (ApothicShieldDamage - (50.00 + (50.00 x (Real((Level of Apothic Shield for ApothicShieldCaster)))))) damage of attack type Hero and damage type Normal
          • Set ApothicShieldDamage = 0.00
        • Else - Actions

This is not in MUI.
 
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