Skip to content

Commit

Permalink
Conquest Clicker 1
Browse files Browse the repository at this point in the history
  • Loading branch information
BadassIC committed Sep 4, 2018
1 parent 88feacb commit 0766176
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
15 changes: 8 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
<head>
<div class="w3-container">
<h1 style="float: left">Conquest Clicker</h1>
<h1 style="float: right"> <span id="goldDisplay">0</span> Gold</h1>
<h6 style="float: right"><span id="netGPS"></span> Gold/s </h6>
</div>
<div class="w3-bar w3-black">
<a class="w3-bar-item w3-button" onClick="tabSelect(1)" id="recruitButton">Recruit</a>
<a class="w3-bar-item w3-button" onClick="tabSelect(2)" id="questsButton">Quests</a>
<a class="w3-bar-item w3-button" onClick="tabSelect(3)" id="conquestButton">Conquest</a>
<a class="w3-bar-item w3-button" onClick="tabSelect(4)" id="settlementButton">Settlement</a>

</div>
<div>
<a class="w3-bar-item w3-button" onClick="tabSelect(4)" id="settlementButton">Settlement</a>
</div>
<div class="w3-bar w3-dark-gray">
<a class="w3-bar-item"><b class="w3-text-amber">Gold: </b><span id="goldDisplay"></span> (<span id="netGPS"></span> Gold/s)</a>
<a class="w3-bar-item"><b class="w3-text-white">Soldiers: </b><span id="soldierDisplay2">0</span> / <span id="maxSoldierDisplay2"></span></a>
<a class="w3-bar-item"><b class="w3-text-blue">Fame: </b><span id="fameDisplay2">0</span></a>
</div>
</head>
<body>
<span id="recruitTab">
Expand Down Expand Up @@ -55,7 +56,7 @@ <h2 id="questName">Capture Pickpocketer</h2>
<h2>Conquest</h2>
<div>Here you can annex civilisations, which grant you land, or you can turn them into puppets, which provides passive income.</div>
</br>
<button id="buyBattleStandard" class="w3-button w3-light-grey normal">Create Battle Standard (1000 Gold)</button>
<button id="buyBattleStandard" class="w3-button w3-light-grey normal">Create Battle Standard (5000 Gold)</button>
</div>
</span>
<span>
Expand Down
13 changes: 8 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//TO DO: Conquest tab
//TO DO: Battle Standard
var gold = 0
var goldPerSecond = 5
var netGPS = goldPerSecond - totalMaintenance
Expand Down Expand Up @@ -82,12 +82,15 @@ function updateValues(){
totalMaintenance = soldiers * maintenance
document.getElementById("goldDisplay").innerHTML = gold
document.getElementById("soldierDisplay").innerHTML = soldiers
document.getElementById("soldierDisplay2").innerHTML = soldiers
document.getElementById("maxSoldierDisplay").innerHTML = maxSoldiers
document.getElementById("maxSoldierDisplay2").innerHTML = maxSoldiers
document.getElementById("maintenance").innerHTML = maintenance
document.getElementById("totalMaintenance").innerHTML = totalMaintenance
netGPS = goldPerSecond - totalMaintenance
document.getElementById("netGPS").innerHTML = netGPS
document.getElementById("fameDisplay").innerHTML = fame
document.getElementById("fameDisplay2").innerHTML = fame
if (inCombat == true){
document.getElementById("battleBox").style.display = "block"
}else{
Expand All @@ -103,7 +106,7 @@ function tabUpdate(){
document.getElementById("conquestButton").innerHTML = "???"
document.getElementById("settlementButton").innerHTML = "???"
document.getElementById("recruitButton").style.display = "block"
document.getElementById("questsButton").style.display = "block"
document.getElementById("questsButton").style.display = "none"
document.getElementById("conquestButton").style.display = "none"
document.getElementById("settlementButton").style.display = "none"
}
Expand All @@ -114,7 +117,7 @@ function tabUpdate(){
document.getElementById("settlementButton").innerHTML = "???"
document.getElementById("recruitButton").style.display = "block"
document.getElementById("questsButton").style.display = "block"
document.getElementById("conquestButton").style.display = "block"
document.getElementById("conquestButton").style.display = "none"
document.getElementById("settlementButton").style.display = "none"
}
if (stage == 3){
Expand All @@ -125,7 +128,7 @@ function tabUpdate(){
document.getElementById("recruitButton").style.display = "block"
document.getElementById("questsButton").style.display = "block"
document.getElementById("conquestButton").style.display = "block"
document.getElementById("settlementButton").style.display = "block"
document.getElementById("settlementButton").style.display = "none"
}
}

Expand Down Expand Up @@ -223,7 +226,7 @@ function secondUpdate(){
if (gold < 1){
gold = 0
soldiers = 0
nodeCreate = ("You have gone bankrupt. All your soldiers have left you.")
nodeCreate("You have gone bankrupt. All your soldiers have left you.")
}
document.getElementById("goldDisplay").innerHTML = gold
}
Expand Down

0 comments on commit 0766176

Please sign in to comment.