Widget:YieldCalc: Difference between revisions
No edit summary |
No edit summary |
||
Line 23: | Line 23: | ||
let a = document.getElementById("cityProd").value; /* City Production */ | let a = document.getElementById("cityProd").value; /* City Production */ | ||
let b = 4; /* Yield(Apples) of the region */ | let b = 4; /* Yield(Apples) of the region */ | ||
let c = | let c = 4; /* Amount of Farms in the region */ | ||
let e = 250; /* Total Percentage Bonus (e.g. 50% from a Plow) */ | let e = 250; /* Total Percentage Bonus (e.g. 50% from a Plow) */ | ||
Line 30: | Line 30: | ||
let y = 6; | let y = 6; | ||
let z = Math.floor( | let z = Math.floor(A*B+B*5*C+5+(A+5*C)*(E/100)1+(C-1)*5+A); /* Food yield for a single farm in the region */ | ||
document.getElementById('outputvalue').innerText=z; | document.getElementById('outputvalue').innerText=z; | ||
} | } |
Revision as of 23:30, 24 October 2024
This widget is used to display and calculate the yield with the values submitted by the user.
Usage: {{#Widget:YieldCalc}}