Skip to content

Commit

Permalink
added onhover onclick tips thus close #110
Browse files Browse the repository at this point in the history
  • Loading branch information
Areso committed Aug 1, 2019
1 parent 5aabdae commit f960ed8
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 83 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Also, any CSL translation could have mistakes or untranslated parts or parts of translation which are partly outdated.<br>
You could help with translations for the game here:<br>
<a href='https://docs.google.com/spreadsheets/d/1WxRoxfPpYBHqvWb4mQNxGVr3r4VyxHSEuELzdU1I2PE'>https://docs.google.com/spreadsheets/d/1WxRoxfPpYBHqvWb4mQNxGVr3r4VyxHSEuELzdU1I2PE</a><br>
This is a single-player game. There is built-in chat, so, you could ask a question to another players.<br>
This is a single-player game. There is built-in chat, so, you could ask a question to other players.<br>
The game itself about building a city. You are starting with some amount of gold and a few citizens.<br>
This is an IDLE game, which means, every minute your citizens will spawn new citizens and pay taxes to you.<br>
You can construct buildings, but upgrading existing ones will require each time more gold, because this game is an Incremental game.<br>
Expand Down
200 changes: 120 additions & 80 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,92 +267,103 @@ <h3><div id="labelGarrison">Garrison</div></h3>
<!--<span onclick="this.parentElement.style.display='none'" class="topright">x</span>-->
<h3><div id="labelBuilding">Building</div></h3>
<div id="theBuildingDiv">
<table border="1">
<table>
<tr>
<td class="building">
<div align="center">
<img id="defencies_img" src="resources/wallsf_as2.png">
</div>
</td>
<td class="building">
<div align="center">
<img src="resources/home_as.png">
</div>
</td>
<td class="building">
<div align="center">
<img src="resources/treasury_as.png">
</div>
</td>
</tr>
<tr>
<td class="building">
<button id="defence" onclick="game.Build('Wall')" class="building">Build walls</button>
</td>
<td class="building">
<button id="homes" onclick="game.Build('Home')" class="building">Build home</button>
</td>
<td class="building">
<button id="treasury" onclick="game.Build('Treasury')" class="building">Build treasury</button>
</td>
</tr>
<tr>
<td class="building">
<div align="center">
<img src="resources/gallows.png">
</div>
</td>
<td class="building">
<div align="center">
<img src="resources/fountain.png">
</div>
</td>
<td class="building">
<div align="center">
<img src="resources/trapdoor.png">
</div>
</td>
</tr>
<tr>
<td class="building">
<button id="buttonBldGallows" onclick="game.buildGallowsOrFountain('Gallows')" class="building">Build gallows</button>
</td>
<td class="building">
<button id="buttonBldFountain" onclick="game.buildGallowsOrFountain('Fountain')" class="building">Build fountain</button>
</td>
<td class="building">
<button id="buttonBldStash" onclick="game.Build('Stash')" class="building">Build stash</button>
</td>
</tr>
<tr>
<td class="building">
<div align="center">
<img src="resources/inn.png">
</div>
</td>
<td class="building">
<div align="center">

</div>
<td>
<table border="1">
<tr>
<td class="building">
<div align="center">
<img id="defencies_img" src="resources/wallsf_as2.png" onmouseover="game.help(this)" onclick="game.help(this)">
</div>
</td>
<td class="building">
<div align="center">
<img id="home_img" src="resources/home_as.png" onmouseover="game.help(this)" onclick="game.help(this)">
</div>
</td>
<td class="building">
<div align="center">
<img id="treasury_img" src="resources/treasury_as.png" onmouseover="game.help(this)" onclick="game.help(this)">
</div>
</td>
</tr>
<tr>
<td class="building">
<button id="defence" onclick="game.Build('Wall')" class="building">Build walls</button>
</td>
<td class="building">
<button id="homes" onclick="game.Build('Home')" class="building">Build home</button>
</td>
<td class="building">
<button id="treasury" onclick="game.Build('Treasury')" class="building">Build treasury</button>
</td>
</tr>
<tr>
<td class="building">
<div align="center">
<img id="gallows_img" src="resources/gallows.png" onmouseover="game.help(this)" onclick="game.help(this)">
</div>
</td>
<td class="building">
<div align="center">
<img id="fountain_img" src="resources/fountain.png" onmouseover="game.help(this)" onclick="game.help(this)">
</div>
</td>
<td class="building">
<div align="center">
<img id="moneystash_img" src="resources/trapdoor.png" onmouseover="game.help(this)" onclick="game.help(this)">
</div>
</td>
</tr>
<tr>
<td class="building">
<button id="buttonBldGallows" onclick="game.buildGallowsOrFountain('Gallows')" class="building">Build gallows</button>
</td>
<td class="building">
<button id="buttonBldFountain" onclick="game.buildGallowsOrFountain('Fountain')" class="building">Build fountain</button>
</td>
<td class="building">
<button id="buttonBldStash" onclick="game.Build('Stash')" class="building">Build stash</button>
</td>
</tr>
<tr>
<td class="building">
<div align="center">
<img id="inn_img" src="resources/inn.png" onmouseover="game.help(this)" onclick="game.help(this)">
</div>
</td>
<td class="building">
<div align="center">

