Widget:PriceCalculator: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Remove vestiges of jquery)
(math.max)
Line 58: Line 58:
         let difficulty = document.querySelectorAll('input[name="difficulty"]:checked').value;
         let difficulty = document.querySelectorAll('input[name="difficulty"]:checked').value;
          
          
         let price_mod = max(1.0, 2.5 - persuasion_mod - attitude - get_difficulty_mod(difficulty));
         let price_mod = Math.max(1.0, 2.5 - persuasion_mod - attitude - get_difficulty_mod(difficulty));
         let price_buy = item_value * price_mod;
         let price_buy = item_value * price_mod;
         let price_sell = item_value / price_mod;
         let price_sell = item_value / price_mod;

Revision as of 17:44, 4 October 2023