From 5514da4774b3a4a1fcf00c6ab3b153a98ba396a0 Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Fri, 5 Jan 2024 22:44:58 -0600 Subject: [PATCH] add dodge --- CHANGELOG.md | 6 ++++++ scripts/rollHelpers.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4d6bd7..5dec6cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Added Dodge as a detected edge on a target for roll modifiers + ## [2.3.1] 2023-12-26 ### Added diff --git a/scripts/rollHelpers.js b/scripts/rollHelpers.js index 8a606a5..7c44607 100644 --- a/scripts/rollHelpers.js +++ b/scripts/rollHelpers.js @@ -47,6 +47,9 @@ export async function preTraitRollModifiers (actor, trait, roll, modifiers, opti if (scaleMod !== 0) { modifiers.push({ label: 'Scale', value: scaleMod, ignore: false }) } + if (target.actor.items.find(e => e.type === 'edge' && e.system.swid === 'dodge')) { + modifiers.push({ label: 'Dodge', value: -2, ignore: true }) + } if (trait?.type === 'skill' && trait?.system?.swid === 'fighting') { const gangUpBonus = calcGangup(token, target) if (gangUpBonus > 0) {