mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Reuse getter in faces setter
This commit is contained in:
parent
714d4edc16
commit
3cdea0c789
2 changed files with 8 additions and 8 deletions
|
|
@ -29,8 +29,8 @@ export default class DualityRoll extends D20Roll {
|
||||||
}
|
}
|
||||||
|
|
||||||
set dHope(faces) {
|
set dHope(faces) {
|
||||||
if (!(this.dice[0] instanceof game.system.api.dice.diceTypes.DualityDie)) this.createBaseDice();
|
// TODO this should not be asymmetrical with the getter. updateRollConfiguration() should use dHope.faces
|
||||||
this.dice[0].faces = this.getFaces(faces);
|
this.dHope.faces = this.getFaces(faces);
|
||||||
}
|
}
|
||||||
|
|
||||||
get dFear() {
|
get dFear() {
|
||||||
|
|
@ -39,8 +39,8 @@ export default class DualityRoll extends D20Roll {
|
||||||
}
|
}
|
||||||
|
|
||||||
set dFear(faces) {
|
set dFear(faces) {
|
||||||
if (!(this.dice[1] instanceof game.system.api.dice.diceTypes.DualityDie)) this.createBaseDice();
|
// TODO this should not be asymmetrical with the getter. updateRollConfiguration() should use dFear.faces
|
||||||
this.dice[1].faces = this.getFaces(faces);
|
this.dFear.faces = this.getFaces(faces);
|
||||||
}
|
}
|
||||||
|
|
||||||
get dAdvantage() {
|
get dAdvantage() {
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ export default class FateRoll extends D20Roll {
|
||||||
}
|
}
|
||||||
|
|
||||||
set dHope(faces) {
|
set dHope(faces) {
|
||||||
if (!(this.dice[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
|
// TODO this should not be asymmetrical with the getter. updateRollConfiguration() should use dHope.faces
|
||||||
this.dice[0].faces = this.getFaces(faces);
|
this.dHope.faces = this.getFaces(faces);
|
||||||
}
|
}
|
||||||
|
|
||||||
get dFear() {
|
get dFear() {
|
||||||
|
|
@ -31,8 +31,8 @@ export default class FateRoll extends D20Roll {
|
||||||
}
|
}
|
||||||
|
|
||||||
set dFear(faces) {
|
set dFear(faces) {
|
||||||
if (!(this.dice[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
|
// TODO this should not be asymmetrical with the getter. updateRollConfiguration() should use dFear.faces
|
||||||
this.dice[0].faces = this.getFaces(faces);
|
this.dFear.faces = this.getFaces(faces);
|
||||||
}
|
}
|
||||||
|
|
||||||
get isCritical() {
|
get isCritical() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue