• 🏆 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!

[Trigger] Autocastable dispellable Poison

Status
Not open for further replies.
Level 9
Joined
Apr 15, 2022
Messages
59
Should be a very simple thing to do

For quite a while I've been trying to figure out how to create an autocastable dispellable poison (a very simple debuff that drains life as long as it's active). I've been screwing around with the premade spells such as parasite and inner fire (with negative values), but parasite can't be dispelled and the later is considered a postive buff, so auto dispells and spell steal don't work on it properly.

I've been trying to do this thing triggers free, but I have no other ideas. I'm not too great with triggered spells, so any help here would be helpful. Perhaps I could make a dummy debuff and create a trigger that periodically drains life of everyone who has it?
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Should be a very simple thing to do

For quite a while I've been trying to figure out how to create an autocastable dispellable poison (a very simple debuff that drains life as long as it's active). I've been screwing around with the premade spells such as parasite and inner fire (with negative values), but parasite can't be dispelled and the later is considered a postive buff, so auto dispells and spell steal don't work on it properly.

I've been trying to do this thing triggers free, but I have no other ideas. I'm not too great with triggered spells, so any help here would be helpful. Perhaps I could make a dummy debuff and create a trigger that periodically drains life of everyone who has it?
what version are you using currently?

In any case, here's the test map.

If you can't open the map because you're a stinky poo-poo pirate or pre-1.31 refugee I've included the triggers export to the link as well; it just means you need to create your own ability and buff.
I removed all the stuff that shouldn't be usable in pre 1.31 so it should work but it's not a guarantee.~

Triggers for those who want to peek at my spaghetti. (so naughty~)
Config:
  • DDot Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ========================== --------
      • -------- --------
      • Set VariableSet DDot_A_Periodic = 0.25
      • Trigger - Add to DDot Periodic <gen> the event (Time - Every DDot_A_Periodic seconds of game time)
      • -------- --------
      • Set VariableSet DDot_C_Ability[0] = Flesh to |cffffcc00W|rorms
      • -------- --------
      • -------- How many times does the unit take damage? (TICK) --------
      • -------- Minimum (0.25), lower DDot_A_Periodic at top of this block to decrease this minimum. --------
      • Set VariableSet DDot_C_Duration_Tick[0] = 1.00
      • -------- --------
      • -------- Damage Per Tick --------
      • Set VariableSet DDot_C_Damage[0] = 8.00
      • -------- --------
      • -------- How long does the buff last for... --------
      • -------- Heroes --------
      • Set VariableSet DDot_C_Duration[0] = 10.00
      • -------- --------
      • -------- Normal Units --------
      • Set VariableSet DDot_C_Duration[1] = 20.00
      • -------- --------
      • -------- Preload --------
      • -------- I'm not entirely sure but this makes things go smoothly on startup --------
      • -------- --------
      • Set VariableSet DDot_A_Point[0] = (Center of (Playable map area))
      • Unit - Create 1 Albatross for Neutral Passive at DDot_A_Point[0] facing Default building facing degrees
      • Unit - Add DDot_C_Ability[1] to (Last created unit)
      • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
      • -------- --------
      • Custom script: call RemoveLocation(udg_DDot_A_Point[0])
Cast:
  • DDot Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DDot_C_Ability[0]
    • Actions
      • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: DDot_C_Ability[0])'s Real Level Field: Duration - Hero ('ahdu') of Level: 0 to DDot_C_Duration[0]
      • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: DDot_C_Ability[0])'s Real Level Field: Duration - Normal ('adur') of Level: 0 to DDot_C_Duration[1]
      • -------- ============================= --------
      • Set VariableSet DDot_A_Unit[0] = (Triggering unit)
      • Set VariableSet DDot_A_Unit[1] = (Target unit of ability being cast)
      • -------- ============================= --------
      • Set VariableSet DDot_A_Index = (DDot_A_Index + 1)
      • Set VariableSet DDot_B_Buff[DDot_A_Index] = Flesh to worms
      • Set VariableSet DDot_B_Unit_Caster[DDot_A_Index] = DDot_A_Unit[0]
      • Set VariableSet DDot_B_Unit_Target[DDot_A_Index] = DDot_A_Unit[1]
      • Set VariableSet DDot_B_Damage[DDot_A_Index] = DDot_C_Damage[0]
      • Set VariableSet DDot_B_Duration[DDot_A_Index] = DDot_C_Duration[1]
      • Set VariableSet DDot_B_Duration_Tick[DDot_A_Index] = DDot_C_Duration_Tick[0]
      • -------- ============================= --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DDot_A_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on DDot Periodic <gen>
        • Else - Actions
      • -------- ============================= --------
