Pjb518 / FoundryVTT-Level-Up-Official

An official implementation of the Level Up: Advanced 5th Edition system for FoundryVTT.
MIT License
43 stars 15 forks source link

[Feat] Conditional/Ternary Operator in Roll Formula #467

Open nchezrony opened 2 months ago

nchezrony commented 2 months ago

It would be very helpful to have something like condition ? trueExpression : falseExpression work.

For example, a feature that adds to blindsight, but only if one has it already, would give a Sense grant with the formula @attributes.senses.blindsight.distance > 0 ? @attributes.senses.blindsight.distance + 30 : 0