()
| 325 | } |
| 326 | |
| 327 | private throwLollipops(): void{ |
| 328 | // If we have enough lollipops |
| 329 | if(this.getGame().getLollipops().getCurrent() >= Saving.loadNumber("wishingWellCurrentLollipopWishPrice")){ |
| 330 | // Pay the price |
| 331 | this.getGame().getLollipops().add(-Saving.loadNumber("wishingWellCurrentLollipopWishPrice")); |
| 332 | // Add the same amount of candies |
| 333 | this.getGame().getCandies().add(Math.ceil(Saving.loadNumber("wishingWellCurrentLollipopWishPrice")/2)); |
| 334 | // Set the speech |
| 335 | this.currentSpeech = "wishingWellThrewLollipopsSpeech"; |
| 336 | // Set the next price |
| 337 | Saving.saveNumber("wishingWellCurrentLollipopWishPrice", Saving.loadNumber("wishingWellCurrentLollipopWishPrice")*10) |
| 338 | // Update |
| 339 | this.update(); |
| 340 | this.getGame().updatePlace(); |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | private throwPainAuChocolat(): void{ |
| 345 | if(this.getGame().getPainsAuChocolat().getCurrent() >= 1){ |
nothing calls this directly
no test coverage detected