main();
async function main() {
let actorCopy = duplicate(actor);
let spells = actorCopy.data.spells;
let resources = actorCopy.data.resources;
let actorName = actorCopy.name;
let spellCosts = [
{name:"1st Level", spelldata:spells.spell1, buy:2, sell:1},
{name:"2nd Level", spelldata:spells.spell2, buy:3, sell:2},
{name:"3rd Level", spelldata:spells.spell3, buy:5, sell:3},
{name:"4th Level", spelldata:spells.spell4, buy:6, sell:4},
{name:"5th Level", spelldata:spells.spell5, buy:7, sell:5},