[Trigger] Bash ability with armor reduction trigger

Status
Not open for further replies.
Level 41
Joined
Feb 27, 2007
Messages
5,229
As long as you are okay with it being an Orb effect, use Orb of Corruption's item ability. It might not show on the command card so you'll have to get around that with a dummy ability to show a tooltip and some simple triggers. If an orb ability is unacceptable to you, then you'll have to make another simple trigger using something like Damage Engine 5.9.0.0 and a dummy-casted Acid Bomb with 5 levels.
 
Level 7
Joined
Feb 20, 2016
Messages
274
As long as you are okay with it being an Orb effect, use Orb of Corruption's item ability. It might not show on the command card so you'll have to get around that with a dummy ability to show a tooltip and some simple triggers. If an orb ability is unacceptable to you, then you'll have to make another simple trigger using something like Damage Engine 5.9.0.0 and a dummy-casted Acid Bomb with 5 levels.
I'm fine with using the orb of corruption stats but i dont see it connected to any ability. What kind of simple trigger?
 
Level 7
Joined
Feb 20, 2016
Messages
274
You you intend for it to be a chance to reduce 5 armor or it always to reduce 5 armor on every hit?

The OoC item should have an ability associated with it. That’s what controls the bonus damage and armor reduction.
Having a % chance to reduce 5 armor would be good too if its not complicated to add. I found the corruption ability.
 
Last edited:
Level 41
Joined
Feb 27, 2007
Messages
5,229
Corruption can't have a chance associated with it, it always fires. Corruption can't stack, it only refreshes the duration of the debuff. Corruption (because it's an orb effect) also will not apply when the unit auto-acquires a target instead of being told to attack or attack move to a location (only works on directly ordered attacks).

If you want a % chance, stacking, or it to always work on every attack no matter what then you'll have to turn to DamageEngine like I linked. And then dummy cast an Acid Bomb on the target whose armor should be reduced. If stacking should be involved you'll need some logic to check the buff level on the target and cast the appropriate level of the armor debuff.
 
Level 7
Joined
Feb 20, 2016
Messages
274
Corruption can't have a chance associated with it, it always fires. Corruption can't stack, it only refreshes the duration of the debuff. Corruption (because it's an orb effect) also will not apply when the unit auto-acquires a target instead of being told to attack or attack move to a location (only works on directly ordered attacks).

If you want a % chance, stacking, or it to always work on every attack no matter what then you'll have to turn to DamageEngine like I linked. And then dummy cast an Acid Bomb on the target whose armor should be reduced. If stacking should be involved you'll need some logic to check the buff level on the target and cast the appropriate level of the armor debuff.
Capture.JPG

Ok i placed the Damage Engine foder in my mod. Now how do i transform the Acid Bomb ability into a dummy?
 
Level 41
Joined
Feb 27, 2007
Messages
5,229
Give it max range, max projectile speed, 0 damage in all damage fields, no cooldown, no mana cost, and a 5s duration. Give it as many levels as the on-hit ability should have and set the armor reduction values appropriately.

When you detect damage from an attack with DamageEngine (some form of a “DamageEvent becomes less than 1.00” event, read the system documentation), check if the unit has the passive ability that should reduce armor. If the unit has that ability, spawn an invisible locusted dummy unit (with no model) for the owner, give it the acid bomb ability, set its level appropriately, give the unit a short expiration timer, and order it to use acid bomb on the target.
 
Level 41
Joined
Feb 27, 2007
Messages
5,229
  • Events
    • Game - Elapsed game time is 0.50 seconds
  • Conditions
  • Actions
    • Set ArmorReduceChance[0] = -1.00 //this is so the condition in the other trigger fails when the level is 0
    • Set ArmorReduceChance[1] = 0.08
    • Set ArmorReduceChance[2] = 0.12
    • Set ArmorReduceChance[3] = 0.14
    • Set ArmorReduceChance[4] = 0.19
    • Set ArmorReduceChance[5] = 0.25 //or whatever numbers, this is the activation chance
  • Events
    • Game - DamageEvent becomes Less than 0.00 //runs on all attacks but not coded attacks
  • Conditions
    • (Random number between 0.00 and 1.00) Less than or equal to ArmorReduceChance[(Level of YOUR_PASSIVE for DamageEventSource)]
  • Actions
    • Set TempPoint = (Position of DamageEventTarget)
    • Unit - Create 1 DUMMY_UNIT_TYPE for (Owner of DamageEventSource) at TempPoint facing Default building facing degrees
    • Unit - Add ACID_BOMB_ABILITY to (Last created unit)
    • Unit - Set level of ACID_BOMB_ABILITY for (Last created unit) to (Level of YOUR_PASSIVE for DamageEventSource)
    • Unit - Add a 3.00 second generic expiration timer to (Last created unit)
    • Unit - Order (Last created unit) to (Neutral Alchemist - Acid Bomb) DamageEventTarget
    • Custom script: call RemoveLocation(udg_TempPoint) //change this to match the name of your point variable, but keep the udg_ prefix
 
Last edited:
Level 7
Joined
Feb 20, 2016
Messages
274
  • Events
    • Game - Elapsed game time is 0.50 seconds
  • Conditions
  • Actions
    • Set ArmorReduceChance[0] = -1.00 //this is so the condition in the other trigger fails when the level is 0
    • Set ArmorReduceChance[1] = 0.08
    • Set ArmorReduceChance[2] = 0.12
    • Set ArmorReduceChance[3] = 0.14
    • Set ArmorReduceChance[4] = 0.19
    • Set ArmorReduceChance[5] = 0.25 //or whatever numbers, this is the activation chance
  • Events
    • Game - DamageEvent becomes Less than 0.00 //runs on all attacks but not coded attacks
  • Conditions
    • (Random number between 0.00 and 1.00) Less than or equal to ArmorReduceChance[(Level of YOUR_PASSIVE for DamageEventSource)]
  • Actions
    • Set TempPoint = (Position of DamageEventTarget)
    • Unit - Create 1 DUMMY_UNIT_TYPE for (Owner of DamageEventSource) at TempPoint facing Default building facing degrees
    • Unit - Add ACID_BOMB_ABILITY to (Last created unit)
    • Unit - Set level of ACID_BOMB_ABILITY for (Last created unit) to (Level of YOUR_PASSIVE for DamageEventSource)
    • Unit - Add a 3.00 second generic expiration timer to (Last created unit)
    • Unit - Order (Last created unit) to (Neutral Alchemist - Acid Bomb) DamageEventTarget
    • Custom script: call RemoveLocation(udg_TempPoint) //change this to match the name of your point variable, but keep the udg_ prefix
Hi, i tried your triggers but i cant find some variables so they're missing. Please take a look at my map. I placed the 2 triggers inside the folders Damage Engine > Events.
 

Attachments

  • (8)GardenOfWar modded.w3x
    9.1 MB · Views: 3
Level 41
Joined
Feb 27, 2007
Messages
5,229
You need... to make... the variables... yourself. Variables aren't magic black boxes, they just store information. If you see a variable being used in a trigger and don't have a variable of such a name in your map already you can either make a new variable with that name or reuse another variable of the same type that already exists in your map.
 
Status
Not open for further replies.
Top