| 282 | } |
| 283 | |
| 284 | private makePotions(boolSavingName: string, numberSavingName: string, howMany: number, singularPotionName: string, pluralPotionName: string): void{ |
| 285 | // We can now use this kind of potion |
| 286 | Saving.saveBool(boolSavingName, true); |
| 287 | |
| 288 | // We increase the quantity |
| 289 | Saving.saveNumber(numberSavingName, Saving.loadNumber(numberSavingName) + howMany); |
| 290 | |
| 291 | // We set the comment |
| 292 | this.potionsComment = "You made " + Algo.pluralFormat(howMany, " " + singularPotionName, " " + pluralPotionName) + "."; |
| 293 | } |
| 294 | |
| 295 | private nextPage(): void{ |
| 296 | // If we can go to the next page |