BSKGetDiceParts
Module: BSKValue
void BSKGetDiceParts( BSKValue* value, BSKI16* count,
BSKUI16* type, BSKCHAR* op, BSKI16* modifier );
Inputs:
- value - the value from which to extract the parts of a dice value.
This should be a value of type VT_DICE.
- count - the buffer to put the number of dice into.
- type - the buffer to put the type of dice into.
- op - the buffer to put the (single character) operation into
(either '+' or '*', for additive versus multiplicative).
- modifier - the buffer to put the modifier into.
Description:
Returns the different parts of the given dice value. If the value
is not a dice value, but IS a number, the count is the number itself,
and the type is '1', and the modifier is 0. If the value is not a
dice or a number, this function sets all parts to 0.
Note that a dice value supports the following formats:
- count{d}type
- count{d}type +/- modifier
- count{d}type x modifier
The count part may be negative, in which case the random number is
intended to be negative.
Return to the API
Return to the function listing
Last updated on 9 Feb 2001 by Jamis Buck (minam@rpgplanet.com)