Random Damage Script

Started by Tigurus, June 16, 2010, 09:19:00 am

Previous topic - Next topic

Tigurus

Heyhey Everyone,

I'm in need of a script which deals random damage.
But that it is easily costumizable in the script.

Also, If you can say between which number the Damage must be.
This for Classes and skills alike.
For example, When Class 5 (Thief) uses Attack, Damage will be between 400 to 500
Or, When using Skill 11 (Impulse Grenade) damage will be between 100 to 1000

Is there someone who can help me with this or knows of such a random script?

~Tigurus

Blizzard

If you want a skill to always deal something like 200-300 damage, simply set up the parameters for the skill properly. 200-300 would be power 250 with a variance of 20%. It's that simple.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Tigurus

That sounds easy hmm...
And if I want to make the gap bigger? Like 200 to 1000 damage?
What do I need to change then? The variance?

WhiteRose

Quote from: Tigurus on June 16, 2010, 04:03:59 pm
That sounds easy hmm...
And if I want to make the gap bigger? Like 200 to 1000 damage?
What do I need to change then? The variance?

Yes. The larger the variance, the larger the range of possible damage.

Blizzard

200-1000 would be power of 600 and variance of 67%. Just do the math.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Tigurus

Aahh Alright

*Does some math*
*Dies*

Thanks for the Help =D
I will experiment with it some more ^_^

*Huggles*