import { ICombatCharacter , ICombat , InternalCombatSkillFunction } from '../../interfaces' ; export const RandomNumber = ( minEval , maxEval , isPositive ? ) => ( caster , target , combat ) : number => { let min = minEval ; if ( minEval instanceof Function ) { min = minEval ( caster , target , combat ) ; } let max = maxEval ; if ( maxEval instanceof Function ) { max = maxEval ( caster , target , combat ) ; } if ( max < min ) max = min ; return Math . floor ( combat . chance . integer ( { min , max } ) ) * ( isPositive ? 1 : - 1 ) ; } ;