From e2d09d3aee772de4e3f87b80d4b402721408802a Mon Sep 17 00:00:00 2001 From: Richard Wilkes Date: Wed, 27 Dec 2023 16:51:19 -0800 Subject: [PATCH] Add documentation for the expression function weapon_damage() coming in v5.19. Also added a note to this and the previous commit's added functions about availability. --- Library/Markdown/Help/Expression Functions.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Library/Markdown/Help/Expression Functions.md b/Library/Markdown/Help/Expression Functions.md index b2727ee4e..f59fd65ee 100644 --- a/Library/Markdown/Help/Expression Functions.md +++ b/Library/Markdown/Help/Expression Functions.md @@ -3,7 +3,7 @@ | Function | Description | |---------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | abs(number) | Returns the absolute value of the `number`. | -| add_dice(dice_spec1, dice_spec2) | Adds two dice specifications together and returns a string suitable for passing to the `roll(dice_spec)` function. `add_dice(1d+1, 1d-2)` would return `2d-1`. | +| add_dice(dice_spec1, dice_spec2) | Adds two dice specifications together and returns a string suitable for passing to the `roll(dice_spec)` function. `add_dice(1d+1, 1d-2)` would return `2d-1`. **Not available prior to v5.19.** | | advantage_level(name) | ***Deprecated.*** Looks for a trait with the `name` and returns its level or -1 if it can't be found. **Not available prior to v4.31**. Use `trait_level(name)` for **v5+.** | | cbrt(number) | Returns the cube root of the `number`. | | ceil(number) | Returns the smallest (closest to negative infinity) value that is greater than or equal to the `number` and is equal to a mathematical integer. | @@ -11,10 +11,10 @@ | dice(count, sides) | Returns a string suitable for passing to the `roll(dice_spec)` function. `dice(2,4)` would return `2d4`. | | dice(count, sides, modifier) | Returns a string suitable for passing to the `roll(dice_spec)` function. `dice(2,4,-1)` would return `2d4-1`. | | dice(count, sides, modifier, multiplier) | Returns a string suitable for passing to the `roll(dice_spec)` function. `dice(2,4,-1,2)` would return `2d4-1x2`. | -| dice_count(dice_spec) | Returns the number of dice in the `dice_spec`. `dice_count(2d+3)` would return `2`. | -| dice_modifier(dice_spec) | Returns the modifier in the `dice_spec`. `dice_modifier(2d+3)` would return `3`. | -| dice_multiplier(dice_spec) | Returns the multiplier in the `dice_spec`. `dice_multiplier(2d+3)` would return `1`, while `dice_multiplier(2d+3x4)` would return `4`. | -| dice_sides(dice_spec) | Returns the number of sides on each die in the `dice_spec`. `dice_sides(2d+3)` would return `6`. | +| dice_count(dice_spec) | Returns the number of dice in the `dice_spec`. `dice_count(2d+3)` would return `2`. **Not available prior to v5.19.** | +| dice_modifier(dice_spec) | Returns the modifier in the `dice_spec`. `dice_modifier(2d+3)` would return `3`. **Not available prior to v5.19.** | +| dice_multiplier(dice_spec) | Returns the multiplier in the `dice_spec`. `dice_multiplier(2d+3)` would return `1`, while `dice_multiplier(2d+3x4)` would return `4`. **Not available prior to v5.19.** | +| dice_sides(dice_spec) | Returns the number of sides on each die in the `dice_spec`. `dice_sides(2d+3)` would return `6`. **Not available prior to v5.19.** | | enc(forSkills) | Returns the current encumbrance modifier (a value from 0 to 4). If `forSkills` is true, the modifier is adjusted to account for equipment that has been marked as not having its weight counting against skills. **Not available prior to v5.3.** | | enc(forSkills, returnFactor) | Returns the current encumbrance modifier (a value from 0 to 4) or the move multiplication factor if `returnFactor` is true. If `forSkills` is true, the modifier is adjusted to account for equipment that has been marked as not having its weight counting against skills. **Not available prior to v5.4.** | | exp(number) | Returns Euler's number e raised to the power of the `number`. | @@ -35,8 +35,9 @@ | sqrt(number) | Returns the positive square root of `number`. | | ssrt(length, units, flag) | Returns a value from the Size and Speed/Range Table on [B550](B550). `length` should be a number. `units` should be one of `in`, `ft`, `yd`, `mi`, `cm`, `km`, or `m`. `flag` should be true to have it return the size modifier or false to return the speed/range modifier. **Not available prior to v4.32.** | | ssrt_to_yards(size_modifier) | Returns the number of yards for the given `size_modifier` from the Size and Speed/Range Table on [B550](B550). **Not available prior to v4.32.** | -| subtract_dice(dice_spec1, dice_spec2) | Subtracts the first dice specification from the second and returns a string suitable for passing to the `roll(dice_spec)` function. `subtract_dice(3d+1, 2d+2)` would return `1d-1`. | +| subtract_dice(dice_spec1, dice_spec2) | Subtracts the first dice specification from the second and returns a string suitable for passing to the `roll(dice_spec)` function. `subtract_dice(3d+1, 2d+2)` would return `1d-1`. **Not available prior to v5.19.** | | trait_level(name) | Looks for a trait with the `name` and returns its level or -1 if it can't be found. **Not available prior to v5.** | +| weapon_damage(description, usage) | Looks for an equipped weapon with the specified description and usage and returns its resolved damage string, or an empty string if it cannot be found. **Not available prior to v5.19.** | See also: [Expression Operators](./Expression%20Operators.md)