From 5808156e1089f7b337c95291aa64a9ebd8396fb1 Mon Sep 17 00:00:00 2001 From: Josh Mudge Date: Thu, 14 Sep 2017 22:15:29 -0600 Subject: [PATCH] Updated percentages and added a couple more options. --- Ardon-income.html | 23 ++++++++++++++++------- calculate.js | 23 ++++++++++++++--------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/Ardon-income.html b/Ardon-income.html index accde45..cc8bc08 100644 --- a/Ardon-income.html +++ b/Ardon-income.html @@ -6,25 +6,34 @@ Minecraft Income Calculator

Minecraft Income Calculator

-

Enter the number of blocks eligable for rent:

+

Enter the number of blocks eligable for rent excluding one "base of operations" you change. (1000 blocks = 1 emerald)



-Enter the number of those blocks that qualify as Housing, Infrastructure, Business or military bases. +Enter the number of blocks used for transportation, recreational purposes, soft infrastructure or utilities that is not buildings. (0.5% bonus)

- +

-Enter the number of rent blocks that qualify as being government buildings (other than capitals) or as being exceptionally designed (confirmed by two people). +Enter the number of those blocks that qualify as Housing, transportation buildings, buildings for recreational purposes, soft infrastructure buildings or utility buildings, Business buildings, Government buildings or military bases. (1.0% bonus)

- +

-Enter the number of embassies in other empires built by permission and confirmed to be embassies by two people. +Enter the number of rent blocks that qualify as being exceptionally designed buildings. (confirmed by two people). (1.5% bonus) +

+ +

+Enter the number of government buildings you have. (2.0% bonus for 4.) +

+ +

+Enter the number of embassies in other empires built by permission and confirmed to be embassies by two people. You can only have three or one per city in another empire. (2.0% bonus per embassy)



-Enter 1 if you have a capital +Enter 1 if you have a capital. (2.5% bonus)



+






diff --git a/calculate.js b/calculate.js index f4f9b45..48c416c 100644 --- a/calculate.js +++ b/calculate.js @@ -13,10 +13,11 @@ function calculate() { //Get input var blocks = document.getElementById("blocks").value; - var tenblocks = document.getElementById("tenblocks").value; - var twentyfifth = document.getElementById("twentyfifth").value; + var one = document.getElementById("one").value; + var gov = document.getElementById("gov").value; var embassies = document.getElementById("embassies").value; var capital = document.getElementById("capital").value; + var infra = document.getElementById("infra").value; if (blocks.match(numReg)) { @@ -31,15 +32,19 @@ function calculate() { var emeralds = +blocks / 1000 console.log(emeralds) - var tenblocks = +tenblocks / 1000 * 0.001 - console.log(tenblocks) - var twentyfifth = +twentyfifth / 1000 * 0.0025 - console.log(twentyfifth) - var embassies = +embassies * 0.0025 + var one = +one / 1000 * 0.01 + console.log(one) + var design = +design / 1000 * 0.015 + console.log(design) + var gov = +gov / 1000 * 0.02 + console.log(gov) + var embassies = +embassies * 0.01 console.log(embassies) - var capital = +capital * 0.01 + var capital = +capital * 0.025 console.log(capital) - var percent = +tenblocks + +twentyfifth + +embassies + +capital + var infra = +infra * 0.005 + console.log(infra) + var percent = +one + +two + +design + +embassies + +capital console.log(percent) var total = +emeralds * +percent +emeralds var total = total.toFixed(4);