Stackable Critical Strike

This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
Stacking Critical Strike
All Bugs now fixed.

Increase chance of critical strike by 7.5% with each attack but decrease the multiplier by 5%.
After 10 stacks there is 20% chance for
mortal strike.(can be used in upper levels of this ability)
After 15 stacks there is 10% chance for Deadly strike.(can be used in upper levels of this ability)
Mortal Strike deals 2% of enemy's max hp as pure damage.

Deadly Strike deals 4% of enemy's max hp as pure damage.
Contents

Stackable Critical Strike (Map)

Reviews
Wrda
You can make Critical Strike Stackable by putting -11 on Y button position. SC_Ability looks completly unnecessary. Special effects are currently leaking, you need to destroy them either right after they're created, or delayed, but I assume you'd just...
The icon artwork here is pretty cool. Please let us know in the description what mortal strike and deadly strike are.

The "attacked" event is not good. The damage is applied too early, and can be interrupted (e.g. by pressing "stop"). You'll want to use the "unit takes damage" event, or use a damage engine if on an earlier WC3 version.

The changing of a unit's life is going to cause problems if the adjustment would kill the target, because the damaging unit will not get credit for the kill. If using Damage Engine, you could do this:

Set DamageEventAmount = (DamageEventAmount + ((Unit - Max Life of DamageEventTarget) x 0.02) )
 
Level 6
Joined
Jul 10, 2023
Messages
33
The icon artwork here is pretty cool. Please let us know in the description what mortal strike and deadly strike are.

The "attacked" event is not good. The damage is applied too early, and can be interrupted (e.g. by pressing "stop"). You'll want to use the "unit takes damage" event, or use a damage engine if on an earlier WC3 version.

The changing of a unit's life is going to cause problems if the adjustment would kill the target, because the damaging unit will not get credit for the kill. If using Damage Engine, you could do this:

Set DamageEventAmount = (DamageEventAmount + ((Unit - Max Life of DamageEventTarget) x 0.02) )
Thank you very much. I fixed the bug you mentioned.
 
Thank you, yes but I like to make my triggers Independent.
In that case, the best option would be to use the modern WarCraft 3 GUI (1.33+) which allows you to have native damage detection in the generic "any unit takes damage" event, and then simply check "Event Damage is Attack" (or whatever BlzGetDamageIsAttack is named in GUI).

If you insist on using legacy WarCraft 3 versions, the best bet is definitely to use a resource built to handle this exact scenario. Using libraries, especially a DDS, is pretty common. I like to follow DRY principles when coding, so if there is a library that does what I need, I am happy to use it. I used to have the same opinion about doing everything myself, and I invite you to challenge the norms if you don't like them.

As it is currently, this is leaking a damage event on every attack. It is programmatically unwise to allow such leaks, and unfortunately does not meet the standards required for a resource with such an avoidable issue.

If you change "disable trigger" to a custom script that destroys the trigger instead, you can avoid leaking the trigger and event. However, the trigger's actions are not destroyed by this process, so you only remove 2/3rds of the handles (event and trigger, but not action).

If you prefer going the route of dynamically creating triggers and actions, you'll need to use JASS instead of GUI (or a very complicated route of embedding custom script into GUI). To make this MUI (which is also a requirement) you can use a hashtable or a unit indexer. You can then attach data to the unit's handle via hashtable, or attach data in an array to the unit's unique array-friendly integer.
 
Last edited:
Level 6
Joined
Jul 10, 2023
Messages
33
In that case, the best option would be to use the modern WarCraft 3 GUI (1.33+) which allows you to have native damage detection in the generic "any unit takes damage" event, and then simply check "Event Damage is Attack" (or whatever BlzGetDamageIsAttack is named in GUI).

If you insist on using legacy WarCraft 3 versions, the best bet is definitely to use a resource built to handle this exact scenario. Using libraries, especially a DDS, is pretty common. I like to follow DRY principles when coding, so if there is a library that does what I need, I am happy to use it. I used to have the same opinion about doing everything myself, and I invite you to challenge the norms if you don't like them.

As it is currently, this is leaking a damage event on every attack. It is programmatically unwise to allow such leaks, and unfortunately does not meet the standards required for a resource with such an avoidable issue.

If you change "disable trigger" to a custom script that destroys the trigger instead, you can avoid leaking the trigger and event. However, the trigger's actions are not destroyed by this process, so you only remove 2/3rds of the handles (event and trigger, but not action).

If you prefer going the route of dynamically creating triggers and actions, you'll need to use JASS instead of GUI (or a very complicated route of embedding custom script into GUI). To make this MUI (which is also a requirement) you can use a hashtable or a unit indexer. You can then attach data to the unit's handle via hashtable, or attach data in an array to the unit's unique array-friendly integer.
i think it's better to move on reforged :D
 

Wrda

Spell Reviewer
Level 27
Joined
Nov 18, 2012
Messages
1,946
You can make Critical Strike Stackable by putting -11 on Y button position. SC_Ability looks completly unnecessary.
Special effects are currently leaking, you need to destroy them either right after they're created, or delayed, but I assume you'd just want the blood effect, so it's the former. The model effect should be configurable.
Bribe has already said pretty much what you have to do, so I'm not going through an exhaustive list.
1. Hashtable or Unit Indexer in order to make it MUI.
2. Any type of DDS (Damage Detection System).
Remember that this also has to work with abilities like multishot, barrage or units who have more than 1 maximum number of targets.

Currently needs fix.
 
Level 6
Joined
Jul 10, 2023
Messages
33
You can make Critical Strike Stackable by putting -11 on Y button position. SC_Ability looks completly unnecessary.
Special effects are currently leaking, you need to destroy them either right after they're created, or delayed, but I assume you'd just want the blood effect, so it's the former. The model effect should be configurable.
Bribe has already said pretty much what you have to do, so I'm not going through an exhaustive list.
1. Hashtable or Unit Indexer in order to make it MUI.
2. Any type of DDS (Damage Detection System).
Remember that this also has to work with abilities like multishot, barrage or units who have more than 1 maximum number of targets.

Currently needs fix.
Yes you are right, I was away from world edit for many years. Please review my 2 other spells, the last spells in site.
 
Top