Periodic:
  • DDot Periodic
    • Events
    • Conditions
    • Actions
      • -------- If you're looking for the periodic it's in the config, this work around allows users to configure how fast they want the periodic to go for what ever reason. --------
      • For each (Integer DDot_A_Loop) from 1 to DDot_A_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • DDot_B_Duration[DDot_A_Loop] Less than or equal to 0.00
                  • DDot_B_Unit_Target[DDot_A_Loop] Equal to No unit
                  • (DDot_B_Unit_Target[DDot_A_Loop] has buff DDot_B_Buff[DDot_A_Loop]) Equal to False
            • Then - Actions
              • Set VariableSet DDot_B_Unit_Target[DDot_A_Loop] = DDot_B_Unit_Target[DDot_A_Index]
              • Set VariableSet DDot_B_Unit_Caster[DDot_A_Loop] = DDot_B_Unit_Caster[DDot_A_Index]
              • Set VariableSet DDot_B_Damage[DDot_A_Loop] = DDot_B_Damage[DDot_A_Index]
              • Set VariableSet DDot_B_Duration_Tick[DDot_A_Loop] = DDot_B_Duration_Tick[DDot_A_Index]
              • Set VariableSet DDot_B_Duration[DDot_A_Loop] = DDot_B_Duration[DDot_A_Index]
              • Set VariableSet DDot_A_Loop = (DDot_A_Loop - 1)
              • Set VariableSet DDot_A_Index = (DDot_A_Index - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DDot_B_Duration[DDot_A_Loop] mod DDot_B_Duration_Tick[DDot_A_Loop]) Equal to 0.00
                • Then - Actions
                  • Unit - Cause DDot_B_Unit_Caster[DDot_A_Loop] to damage DDot_B_Unit_Target[DDot_A_Loop], dealing DDot_B_Damage[DDot_A_Loop] damage of attack type Spells and damage type Universal
                • Else - Actions
              • Set VariableSet DDot_B_Duration[DDot_A_Loop] = (DDot_B_Duration[DDot_A_Loop] - DDot_A_Periodic)
 
Last edited:
Level 9
Joined
Apr 15, 2022
Messages
59
what version are you using currently?

In any case, here's the test map.

If you can't open the map because you're a stinky poo-poo pirate or pre-1.31 refugee I've included the triggers export to the link as well; it just means you need to create your own ability and buff.
I removed all the stuff that shouldn't be usable in pre 1.31 so it should work but it's not a guarantee.~

Triggers for those who want to peek at my spaghetti. (so naughty~)
Config:
  • DDot Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ========================== --------
      • -------- --------
      • Set VariableSet DDot_A_Periodic = 0.25
      • Trigger - Add to DDot Periodic <gen> the event (Time - Every DDot_A_Periodic seconds of game time)
      • -------- --------
      • Set VariableSet DDot_C_Ability[0] = Flesh to |cffffcc00W|rorms
      • -------- --------
      • -------- How many times does the unit take damage? (TICK) --------
      • -------- Minimum (0.25), lower DDot_A_Periodic at top of this block to decrease this minimum. --------
      • Set VariableSet DDot_C_Duration_Tick[0] = 1.00
      • -------- --------
      • -------- Damage Per Tick --------
      • Set VariableSet DDot_C_Damage[0] = 8.00
      • -------- --------
      • -------- How long does the buff last for... --------
      • -------- Heroes --------
      • Set VariableSet DDot_C_Duration[0] = 10.00
      • -------- --------
      • -------- Normal Units --------
      • Set VariableSet DDot_C_Duration[1] = 20.00
      • -------- --------
      • -------- Preload --------
      • -------- I'm not entirely sure but this makes things go smoothly on startup --------
      • -------- --------
      • Set VariableSet DDot_A_Point[0] = (Center of (Playable map area))
      • Unit - Create 1 Albatross for Neutral Passive at DDot_A_Point[0] facing Default building facing degrees
      • Unit - Add DDot_C_Ability[1] to (Last created unit)
      • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
      • -------- --------
      • Custom script: call RemoveLocation(udg_DDot_A_Point[0])
