Posible or not? crit with skills

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
With a damage/attack detection system, it should be quite simple. Giving every unit an orb ability, normal attacks should place a buff on the target. Combined with a damage detection system, you can then detect non-attack damage, presume that it's spell damage and trigger bonus damage on the target.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Weep's GUI Damage Detection System lets you detect when a unit takes damage, regardless of spells or attacks.

So how do detect spell damage? Well:
Only plausible solution requires orb effects on every unit in your map. Just add some orb effect (Orb of Corruption is probably the easiest, since it's invisible by default, and its effect can be nullified) to all units, and when they are damaged, check if the Orb of Corruption buff is present. If it's not, you should be able to assume that the damage dealt was from a spell.

There's one final problem: Orb of Corruption and other orb effects only take effect when a unit is issued a direct attack order, meaning a right-click or choosing Attack and clicking on the target. An auto-attack would not trigger Orb of Corruption, thus leading to no buff on the target and the attack to be treated as spell damage. To counter this, we use this neat little trigger:
Trigger:
  • Force Attacks
    • Events
      • Unit - No unit Notices a target in range
    • Conditions
    • Actions
      • Unit - Order (Triggering unit) to Attack (Targeted unit)

Of course, using "No unit" is pointless. What you should do is to create a trigger that registers when a unit enters the map, then adds to the Force Attacks trigger the event "Triggering unit Notices a target in range". Then any units that prepare to auto-attack will launch the Orb of Corruption effect. Any spell damage will then be obvious as the unit won't have the Orb of Corruption buff, and you can trigger the bonus damage.

If you need, I can make you a demo map showing the effect.
 

Smitty

Member
Reaction score
20
Wouldn't it make more sense to use 'a unit attacks a unit' since noticing units in range might mean that a unit will move towards another unit to attack it, and on it's way notice a 3rd unit, which it will then move to attack? Also, orbs don't stack do they, and I've not had a need to use orb effects yet to make a spell, but won't having every unit with an orb effect be rather inhibiting when it comes to items etc?

EDIT: That said, using 'a unit attacks a unit' might lead to an infinite loop, not able to test right now.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
"Is Attacked" only happens slightly before the attack is launched, and still happens after you right-click the target. This has a chance of causing delays in relation to the unit's Animation Damage Point. "Notices a target in range" takes place before that, avoiding the possibility.

As for orb effects on items, you could just trigger the effects by detecting attack damage. The same thing happens. Though I don't know if orb effects can still fire if you drop the orb after launching the effect, in which case this method could be slightly off.
 

Smitty

Member
Reaction score
20
I don't see how it could cause a problem, since repeatedly telling a unit to attack another unit manually simply results in the unit making the attack. Plus, noticing a unit in range- what if I ask a unit to hold ground, then an enemy wanders past? It would override my 'hold ground' command and go to attack the enemy.
 

Inflicted

Currently inactive
Reaction score
63
I did something very similar for my map.
EDIT: eh wait, nvm this isnt what you where looking for.
Trigger:
  • Event
    • GDD_Event Equal to 0
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of Critical Strike for GDD_DamageSource) Greater than or Equal to 1
      • Then - Actions
        • Set Temp_Number = (Random integer number between 1 and 10)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Temp_Number Less than or equal to 2
          • Then - Actions
            • Set Temp_Number = (Integer((GDD_Damage x 3.50)))
            • Set Temp_Point = (Position of GDD_DamageSource)
            • Floating Text - Create floating text that reads ((String(Temp_Number)) + !) at Temp_Point with Z offset 0.00, using font size 11.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
            • Floating Text - Show (Last created floating text) for (All players)
            • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
            • Floating Text - Change (Last created floating text): Disable permanence
            • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            • Floating Text - Change the fading age of (Last created floating text) to 1.25 seconds
            • Set Temp_Number = (Integer((GDD_Damage x 2.50)))
            • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (Real(Temp_Number)) damage of attack type Normal and damage type Normal
            • Custom script: call RemoveLocation (udg_Temp_Point)
          • Else - Actions
      • Else - Actions


Sorry this was a quick edit of my ability.
Deals 3.5x damage on 20% of attacks.
Defaultly the attack deals 1x. So this method adds an additional 2.5x
It shows the 3.5x with an exclamation mark at the end. (eg 255!)

Erm, it might have an error as I edited it freehand without test.
Also note you need the usage of Weeps GDD system for this.

Advantages of using this over default Critical Strike ability:
Chance can be dynamically adjusted.
Additional damage can be dealt using factors like Attributes or Maximum HitPoints/ManaPoints.
Can add additional effects, eg stun or slow.

EDIT: This is on both attacks and casts.
If you want only on spells/abilities.
Do some sort of event detection that checks the damage dealt by the spells.
Or on cast trigger some sort of dummy unit to deal a blast with a damage of a multiple of that which you originally had.
 

Inflicted

Currently inactive
Reaction score
63
lol I realised a mistake afterwards, but if you want to use that.
You should probably start by learning about GDD DDS's.
Search for Weep's GDD.

Erm its probably easier to just do a trigger on cast, that replaces the ability with a copy that deals more damage and trigger that to cast. After, just add the text showing the crit amount. Erm, yeah you might need a few dummy abilities.
 

bigbone

New Member
Reaction score
0
Yeah, I think I should start with basics.. still don't know much about mapping and making huge plains is abit stupid of me ._.
 

Smitty

Member
Reaction score
20
I'd suggest just having a dummy of the same unit (no model file, locust etc) and having a chance to create one when a unit casts it's spell, and order it to cast as well.
 

Inflicted

Currently inactive
Reaction score
63
Caster Dummy's cant have locust. (i may be wrong)
Also you wouldnt want 2 projectiles.
You need to make the actual ability not have any projectile and damage, but that every cast is triggered. And that there are different levels of the ability for the dummy unit to indicate the increased damage of the critical cast.
 

Smitty

Member
Reaction score
20
Caster dummies should ALWAYS have locust, otherwise players can select them Oo and yeh, remove the projectile from the dummy spell, or place the dummy in the exact position of the casting unit.
 

Inflicted

Currently inactive
Reaction score
63
Caster dummies should ALWAYS have locust, otherwise players can select them Oo and yeh, remove the projectile from the dummy spell, or place the dummy in the exact position of the casting unit.

nope. I use them without locust in almost all my maps.
Set model file to something invalid, make them invulnurable or targeted as nothing.
Hide them from minimap, make selection size negative to hit health bar.

Even permanent invisbility if you want, but not really necessary.
The only fail part about this is that it is counted in unit groups.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top