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 .
 
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".
 
hmm would you explain more about this code triggers start from events .
 
a unit starts/finishes casting an ability

ability equal to your spell

^^^and that above^^^^

im a noob so im probably wrong.
 
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.
 
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 ?
 
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
  • No one is chatting at the moment.
  • The Helper The Helper:
    It is weird seeing a way more realistic users online number
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top