Cast:
  • DDot Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DDot_C_Ability[0]
    • Actions
      • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: DDot_C_Ability[0])'s Real Level Field: Duration - Hero ('ahdu') of Level: 0 to DDot_C_Duration[0]
      • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: DDot_C_Ability[0])'s Real Level Field: Duration - Normal ('adur') of Level: 0 to DDot_C_Duration[1]
      • -------- ============================= --------
      • Set VariableSet DDot_A_Unit[0] = (Triggering unit)
      • Set VariableSet DDot_A_Unit[1] = (Target unit of ability being cast)
      • -------- ============================= --------
      • Set VariableSet DDot_A_Index = (DDot_A_Index + 1)
      • Set VariableSet DDot_B_Buff[DDot_A_Index] = Flesh to worms
      • Set VariableSet DDot_B_Unit_Caster[DDot_A_Index] = DDot_A_Unit[0]
      • Set VariableSet DDot_B_Unit_Target[DDot_A_Index] = DDot_A_Unit[1]
      • Set VariableSet DDot_B_Damage[DDot_A_Index] = DDot_C_Damage[0]
      • Set VariableSet DDot_B_Duration[DDot_A_Index] = DDot_C_Duration[1]
      • Set VariableSet DDot_B_Duration_Tick[DDot_A_Index] = DDot_C_Duration_Tick[0]
      • -------- ============================= --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DDot_A_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on DDot Periodic <gen>
        • Else - Actions
      • -------- ============================= --------
Periodic:
  • DDot Periodic
    • Events
    • Conditions
    • Actions
      • -------- If you're looking for the periodic it's in the config, this work around allows users to configure how fast they want the periodic to go for what ever reason. --------
      • For each (Integer DDot_A_Loop) from 1 to DDot_A_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • DDot_B_Duration[DDot_A_Loop] Less than or equal to 0.00
                  • DDot_B_Unit_Target[DDot_A_Loop] Equal to No unit
                  • (DDot_B_Unit_Target[DDot_A_Loop] has buff DDot_B_Buff[DDot_A_Loop]) Equal to False
            • Then - Actions
              • Set VariableSet DDot_B_Unit_Target[DDot_A_Loop] = DDot_B_Unit_Target[DDot_A_Index]
              • Set VariableSet DDot_B_Unit_Caster[DDot_A_Loop] = DDot_B_Unit_Caster[DDot_A_Index]
              • Set VariableSet DDot_B_Damage[DDot_A_Loop] = DDot_B_Damage[DDot_A_Index]
              • Set VariableSet DDot_B_Duration_Tick[DDot_A_Loop] = DDot_B_Duration_Tick[DDot_A_Index]
              • Set VariableSet DDot_B_Duration[DDot_A_Loop] = DDot_B_Duration[DDot_A_Index]
              • Set VariableSet DDot_A_Loop = (DDot_A_Loop - 1)
              • Set VariableSet DDot_A_Index = (DDot_A_Index - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DDot_B_Duration[DDot_A_Loop] mod DDot_B_Duration_Tick[DDot_A_Loop]) Equal to 0.00
                • Then - Actions
                  • Unit - Cause DDot_B_Unit_Caster[DDot_A_Loop] to damage DDot_B_Unit_Target[DDot_A_Loop], dealing DDot_B_Damage[DDot_A_Loop] damage of attack type Spells and damage type Universal
                • Else - Actions
              • Set VariableSet DDot_B_Duration[DDot_A_Loop] = (DDot_B_Duration[DDot_A_Loop] - DDot_A_Periodic)
Thanks man, you're amazing
 
Status
Not open for further replies.
Top