Skip to content

Commit

Permalink
Merge pull request dmdorman#1197 from jasonareid/transform-cleanup
Browse files Browse the repository at this point in the history
Post-merge cleanups of Transform code
  • Loading branch information
phBalance authored Sep 7, 2024
2 parents 2a50b6f + daee827 commit cebf118
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion module/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5333,7 +5333,7 @@ function addPower(powerDescription6e, powerOverrideFor5e) {
return 15;
}
// This should never happen
console.error("Invalid TRANSFORM option ID: " + item.system.OPTIONID);
console.error(`Invalid TRANSFORM option ID: ${item.system.OPTIONID}`);
return 1;
},
costEnd: true,
Expand Down
2 changes: 1 addition & 1 deletion module/item/item-attack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ export async function _onRollDamage(event) {
.makeAdjustmentRoll(!!adjustment)
.makeFlashRoll(!!senseAffecting)
.makeEntangleRoll(entangle)
.makeTransformRoll(transform)
.makeEffectRoll(transform)
.addStunMultiplier(increasedMultiplierLevels - decreasedMultiplierLevels)
.addDice(formulaParts.d6Count >= 1 ? formulaParts.d6Count : 0)
.addHalfDice(formulaParts.halfDieCount >= 1 ? formulaParts.halfDieCount : 0)
Expand Down
8 changes: 4 additions & 4 deletions module/testing/testing-dice.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ export function registerDiceTests(quench) {
roller.makeFlashRoll(undefined);
expect(roller._type).to.equal(HeroRoller.ROLL_TYPE.FLASH);

roller.makeTransformRoll(0);
roller.makeEffectRoll(0);
expect(roller._type).to.equal(HeroRoller.ROLL_TYPE.FLASH);
roller.makeTransformRoll(false);
roller.makeEffectRoll(false);
expect(roller._type).to.equal(HeroRoller.ROLL_TYPE.FLASH);
roller.makeTransformRoll(null);
roller.makeEffectRoll(null);
expect(roller._type).to.equal(HeroRoller.ROLL_TYPE.FLASH);
roller.makeTransformRoll(undefined);
roller.makeEffectRoll(undefined);
expect(roller._type).to.equal(HeroRoller.ROLL_TYPE.EFFECT);
});

Expand Down
7 changes: 0 additions & 7 deletions module/utility/dice.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,6 @@ export class HeroRoller {
return this;
}

makeTransformRoll(apply = true) {
if (apply) {
this._type = HeroRoller.ROLL_TYPE.EFFECT;
}
return this;
}

makeFlashRoll(apply = true) {
if (apply) {
this._type = HeroRoller.ROLL_TYPE.FLASH;
Expand Down

0 comments on commit cebf118

Please sign in to comment.