diff --git a/changelog b/changelog index 3b67186..beb31d4 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +1.0.3 +XP calculations will now only calcluate opposition npcs instead of all NPCs for combat auto calculated exp +Added check for Proficeny without Level Variaent xp calculations + 1.0.2 Filter Eidolons and Minions from the XP award Menu diff --git a/module.json b/module.json index 1d2b492..9040a36 100644 --- a/module.json +++ b/module.json @@ -1,7 +1,7 @@ { "id": "pf2e-award-xp", "title": "pf2e award xp", - "version": "1.0.2", + "version": "1.0.3", "compatibility": { "minimum": "11", "verified": "11" @@ -37,5 +37,5 @@ } ], "manifest": "https://github.com/jsavko/pf2e-award-xp/releases/latest/download/module.json", - "download": "https://github.com/jsavko/pf2e-award-xp/releases/download/1.0.2/module.zip" + "download": "https://github.com/jsavko/pf2e-award-xp/releases/download/1.0.3/module.zip" } \ No newline at end of file diff --git a/pf2e-awardxp.js b/pf2e-awardxp.js index df6b97a..5ea4bb4 100644 --- a/pf2e-awardxp.js +++ b/pf2e-awardxp.js @@ -9,13 +9,14 @@ Hooks.on('preDeleteCombat', (combat,html,id) => { if (!game.user.isGM) return - const pcs = combat.combatants.filter(c => c.actor.type==='character' && !c.actor.traits.has('eidolon') && !c.actor.traits.has('minion')).map(c => c.actor) + const pcs = combat.combatants.filter(c => c.actor.type==='character' && c.actor.alliance === 'party' && !c.actor.traits.has('eidolon') && !c.actor.traits.has('minion')).map(c => c.actor) + const pwol = game.pf2e.settings.variants.pwol.enabled; let calulatedXP = game.pf2e.gm.calculateXP( pcs[0].system.details.level.value, pcs.length, - combat.combatants.filter(c => c.actor.type === 'npc').map(c => c.actor.system.details.level.value), + combat.combatants.filter(c => c.actor.alliance === 'opposition').map(c => c.actor.system.details.level.value), combat.combatants.filter(c => c.actor.type === "hazard").map(c => c.actor.system.details.level.value), - {} + {pwol} ) const award = new game.pf2e_awardxp.Award(null,{destinations:pcs, description:'Encounter (' + calulatedXP.rating.charAt(0).toUpperCase() + calulatedXP.rating.slice(1) + ')', xp:calulatedXP.xpPerPlayer}); award.render(true);