Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plat upg bg color #257

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Javascript/platonic.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,20 @@ function createPlatonicDescription(index) {
}
}

function updatePlatonicUpgradeBG(i) {
let a = document.getElementById("platUpg" + i);

if (player.platonicUpgrades[i] === 0) {
a.style.backgroundColor = "black";
}
if (player.platonicUpgrades[i] > 0 && player.platonicUpgrades[i] < platUpgradeBaseCosts[i].maxLevel) {
a.style.backgroundColor = "purple";
}
if (player.platonicUpgrades[i] === platUpgradeBaseCosts[i].maxLevel) {
a.style.backgroundColor = "green";
}
}

function buyPlatonicUpgrades(index) {
let resourceCheck = checkPlatonicUpgrade(index)
if (resourceCheck.canBuy) {
Expand All @@ -266,4 +280,5 @@ function buyPlatonicUpgrades(index) {
player.wowAbyssals -= platUpgradeBaseCosts[index].abyssals
}
createPlatonicDescription(index)
updatePlatonicUpgradeBG(index);
}
Binary file modified Pictures/PlatonicUpgrade1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pictures/PlatonicUpgrade9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Pictures/desktop.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[LocalizedFileNames]
PlatonicUpgrade1.png=@PlatonicUpgrade1,0
3 changes: 3 additions & 0 deletions Synergism.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,9 @@ function loadSynergy() {
for (let j = 1; j <= 50; j++) {
updateCubeUpgradeBG(j);
}
for (let j = 1; j <= 15; j++) {
updatePlatonicUpgradeBG(j);
}

player.subtabNumber = 0;
runescreen = "runes";
Expand Down
34 changes: 17 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2150,26 +2150,26 @@
</div>
<div id="platonicUpgrades">
<table id="platonicUpgradePics" style='border: 3px solid plum'>
<tr>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade1.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(1)" onclick="buyPlatonicUpgrades(1)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade2.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(2)" onclick="buyPlatonicUpgrades(2)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade3.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(3)" onclick="buyPlatonicUpgrades(3)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade4.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(4)" onclick="buyPlatonicUpgrades(4)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade5.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(5)" onclick="buyPlatonicUpgrades(5)"></td>
<tr>
<td style="font-size: 0;"><img id="platUpg1" src="Pictures/PlatonicUpgrade1.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(1)" onclick="buyPlatonicUpgrades(1)"></td>
<td style="font-size: 0;"><img id="platUpg2" src="Pictures/PlatonicUpgrade2.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(2)" onclick="buyPlatonicUpgrades(2)"></td>
<td style="font-size: 0;"><img id="platUpg3" src="Pictures/PlatonicUpgrade3.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(3)" onclick="buyPlatonicUpgrades(3)"></td>
<td style="font-size: 0;"><img id="platUpg4" src="Pictures/PlatonicUpgrade4.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(4)" onclick="buyPlatonicUpgrades(4)"></td>
<td style="font-size: 0;"><img id="platUpg5" src="Pictures/PlatonicUpgrade5.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(5)" onclick="buyPlatonicUpgrades(5)"></td>
</tr>
<tr>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade6.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(6)" onclick="buyPlatonicUpgrades(6)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade7.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(7)" onclick="buyPlatonicUpgrades(7)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade8.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(8)" onclick="buyPlatonicUpgrades(8)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade9.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(9)" onclick="buyPlatonicUpgrades(9)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade10.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(10)" onclick="buyPlatonicUpgrades(10)"></td>
<td style="font-size: 0;"><img id="platUpg6" src="Pictures/PlatonicUpgrade6.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(6)" onclick="buyPlatonicUpgrades(6)"></td>
<td style="font-size: 0;"><img id="platUpg7" src="Pictures/PlatonicUpgrade7.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(7)" onclick="buyPlatonicUpgrades(7)"></td>
<td style="font-size: 0;"><img id="platUpg8" src="Pictures/PlatonicUpgrade8.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(8)" onclick="buyPlatonicUpgrades(8)"></td>
<td style="font-size: 0;"><img id="platUpg9" src="Pictures/PlatonicUpgrade9.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(9)" onclick="buyPlatonicUpgrades(9)"></td>
<td style="font-size: 0;"><img id="platUpg10" src="Pictures/PlatonicUpgrade10.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(10)" onclick="buyPlatonicUpgrades(10)"></td>
</tr>
<tr>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade11.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(11)" onclick="buyPlatonicUpgrades(11)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade12.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(12)" onclick="buyPlatonicUpgrades(12)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade13.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(13)" onclick="buyPlatonicUpgrades(13)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade14.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(14)" onclick="buyPlatonicUpgrades(14)"></td>
<td style="font-size: 0;"><img src="Pictures/PlatonicUpgrade15.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(15)" onclick="buyPlatonicUpgrades(15)"></td>
<tr>
<td style="font-size: 0;"><img id="platUpg11" src="Pictures/PlatonicUpgrade11.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(11)" onclick="buyPlatonicUpgrades(11)"></td>
<td style="font-size: 0;"><img id="platUpg12" src="Pictures/PlatonicUpgrade12.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(12)" onclick="buyPlatonicUpgrades(12)"></td>
<td style="font-size: 0;"><img id="platUpg13" src="Pictures/PlatonicUpgrade13.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(13)" onclick="buyPlatonicUpgrades(13)"></td>
<td style="font-size: 0;"><img id="platUpg14" src="Pictures/PlatonicUpgrade14.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(14)" onclick="buyPlatonicUpgrades(14)"></td>
<td style="font-size: 0;"><img id="platUpg15" src="Pictures/PlatonicUpgrade15.png" alt="" class="platonicUpgradeImage" onmouseover="createPlatonicDescription(15)" onclick="buyPlatonicUpgrades(15)"></td>
</tr>
</table>
</div>
Expand Down