• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Enfeebling Poison (Reduce Strength) - MUI Ability

Status
Not open for further replies.
Level 4
Joined
Sep 25, 2018
Messages
81
I am trying to create an ability, based off Envenomed Spears, which damages and decreases the strength of the target by 1 every tick. The poison lasts 3 seconds but reduces the strength indefinitely if the target still has the debuff. When the debuff is removed, be it by the timer running out or dispel, the targets strength returns to its initial value.

I am using Bribe’s Damage Engine to detect the damage. Every detected tick of damage reduces the strength in the hidden Attribute Bonus ability by 1.

My problem is I cannot remember the most efficient way of saving the initial stats, in the hidden Attribute Bonus ability, before the poison starts reducing the stats.

So far, I have the damage and strength reducing part working proper.

  • EnfeeblingPoisonDamage
    • Events
      • Game - DamageModifierEvent becomes Equal to 0.00
    • Conditions
      • (DamageEventTarget has buff Enfeebling Poison (Stacking)) Equal to True
      • DamageEventPrevAmt Equal to 5.00
    • Actions
      • Set VariableSet DamageEventAmount = (Real(((Integer(((Real((Agility of DamageEventSource (Include bonuses)))) / 10.00))) x (Integer(DamageEventAmount)))))
      • Ability - Set Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus )'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus )'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) - 1)
      • Unit - Increase level of Attribute Bonus for DamageEventTarget
      • Unit - Decrease level of Attribute Bonus for DamageEventTarget
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
you need some kind of way to keep track of the units that are under effect of this.

I use GUI Unit Indexer 1.4.0.0

this assigns a unique integer as the custom value of each unit on the map.

once you have this you can just create a real array where for every unit the spell is cast on you just keep track of the amount you are changing their attributes and use this amount to change it back at the end. it would look like - StrengthChanged[custom value of picked unit] = bla bla bla. It is better to track the changes you did to the attribute than the original attribute bc otherwise - if the hero levels up while under this spell - it will not get the attribute boost it is supposed to due to the level...
 
Level 4
Joined
Sep 25, 2018
Messages
81
you need some kind of way to keep track of the units that are under effect of this.

I use GUI Unit Indexer 1.4.0.0

this assigns a unique integer as the custom value of each unit on the map.

once you have this you can just create a real array where for every unit the spell is cast on you just keep track of the amount you are changing their attributes and use this amount to change it back at the end. it would look like - StrengthChanged[custom value of picked unit] = bla bla bla. It is better to track the changes you did to the attribute than the original attribute bc otherwise - if the hero levels up while under this spell - it will not get the attribute boost it is supposed to due to the level...
The Attribute Bonus ability is a hidden, unlevelled/unlevelable, ability that all my Heroes have from the start of the game. It is effectively a dummy ability that gives the player a visual of what attributes have been changed.

I should be able to save the initial value of the Attribute Bonus (before being affected by Enfeebling Poison) using Hashtables. Once the debuff is gone, I can pull the information from the Hashtable and revert the Attribute Bonus back to its original value.

