orffen / basicfantasyrpg

The Basic Fantasy RPG system for FoundryVTT!
Other
10 stars 8 forks source link

Fix coin weight calculation #64

Open orffen opened 9 months ago

orffen commented 9 months ago
    // Iterate through money, add to carried weight
    if (context.data.money) {
      let gp = Number(context.data.money.gp.value);
      gp += context.data.money.pp.value * 5;
      gp += context.data.money.ep.value / 5;
      gp += context.data.money.sp.value / 10;
      gp += context.data.money.cp.value / 100;
      carriedWeight._addWeight('*', gp);  // '*' will calculate GP weight
    }

Change to:

    // Iterate through money, add to carried weight
    if (context.data.money) {
      let gp = Number(context.data.money.gp.value);
      gp += context.data.money.pp.value;
      gp += context.data.money.ep.value;
      gp += context.data.money.sp.value;
      gp += context.data.money.cp.value;
      carriedWeight._addWeight('*', gp);  // '*' will calculate GP weight
    }