javierriveracastro / betteroll-swade

A Better Rolls port for SWADE
GNU General Public License v3.0
16 stars 32 forks source link

The power point cost don't sum well #568

Closed brunocalado closed 1 year ago

brunocalado commented 1 year ago

Hi.

The sum of modifiers is not working well.

If you mark a couple of modifiers it will not calculate it well.

    {
      id:"POWERBOOSTLOWERTRAITMOGREATER",
      name:"POWERBOOSTLOWERTRAITMOGREATER",
      button_name: "Greater Boost/Lower Trait (+2)",
      shotsUsed:"+2",
      and_selector: [
        { selector_type: "item_type", selector_value:"power" }, 
        { selector_type: "item_name", selector_value: "Boost/Lower Trait" }
      ],
      group: "Boost/Lower Trait Modifiers"
    },  

    {
      id:"POWERBARRIERMODDEADLY",
      name:"POWERBARRIERMODDEADLY",
      button_name: starIcon + "Deadly (+2)",
      shotsUsed:"+2",
      dmgOverride: "2d6",
      and_selector: [
        { selector_type: "item_type", selector_value:"power" }, 
        { selector_type: "item_name", selector_value: "Barrier" }
      ],
      group: "Barrier Modifiers"
    },   

This would require to remove 6 PP. But, it only take 4 points. image

Link: Link

brunocalado commented 1 year ago

another example image

brunocalado commented 1 year ago

If you override the cost and then add a cost it will fail to sum too. image

javierriveracastro commented 1 year ago

Done

brunocalado commented 1 year ago

It's not working yet image