1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.