()
| 286 | } |
| 287 | |
| 288 | private throwChocolateBar(): void{ |
| 289 | if(this.getGame().getChocolateBars().getCurrent() >= 1){ |
| 290 | // Pay the price |
| 291 | this.getGame().getChocolateBars().add(-1); |
| 292 | // Set the speech (depending on if it's the first bar we throw or not) |
| 293 | if(Saving.loadNumber("wishingWellHowManyChocolateBarsThrown") == 0) |
| 294 | this.currentSpeech = "wishingWellChocolateBarIntroductionSpeech"; |
| 295 | else |
| 296 | this.currentSpeech = "wishingWellThrewChocolateBarSpeech"; |
| 297 | // Increase the number of chocolate bars thrown |
| 298 | Saving.saveNumber("wishingWellHowManyChocolateBarsThrown", Saving.loadNumber("wishingWellHowManyChocolateBarsThrown") + 1) |
| 299 | // We are now enchanting |
| 300 | Saving.saveBool("wishingWellWeAreEnchanting", true); |
| 301 | // Update |
| 302 | this.update(); |
| 303 | this.getGame().updatePlace(); |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | private throwFirstCandy(): void{ |
| 308 | if(this.getGame().getCandies().getCurrent() >= 1){ |
nothing calls this directly
no test coverage detected