Triggered block & reflect

jarekpl12

TH.net Regular
Reaction score
6
I want to make item which has 10% chance to absorb and reflect incoming damage. I'm not sure this trigger will work:/ If not please somone to show me how to make trigger like this...thx

Trigger:
  • Shield of Retribution learn
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Trigger - Add to Shield of Retribution <gen> the event (Unit - (Triggering unit) Takes damage)



Trigger:
  • Shield of Retribution
    • Events
    • Conditions
      • (Random integer number between 1 and 100) Lesser or Equal to 10
      • ((Triggering unit) has an item of type Shield of Retribution) Equal to
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
      • Unit - Cause (Triggering unit) to damage (Damage source), dealing (Damage taken) damage of attack type Chaos and damage type Power
 

sLsIDK

New Member
Reaction score
13
This will not work. Unit - Triggering unit Takes damage won't do anything because there is no unit triggering the Map Initialization trigger. Also in the second trigger triggering unit isn't good to use. Get rid of the first trigger and make the second trigger this:

Trigger:
  • Shield of Retribution
    • Events
      • Unit - A unit is attacked
    • Conditions
      • (Random integer number between 1 and 100) Less than or Equal to 10
      • ((Attacked unit) has an item of type Shield of Retribution) Equal to True
    • Actions
      • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + (Damage taken))
      • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing (Damage taken) damage of attack type Chaos and damage type Power
 

Nexor

...
Reaction score
74
In your trigger, there will be no Damage Taken value.

@jarekpl12:
Your trigger looks good, but turn trigger off at the beginning (not the initialization) and after the damage dealt, turn it on.
 

CYRRIC

Active Member
Reaction score
3
with this system isnt the probleme that the unit could die ?

i explain

unit have 100 hp unit take 200 damage
your trigger run but the unit die no ? or the trigger run just before and so the unit doesnt die ?
 

canons200

New Member
Reaction score
50
this is not a good way, you can use GDD gui damage detected to detect the unit take damage event. easy way
 

Ayanami

칼리
Reaction score
288
This will not work. Unit - Triggering unit Takes damage won't do anything because there is no unit triggering the Map Initialization trigger. Also in the second trigger triggering unit isn't good to use. Get rid of the first trigger and make the second trigger this:

Trigger:
  • Shield of Retribution
    • Events
      • Unit - A unit is attacked
    • Conditions
      • (Random integer number between 1 and 100) Less than or Equal to 10
      • ((Attacked unit) has an item of type Shield of Retribution) Equal to True
    • Actions
      • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + (Damage taken))
      • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing (Damage taken) damage of attack type Chaos and damage type Power

I believe this won't work at all. You cannot use (Damage Taken) in this case as there is no damage. The event is "Unit is attacked", thus no Damage Taken is unrecognized when you use this event. I suggest you use Weep's GDD Snippet. After implementing it, create the trigger below for your spell.

Trigger:
  • Return Damage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Random integer number between 1 and 100) Lesser or Equal to 10
      • (GDD_DamagedUnit has an item of type Shield of Retribution) Equal to
    • Actions
      • Unit - Set life of GDD_DamagedUnit to ((Life of GDD_DamagedUnit) + (GDD_Damage x 0.10))
      • Unit - Cause GDD_DamagedUnit to damage GDD_DamageSource, dealing GDD_Damage damage of attack type Chaos and damage type Universal
 
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