Widget:YieldCalc: Difference between revisions

From Ara: History Untold Wiki
No edit summary
No edit summary
Line 35: Line 35:
   let E = Number(document.getElementById('percBonus').value); // Total Percentage Bonus (e.g. 50% from a Plow)
   let E = Number(document.getElementById('percBonus').value); // Total Percentage Bonus (e.g. 50% from a Plow)


   let F = Number(document.getElementById('verseBonus').value); // Extra farm adjacency from religious verse (Boolean)
   let F = document.getElementById('verseBonus').value; // Extra farm adjacency from religious verse
 
  if (condition) {
      //  block of code to be executed if the condition is true
  } else {
      //  block of code to be executed if the condition is false
  }
 
   let H = C + F; // Add F to the actual amount of farms in the region
   let H = C + F; // Add F to the actual amount of farms in the region



Revision as of 02:01, 25 October 2024

This widget is used to display and calculate the yield with the values submitted by the user.

Usage: ‎{{#Widget:YieldCalc}}