Ishpeck/AlternityManager — pull request #2 by squirrelsama (2013-09-22 02:51:29+00:00)
Title: added a rollPenalty function for Alternity-specific rolls

>>> from roller import rollPenalty as rp
>>> dict(map(lambda x: (x, rp(x)), range(-6,6)))
{0: (19, '19+0', 'd20+d0'),
1: (17, '16+1', 'd20+d4'),
2: (11, '7+4', 'd20+d6'),
3: (21, '18+3', 'd20+d8'),
4: (20, '19+1', 'd20+d12'),
5: (10, '3+7', 'd20+1d20'),
-1: (15, '18-3', 'd20-d4')
-2: (16, '20-4', 'd20-d6'),
-6: (-1, '20-(2+19)', 'd20-2d20'),
-5: (-3, '11-14', 'd20-1d20'),
-4: (7, '14-7', 'd20-d12'),
-3: (-1, '3-4', 'd20-d8')}