I have tried to put something together, but it has been a few years since I have done this.
  • EnfeeblingPoisonDamage
    • Events
      • Game - DamageModifierEvent becomes Equal to 0.00
    • Conditions
      • (DamageEventTarget has buff Enfeebling Poison (Stacking)) Equal to True
      • DamageEventPrevAmt Equal to 5.00
    • Actions
      • -------- Add to EP_UnitGroup --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in EP_UnitGroup.) Not equal to True
        • Then - Actions
          • Unit Group - Add DamageEventTarget to EP_UnitGroup
          • Unit Group - Pick every unit in EP_UnitGroup and do (Actions)
            • Loop - Actions
              • Set VariableSet EP_TempUnit = (Picked unit)
              • Set VariableSet EP_TempHandle = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (EP_TempUnit is alive) Equal to True
                  • (EP_TempUnit is A structure) Not equal to True
                • Then - Actions
                  • Hashtable - Save (Ability: (Unit: EP_TempUnit's Ability with Ability Code: Attribute Bonus )'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) as (Key EP_AttributeHandle.) of (Key EP_TempHandle.) in EP_HastTable.
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (EnfeeblingPoisonTimer <gen> is on) Not equal to True
                • Then - Actions
                  • Trigger - Turn on EnfeeblingPoisonTimer <gen>
                • Else - Actions
        • Else - Actions
      • Set VariableSet DamageEventAmount = (Real(((Integer(((Real((Agility of DamageEventSource (Include bonuses)))) / 10.00))) x (Integer(DamageEventAmount)))))
      • Ability - Set Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus )'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus )'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) - 1)
      • Unit - Increase level of Attribute Bonus for DamageEventTarget
      • Unit - Decrease level of Attribute Bonus for DamageEventTarget

  • EnfeeblingPoisonTimer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EP_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enfeebling Poison (Non-stacking)) Not equal to True
            • Then - Actions
              • Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attribute Bonus )'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to (Load (Key EP_AttributeHandle.) of (Key EP_TempHandle.) from EP_HastTable.)
              • Unit - Increase level of Attribute Bonus for (Picked unit)
              • Unit - Decrease level of Attribute Bonus for (Picked unit)
              • Hashtable - Clear all child hashtables of child (Key EP_TempHandle.) in EP_HastTable.
              • Unit Group - Remove (Picked unit) from EP_UnitGroup.
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in EP_UnitGroup) Less than or equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
This does not work, and I lack the knowledge with Hashtables as to why.


Edit: Just had another go, and this seems to be working. I have done some minor stress testing and it seems to be holding up.

Any advice/improvements are very welcome!
  • EnfeeblingPoisonDamage
    • Events
      • Game - DamageModifierEvent becomes Equal to 0.00
    • Conditions
      • (DamageEventTarget has buff Enfeebling Poison (Stacking)) Equal to True
      • DamageEventPrevAmt Equal to 5.00
    • Actions
      • -------- Add to EP_UnitGroup --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in EP_UnitGroup.) Not equal to True
        • Then - Actions
          • Unit Group - Add DamageEventTarget to EP_UnitGroup
          • Hashtable - Save (Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus )'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) as (Key EP_AttributeHandle.) of (Key EP_TempHandle.) in EP_HastTable.
        • Else - Actions
      • -------- - --------
      • -------- Turn on EnfeeblingPoisonTimer --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (EnfeeblingPoisonTimer <gen> is on) Not equal to True
        • Then - Actions
          • Trigger - Turn on EnfeeblingPoisonTimer <gen>
        • Else - Actions
      • -------- - --------
      • -------- Set Damage --------
      • Set VariableSet DamageEventAmount = (Real(((Integer(((Real((Agility of DamageEventSource (Include bonuses)))) / 10.00))) x (Integer(DamageEventAmount)))))
      • -------- - --------
      • -------- Reduce Strength if total Strength greater than 0 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of DamageEventTarget (Include bonuses)) Greater than 0
        • Then - Actions
          • Ability - Set Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus )'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus )'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) - 1)
          • Unit - Increase level of Attribute Bonus for DamageEventTarget
          • Unit - Decrease level of Attribute Bonus for DamageEventTarget
        • Else - Actions

  • EnfeeblingPoisonTimer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EP_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enfeebling Poison (Stacking)) Not equal to True
            • Then - Actions
              • Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attribute Bonus )'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to (Load (Key EP_AttributeHandle.) of (Key EP_TempHandle.) from EP_HastTable.)
              • Unit - Increase level of Attribute Bonus for (Picked unit)
              • Unit - Decrease level of Attribute Bonus for (Picked unit)
              • Hashtable - Clear all child hashtables of child (Key EP_TempHandle.) in EP_HastTable.
              • Unit Group - Remove (Picked unit) from EP_UnitGroup.
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in EP_UnitGroup) Less than or equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
Edit Edit: Strangely, the ability only works with my Blood Mage unit (I was using the Blood Mage initally to test the damage part of the ability). When I add the Ability to other units, the damage and the strength reduction do not work.

