Skip to content

Commit

Permalink
Merge pull request dmdorman#1654 from aeauseth/main
Browse files Browse the repository at this point in the history
Adjustment overhaul.
  • Loading branch information
aeauseth authored Dec 26, 2024
2 parents 7539de6 + 4af80be commit 3ffc19f
Show file tree
Hide file tree
Showing 10 changed files with 918 additions and 410 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Releases

## Version 4.0.13 [Hero System 6e (Unofficial) v2](https://github.com/dmdorman/hero6e-foundryvtt)
## Version 4.0.13 So Far... [Hero System 6e (Unofficial) v2](https://github.com/dmdorman/hero6e-foundryvtt)

- Enhanced Senses improvements:
- SIGHTGROUP visions now respect the BLIND status. [#1590](https://github.com/dmdorman/hero6e-foundryvtt/issues/1590)
Expand All @@ -11,6 +11,7 @@
- Fixed formatting issues with prosemirror editor caused by us overriding some css that we shouldn't have. [#1629](https://github.com/dmdorman/hero6e-foundryvtt/issues/1629)
- Knocked out targets no longer get double adjustment effect. [#1255](https://github.com/dmdorman/hero6e-foundryvtt/issues/1255)
- Explosions now correctly deal different damage to each token based on distance when using the "Apply Damage to ALL" button. [#1323](https://github.com/dmdorman/hero6e-foundryvtt/issues/1323)
- Fixed issue where some adders (like EVERYPHASE) were ignored when there were multiple modifiers. [#1634](https://github.com/dmdorman/hero6e-foundryvtt/issues/1634)

## Version 4.0.12 [Hero System 6e (Unofficial) v2](https://github.com/dmdorman/hero6e-foundryvtt)

Expand Down
8 changes: 8 additions & 0 deletions module/actor/actor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2476,4 +2476,12 @@ export class HeroSystem6eActor extends Actor {
const price = equipment.reduce((a, b) => a + parseFloat(b.system.PRICE), 0);
return price.toFixed(2);
}

/**
* Apply any transformations to the Actor data which are caused by ActiveEffects.
*/
// *override
applyActiveEffects(...args) {
return super.applyActiveEffects(...args);
}
}
16 changes: 8 additions & 8 deletions module/item/item-attack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2695,8 +2695,8 @@ async function _onApplyAdjustmentToSpecificToken(adjustmentItem, token, damageDe

const adjustmentItemTags = getAttackTags(adjustmentItem);

const rawActivePointsDamageBeforeDefense = damageDetail.stunDamage;
const activePointsDamageAfterDefense = damageDetail.stun;
const rawActivePointsEffectBeforeDefense = damageDetail.stunDamage;
const activePointsEffectAfterDefense = damageDetail.stun;

// DRAIN
const reductionChatMessages = [];
Expand All @@ -2706,7 +2706,7 @@ async function _onApplyAdjustmentToSpecificToken(adjustmentItem, token, damageDe
await performAdjustment(
adjustmentItem,
reduce,
activePointsDamageAfterDefense,
-activePointsEffectAfterDefense,
defense,
damageDetail.effects,
false,
Expand All @@ -2731,7 +2731,7 @@ async function _onApplyAdjustmentToSpecificToken(adjustmentItem, token, damageDe
await performAdjustment(
adjustmentItem,
"STUN", //enhance,
-rawActivePointsDamageBeforeDefense,
rawActivePointsEffectBeforeDefense,
"None - Beneficial",
"",
false,
Expand All @@ -2743,7 +2743,7 @@ async function _onApplyAdjustmentToSpecificToken(adjustmentItem, token, damageDe
await performAdjustment(
adjustmentItem,
"BODY", //enhance,
-damageDetail.bodyDamage,
damageDetail.bodyDamage,
"None - Beneficial",
"",
false,
Expand All @@ -2760,10 +2760,10 @@ async function _onApplyAdjustmentToSpecificToken(adjustmentItem, token, damageDe
adjustmentItem,
enhance,
adjustmentItem.system.XMLID === "TRANSFER"
? -activePointsDamageAfterDefense
? activePointsEffectAfterDefense
: simplifiedHealing && enhance === "BODY"
? -damageDetail.bodyDamage
: -rawActivePointsDamageBeforeDefense,
? damageDetail.bodyDamage
: rawActivePointsEffectBeforeDefense,
"None - Beneficial",
"",
false,
Expand Down
2 changes: 2 additions & 0 deletions module/item/item.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3127,6 +3127,8 @@ export class HeroSystem6eItem extends Item {
? reduceAndEnhanceTargets.enhances || reduceAndEnhanceTargets.reduces
: "unknown"
} ${diceFormula}`;

this.name = system.NAME || `${system.ALIAS} ${system.INPUT}`;
}
break;

Expand Down
Loading

0 comments on commit 3ffc19f

Please sign in to comment.