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

[General] Spell Criticals

Status
Not open for further replies.
Level 8
Joined
Dec 11, 2012
Messages
412
Is there such a thing as spell crit in Warcraft 3.... For example, your hero has pasisve Critical strike that has chance to both make your melee and spell attacks crit.

Example, I cast fireball, it crits, and sh!t. How do I make that? Any ideas, cuz I'm n00b? :ogre_haosis:
 
Level 18
Joined
May 11, 2012
Messages
2,103
That would require using DDS (looking for help's one is good).
When you cast spell, detect the damage type and if it is spell, then multiply that damage by desired amount (crit) and apply the damage to the unit(s).
Make sure you avoid infinite loop by putting turn off (this trigger) at the beggining, and turn it back on at the end.
 
Level 8
Joined
Nov 9, 2011
Messages
326
Something like this (25% chance)

  • Spell Crit
    • Events
      • Game - PDD_damageEventTrigger becomes Equal to 1.00
    • Conditions
      • PDD_damageType Equal to PDD_SPELL
    • Actions
      • Set RANDOMRealVariable = (Random real number between 1.00 and 100.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RANDOMRealVariable Less than or equal to 25.00
        • Then - Actions
          • Set PDD_amount = (PDD_amount x DamageMultiply)
        • Else - Actions

Now the DamageMultiply real is how much the crit damage is. In my case its set to 75%
  • Set DamageMultiply = 1.75
u set that in some Map initialization trigger
How ever u will need DDS from looking_for_help. Its easy to use
http://www.hiveworkshop.com/forums/...etection-gui-v1-2-0-1-a-231846/?prev=status=a

EDIT: Why i used real for chance and not integer is that u can use chances like 22.5 or 13.2% chances
 
Actually, instead of dealing damage you should reduce the life by damage. That way you don't need to worry about that.

As far as I am aware every single DDS doesn't have a function that change the damage.

Actually looking for help's does.

[trigger=]
OnDamage
Events
Game - damageEventTrigger becomes Equal to 1.00
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
damageType Equal to PHYSICAL
Then - Actions
-------- Actions for PHYSICAL damage --------
-------- End of Actions for PHYISCAL damage --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
damageType Equal to SPELL
Then - Actions
-------- Actions for SPELL damage --------
-------- This allows units with critical strike to have a 15% chance to spell-crit like the normal critical strike blademaster has when normally attacking --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Critical Strike for source) Greater than 0
(Random real number between 0.00 and 100.00) Less than or equal to 15.00
Then - Actions
Set amount = (((Real((Level of Critical Strike for source))) + 1.00) x amount)
Else - Actions
-------- End of Actions for SPELL damage --------
Else - Actions
-------- Actions for CODE damage --------
-------- End of Actions for CODE damage --------

[/trigger]
 
Status
Not open for further replies.
Top