Wondering what could be the problem!
 
Last edited:
Level 4
Joined
Sep 25, 2018
Messages
81
After some testing, I found out what the issue was!

It seems that the two buffs, Poison (Non-stacking) and Poison (Stacking), which Envenomed Weapons uses, refers to whether the attacking unit is melee or ranged. It seems that Poison (Stacking) is the ranged buff, while Poison (Non-stacking) is melee. Another interesting thing about this is that if two units, one melee and one ranged, both have the same Envenomed Weapons ability, they stack independently from one another. In my case, doubling the Strength loss!

I have now had to make two separate triggers, one for melee units and one for ranged.
  • EnfeeblingPoisonMDamage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff Enfeebling Poison (Melee)) Equal to True
      • DamageEventPrevAmt Equal to 5.00
    • Actions
      • -------- Add to EP_UnitGroup --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in EPM_UnitGroup.) Not equal to True
        • Then - Actions
          • Unit Group - Add DamageEventTarget to EPM_UnitGroup
          • Hashtable - Save (Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Hidden))'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) as (Key EPM_AttributeHandle.) of (Key EPM_TempHandle.) in EPM_HastTable.
        • Else - Actions
      • -------- - --------
      • -------- Turn on EnfeeblingPoisonTimer --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (EnfeeblingPoisonMTimer <gen> is on) Not equal to True
        • Then - Actions
          • Trigger - Turn on EnfeeblingPoisonMTimer <gen>
        • Else - Actions
      • -------- - --------
      • -------- Set Damage --------
      • Set VariableSet DamageEventAmount = (Real(((Integer(((Real((Agility of DamageEventSource (Include bonuses)))) / 10.00))) x (Integer(DamageEventPrevAmt)))))
      • -------- - --------
      • -------- Reduce Strength if total Strength greater than 0 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of DamageEventTarget (Include bonuses)) Greater than 0
        • Then - Actions
          • Ability - Set Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Hidden))'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Hidden))'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) - 1)
          • Unit - Increase level of Attribute Bonus (Hidden) for DamageEventTarget
          • Unit - Decrease level of Attribute Bonus (Hidden) for DamageEventTarget
        • Else - Actions

  • EnfeeblingPoisonMTimer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EPM_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enfeebling Poison (Melee)) Not equal to True
            • Then - Actions
              • Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attribute Bonus (Hidden))'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to (Load (Key EPM_AttributeHandle.) of (Key EPM_TempHandle.) from EPM_HastTable.)
              • Unit - Increase level of Attribute Bonus (Hidden) for (Picked unit)
              • Unit - Decrease level of Attribute Bonus (Hidden) for (Picked unit)
              • Hashtable - Clear all child hashtables of child (Key EPM_TempHandle.) in EPM_HastTable.
              • Unit Group - Remove (Picked unit) from EPM_UnitGroup.
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in EPM_UnitGroup) Less than or equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
  • EnfeeblingPoisonRDamage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff Enfeebling Poison (Ranged)) Equal to True
      • DamageEventPrevAmt Equal to 5.00
    • Actions
      • -------- Add to EP_UnitGroup --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in EPR_UnitGroup.) Not equal to True
        • Then - Actions
          • Unit Group - Add DamageEventTarget to EPR_UnitGroup
          • Hashtable - Save (Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Hidden))'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) as (Key EPR_AttributeHandle.) of (Key EPR_TempHandle.) in EPR_HastTable.
        • Else - Actions
      • -------- - --------
      • -------- Turn on EnfeeblingPoisonTimer --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (EnfeeblingPoisonRTimer <gen> is on) Not equal to True
        • Then - Actions
          • Trigger - Turn on EnfeeblingPoisonRTimer <gen>
        • Else - Actions
      • -------- - --------
      • -------- Set Damage --------
      • Set VariableSet DamageEventAmount = (Real(((Integer(((Real((Agility of DamageEventSource (Include bonuses)))) / 10.00))) x (Integer(DamageEventPrevAmt)))))
      • -------- - --------
      • -------- Reduce Strength if total Strength greater than 0 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of DamageEventTarget (Include bonuses)) Greater than 0
        • Then - Actions
          • Ability - Set Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Hidden))'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Hidden))'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) - 1)
          • Unit - Increase level of Attribute Bonus (Hidden) for DamageEventTarget
          • Unit - Decrease level of Attribute Bonus (Hidden) for DamageEventTarget
        • Else - Actions

  • EnfeeblingPoisonRTimer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EPR_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enfeebling Poison (Ranged)) Not equal to True
            • Then - Actions
              • Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attribute Bonus (Hidden))'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to (Load (Key EPR_AttributeHandle.) of (Key EPR_TempHandle.) from EPR_HastTable.)
              • Unit - Increase level of Attribute Bonus (Hidden) for (Picked unit)
              • Unit - Decrease level of Attribute Bonus (Hidden) for (Picked unit)
              • Hashtable - Clear all child hashtables of child (Key EPR_TempHandle.) in EPR_HastTable.
              • Unit Group - Remove (Picked unit) from EPR_UnitGroup.
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in EPR_UnitGroup) Less than or equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
I now also realise that I need a new way to revert the Strength lost back to its original value.

