Extend conditional evaluation of flags.midi-qol variables to flags.midi-qol.max.damage and flags.midi-qol.min.damage

So I started on that to make the Beacon of Hope spell easier to automate.

If someone narrows the scope to only one damageType on an Item, this should be more or less fine... and would make spells like Beacon of Hope trivial with a check against the target having the transferred Active Effect.

Though the really narrow scope, doesn't feel right and I am not sure what can be done.
Changes I made:
utils.js:1041

const variableKeys = [
    "flags.midi-qol.OverTime",
    "flags.midi-qol.optional",
    "flags.midi-qol.advantage",
    "flags.midi-qol.disadvantage",
    "flags.midi-qol.grants",
    "flags.midi-qol.fails",
    "flags.midi-qol.max.damage",   //added
    "flags.midi-qol.min.damage"    //added 
 ];

and itemhandling.js:618 or thereabouts

const maxflags = getProperty(workflow.actor.flags, "midi-qol.max") ?? {};
	if (maxflags.damage && evalActivationCondition(workflow,maxflags.damage.all || maxflags.damage[this.system.actionType],workflow.hitTargets.first().document))
		result = await new Roll(result.formula).roll({ maximize: true });	
		
const minflags = getProperty(this.flags, "midi-qol.min") ?? {};
	if (minflags.damage && evalActivationCondition(workflow,minflags.damage.all || minflags.damage[this.system.actionType],workflow.hitTargets.first().document))
		result = await new Roll(result.formula).roll({ minimize: true });

Edited by thatlonelybugbear