A Foundry VTT game system for Delta Green: The RPG! This is a fan made work that is unaffiliated with Shane Ivey or Arc Dream Publishing, published under the Delta Green Community license. http://www.delta-green.com https://foundryvtt.com/
Separate rolls into their own class DGRoll which extends base Foundry Roll
DGRoll is a basic/general class that specific rolls should extend. We almost never do new DGRoll(...args) directly.
For example, DGPercentileRoll extends DGRoll, and applies its own methods and data to the class object.
This has simplified a lot of nested if/else statements and rolls now follow a more understandable and consistent logic.
This has also allowed us to remove a lot of clutter in the datasets in html elements.
Percentile rolls just need to specify data-rolltype, data-key, and data-iid in the HTML.
The rolltype for percentile rolls should be one of the following values "skill", "stat", "weapon", "lethality", "luck", . Note, Lethality rolls are a subclass of percentile rolls, not damage rolls.
The key should be the stat (e.g. "str", skill (e.g. "unarmed-combat"), or "custom" that is used to derive the target number. This is unnecessary for lethality, sanity, luck, and damage rolls.
The iid should be the ID of the item used to make the roll, if applicable. Note, this is only necessary to provide when rolling from an item like with a weapon attack or damage/lethality roll.
Damage rolls need to specify data-rolltype and data-iid
The rolltype for damage rolls should be damage or sanity-damage.
data-iid is the id of the weapon used to make the damage roll. Not necessary for sanity damage rolls
The refactor of the roll system brought along some slight restyling of roll chat messages.
Restyled actor sheets to be more in-line with the core book's design.
Weapons can now have modifiers for their rolls built-in.
Weapons can choose a custom target for their rolls.
Damage rolls can now utilize math functions like base Foundry rolls (e.g. ceil((1d12+2)/4)).
The "Hide Untrained Skills" checkbox has been turned into an "eye" glyph.
Steps to test:
For all rolls, try rolling a few to make sure all the combinations work (critical success, regular success, regular fail, and critical fail).
Roll stats
Roll unmodified stat
Roll modified stat
Roll inhuman stat (stat > 20) and make sure it follows all the rules
Check chat cards (expanded and not expanded) and make sure they look good.
Roll skills
Roll unmodified skill
Roll unmodified typed skill
Roll modified skill
Roll unmodified typed skill
Check chat cards (expanded and not expanded) and make sure they look good.
Roll Luck check, modified and unmodified
Roll a Sanity check, modified and unmodified
Roll weapons
Roll weapon attack (using a skill for the target) modified and unmodified
Roll regular damage modified and unmodified
Roll regular damage with a math function in the formula
Roll lethality damage modified and unmodified
Repeat steps 5.1-5.4 using a stat x5 for the target
Repeat steps 5.1-5.4 using a custom target
Repeat steps 5.1-5.4 with a modifier on the weapon item.
Check chat messages for 5.1 - 5.7.
Repeats steps 1-5 on NPC and Unnatural sheets (if applicable).
On an unnatural sheet, roll sanity damage. Check chat message
On NPC/Unnatural sheets, click the "eye" glyph to toggle the display of untrained skills.
This PR does a number of things:
DGRoll
which extends base FoundryRoll
DGRoll
is a basic/general class that specific rolls should extend. We almost never donew DGRoll(...args)
directly.DGPercentileRoll
extendsDGRoll
, and applies its own methods and data to the class object.data-rolltype
,data-key
, anddata-iid
in the HTML.rolltype
for percentile rolls should be one of the following values"skill"
,"stat"
,"weapon"
,"lethality"
,"luck"
, . Note, Lethality rolls are a subclass of percentile rolls, not damage rolls.key
should be the stat (e.g."str"
, skill (e.g."unarmed-combat"
), or"custom"
that is used to derive the target number. This is unnecessary forlethality
,sanity
,luck
, and damage rolls.iid
should be theID
of the item used to make the roll, if applicable. Note, this is only necessary to provide when rolling from an item like with a weapon attack or damage/lethality roll.data-rolltype
anddata-iid
rolltype
for damage rolls should bedamage
orsanity-damage
.data-iid
is the id of the weapon used to make the damage roll. Not necessary for sanity damage rollsceil((1d12+2)/4)
).Steps to test:
For all rolls, try rolling a few to make sure all the combinations work (critical success, regular success, regular fail, and critical fail).