Healing a unit "random real number"

Ommi

New Member
Reaction score
7
Hey Im trying to make a spell that deals random ammount of damage but also heals the target for a random number, Ive got the damage part down, but I cant seem to find anything similar with "healing" just put units hp to a specific number or %

here is my trigger as it is now:

Code:
Heads or Tails
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Heads or Tails
        ((Target unit of ability being cast) is A Hero) Equal to True
    Actions
        Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (Random real number between 200.00 and 500.00) damage of attack type Chaos and damage type Normal
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Hey Im trying to make a spell that deals random ammount of damage but also heals the target for a random number, Ive got the damage part down, but I cant seem to find anything similar with "healing" just put units hp to a specific number or %

here is my trigger as it is now:

Code:
Heads or Tails
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Heads or Tails
        ((Target unit of ability being cast) is A Hero) Equal to True
    Actions
        Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (Random real number between 200.00 and 500.00) damage of attack type Chaos and damage type Normal

Code:
Unit - Set life of (Target unit of ability being cast) to (Life of (Target unit of ability being cast) + (Random real number between x and y))
 

Ommi

New Member
Reaction score
7
Ah thank you very much : )

So many tricky things like that, that I still havent managed to figgure out hehe :p guess it comes with time
 

Ommi

New Member
Reaction score
7
Hmm, I guess I have 1 more question regarding spell triggers, is there a way to make them "level up" with the spell, or make them do diffrent effects on diffrent levels of the spell beeing used ?
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Use 'If/Then/Else' for different effects per level.
If you want the numbers to be different per level, let's say 100/200/300 for level 1/2/3 then make a formula :

100 * level of ability
 

Somatic

You can change this now in User CP.
Reaction score
84
Using the arifmatic function, where you are presented with the (1.00) + (1.00) and you can manipulate 1 of the field to reflect the level of the spell, while the other to reflect the amount you want. In the case that you want it to be random, you will have to need a variable to store the "Minimun: heal value and the "maximun" heal value to obtain a random figure between both value.
 

Ommi

New Member
Reaction score
7
Thanks for the help : )

finished the spell now and its working great, here it is if your intrested:

Code:
Heads or Tails
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Heads or Tails
        ((Target unit of ability being cast) is A Hero) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Life of (Target unit of ability being cast)) Equal to (Max life of (Target unit of ability being cast))
            Then - Actions
                Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Real((Level of Heads or Tails for (Casting unit)))) x (Random real number between 200.00 and 400.00)) damage of attack type Chaos and damage type Normal
                Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Real((Level of Heads or Tails for (Casting unit)))) x (Random real number between 100.00 and 300.00)))
            Else - Actions
                Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Real((Level of Heads or Tails for (Casting unit)))) x (Random real number between 100.00 and 300.00)))
                Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Real((Level of Heads or Tails for (Casting unit)))) x (Random real number between 200.00 and 400.00)) damage of attack type Chaos and damage type Normal
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top