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

Bonus Damage Every 3rd consecutive Attack

Status
Not open for further replies.
Level 9
Joined
May 21, 2014
Messages
580
I can write a somewhat of a pseudo code. It's up to you how to index the unit if you want to use one or store variables.

So I'm assuming it's an innate.

initialize trigger
JaxUnitDamageCounter = 0
JaxUnit = Unit of Unit Type Jax OR Instance of Jax
3rdConsecutiveAttackBuffer = Unit Type DummyBufferUnit

Skill Trigger
Event - Damage Detection System of something

Condition - Unit Type of Triggering Unit is equal JaxUnit OR Triggering Unit is equal JaxUnit.

Actions
If JaxUnit has buff from 3rdConsecutiveAttackBuffer Then
Deal damage to target
Remove buff from JaxUnit
JaxUnitDamageCounter = 0

If JaxUnitDamageCounter == 3 Then
Create 1 Unit of Unit Type 3rdConsecutiveAttackBuffer
Order Last created unit to Buff JaxUnit
Add expiration to last created unit

JaxUnitDamageCounter = JaxUnitDamageCounter + 1

It's a rough code. but you should get what I mean. Tell me if there is something unclear.
 
Using Bribe's GUI Damage Engine and Unit Indexer. This was for a map of mine.

  • Quickshot effect OLD
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • IsDamageSpell Equal to False
          • (DamageEventSource has buff Inner Fire) Equal to True
    • Actions
      • Set QuickshotAttacks[(Custom value of DamageEventSource)] = (QuickshotAttacks[(Custom value of DamageEventSource)] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QuickshotAttacks[(Custom value of DamageEventSource)] Equal to 5
        • Then - Actions
          • Set DamageEventAmount = (DamageEventPrevAmt x 2.00)
          • Set QuickshotAttacks[(Custom value of DamageEventSource)] = 0
        • Else - Actions
With this trigger the unit with the "Inner Fire" buff will deal double damage on every 5th attack.
 
Status
Not open for further replies.
Top