Widget:PriceCalculator: Difference between revisions
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; |