Array.prototype.fancyMathEvaluate ??= function(){
	this.sortByPriority();
	let result = 0;
	let min = -Infinity;
	let max = Infinity;
	for(let element of this){
		if('set' in element)
			result = element.set;
		if('inc' in element)
			result += element.inc;
		if('dec' in element)
			result -= element.dec;
		if('min' in element)
			min = Math.max(min,element.min);
		if('max' in element)
			max = Math.min(max,element.max);
	}
	result = Math.max(result,min);
	result = Math.min(result,max);
	return result;
}