Fix treasure calculations

master
John Downey 2022-04-09 19:54:34 -05:00
parent 10efcb4d7a
commit 810e1b7c53
1 changed files with 2 additions and 2 deletions

View File

@ -705,10 +705,10 @@ export class AcksActor extends Actor {
// Compute treasure
let total = 0;
let treasure = this.data.items.filter(
(i) => i.type == "item" && i.data.treasure
(i) => i.data.type == "item" && i.data.data.treasure
);
treasure.forEach((item) => {
total += item.data.quantity.value * item.data.cost
total += item.data.data.quantity.value * item.data.data.cost
});
data.treasure = total;
}