Custom spell math help

Status
Not open for further replies.
Level 11
Joined
Sep 14, 2009
Messages
284
Hi. Im trying to make a healing spell based on Tranquility. The healing is triggered.

What I'm trying to accomplish is that nearby allies are healed for 250 over 10 seconds. But I want to healing to be more powerful in the beginning of the spell and become weaker at the end of the duration, but the total amount healed would still be 250.

How do I use math to accomplish this?
 
Level 7
Joined
Jan 23, 2011
Messages
350
Assuming a linear decrease, and that the integral is equal to the area of the figure formed between axis and graph

Height * base /2 = 250

base should be the spell duration
Height is the first healing tick

Then 250 x 2 / duration = First tick

And to know each healing tick

First tick - A t
Where A is the pendent
First tick - A dur = 0
250 * 2 * 1/dur - A dur = 0
500 - A dur^2 = 0
A = 500/dur^2

So your function is
First tick - (Total Healing*2/duration^2) * t

Either that or i need to study more calc
 
Level 10
Joined
Sep 16, 2016
Messages
269
Suggesting that: at the 1st second you heals 10 times of basic healing amount; 2nd - 9 times....; 10th - 1 times
The number of basic healings accumulated is 10+9+8+...+1 = 55 times.
Basic healing amount (250/55) = A Hp(s)

At 1s you heal 10xA; at 2s you heal 9xA
or 10xA=B
At 1s you heal B; at 2s set B=B-A and heal B amount.
 
Level 11
Joined
May 16, 2016
Messages
730
Hi. Im trying to make a healing spell based on Tranquility. The healing is triggered.

What I'm trying to accomplish is that nearby allies are healed for 250 over 10 seconds. But I want to healing to be more powerful in the beginning of the spell and become weaker at the end of the duration, but the total amount healed would still be 250.

How do I use math to accomplish this?
Your spell request isn't transparent. Accodring to the comments above you should give us more detailed information about what do you want.
-Do this ability must heal equally all units?
-Do the healing power must be decreased with geomethric progression or with arithmetic one?
-How must the healing power be decreased: every tick or after a certain time of channeling the spell?
Anyway I made a template you may see and give suggestions.
*The healing power per single unit becomes lesser every tick with geometric progression.
*The ability heals all allied units equally, but you can't heal the whole group larger than total heal.
*All parameters may be changed in the "USE ABILITY" trigger.
*The healing power doesn't decreased if there are no injured allies inside the area.
 

Attachments

  • tranquil.w3x
    19.3 KB · Views: 23
Status
Not open for further replies.
Top