</div>
</td>
<td class="building">
<div align="center">

</div>
</td>
</tr>
<tr>
<td class="building">
<button id="buttonBldInn" onclick="game.Build('Inn')" class="building">Build Inn</button>
</td>
<td class="building">

</td>
<td class="building">

</td>
</tr>
</table>
</td>
<td class="building">
<div align="center">
<td>
<div id="lblBuildHelp">

</div>
</td>
</tr>
<tr>
<td class="building">
<button id="buttonBldInn" onclick="game.Build('Inn')" class="building">Build Inn</button>
</td>
<td class="building">

</td>
<td class="building">

</td>
</tr>
</table>
</table>
</div>
</div>
<div id="About" class="tabcontent">
Expand Down Expand Up @@ -806,6 +817,30 @@ <h2>How to play</h2>
cityWarehouse: [], //should the list contain objects?
myhero: {},
festival_cooldown: 0,
help(myobject) {
console.log(myobject.id);
if (myobject.id==="defencies_img") {
document.getElementById("lblBuildHelp").innerHTML=localeStrings[230];
}
if (myobject.id==="home_img") {
document.getElementById("lblBuildHelp").innerHTML=localeStrings[233];
}
if (myobject.id==="treasury_img") {
document.getElementById("lblBuildHelp").innerHTML=localeStrings[234];
}
if (myobject.id==="gallows_img") {
document.getElementById("lblBuildHelp").innerHTML=localeStrings[235];
}
if (myobject.id==="fountain_img") {
document.getElementById("lblBuildHelp").innerHTML=localeStrings[236];
}
if (myobject.id==="moneystash_img") {
document.getElementById("lblBuildHelp").innerHTML=localeStrings[237];
}
if (myobject.id==="inn_img") {
document.getElementById("lblBuildHelp").innerHTML=localeStrings[238];
}
},
heroAlignment(returnFormat) {
if (returnFormat==="text") {
var heroAlignment = "";
Expand Down Expand Up @@ -1829,6 +1864,11 @@ <h2>How to play</h2>
composite_gm();
}
function populatePatchnotes() {
msg = "version 1.0.238";
writeToTextArea(msg);
msg = "Made onhover, onclick tips in the Buildings tab";
writeToTextArea(msg);

msg = "version 1.0.234";
writeToTextArea(msg);
msg = "Update German translation; enabled 'thieves' feature. They are now in the game!";
Expand Down
35 changes: 34 additions & 1 deletion langs/de-DE.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,37 @@ localeStrings.push("Gut");
localeStrings.push("Neutral");
localeStrings.push("Evil");
localeStrings.push(["Ritter", "Mönch"]);
localeStrings.push("Klasse");//205
localeStrings.push("Klasse");//205
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//210
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//215
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//220
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//225
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("Dieses Gebäude wird benötigt, um die Stadt vor Eindringlingen zu schützen."); // 230
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("Dieses Gebäude und seine Verbesserungen sind erforderlich, um Ihr Bevölkerungslimit zu erhöhen.");
localeStrings.push("Dieses Gebäude und seine Verbesserungen werden benötigt, um Ihr Geldlimit zu erhöhen. <br> In diesem Gebäude können Sie Schatzmeister einstellen. <br> Sie werden benötigt, um die Wahrscheinlichkeit zu minimieren, dass Sie ausgeraubt werden.");
localeStrings.push("Dieses Gebäude und seine Verbesserungen sind für die Hinrichtung Ihrer Bürger erforderlich. <br> Es erhöht auch die Steuern und senkt die Geburtenrate und das Glück. <br> Wenn Sie dieses Gebäude bauen, können Sie den Brunnen nicht bauen!");
localeStrings.push("Dieses Gebäude und seine Verbesserungen sind für die Ausrichtung von Festivals erforderlich. Es erhöht außerdem die Geburtenrate und das Glück und senkt die Steuern. <br> Wenn Sie dieses Gebäude bauen, können Sie die Galgen nicht bauen!");
localeStrings.push("Dieses Gebäude und seine Verbesserungen werden benötigt, um Ihr Geld vor Dieben zu retten, falls die Diebe Ihre Schatzkammer ausrauben. <br> Je höher Ihr Stash-Level ist, desto mehr könnten Sie sich im Stash verstecken.");
localeStrings.push("Dieses Gebäude und seine Verbesserungen sind erforderlich, um Helden einzustellen. <br> Je höher Ihr Inn-Level ist, desto erfahrener können Sie dort Helden einstellen.");
33 changes: 33 additions & 0 deletions langs/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,36 @@ localeStrings.push("Neutral");
localeStrings.push("Evil");
localeStrings.push(["Knight", "Monk"]);
localeStrings.push("Class");//205
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//210
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//215
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//220
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//225
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("This building is needed for defending the city from intruders.");//230
localeStrings.push("placeholder");//tower
localeStrings.push("placeholder");//stone tower
localeStrings.push("This building and its improvements is needed to raise your population limit.");
localeStrings.push("This building and its improvements is needed to raise your money limit.<br>This building allows you to hire treasury guards.<br>They are needed to minimize your chances to be robbed.");
localeStrings.push("This building and its improvements is needed to execute your citizens.<br>It is also increase taxes and decrease birthrate and happiness.<br>If you build this building, you will not be able to build the Fountain!");
localeStrings.push("This building and its improvements is needed to place festivals.<br>It is also increase birthrate and happiness and decrease taxes.<br>If you build this building, you will not be able to build the Gallows!");
localeStrings.push("This building and its improvements is needed to save your money from thieves, in case the thieves rob your treasury.<br>The highier level of Stash do you have, the more you could hide in the Stash.");
localeStrings.push("This building and its improvements is needed to hire heroes.<br>The highier level of Inn do you have, the more experienced hero you could hire there.");
36 changes: 35 additions & 1 deletion langs/eo.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ localeStrings.push("placeholder");
localeStrings.push("placeholder");//185
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("Nivelo");
localeStrings.push("Atako");//190
localeStrings.push("Defendo");
Expand All @@ -233,4 +234,37 @@ localeStrings.push("Bono");
localeStrings.push("Neŭtralo");
localeStrings.push("Malbono");
localeStrings.push(["Kavaliro", "Monako"]);
localeStrings.push("Klaso");//205
localeStrings.push("Klaso");//205
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//210
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//215
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//220
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");//225
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("Ĉi tiu konstruaĵo necesas por defendi la urbon kontraŭ entruduloj."); // 230
localeStrings.push("placeholder");
localeStrings.push("placeholder");
localeStrings.push("Ĉi tiu konstruaĵo kaj ĝiaj plibonigoj bezonas por altigi vian loĝantar limon.");
localeStrings.push("Ĉi tiu konstruaĵo kaj ĝiaj plibonigoj estas bezonataj por pliigi vian monan limon. <br> Ĉi tiu konstruaĵo permesas dungi kasistojn. <br> Ili necesas por minimumigi viajn ŝancojn esti ŝtelitaj.");
localeStrings.push("Ĉi tiu konstruaĵo kaj ĝiaj plibonigoj necesas por ekzekuti viajn civitanojn. <br> Ĝi ankaŭ pliigas impostojn kaj malpliigas naskiĝotempon kaj feliĉon. <br> Se vi konstruos ĉi tiun konstruaĵon, vi ne povos konstrui la Fontanon!");
localeStrings.push("Ĉi tiu konstruaĵo kaj ĝiaj plibonigoj necesas por aranĝi festivalojn. <br> Ĝi ankaŭ pliigas naskiĝtempon kaj feliĉon kaj malpliigas impostojn. <br> Se vi konstruos ĉi tiun konstruaĵon, vi ne povos konstrui la forkojn!");
localeStrings.push("Ĉi tiu konstruaĵo kaj ĝiaj plibonigoj necesas por ŝpari vian monon de ŝtelistoj, se la ŝtelistoj ŝtelas vian trezorejon. La pli alta nivelo de Stash vi havas, des pli vi povus kaŝi en la Stash.") ;
localeStrings.push("Ĉi tiu konstruaĵo kaj ĝiaj plibonigoj necesas por dungi heroojn. La plej altan nivelon de Gastejo vi havas, des pli spertan heroon vi povus dungi tie.");
Loading

0 comments on commit f960ed8

Please sign in to comment.