v4.2.9
New Feature - Starred Operator in Draconic
- The Starred operator is now available in Draconic, for all your
func(*args, **kwargs)and other assignment needs (Thank you @Infinidoge and @LazyDope!)
>>> # normal call with separate arguments
>>> {{range(3, 6)}}
[3, 4, 5]
>>> # call with arguments unpacked from a list
>>> {{args = [3, 6]}}
>>> {{range(*args)}}
[3, 4, 5]
>>> # normal call with separate kwargs
>>> {{vroll(dice="1d12+8", multiply=2, add=1)}}
3d12 (4, 9, 8) + 8 = `29`
>>> # call with kwargs unpacked from a dict
>>> {{dice_args = {"dice": "1d12+8", "multiply": 2, "add": 1} }}
>>> {{vroll(**dice_args)}}
3d12 (2, 11, 4) + 8 = `25`Notable Difference
Assigning to a starred variable outside of a tuple or list in Python throws aSyntaxError, but is valid in Draconic:
Python
>>> *a = [1, 2, 3]
SyntaxError: starred assignment target must be in a list or tupleDraconic
>>> {{*a = [1, 2, 3]}}
>>> {{a}}
[1, 2, 3]Improvements
- Adjust how long descriptions are handled in lookup embeds
- Added
.attacksand.buttonstoSimpleEffect - Added
include_totalas an argument forparse_coins(), defaulting to True - Better handling of duplicate attacks, offhand weapons, and martial arts unarmed strike naming from DDB sheets
- Renamed the counter for Rages as imported by Dicecloud v1, to match the expected counter name used by the actions (This may result in a second counter being named, sorry about that!)
Bug Fixes
- Fixed
displayNamein Roll effects deleting itself after the first use - Various backend fixes and improvements