Reuse getter in faces setter

This commit is contained in:
Carlos Fernandez 2026-03-30 21:15:44 -04:00
parent 714d4edc16
commit 3cdea0c789
2 changed files with 8 additions and 8 deletions

View file

@ -29,8 +29,8 @@ export default class DualityRoll extends D20Roll {
}
set dHope(faces) {
if (!(this.dice[0] instanceof game.system.api.dice.diceTypes.DualityDie)) this.createBaseDice();
this.dice[0].faces = this.getFaces(faces);
// TODO this should not be asymmetrical with the getter. updateRollConfiguration() should use dHope.faces
this.dHope.faces = this.getFaces(faces);
}
get dFear() {
@ -39,8 +39,8 @@ export default class DualityRoll extends D20Roll {
}
set dFear(faces) {
if (!(this.dice[1] instanceof game.system.api.dice.diceTypes.DualityDie)) this.createBaseDice();
this.dice[1].faces = this.getFaces(faces);
// TODO this should not be asymmetrical with the getter. updateRollConfiguration() should use dFear.faces
this.dFear.faces = this.getFaces(faces);
}
get dAdvantage() {

View file

@ -21,8 +21,8 @@ export default class FateRoll extends D20Roll {
}
set dHope(faces) {
if (!(this.dice[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
this.dice[0].faces = this.getFaces(faces);
// TODO this should not be asymmetrical with the getter. updateRollConfiguration() should use dHope.faces
this.dHope.faces = this.getFaces(faces);
}
get dFear() {
@ -31,8 +31,8 @@ export default class FateRoll extends D20Roll {
}
set dFear(faces) {
if (!(this.dice[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
this.dice[0].faces = this.getFaces(faces);
// TODO this should not be asymmetrical with the getter. updateRollConfiguration() should use dFear.faces
this.dFear.faces = this.getFaces(faces);
}
get isCritical() {