ID:138497   Jul 13 2000, 10:23 pm 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? - -
 <-> Jul 13 2000, 10:32 pm 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?
 <-> Jul 14 2000, 5:52 am In response to Tom H. 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?