Skip to content

Commit

Permalink
Merge pull request dmdorman#1329 from aeauseth/main
Browse files Browse the repository at this point in the history
Fixes for Density Increase and layered defenses like Impenetrable
  • Loading branch information
aeauseth authored Oct 18, 2024
2 parents 210474c + a2ffef5 commit 1df8060
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
- Encumbrance related improvements.
- Fix for 5e DAMAGE RESISTANCE and PD/ED purchased as a power, where the PD/ED was counted twice. [#1297](https://github.com/dmdorman/hero6e-foundryvtt/issues/1297)
- Improved KNOWLEDGE_SKILL descriptions. [#1278](https://github.com/dmdorman/hero6e-foundryvtt/issues/1278)
- Initial NIGHTVISION, INFRAREDPERCEPTION, ULTRASONICPERCEPTION, and ULTRAVIOLETPERCEPTION support.
- Initial NIGHTVISION, INFRAREDPERCEPTION, ULTRASONICPERCEPTION, and ULTRAVIOLETPERCEPTION support. Also if you create a custom power with the word light in it, you can toggle it on/off like a lantern (QTY = meters of bright vision).
- Fixes for CONTINUING CHARGES and auto expiration with SIMPLE CALENDAR.
- Fixes for CHARACTERISTICS toggles that were subtracting instead of adding to values. [#1293](https://github.com/dmdorman/hero6e-foundryvtt/issues/1293)
- Various minor improvements for tokens of type BASE in an effort to improve [Token Attacher](https://github.com/KayelGee/token-attacher) support.
- Conditional defenses are now hidden when they provide no defense against a specific attack. There is a new setting to show All Conditional Defenses.
- Fix where some defenses were being ignored.

## Version 4.0.1

Expand Down
2 changes: 1 addition & 1 deletion module/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4342,7 +4342,7 @@ function addPower(powerDescription6e, powerOverrideFor5e) {
{
key: "DENSITYINCREASE",
type: ["body-affecting", "standard"],
behaviors: ["activatable"],
behaviors: ["activatable", "defense"],
perceivability: "obvious",
duration: "constant",
target: "self only",
Expand Down
8 changes: 6 additions & 2 deletions module/utility/defense.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,18 @@ export function determineDefense(targetActor, attackItem, options) {
// PD
if (xmlid === "PD") {
// Making sure this isn't an AE that is already included in the natural PD numbers
if (activeDefense.effects.size > 0) continue;
if (activeDefense.effects.size > 0) {
PD -= parseInt(activeDefense.system.LEVELS);
}
activeDefense.system.defenseType = "pd";
}

// ED
if (xmlid === "ED") {
// Making sure this isn't an AE that is already included in the natural ED numbers
if (activeDefense.effects.size > 0) continue;
if (activeDefense.effects.size > 0) {
ED -= parseInt(activeDefense.system.LEVELS);
}
activeDefense.system.defenseType = "ed";
}

Expand Down

0 comments on commit 1df8060

Please sign in to comment.