Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KingBecks123 authored Jun 10, 2021
1 parent 7b8fd46 commit 3d8bc60
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 23 deletions.
18 changes: 14 additions & 4 deletions bars.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ function advertise() {
}

function working() {
gameData.employeeIsWorking = 1
barStartGranular("working")

}

function basket() {
Expand All @@ -18,19 +20,27 @@ updateValues()
}

function workingBar() {
if(gameData.workingBar <= 99)
if(gameData.workingBar <= 99 && gameData.employeeIsWorking == 1)
{
gameData.workingBar += 1;
setTimeout(workingBar, 600 / gameData.tickspeed)
}
else
{
gameData.limes += gameData.employeeCurrentSpeed
gameData.employeeWorking -= 1
if (gameData.employeeIsWorking == 1)
{
gameData.limes += gameData.employeeCurrentSpeed
gameData.employeeWorking -= 1
}

if(gameData.employeeWorking > 0)
{
working()
}
else
{
gameData.employeeIsWorking = 0
}
}
updateValues()
}
Expand Down Expand Up @@ -215,7 +225,7 @@ function sellYourJuiceBar() {
}
else
{
gameData.coins += gameData.juiceBulkAmount
gameData.coins += gameData.juiceSellReward
gameData.deliveryOngoing = 0
}
updateValues()
Expand Down
24 changes: 17 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,16 @@
<p class="basicText">Price: 2000 Coins</p>
</div>

<div class="basicDiv", id="increaseJuicePrice">
<button class="specialButton" onclick="increaseJuicePrice()">Increase Juice Price</button>
<p class="basicText">'Squeeze' more money from your customers</p>
<p class="basicText">The more you raise the price, the more it takes to convince the customer to still buy</p>
<p class="basicText">+1 cent per juice</p>


<p class="basicText" id="textForJuicePricePrice">Price: 1 Coins</p>
</div>

<div class="basicDiv", id="buyFourthMapDiv">
<button class="specialButton" onclick="buyAMap()">Buy A Giant Map</button>
<p class="basicText">Find places only the rich can go</p>
Expand Down Expand Up @@ -820,13 +830,13 @@

</div>

<script src="aesthetic.js?v=42" charset="utf-8" type="text/javascript"></script>
<script src="myfunctions.js?v=42" charset="utf-8" type="text/javascript"></script>
<script src="main.js?v=42" charset="utf-8" type="text/javascript"></script>
<script src="technical.js?v=42" charset="utf-8" type="text/javascript"></script>
<script src="bars.js?v=42" charset="utf-8" type="text/javascript"></script>
<script src="update.js?v=42" charset="utf-8" type="text/javascript"></script>
<script src="oldupdatefixes.js?v=42" charset="utf-8" type="text/javascript"></script>
<script src="aesthetic.js?v=43" charset="utf-8" type="text/javascript"></script>
<script src="myfunctions.js?v=43" charset="utf-8" type="text/javascript"></script>
<script src="main.js?v=43" charset="utf-8" type="text/javascript"></script>
<script src="technical.js?v=43" charset="utf-8" type="text/javascript"></script>
<script src="bars.js?v=43" charset="utf-8" type="text/javascript"></script>
<script src="update.js?v=43" charset="utf-8" type="text/javascript"></script>
<script src="oldupdatefixes.js?v=43" charset="utf-8" type="text/javascript"></script>

</body>
</html>
46 changes: 36 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,13 @@ function hireApplicant() {

gameData.employees = 1

setTimeout(resetWorkingBar, 1000)

gameData.employeeIsWorking = 0
gameData.workingBar = 0
}

updateValues()
}

function resetWorkingBar() {
gameData.workingBar = 0
updateValues()
}


