Fix Tech point consumption

whoops again...
This commit is contained in:
supervj 2021-02-11 15:50:38 -05:00
parent c82a4331a5
commit 4599639237

View file

@ -560,10 +560,10 @@ export default class Item5e extends Item {
}
actorUpdates[`data.powers.${consumePowerSlot}.tvalue`] = Math.max(powers - 1, 0);
if (tp.temp >= powerCost) {
actorUpdates["data.attributes.force.points.temp"] = tp.temp - powerCost;
actorUpdates["data.attributes.tech.points.temp"] = tp.temp - powerCost;
}else{
actorUpdates["data.attributes.force.points.value"] = tp.value + tp.temp - powerCost;
actorUpdates["data.attributes.force.points.temp"] = 0;
actorUpdates["data.attributes.tech.points.value"] = tp.value + tp.temp - powerCost;
actorUpdates["data.attributes.tech.points.temp"] = 0;
}
break;
}