A bit of an oversight, but I did not realise that after the poison timer runs out, the initial value does not consider potential Strength changes while the unit was debuffed, therefore, if the unit gained Strength using an ability, e.g. my Roar ability...
...the bonus Strength from that ability will be lost as well when the debuff is gone!
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
I now also realise that I need a new way to revert the Strength lost back to its original value.

A bit of an oversight, but I did not realise that after the poison timer runs out, the initial value does not consider potential Strength changes while the unit was debuffed, therefore, if the unit gained Strength using an ability, e.g. my Roar ability...
...the bonus Strength from that ability will be lost as well when the debuff is gone!
I tried to point this out in my first response. thats why I think it makes more sense to keep track of the amount of strength you reduced from the unit instead of the amount it originally had.
 
Level 4
Joined
Sep 25, 2018
Messages
81
I tried to point this out in my first response. thats why I think it makes more sense to keep track of the amount of strength you reduced from the unit instead of the amount it originally had.
Yeah, I see what you mean now.

In my map, every unit is a Hero, and no one levels up. The way the units get stronger is through buying items. So the whole levelling thing was not relevant.

I do appreciate the help though :)

Edit: After some playing around, I think my initial plan of editing the same Attribute Bonus for every Attribute affecting spell is far too difficult. So for this ability, I have created a new Attribute Bonus ability which will just be removed from the unit once the debuff has been lost.
  • EnfeeblingPoisonMDamage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff Enfeebling Poison (Melee)) Equal to True
      • DamageEventPrevAmt Equal to 5.00
    • Actions
      • -------- Add to EP_UnitGroup --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in EPM_UnitGroup.) Not equal to True
        • Then - Actions
          • Unit Group - Add DamageEventTarget to EPM_UnitGroup
        • Else - Actions
      • -------- - --------
      • -------- Add AttributeBonus (Enfeebling Poison - Melee) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Attribute Bonus (Enfeebling Poison - Melee) for DamageEventTarget) Less than or equal to 0
        • Then - Actions
          • Unit - Add Attribute Bonus (Enfeebling Poison - Melee) to DamageEventTarget
        • Else - Actions
      • -------- - --------
      • -------- Turn on EnfeeblingPoisonTimer --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (EnfeeblingPoisonMTimer <gen> is on) Not equal to True
        • Then - Actions
          • Trigger - Turn on EnfeeblingPoisonMTimer <gen>
        • Else - Actions
      • -------- - --------
      • -------- Set Damage --------
      • Set VariableSet DamageEventAmount = (Real(((Integer(((Real((Agility of DamageEventSource (Include bonuses)))) / 10.00))) x (Integer(DamageEventPrevAmt)))))
      • -------- - --------
      • -------- Reduce Strength if total Strength greater than 0 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of DamageEventTarget (Include bonuses)) Greater than 0
        • Then - Actions
          • Ability - Set Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Enfeebling Poison - Melee))'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Enfeebling Poison - Melee))'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) - 1)
          • Unit - Increase level of Attribute Bonus (Enfeebling Poison - Melee) for DamageEventTarget
          • Unit - Decrease level of Attribute Bonus (Enfeebling Poison - Melee) for DamageEventTarget
        • Else - Actions

  • EnfeeblingPoisonMTimer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EPM_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enfeebling Poison (Melee)) Not equal to True
            • Then - Actions
              • Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attribute Bonus (Enfeebling Poison - Melee))'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to 0
              • Unit - Increase level of Attribute Bonus (Enfeebling Poison - Melee) for (Picked unit)
              • Unit - Decrease level of Attribute Bonus (Enfeebling Poison - Melee) for (Picked unit)
              • Unit - Remove Attribute Bonus (Enfeebling Poison - Melee) from (Picked unit)
              • Unit Group - Remove (Picked unit) from EPM_UnitGroup.
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in EPM_UnitGroup) Less than or equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
  • EnfeeblingPoisonRDamage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff Enfeebling Poison (Ranged)) Equal to True
      • DamageEventPrevAmt Equal to 5.00
    • Actions
      • -------- Add to EP_UnitGroup --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in EPR_UnitGroup.) Not equal to True
        • Then - Actions
          • Unit Group - Add DamageEventTarget to EPR_UnitGroup
        • Else - Actions
      • -------- - --------
      • -------- Add AttributeBonus (Enfeebling Poison - Ranged) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Attribute Bonus (Enfeebling Poison - Ranged) for DamageEventTarget) Less than or equal to 0
        • Then - Actions
          • Unit - Add Attribute Bonus (Enfeebling Poison - Ranged) to DamageEventTarget
        • Else - Actions
      • -------- - --------
      • -------- Turn on EnfeeblingPoisonTimer --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (EnfeeblingPoisonRTimer <gen> is on) Not equal to True
        • Then - Actions
          • Trigger - Turn on EnfeeblingPoisonRTimer <gen>
        • Else - Actions
      • -------- - --------
      • -------- Set Damage --------
      • Set VariableSet DamageEventAmount = (Real(((Integer(((Real((Agility of DamageEventSource (Include bonuses)))) / 10.00))) x (Integer(DamageEventPrevAmt)))))
      • -------- - --------
      • -------- Reduce Strength if total Strength greater than 0 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Strength of DamageEventTarget (Include bonuses)) Greater than 0
        • Then - Actions
          • Ability - Set Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Enfeebling Poison - Ranged))'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: DamageEventTarget's Ability with Ability Code: Attribute Bonus (Enfeebling Poison - Ranged))'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) - 1)
          • Unit - Increase level of Attribute Bonus (Enfeebling Poison - Ranged) for DamageEventTarget
          • Unit - Decrease level of Attribute Bonus (Enfeebling Poison - Ranged) for DamageEventTarget
        • Else - Actions

  • EnfeeblingPoisonRTimer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EPR_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Enfeebling Poison (Ranged)) Not equal to True
            • Then - Actions
              • Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attribute Bonus (Enfeebling Poison - Ranged))'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to 0
              • Unit - Increase level of Attribute Bonus (Enfeebling Poison - Ranged) for (Picked unit)
              • Unit - Decrease level of Attribute Bonus (Enfeebling Poison - Ranged) for (Picked unit)
              • Unit - Remove Attribute Bonus (Enfeebling Poison - Ranged) from (Picked unit)
              • Unit Group - Remove (Picked unit) from EPR_UnitGroup.
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in EPR_UnitGroup) Less than or equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
This seems to be working, even after some minor stress testing!
 
Last edited:
Status
Not open for further replies.
Top