function researchBetterAdvertising() {
if(gameData.coins >= 10)
Expand Down Expand Up @@ -600,11 +595,42 @@ function sellYourLimes() {
updateValues()
}

function increaseJuicePrice() {
if(gameData.coins >= gameData.juicePricePrice)
{
gameData.coins -= gameData.juicePricePrice


if ( gameData.juicePricePrice % 2 == 0 )
{
gameData.juicePricePrice *= 5
gameData.juicePricePrice /= 2
}
else{
gameData.juicePricePrice *= 2
}




gameData.juicePriceCents += 1
}

updateValues()
}


function decreaseJuiceSold() {
if(gameData.juiceBulkAmountToggle >= 1)
{
gameData.juiceBulkAmountToggle -= 1
if( gameData.juiceBulkAmountToggle > 100)
{
gameData.juiceBulkAmountToggle -= 10
}
else
{
gameData.juiceBulkAmountToggle -= 1
}
}

updateValues()
Expand All @@ -615,9 +641,9 @@ function increaseJuiceSold() {
{
gameData.juiceBulkAmountToggle += 1
}
else if (gameData.juiceBulkAmountToggle < 500 && gameData.fasterTransport > 0)
else if (gameData.juiceBulkAmountToggle < 500 && gameData.deliveryTypeToggle == 2 && gameData.fasterTransport > 0)
{
gameData.juiceBulkAmountToggle += 1
gameData.juiceBulkAmountToggle += 10
}


Expand Down
2 changes: 1 addition & 1 deletion myfunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ function loadStuff(savegame){
if (savegame !== null) {
Object.assign(gameData, savegame);
backwardsCompatibility(savegame.versionNumber)
gameData.versionNumber = 42
gameData.versionNumber = 43
updateValues()
updateAfterLoad()
}
Expand Down
3 changes: 3 additions & 0 deletions technical.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ var gameDataBase = {

entrepreneurialCertificates: 0,

juicePricePrice: 1,
juicePriceCents: 0,

autosave: 1,

//Should be 0 for normal game, 1 if you want to go faster :)
Expand Down
27 changes: 26 additions & 1 deletion update.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ function updateValues() {

addAesthetic()



if (gameData.juiceBulkAmountToggle > 100 && gameData.deliveryTypeToggle < 2)
{
gameData.juiceBulkAmountToggle = 100
}

if (gameData.juiceBulkAmountToggle > 500)
{
gameData.juiceBulkAmountToggle = 500
}


if (gameData.coins > 1e6)
{
gameData.coins = 1e6
Expand Down Expand Up @@ -105,6 +118,8 @@ function updateValues() {

}

gameData.juiceSellReward = Math.floor(gameData.juiceBulkAmountToggle * (1 + (gameData.juicePriceCents / 100)))


gameData.limesInBaskets = Math.floor(gameData.baskets * (gameData.basketBar / 4))

Expand All @@ -125,6 +140,9 @@ function updateValues() {
update("textForLakes", gameData.limeDiseaseLakes + " Lakes")

update("currentSpeedEmployee", "Current speed: " + gameData.employeeCurrentSpeed + " limes per minute.")

update("textForJuicePricePrice", "Price: " + gameData.juicePricePrice + " Coins")


if(gameData.employeeWorking > 0)
{
Expand Down Expand Up @@ -176,7 +194,13 @@ function updateValues() {

update("textForPeeledLimes", gameData.peeledLimes + " Peeled Limes")
update("sellYourJuiceAmount", "You Will Deliver " + gameData.juiceBulkAmountToggle + " Juice")
update("sellYourJuiceReward", "You Will Get " + gameData.juiceBulkAmountToggle + " Coins")


update("sellYourJuiceReward", "You Will Get " + gameData.juiceSellReward + " Coins")




update("sellYourJuicePrice", "You Need " + gameData.deliveryPrice + " Coins For Delivery")

checkShow(gameData.megaCoins, "textForMegaCoins")
Expand Down Expand Up @@ -341,6 +365,7 @@ function updateValues() {
if(gameData.maps >= 3)
{
tabs("travellingArea", "block")
showBasicDiv("increaseJuicePrice")


if(gameData.fasterTransport == 0)
Expand Down

0 comments on commit 3d8bc60

Please sign in to comment.