File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,11 +113,13 @@ export class ABFActor extends Actor {
113113 const abilityValue = this . system . secondaries [ groupPath ] [ ability ] . final . value ;
114114 const label = name ? `Rolling ${ name } ` : '' ;
115115 const mod = await openModDialog ( ) ;
116- let formula = `1d100xa + ${ abilityValue } + ${ mod ?? 0 } ` ;
116+ let formula = `${
117+ this . system . general . diceSettings . abilityDie . value
118+ } + ${ abilityValue } + ${ mod ?? 0 } `;
117119 if ( abilityValue >= 200 )
118120 formula = formula . replace (
119- this . system . general . diceSettings . abilityDie ,
120- this . system . general . diceSettings . abilityMasteryDie
121+ this . system . general . diceSettings . abilityDie . value ,
122+ this . system . general . diceSettings . abilityMasteryDie . value
121123 ) ;
122124 const roll = new ABFFoundryRoll ( formula , this . system ) ;
123125 await roll . roll ( ) ;
Original file line number Diff line number Diff line change @@ -177,7 +177,18 @@ export default class ABFActorSheet extends ActorSheet {
177177 const label = dataset . label ? `Rolling ${ dataset . label } ` : '' ;
178178 const mod = await openModDialog ( ) ;
179179 let formula = `${ dataset . roll } + ${ mod } ` ;
180- if ( parseInt ( dataset . extra ) >= 200 ) formula = formula . replace ( 'xa' , 'xamastery' ) ;
180+ if ( parseInt ( dataset . extra ) >= 200 ) {
181+ formula = formula . replace (
182+ this . actor . system . general . diceSettings . abilityDie . value ,
183+ this . actor . system . general . diceSettings . abilityMasteryDie . value
184+ ) ;
185+ // let splittedFormula = formula.split(
186+ // this.actor.system.general.diceSettings.abilityDie.value
187+ // );
188+ // formula = splittedFormula.join(
189+ // this.actor.system.general.diceSettings.abilityMasteryDie.value
190+ // );
191+ }
181192 const roll = new ABFFoundryRoll ( formula , this . actor . system ) ;
182193
183194 roll . toMessage ( {
You can’t perform that action at this time.
0 commit comments