ID:138497
 
I'm trying to figure out a way to write the following equasion so that I can incorporate it into a function. Here it is right out of the rule book:

When a character attempts to use a skill, 1d100 is
rolled. If the roll is equal to or less than EML, the
skill has been successfully employed; if the roll is
greater than EML, the attempt has failed.
Any success roll ending with a five or zero is a Critical
Success. Any failure roll ending with a five or zero is a
Critical Failure. All non-critical results are Marginal.

The problem I'm having is determining if the last digit on the 1d100 is a five or zero. Or, alternatively, some other way of determing critical success/failure without throwing off the percentage chance. A straite 20% roll maybe?

Anyone lend me a few brain cells?

- -
On 7/14/00 2:23 am Gabriel wrote:
I'm trying to figure out a way to write the following equasion so that I can incorporate it into a function. Here it is right out of the rule book:

When a character attempts to use a skill, 1d100 is
rolled. If the roll is equal to or less than EML, the
skill has been successfully employed; if the roll is
greater than EML, the attempt has failed.

Any success roll ending with a five or zero is a Critical
Success. Any failure roll ending with a five or zero is a
Critical Failure. All non-critical results are Marginal.

The problem I'm having is determining if the last digit on the 1d100 is a five or zero. Or, alternatively, some other way of determing critical success/failure without throwing off the percentage chance. A straite 20% roll maybe?

Anyone lend me a few brain cells?

proc/tohit()
var/v = rand(1,100) // or, cooler: = roll("1d100")
// do your EML stuff
if(v%5 == 0) // is it divisible by 5?
// do your other stuff

Helpful?

In response to Tom H. (#1)
Whoowhoo! Thanks!


On 7/14/00 2:32 am Tom H. wrote:
On 7/14/00 2:23 am Gabriel wrote:
The problem I'm having is determining if the last digit
on the 1d100 is a five or zero. Or, alternatively, some
other way of determing critical success/failure without
throwing off the percentage chance. A straite 20% roll
maybe?

Anyone lend me a few brain cells?

proc/tohit()
var/v = rand(1,100) // or, cooler: = roll("1d100")
// do your EML stuff
if(v%5 == 0) // is it divisible by 5?
// do your other stuff

Helpful?