Add soldiers upkeep

This commit is contained in:
Josh Mudge 2017-09-20 15:44:54 -06:00
parent b8a3ab3efa
commit 6c0cdfd0ba
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,6 @@
"use strict";
//Licensed under the Apache License 2.0. See license file for information.
// Ardon Income Calculator v3.3 stable.
// Ardon Income Calculator v3.4 stable.
// Written by Josh Mudge
// Ad Mejorem Dei Glorium
@ -11,6 +11,7 @@ function calculate() {
//Get input
var blocks = document.getElementById("blocks").value;
var soldiers = document.getElementById("soldiers").value;
var one = document.getElementById("one").value;
var gov = document.getElementById("gov").value;
var design = document.getElementById("design").value;
@ -35,6 +36,8 @@ function calculate() {
var gold = +blocks / 1000 * 100
console.log(gold)
var gold = +gold - (soldiers * 50)
console.log(gold)
var infra = +infra / 1000 * 0.0025
console.log(infra)
var one = +one / 1000 * 0.01

View File

@ -10,7 +10,11 @@
<p>Enter the number of blocks eligable for rent excluding one "base of operations" you change. (1000 blocks = 1 emerald)</p>
<input type="number" id="blocks"></input>
<br><br><br><br>
Enter the number of blocks used for transportation, farmland, recreational purposes, soft infrastructure or utilities that is not buildings. (0.1% bonus)
Enter the number of soldiers you have. (upkeep cost of 50 gold/year)
<br><br>
<input type="number" id="soldiers"></input>
<br><br><br><br>
Enter the number of blocks used for transportation, farmland, recreational purposes, soft infrastructure or utilities that is not buildings. (0.25% bonus)
<br><br>
<input type="number" id="infra"></input>
<br><br><br><br>