1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Mana shield that reflects damage

Discussion in 'World Editor Help Zone' started by darkalex13, Sep 6, 2008.

  1. darkalex13

    darkalex13

    Joined:
    Feb 20, 2008
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Hey I want to make a trigger in which if a unit has mana shield actived it has a chance of reflecting the damage done to him back to the attacker... Can anyone help me?
     
  2. Blackscar

    Blackscar

    Joined:
    Nov 10, 2007
    Messages:
    43
    Resources:
    0
    Resources:
    0
    Units is attacked
    if attacked units had buff = to mana shield
    cause attacked units to deal damage to attacked unit and so on
    chance huh cant remember atm
     
  3. darkalex13

    darkalex13

    Joined:
    Feb 20, 2008
    Messages:
    54
    Resources:
    0
    Resources:
    0
    That part I know but I don't know how to do the damage that has been done to him...
     
  4. Blackscar

    Blackscar

    Joined:
    Nov 10, 2007
    Messages:
    43
    Resources:
    0
    Resources:
    0
    Sorry , but you have to explain this to me again

    "I don't know how to do the damage that has been done to him"
    You mean when it has been attacked?
     
  5. -Berz-

    -Berz-

    Joined:
    Mar 5, 2008
    Messages:
    3,203
    Resources:
    123
    Icons:
    111
    Packs:
    1
    Skins:
    1
    Spells:
    10
    Resources:
    123
    You will need damage detection system for that, but i'm not sure how to use it... You will need it because there is no such thing/actions that would detect the damage done (there is damage taken, but it don't works)
    Btw, sweet idea =D
     
  6. darkalex13

    darkalex13

    Joined:
    Feb 20, 2008
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Well yeah, when it's attacked to give the damage done to him back to the attacker...

    @-BerZeKeR- yeah you understood what I meant, hopefully someone will have the answer to this enigma... :D
     
  7. Blackscar

    Blackscar

    Joined:
    Nov 10, 2007
    Messages:
    43
    Resources:
    0
    Resources:
    0
    This is somthing that i got it works the moment the attacked unit has the buff.

    Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (7.00 + (3.00 x (Real((Level of Open Wounds for Hero_BloodKnight))))) damage of attack type Normal and damage type Normal
     
  8. Need_O2

    Need_O2

    Joined:
    Aug 24, 2007
    Messages:
    2,880
    Resources:
    0
    Resources:
    0
    it would be very easy

    Make a trigger with no events
    Events
    Conditions
    ---If Triggering Unit has Mana Shield Buff
    Actions
    ---Cause Triggering Unit to damage (Event Damage Source) by (Damage Done) Attack type of spells etc

    When Someone learns Mana Shield
    if Level of its mana shield is 1 ( so it will be his first learning)
    Add (Triggering Unit) takes damage event to First trigger

    Only use for heroes
    for units this would leak much
     
  9. M0RT

    M0RT

    Joined:
    Apr 15, 2008
    Messages:
    1,067
    Resources:
    6
    Maps:
    3
    StarCraft II Resources:
    1
    Tutorials:
    2
    Resources:
    6
    Don't forget that the shielded unit could be on low mana... then it's stupid when the manashield absorbs 6 damage and gives 150 damage back..you should calculate the damage done like this:
    damageReturn = min( DamageDone, (Level of Mana Shield for (Damaged Unit) + 1 ) *0,5 * (Mana of Damaged unit) )
    (If you are using the standard mana shield MP:HP ratios of 1/1,5/2. Otherwise you should adjust the formula.