chance to crit fire bolt

mute

New Member
Reaction score
2
Hello,
how to give items or passive spells chance to crit your spells like fire bolt or finger of death just spells not normal attack .
 

Bogrim

y hello thar
Reaction score
154
Trigger the damage caused by the spell, and use a random number to determine the crit percentage chance. For example, "If (Random number between 1 and 5) Equal to 1 Then Cause (Triggering unit) to damage (Target unit of ability being cast) for 200.00 damage Else (Triggering unit) to damage (Target unit of ability being cast) for 100.00 damage".
 

mute

New Member
Reaction score
2
hmm would you explain more about this code triggers start from events .
 

pr0-assasin

New Member
Reaction score
4
a unit starts/finishes casting an ability

ability equal to your spell

^^^and that above^^^^

im a noob so im probably wrong.
 

Cheddar

This is the way it was meant to be.
Reaction score
126
a unit starts/finishes casting an ability

ability equal to your spell

^^^and that above^^^^

im a noob so im probably wrong.

No, you have it mostly right.

Code:
EVENTS: Unit - Unit starts the effect of an ability
CONDITIONS: (Ability being cast) equal to (CRIT THING)
ACTIONS: Set (ThisIsAnIntegerVariable) equal to (Random number between 1 and ([B]100/([I]Percent chance to crit[/I][/B]))
If - Then - Else (Multiple actions)
     IF: ThisIsAnIntegerVariable is equal to 1
     THEN: Cause (Triggering unit) to damage (Target unit of ability being cast) for (DAMAGE) damage
     ELSE: Do nothing

Bold: Obviously not what you'd explicitly put in. It's just the formula. 20% chance to critical spell = 100 / 20 = 5. Random number from 1 to 5.
Italics: Percent chance to crit.
 

mute

New Member
Reaction score
2
hmm ok what about if there is any item have 10% increase chance to spell crit how i can do this trigger as i understand it now i need to trigger all spells on this item ?
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
there is no critical to spells, all you have to do is to trigger all your spells, and then take a chance taht a damage is doubled or tripled, equal to the item the hero has.
Lets say this is a firebolt spell
its freehand: this means that this is only the idea
Make a trigger that saves chances and multipliers

Event
.Map init
Condition
Action
.Set item[1] = "item1"
.Set item[2] = "item2"
.Set chance[1]= 20
.Set chance[2]= 15
.Set DmgMul[1]= 0.5
.Set DmgMul[2]= 0.75

Make a firebolt spell that gives 0 dmg, And add this trigger

Event
.A unit starts the effect of an ability
Condition
.Ability being cast is equal to "your ability" and target of ability is not immune or invulnerable
Action
.Set Attack= 100*(level of "your ability" of unit) <---Example damage
.Order caster to damage target unit with damage Attack
{For integer A from 1 to 2 do actions <---The 2 means that there are only 2 variables in main trigger, if you add more you will have to put more :D
.If caster has item[A] in his inventory
...If (random number from 1 to 100)<chance[A]
....Order caster to damage target unit with damage Attack*DmgMul[A]}
In the brackets we do the rest damage, the critical, so if you have an item that has 20% chance to damage 1,5 times more you put in first trigger at chance 20 and at DmgMul 0.5 because you already do the x1 damage and then 0.5 of that as critical dmg.
This can work with passive spells too and you have to add another check in the brackets.....I hope you got it.
 
General chit-chat
Help Users

      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