1var cauldron = { 2 3 // Variables 4 textCauldron : [], 5 textBook : [], 6 textActionsInfo : "", 7 textActionsPut : "", 8 textActionsInCauldron : "", 9 textActions : "", 10 textLeftPage : [], 11 textRightPage : [], 12 cauldronPosX : 10, // X position of the cauldron in the system 13 cauldronPosY : 7, // Y position of the cauldron in the system 14 cauldronWidth : 58, // Width of the cauldron <pre> 15 cauldronHeight : 16, // Height 16 bookWidth : 58, // Width of the book <pre> 17 bookHeight : 17, // Height 18 smokeBool : false, // If true, there is a smoke right now above the cauldron 19 smokePosX : 0, // X position of this smoke 20 smokePosY : 0, // Y position 21 smokeOrientation : true, // Can be true or false, depending on the smoke orientation (two orientations possible, that's why it's a boolean) 22 bookPosX : 0, // X position of the book 23 bookPosY : 0, // Y position of the book 24 bookPage : 0, // Current book page 25 maxBookPage : 26, // Max book page 26 bookFirstPageNumberPosX : 9, // X position of the first page number of the book (relative to the book) 27 bookFirstPageNumberPosY : 1, // Y 28 bookSecondPageNumberPosX : 43, // X second page 29 bookSecondPageNumberPosY : 1, // Y 30 bookChangePageButtonPosX : 2, // X position of the book's buttons used to change pge 31 bookChangePageButtonPosY : 16, // Y 32 bookLeftPagePosX : 8, // X position of the left page of the book 33 bookLeftPagePosY : 3, // Y 34 bookRightPagePosX : 29, // X right page 35 bookRightPagePosY : 3, // Y 36 candiesInTheCauldron : 0, // Number of candies present in the cauldron 37 lollipopsInTheCauldron : 0, // Idem for lollipops 38 weAreMixing : false, // True if the player is mixing right now 39 weAreBoiling : false, // True if the player is boiling right now 40 candiesWhenWeBeganAction : 0, // Number of candies in the cauldron when we began mixing 41 lollipopsWhenWeBeganAction : 0, // Idem lollipops 42 actionsList : [{type:"none"}, {type:"none"}, {type:"none"}], // List of actions 43 actionTimer : 0, // Count the number of seconds an action lasts 44 45 // Functions 46 registerAction : function(type, nbrCandies, nbrLollipops, timer){ 47 // We add the action to the list 48 this.actionsList.push({type:type, nbrCandies:nbrCandies, nbrLollipops:nbrLollipops, timer:timer}); 49 50 // We delete one action if there's too much actions in the list 51 if(this.actionsList.length > 3){ 52 this.actionsList.splice(0, 1); 53 } 54 }, 55 56 onload : function(){ 57 this.setBookPage(0); 58 }, 59 60 checkVisibility : function(){ 61 if(objects.list.cauldron.have){ 62 // Show the cauldron tab, which have to be hidden before this point 63 tabs.enable(3); 64 65 // And we update everything on page 66 this.updateCauldronOnPage(); 67 this.updateBookOnPage(); 68 this.updateActionsInfoOnPage(); 69 this.updateActionsPutOnPage(); 70 this.updateActionsInCauldronOnPage(); 71 this.updateActionsOnPage(); 72 } 73 }, 74 75 resetCauldronText : function(){ 76 // Init the text var by putting lots of blank spaces 77 this.textCauldron = []; 78 for(var i = 0; i < this.cauldronHeight; i++){ 79 this.textCauldron.push(""); // We add a line 80 for(var j = 0; j < this.cauldronWidth; j++){ 81 this.textCauldron[i] += " "; // We add a blank space in this line 82 } 83 this.textCauldron[i] += "\n"; // We add the end of line 84 } 85 }, 86 87 resetBookText : function(){ 88 // Init the text var by putting lots of blank spaces 89 this.textBook = []; 90 for(var i = 0; i < this.bookHeight; i++){ 91 this.textBook.push(""); // We add a line 92 for(var j = 0; j < this.bookWidth; j++){ 93 this.textBook[i] += " "; // We add a blank space in this line 94 } 95 this.textBook[i] += "\n"; // We add the end of line 96 } 97 }, 98 99 setBookPage : function(value){ 100 // If the new value is correct 101 if(value >= 0 && value <= this.maxBookPage){ 102 // We set it 103 this.bookPage = value; 104 // We set the text of the pages 105 switch(this.bookPage){ 106 case 0: 107 this.textLeftPage = this.asciiFirstPage; 108 this.textRightPage = this.asciiSecondPage; 109 break; 110 case 1: 111 this.textLeftPage = this.asciiThirdPage; 112 this.textRightPage = this.asciiFourthPage; 113 break; 114 case 2: 115 this.textLeftPage = this.asciiFifthPage; 116 this.textRightPage = this.asciiSixthPage; 117 break; 118 case 3: 119 this.textLeftPage = this.asciiSeventhPage; 120 this.textRightPage = this.asciiEighthPage; 121 break; 122 case 4: 123 this.textLeftPage = this.asciiNinthPage; 124 this.textRightPage = this.asciiTenthPage; 125 break; 126 case 5: 127 this.textLeftPage = this.asciiMinorHealthPotionP1; 128 this.textRightPage = this.asciiMinorHealthPotionP2; 129 break; 130 case 6: 131 this.textLeftPage = this.asciiMinorHealthPotionP3; 132 this.textRightPage = this.asciiMinorHealthPotionP4; 133 break; 134 case 7: 135 this.textLeftPage = this.asciiMajorHealthPotionP1; 136 this.textRightPage = this.asciiMajorHealthPotionP2; 137 break; 138 case 8: 139 this.textLeftPage = this.asciiMajorHealthPotionP3; 140 this.textRightPage = this.asciiMajorHealthPotionP4; 141 break; 142 case 9: 143 this.textLeftPage = this.asciiInvulnerabilityPotionP1; 144 this.textRightPage = this.asciiInvulnerabilityPotionP2; 145 break; 146 case 10: 147 this.textLeftPage = this.asciiInvulnerabilityPotionP3; 148 this.textRightPage = []; 149 break; 150 case 11: 151 this.textLeftPage = this.asciiTurtlePotionP1; 152 this.textRightPage = this.asciiTurtlePotionP2; 153 break; 154 case 12: 155 this.textLeftPage = this.asciiTurtlePotionP3; 156 this.textRightPage = this.asciiTurtlePotionP4; 157 break; 158 case 13: 159 this.textLeftPage = this.asciiTurtlePotionP5; 160 this.textRightPage = this.asciiTurtlePotionP6; 161 break; 162 case 14: 163 this.textLeftPage = this.asciiCloningPotionP1; 164 this.textRightPage = this.asciiCloningPotionP2; 165 break; 166 case 15: 167 this.textLeftPage = this.asciiCloningPotionP3; 168 this.textRightPage = this.asciiCloningPotionP4; 169 break; 170 case 16: 171 this.textLeftPage = this.asciiCloningPotionP5; 172 this.textRightPage = this.asciiCloningPotionP6; 173 break; 174 case 17: 175 this.textLeftPage = this.asciiGMOOHPotionP1; 176 this.textRightPage = this.asciiGMOOHPotionP2; 177 break; 178 case 18: 179 this.textLeftPage = this.asciiGMOOHPotionP3; 180 this.textRightPage = this.asciiGMOOHPotionP4; 181 break; 182 case 19: 183 this.textLeftPage = this.asciiSupermanPotionP1; 184 this.textRightPage = this.asciiSupermanPotionP2; 185 break; 186 case 20: 187 this.textLeftPage = this.asciiSupermanPotionP3; 188 this.textRightPage = this.asciiSupermanPotionP4; // je t'aime <3 189 break; 190 case 21: 191 this.textLeftPage = this.asciiSeedP1; 192 this.textRightPage = this.asciiSeedP2; 193 break; 194 case 22: 195 this.textLeftPage = this.asciiSeedP3; 196 this.textRightPage = this.asciiSeedP4; 197 break; 198 case 23: 199 this.textLeftPage = this.asciiJellyP1; 200 this.textRightPage = this.asciiJellyP2; 201 break; 202 case 24: 203 this.textLeftPage = this.asciiJellyP3; 204 this.textRightPage = this.asciiJellyP4; 205 break; 206 case 25: 207 this.textLeftPage = this.asciiJellyP5; 208 this.textRightPage = []; 209 break; 210 case 26: 211 this.textLeftPage = this.asciiEndP1; 212 this.textRightPage = this.asciiEndP2; 213 break; 214 default: 215 this.textLeftPage = []; 216 this.textRightPage = []; 217 break; 218 } 219 // We update the book on page 220 this.updateBookOnPage(); 221 } 222 }, 223 224 previousPage : function(){ 225 this.setBookPage(this.bookPage-1); 226 }, 227 228 nextPage : function(){ 229 this.setBookPage(this.bookPage+1); 230 }, 231
232 drawBook : function(){ 233 // Draw the book itself 234 for(i = 0; i < this.asciiBook.length; i++){ 235 this.textBook[this.bookPosY + i] = this.textBook[this.bookPosY + i].replaceAt(this.bookPosX, this.asciiBook[i]); 236 } 237 238 // Draw the page numbers 239 this.textBook[this.bookPosY + this.bookFirstPageNumberPosY] = this.textBook[this.bookPosY + this.bookFirstPageNumberPosY].replaceAt(this.bookPosX + this.bookFirstPageNumberPosX, "" + this.bookPage * 2); 240 this.textBook[this.bookPosY + this.bookSecondPageNumberPosY] = this.textBook[this.bookPosY + this.bookSecondPageNumberPosY].replaceAt(this.bookPosX + this.bookSecondPageNumberPosX, "" + (this.bookPage * 2 + 1)); 241 242 // Draw the previous and next page buttons 243 this.textBook[this.bookPosY + this.bookChangePageButtonPosY] = this.textBook[this.bookPosY + this.bookChangePageButtonPosY].replaceAt(this.bookPosX + this.bookChangePageButtonPosX, "<button onclick=\"cauldron.previousPage()\">Previous page</button> <button onclick=\"cauldron.nextPage()\">Next page</button>"); 244 245 // Draw the left page text 246 for(i = 0; i < this.textLeftPage.length; i++){ 247 this.textBook[this.bookLeftPagePosY + i] = this.textBook[this.bookLeftPagePosY + i].replaceAt(this.bookPosX + this.bookLeftPagePosX, this.textLeftPage[i]); 248 } 249 250 // Idem right 251 for(i = 0; i < this.textRightPage.length; i++){ 252 this.textBook[this.bookRightPagePosY + i] = this.textBook[this.bookRightPagePosY + i].replaceAt(this.bookPosX + this.bookRightPagePosX, this.textRightPage[i]); 253 } 254 }, 255 256 drawCauldron : function(){ 257 // We draw the cauldron 258 for(i = 0; i < this.asciiCauldron.length; i++){ 259 this.textCauldron[this.cauldronPosY + i] = this.textCauldron[this.cauldronPosY + i].replaceAt(this.cauldronPosX, this.asciiCauldron[i]); 260 } 261 262 // We add the smoke 263 this.drawSmoke(); 264 }, 265 266 drawSmoke : function(){ 267 // Finally, if there's a smoke, we draw it 268 if(this.smokeBool == true){ 269 if(this.smokeOrientation == true){ 270 this.textCauldron[this.smokePosY] = this.textCauldron[this.smokePosY].replaceAt(this.smokePosX, "("); 271 this.textCauldron[this.smokePosY-1] = this.textCauldron[this.smokePosY-1].replaceAt(this.smokePosX + 1, ")"); 272 } 273 else{ 274 this.textCauldron[this.smokePosY] = this.textCauldron[this.smokePosY].replaceAt(this.smokePosX + 1, ")"); 275 this.textCauldron[this.smokePosY-1] = this.textCauldron[this.smokePosY-1].replaceAt(this.smokePosX, "("); 276 } 277 } 278 }, 279 280 moveSmoke : function(){ 281 // If we have the cauldron 282 if(objects.list.cauldron.have){ 283 // If there's no smoke yet, we create one 284 if(this.smokeBool == false){ 285 this.smokeBool = true; // Bool is true 286 this.smokePosX = this.cauldronPosX + 7 + random.getRandomIntUpTo(10); // PosX 287 this.smokePosY = this.cauldronPosY; // PosY 288 // Random orientation 289 if(random.flipACoin()) this.smokeOrientation = true; 290 else this.smokeOrientation = false; 291 } 292 // Else, there's a smoke 293 else{ 294 // We make it go up 295 this.smokePosY -= 1; 296 // We switch its orientation 297 if(this.smokeOrientation == true) this.smokeOrientation = false; 298 else this.smokeOrientation = true; 299 // If it's too high : there's no smoke anymore 300 if(this.cauldronPosY - this.smokePosY > 3){ 301 this.smokeBool = false; 302 } 303 } 304 } 305 306 this.updateCauldronOnPage(); 307 }, 308 309 drawActionsInfo : function(){ 310 this.textActionsInfo = "<br/><b>What you have :</b><br/>"; 311 312 // Add candies and lollipops info 313 this.textActionsInfo += " Candies : " + candies.nbrOwned; 314 this.textActionsInfo += "<br/> Lollipops : " + lollipops.nbrOwned; 315 }, 316 317 drawActionsPut : function(){ 318 this.textActionsPut = "<b>What you want to put in the cauldron :</b><br/><br/>" 319 this.textActionsPut += "<input id=\"cauldron_candies_quantity\" type=\"text\" size=\"10\"/> candies<br/>"; 320 this.textActionsPut += "<input id=\"cauldron_lollipops_quantity\" type=\"text\" size=\"10\"/> lollipops<br/>"; 321 this.textActionsPut += "<button onclick=\"cauldron.putInTheCauldron()\">Put all that in the cauldron</button> <span id=\"cauldron_comment\"></span><br/>"; 322 }, 323 324 drawActionsInCauldron : function(){ 325 this.textActionsInCauldron += "<b>What is in the cauldron :</b><br/>"; 326 this.textActionsInCauldron += " Candies : " + this.candiesInTheCauldron; 327 this.textActionsInCauldron += "<br/> Lollipops : " + this.lollipopsInTheCauldron + "<br/>"; 328 }, 329 330 drawActions : function(){ 331 this.textActions += "<b>What you can do with it :</b><br/>"; 332 this.textActions += "<button id=\"cauldron_mix\" onclick=\"cauldron.setWeAreMixing(true)\">Mix</button><button id=\"cauldron_boil\" onclick=\"cauldron.setWeAreBoiling(true)\">Boil</button><button disabled=\"disabled\" id=\"cauldron_stop\" onclick=\"cauldron.stopActions()\">Stop</button><br/><br/>"; 333 this.textActions += "<span id=\"cauldron_action_text\"></span>"; 334 this.textActions += "<button id=\"cauldron_put_into_bottles\" onclick=\"cauldron.putIntoBottles()\">Put everything into bottles</button><br/><br/>"; 335 this.textActions += "<span id=\"cauldron_results_text\"></span>"; 336 }, 337 338 increaseActionTimer : function(){ 339 this.setActionTimer(this.actionTimer + 1); 340 }, 341 342 setActionTimer : function(value){ 343 // We set the value 344 this.actionTimer = value; 345 346 // We change on the page 347 if(this.weAreMixing){ 348 if(this.actionTimer < 60){ 349 // If we just began mixing or we're mixing something 350 if(this.actionTimer < 5 || (this.candiesInTheCauldron != 0 || this.lollipopsInTheCauldron != 0)){ 351 // We show the timer 352 htmlInteraction.setInnerHtml("cauldron_timer", this.actionTimer); 353 } 354 // Else 355 else{ 356 // We show a special message 357 htmlInteraction.setInnerHtml("cauldron_timer", this.actionTimer + " ... You do realize that you're not mixing anything, r
357ight ?"); 358 } 359 } 360 else 361 htmlInteraction.setInnerHtml("cauldron_timer", "too much mixing, your arms are hurting."); 362 } 363 else if(this.weAreBoiling){ 364 if(this.actionTimer < 3) 365 htmlInteraction.setInnerHtml("cauldron_timer", "cold."); 366 else if(this.actionTimer < 6) 367 htmlInteraction.setInnerHtml("cauldron_timer", "lukewarm."); 368 else if(this.actionTimer < 9) 369 htmlInteraction.setInnerHtml("cauldron_timer", "hot.."); 370 else if(this.actionTimer < 11) 371 htmlInteraction.setInnerHtml("cauldron_timer", "very hot..."); 372 else if(this.actionTimer < 13) 373 htmlInteraction.setInnerHtml("cauldron_timer", "very very hot !"); 374 else if(this.actionTimer < 14) 375 htmlInteraction.setInnerHtml("cauldron_timer", "bubbles begin to appear..."); 376 else if(this.actionTimer < 15) 377 htmlInteraction.setInnerHtml("cauldron_timer", "bubbles begin to appear... and.."); 378 else if(this.actionTimer < 32) 379 htmlInteraction.setInnerHtml("cauldron_timer", "BOILING !"); 380 else 381 htmlInteraction.setInnerHtml("cauldron_timer", "the water is burnt ! How is that even possible ?"); 382 } 383 }, 384 385 setWeAreMixing : function(value){ 386 // If we want to stop mixing 387 if(value == false && this.weAreMixing == true){ 388 // Then we stop 389 this.weAreMixing = false; 390 // We register the mixing 391 this.registerAction("mix", this.candiesWhenWeBeganAction, this.lollipopsWhenWeBeganAction, this.actionTimer); 392 } 393 // Else, if we want to begin mixing 394 else if(value == true && this.weAreMixing == false){ 395 // Then we begin 396 this.weAreMixing = true; 397 this.disableActionsButtons(); 398 // We set the text 399 htmlInteraction.setInnerHtml("cauldron_action_text", "Mixing... <span id=\"cauldron_timer\"></span><br/><br/>"); 400 // We set the timer 401 this.setActionTimer(0); 402 // We store some info 403 this.candiesWhenWeBeganAction = this.candiesInTheCauldron; 404 this.lollipopsWhenWeBeganAction = this.lollipopsInTheCauldron; 405 } 406 }, 407 408 setWeAreBoiling : function(value){ 409 // If we want to stop Boiling 410 if(value == false && this.weAreBoiling == true){ 411 // Then we stop 412 this.weAreBoiling = false; 413 // We register the Boiling 414 this.registerAction("boil", this.candiesWhenWeBeganAction, this.lollipopsWhenWeBeganAction, this.actionTimer); 415 } 416 // Else, if we want to begin Boiling 417 else if(value == true && this.weAreBoiling == false){ 418 // Then we begin 419 this.weAreBoiling = true; 420 this.disableActionsButtons(); 421 // We set the text 422 htmlInteraction.setInnerHtml("cauldron_action_text", "Boiling... <span id=\"cauldron_timer\"></span><br/><br/>"); 423 // We set the timer 424 this.setActionTimer(0); 425 // We store some info 426 this.candiesWhenWeBeganAction = this.candiesInTheCauldron; 427 this.lollipopsWhenWeBeganAction = this.lollipopsInTheCauldron; 428 } 429 }, 430 431 putIntoBottles : function(){ 432 // We create the vars which will store the results for a final drawing on the page 433 var resultsList = []; 434 var resultsText = ""; 435 436 // We store actions into vars for easier use 437 var lastAc = this.actionsList[this.actionsList.length - 1]; 438 var lastLastAc = this.actionsList[this.actionsList.length - 2]; 439 var lastLastLastAc = this.actionsList[this.actionsList.length - 3]; 440 441 // Check for minor health potion 442 if(lastAc.type == "mix" // Last action was mixing 443 && lastAc.nbrLollipops == 0 // We mixed no lollipop 444 && lastAc.nbrCandies > 0 // We mixed at least one candy 445 && lastAc.nbrCandies % 100 == 0 // The candies we mixed were a multiple of 100 446 && lastAc.nbrCandies == this.candiesInTheCauldron && lastAc.nbrLollipops == this.lollipopsInTheCauldron // We didn't add anything while mixing 447 && lastAc.timer >= 11 && lastAc.timer <= 19){ // It took between 11 and 19 seconds 448 potions.getPotions(potions.list.health, Math.floor(lastAc.nbrCandies/100)); // We add the potions to our stock 449 resultsList.push({type:"minor health", nbr:Math.floor(lastAc.nbrCandies/100)}); // We add the result to the list 450 } 451 452 // Check for major health potion 453 if(lastAc.type == "mix" // Last action was mixing 454 && lastAc.nbrLollipops > 0 // We mixed at least one lollipop 455 && lastAc.nbrLollipops % 100 == 0 // The lollipops we mixed were a multiple of 100 456 && lastAc.nbrCandies == 0 // We mixed no candy 457 && lastAc.nbrLollipops == this.lollipopsInTheCauldron // We didn't add any lollipop while mixing 458 && this.candiesInTheCauldron == lastAc.nbrLollipops // While mixing, we added as many candies as we had lollipops at the beginning 459 && lastAc.timer >= 16 && lastAc.timer <= 24){ // It took between 16 and 24 seconds 460 potions.getPotions(potions.list.majorHealth, Math.floor(lastAc.nbrLollipops/100)); // We add the potions to our stock 461 resultsList.push({type:"major health", nbr:Math.floor(lastAc.nbrLollipops/100)}); // We add the result to the list 462 } 463 464 // Check for turtle potion 465 if( 466 /* LAST ACTION */ 467 lastAc.type == "boil" // Last action was boiling 468 && lastAc.nbrCandies == 0 // We boiled no candy 469 && lastAc.nbrLollipops > 0 // We boiled at least one lollipop 470 && lastAc.nbrLollipops % 20000 == 0 // The lollipops we boiled were a multiple of 20000 471 && lastAc.nbrLollipops == this.lollipopsInTheCauldron // We didn't add any lollipop while boiling 472 && lastAc.nbrCandies == this.candiesInTheCauldron // We didn't add any candy while boiling 473 && lastAc.timer >= 15 && lastAc.timer < 32 // It was boiling when we stopped boiling 474 /* LAST LAST ACTION */ 475 && lastLastAc.type == "mix" // Last last action was mixing 476 /* LAST LAST LAST ACTION */ 477 && lastLastLastAc.type == "boil" // Last last last action was boiling 478 && lastLastLastAc.nbrCandies == 0 // We boiled no candy 479 && lastLastLastAc.nbrLollipops > 0 // We boiled at least one lollipop 480 && lastLastLastAc.nbrLollipops % 10000 == 0 // The lollipops we boiled were a multiple of 10000 481 && lastLastLastAc.timer >= 15 && lastLastLastAc.timer < 32 // It was boiling when we stopped boiling 482 /* STUFF BETWEEN ACTIONS */ 483 && lastAc.nbrLollipops == 2 * lastLastLastAc.nbrLollipops){ // We boiled at the end twice more lollipops than what we boiled at first 484 potions.getPotions(potions.list.turtle, Math.floor(lastAc.nbrLollipops/20000)); // We add the potions to our stock 485 resultsList.push({type:"turtle", nbr:Math.floor(lastAc.nbrLollipops/20000)}); // We add the result to the list 486 } 487 488 // Check for invulnerability potion 489 if(lastAc.type == "mix" // Last action was mixing 490 && lastAc.nbrLollipops == 0 // We mixed no lollipop 491 && lastAc.nbrCandies > 0 // We mixed at least one candy 492 && lastAc.nbrCandies % 2000 == 0 // The candies we mixed were a multiple of 2000 493 && lastAc.nbrCandies == this.candiesInTheCauldron && lastAc.nbrLollipops == this.lollipopsInTheCauldron // We didn't add anything while mixing 494 && lastAc.timer >= 60){ // It took >= 60 seconds 495 potions.getPotions(potions.list.invulnerability, Math.floor(lastAc.nbrCandies/2000)); // We add the potions to our stock 496 resultsList.push({type:"invulnerability", nbr:Math.floor(lastAc.nbrCandies/2000)}); // We add the result to the list 497 } 498 499 // Check for cloning potion 500 if(lastAc.type == "boil" // Last action was boiling 501 && lastAc.nbrLollipops == 0 // We boiled no lollipop 502 && lastAc.nbrCandies == 0 // We boiled no candy 503 && this.lollipopsInTheCauldron == 0 // We didn't add any lollipop while boiling 504 && this.convertCandiesToPotionsForTheCloningPotion(this.candiesInTheCauldron) > 0 // With the candies we added while boiling (or after), we can make at least one potion 505 && lastAc.timer >= 32){ // The water burnt while boiling 506 potions.getPotions(potions.list.cloning, this.convertCandiesToPotionsForTheCloningPotion(this.candiesInTheCauldron)); // We add the potions to our stock 507 resultsList.push({type:"cloning", nbr:this.convertCandiesToPotionsForTheCloningPotion(this.candiesInTheCauldron)}); // We add the result to the list 508 } 509 510 // Check for G.M.O.O.H. potion 511 if(lastAc.type == "mix" // Last action was mixing 512 && lastAc.nbrLollipops > 0 // We mixed at least one lollipop 513 && lastAc.nbrLollipops % 500 == 0 // The lollipops we mixed were a multiple of 500 514 && lastAc.nbrCandies == 10000 // We mixed 10000 candies 515 && this.candiesInTheCauldron == lastAc.nbrCandies // We didn't add any candy while mixing 516 && this.lollipopsInTheCauldron == lastAc.nbrLollipops){ // We didn't add any lollipop while mixing 517 potions.getPotions(potions.list.gmooh, Math.floor(lastAc.nbrLollipops/500)); // We add the potions to our stock 518 resultsList.push({type:"G.M.O.O.H.", nbr:Math.floor(lastAc.nbrLollipops/500)}); // We add the result to the list 519 } 520 521 // Check for superman potion 522 if(lastAc.type == "mix" // Last action was mixing 523 && lastAc.nbrLollipops == 0 // We mixed no lollipop 524 && lastAc.nbrCandies > 0 // We mixed at least one candy 525 && lastAc.nbrCandies % 180 == 0 // The candies we mixed were a multiple of 180 526 && lastAc.nbrCandies == this.candiesInTheCauldron && lastAc.nbrLollipops == this.lollipopsInTheCauldron){ // We didn't add anything while mixing 527 potions.getPotions(potions.list.superman, Math.floor(lastAc.nbrCandies/180)); // We add the potions to our stock 528 resultsList.push({type:"superman", nbr:Math.floor(lastAc.nbrCandies/180)}); // We add the result to the list 529 } 530 531 // Check for seed 532 if(lastAc.type == "boil" // Last action was boiling 533 && lastAc.nbrLollipops == 0 // We boiled no lollipop 534 && lastAc.nbrCandies == 0 // We boiled no candy 535 && this.lollipopsInTheCauldron == 0 // We didn't add any lollipop while boiling 536 && this.candiesInTheCauldron > 0 // We added at least one candy while or after boiling 537 && this.candiesInTheCauldron % 650 == 0){ // The candies we added while or after boiling are a multiple of 650 538 potions.getPotions(potions.list.seed, Math.floor(this.candiesInTheCauldron/650)); // We add the potions to our stock 539 resultsList.push({type:"seed", nbr:Math.floor(this.candiesInTheCauldron/650), special:true, plural:"seeds"}); // We add the result to the list 540 } 541 542 // Check for jelly 543 if( 544 /* ACTIONS TYPES */ 545 lastAc.type == "boil" // Last action was boiling 546 && lastLastAc.type == "mix" // Last last action was mixing 547 && lastLastLastAc.type == "boil" // Last last last action was boiling 548 /* LAST LAST LAST ACTION */ 549 && lastLastLastAc.nbrLollipops == 0 // No lollipop 550 && lastLastLastAc.nbrCandies > 0 // At least one candy 551 && lastLastLastAc.nbrCandies % 600 == 0 // Candies multiple of 600 552 /* LAST LAST ACTION */ 553 && lastLastAc.nbrLollipops > 0 // At least one lollipop 554 && lastLastAc.nbrLollipops % 6000 == 0 // Lollipops mutiple of 6000 555 && lastLastAc.nbrLollipops == 10*lastLastLastAc.nbrCandies // Lollipops = 10*candies of last last last action 556 && lastLastAc.nbrCandies == lastLastLastAc.nbrCandies // As many candies as last last last action 557 /* LAST ACTION */ 558 && lastAc.nbrLollipops == lastLastAc.nbrLollipops // As many lollipops as last last action 559 && lastAc.nbrCandies == lastLastLastAc.nbrCandies*2 // Twice more candies than last last last action 560 && lastAc.nbrLollipops == this.lollipopsInTheCauldron // We didn't add any lollipop 561 && lastAc.nbrCandies == this.candiesInTheCauldron){ // We didn't add any candy 562 potions.getPotions(potions.list.jelly, Math.floor(lastAc.nbrCandies/600)); // We add the potions to our stock 563 resultsList.push({type:"jelly", nbr:Math.floor(lastAc.nbrCandies/600), special:true, plural:"jellies"}); // We add the result to the list 564 } 565 566 // We show the result on the page if there's any result 567 if(resultsList.length > 0){ 568 for(var i = 0; i < resultsList.length; i++){ 569 if(resultsList[i].special != true){ 570 if(resultsList[i].nbr > 1){ 571 resultsText += "You made " + resultsList[i].nbr + " " + resultsList[i].type + " potions !<br/>"; 572 } 573 else{ 574 resultsText += "You made a " + resultsList[i].type + " potion.<br/>"; 575 } 576 } 577 else{ 578 if(resultsList[i].nbr > 1){ 579 resultsText += "You made " + resultsList[i].nbr + " " + resultsList[i].plural + " !<br/>"; 580 } 581 else{ 582 resultsText += "You made a " + resultsList[i].type + ".<br/>"; 583 } 584 } 585 } 586 htmlInteraction.setInnerHtml("cauldron_results_text", resultsText); 587 } 588 else{ 589 htmlInteraction.setInnerHtml("cauldron_results_text", "You don't manage to get anything interesting with that preparation.<br/>Did you follow the manual's instructions ?"); 590 } 591 592 // We empty the cauldron 593 this.setCandiesInTheCauldron(0); 594 this.setLollipopsInTheCauldron(0); 595 596 // We reset the actions list 597 this.actionsList = [{type:"none"}, {type:"none"}, {type:"none"}]; 598 }, 599 600 convertCandiesToPotionsForTheCloningPotion : function(howMuch){ 601 return Math.floor(howMuch / 1337); 602 }, 603 604 disableActionsButtons : function(){ 605 // We disable the mixing button 606 htmlInteraction.disableButton("cauldron_mix"); 607 // We disable the put into bottles button 608 htmlInteraction.disableButton("cauldron_put_into_bottles"); 609 // We disable the boiling button 610 htmlInteraction.disableButton("cauldron_boil"); 611 // We enable the stopping button 612 htmlInteraction.enableButton("cauldron_stop"); 613 }, 614 615 enableActionsButtons : function(){ 616 // We re enable the mixing button 617 htmlInteraction.enableButton("cauldron_mix"); 618 // We re enable the put into bottles button 619 htmlInteraction.enableButton("cauldron_put_into_bottles"); 620 // We re enable the boiling button 621 htmlInteraction.enableButton("cauldron_boil"); 622 // We disable the button 623 htmlInteraction.disableButton("cauldron_stop"); 624 }, 625 626 stopActions : function(){ 627 // Stop all actions 628 this.setWeAreMixing(false); 629 this.setWeAreBoiling(false); 630 631 // Re enable buttons 632 this.enableActionsButtons(); 633 634 // Empty the action text 635 htmlInteraction.setInnerHtml("cauldron_action_text", ""); 636 }, 637 638 putInTheCauldron : function(){ 639 // We get the values of the text inputs 640 var candiesInput = htmlInteraction.getElement("cauldron_candies_quantity").value; 641 var lollipopsInput = htmlInteraction.getElement("cauldron_lollipops_quantity").value; 642 643 // We get the quantities 644 if(candiesInput != ""){ 645 var candiesQuantity = parseInt(candiesInput); 646 } 647 else candiesQuantity = 0; 648 649 if(lollipopsInput != ""){ 650 var lollipopsQuantity = parseInt(lollipopsInput); 651 } 652 else lollipopsQuantity = 0; 653 654 // If the quantities are incorrect 655
655if(isNaN(candiesQuantity) || isNaN(lollipopsQuantity)){ 656 // If both values are incorrect 657 if(isNaN(candiesQuantity) && isNaN(lollipopsQuantity)){ 658 htmlInteraction.setInnerHtml("cauldron_comment", "The values you entered are not numbers."); 659 } 660 // If only the candies value is incorrect 661 else if(isNaN(candiesQuantity)){ 662 htmlInteraction.setInnerHtml("cauldron_comment", "The value you entered for candies is not a number."); 663 } 664 // Else, only the lollipops value is incorrect 665 else{ 666 htmlInteraction.setInnerHtml("cauldron_comment", "The value you entered for lollipops is not a number."); 667 } 668 } 669 // Else, if we don't have enough candies or lollipops to put all that in the cauldron 670 else if(candiesQuantity > candies.nbrOwned || lollipopsQuantity > lollipops.nbrOwned){ 671 htmlInteraction.setInnerHtml("cauldron_comment", "You don't have enough to put all that in the cauldron !"); 672 } 673 // Else, if one if the value is negative 674 else if(candiesQuantity < 0 || lollipopsQuantity < 0){ 675 htmlInteraction.setInnerHtml("cauldron_comment", "Don't put negative values !"); 676 } 677 // Else, we put all that in the cauldron ! 678 else{ 679 htmlInteraction.setInnerHtml("cauldron_comment", ""); // We empty the comment 680 // We clear the text inputs 681 htmlInteraction.getElement("cauldron_candies_quantity").value = ""; 682 htmlInteraction.getElement("cauldron_lollipops_quantity").value = ""; 683 // We substract candies from our stock 684 candies.setNbrOwned(candies.nbrOwned - candiesQuantity); 685 lollipops.setNbrOwned(lollipops.nbrOwned - lollipopsQuantity); 686 // And we add them in the cauldron 687 this.setCandiesInTheCauldron(this.candiesInTheCauldron + candiesQuantity); 688 this.setLollipopsInTheCauldron(this.lollipopsInTheCauldron + lollipopsQuantity); 689 } 690 }, 691 692 setCandiesInTheCauldron : function(value){ 693 this.candiesInTheCauldron = value; 694 this.updateActionsInCauldronOnPage(); 695 }, 696 697 setLollipopsInTheCauldron : function(value){ 698 this.lollipopsInTheCauldron = value; 699 this.updateActionsInCauldronOnPage(); 700 }, 701 702 updateCauldronOnPage : function(){ 703 this.resetCauldronText(); 704 this.drawCauldron(); 705 htmlInteraction.setInnerHtml("cauldron_cauldron", this.textCauldron.join("")); 706 }, 707 708 updateBookOnPage : function(){ 709 this.resetBookText(); 710 this.drawBook(); 711 htmlInteraction.setInnerHtml("cauldron_book", this.textBook.join("")); 712 }, 713 714 updateActionsInfoOnPage : function(){ 715 this.textActionsInfo = ""; 716 this.drawActionsInfo(); 717 htmlInteraction.setInnerHtml("cauldron_actions_info", this.textActionsInfo); 718 }, 719 720 updateActionsPutOnPage : function(){ 721 this.textActionsPut = ""; 722 this.drawActionsPut(); 723 htmlInteraction.setInnerHtml("cauldron_actions_put", this.textActionsPut); 724 }, 725 726 updateActionsInCauldronOnPage : function(){ 727 this.textActionsInCauldron = ""; 728 this.drawActionsInCauldron(); 729 htmlInteraction.setInnerHtml("cauldron_actions_in_cauldron", this.textActionsInCauldron); 730 }, 731 732 updateActionsOnPage : function(){ 733 this.textActions = ""; 734 this.drawActions(); 735 htmlInteraction.setInnerHtml("cauldron_actions", this.textActions); 736 }, 737 738 // Ascii 739 asciiCauldron : 740[ 741" ___________", 742" (___________)", 743" / \\", 744" / \\", 745" | |", 746" ____\\ /____", 747"()____\'.__ __.\'____()", 748" .\'` .\'```\'. `-.", 749" ().\'` `\'.()" 750], 751 752 asciiBook : 753[ 754" ___________________ ___________________", 755" .-/| ~~**~~ \\ / ~~**~~ |\\-.", 756" |||| : ||||", 757" |||| : ||||", 758" |||| : ||||", 759" |||| : ||||", 760" |||| : ||||", 761" |||| : ||||", 762" |||| : ||||", 763" |||| : ||||", 764" |||| : ||||", 765" |||| : ||||", 766" |||| : ||||", 767" ||||___________________ : ___________________||||", 768" ||/====================\\:/====================\\||", 769" `---------------------~___~--------------------\'\'" 770], 771 772 asciiFirstPage : 773[ 774"Welcome to the", 775"potions brewing", 776"manual for", 777"beginners !", 778"", 779" (second edition)", 780"", 781" __ __ __ __ ", 782" )( )( )( )( ", 783"(__)(__)(__)(__)" 784], 785 786 asciiSecondPage : 787[ 788"", 789"The present", 790"manual will focus", 791"on potions that", 792"require materials", 793"such as : ", 794" - candies", 795" - lollipops", 796], 797 798 asciiThirdPage : 799[ 800" The three rules", 801"of potion brewing", 802"-----------------", 803"", 804"1. The effect of", 805"a potion depends", 806"on its content as", 807"well as on the", 808"steps followed to", 809"prepare it." 810], 811 812 asciiFourthPage : 813[ 814"2. You can do", 815"several potions", 816"in one go.", 817"", 818"3. It's possible", 819"to mix", 820"instructions to", 821"brew potions of", 822"different types", 823"in one go." 824], 825 826 asciiFifthPage : 827[ 828"Table of contents", 829"-----------------", 830" Pages 10 to 20", 831" (Good potions)", 832"-----------------", 833"", 834" 10-13", 835"Minor health", 836"potion" 837], 838 839 asciiSixthPage : 840[ 841"", 842" 14-17", 843"Major health", 844"potion", 845"", 846" 18-20", 847"Invulnerability", 848"potion" 849], 850 851 asciiSeventhPage : 852[ 853"Table of contents", 854"-----------------", 855" Pages 22 to 41", 856"(Strange potions)", 857"-----------------", 858"", 859" 22-27", 860"Turtle potion" 861], 862 863 asciiEighthPage : 864[ 865" 28-33", 866"Cloning potion", 867"", 868" 34-37", 869"G.M.O.O.H.", 870"potion", 871"", 872" 38-41", 873"Superman potion", 874], 875 876 asciiNinthPage : 877[ 878"Table of contents", 879"-----------------", 880" Pages 42 to 50", 881"(Various magical", 882"objects you can", 883" brew in your",
884" cauldron)", 885"-----------------" 886], 887 888 asciiTenthPage : 889[ 890"", 891"", 892" 42-45", 893"Magical seed", 894"", 895"", 896" 46-50", 897"Magical jelly", 898], 899 900 asciiMinorHealthPotionP1 : 901[ 902"Minor health pot.", 903"-----------------", 904"The minor health", 905"potion is the", 906"easiest to brew", 907"for beginners.", 908"", 909"Used during a", 910"quest, it will", 911"make you recover" 912], 913 914 asciiMinorHealthPotionP2 : 915[ 916"50 health points.", 917"", 918"For one potion,", 919"you will need 100", 920"candies.", 921"", 922"Put them in the", 923"cauldron and mix", 924"during about 15", 925"seconds." 926], 927 928 asciiMinorHealthPotionP3 : 929[ 930"You can mix a", 931"little more or", 932"less longer, it", 933"doesn't matter so", 934"much.", 935"", 936"When you're done,", 937"put the resulting", 938"mixture into", 939"bottles." 940], 941 942 asciiMinorHealthPotionP4 : 943[ 944"Congratulations !", 945"You just made", 946"your first minor", 947"health potion !", 948"", 949"", 950"N.B. : use 200", 951"candies for 2", 952"potions, 300 for", 953"3, etc." 954], 955 956 asciiMajorHealthPotionP1 : 957[ 958"Major health pot.", 959"-----------------", 960"The major health", 961"potion is a bit", 962"harder to make", 963"than the previous", 964"one.", 965"", 966"But it's also", 967"a lot more", 968], 969 970 asciiMajorHealthPotionP2 : 971[ 972"efficient : by", 973"drinking it", 974"during a quest,", 975"you will gain", 976"100 health points", 977"instead of 50.", 978"", 979"How to make a", 980"major health", 981"potion :" 982], 983 984 asciiMajorHealthPotionP3 : 985[ 986"1. Put 100", 987"lollipops into", 988"your cauldron.", 989"", 990"2. Begin mixing", 991"forcefully.", 992"", 993"3. While you're", 994"mixing, add 100", 995"candies into the", 996], 997 998 asciiMajorHealthPotionP4 : 999[ 1000"cauldron.", 1001"", 1002"4. Stop mixing", 1003"after 20 seconds.", 1004"", 1005"5. Put the result", 1006"into bottles.", 1007"", 1008"6. You're done !" 1009], 1010 1011 asciiInvulnerabilityPotionP1 : 1012[ 1013" Invulnerability", 1014" potion", 1015"-----------------", 1016"", 1017"This potion,", 1018"although being", 1019"quite easy to", 1020"brew, require a", 1021"lot of candies." 1022], 1023 1024 asciiInvulnerabilityPotionP2 : 1025[ 1026"The recipe is", 1027"simple : just", 1028"put 2000 candies", 1029"inside your", 1030"cauldron and mix", 1031"them until your", 1032"arms hurt.", 1033"", 1034"This potion will", 1035"make you" 1036], 1037 1038 asciiInvulnerabilityPotionP3 : 1039[ 1040"invincible for", 1041"some time,", 1042"during which you", 1043"won't feel any", 1044"pain or physical", 1045"damage." 1046], 1047 1048 asciiTurtlePotionP1 : 1049[ 1050" Turtle potion", 1051"-----------------", 1052"A turtle !", 1053"A turtle !", 1054"Do you want to", 1055"become a turtle ?", 1056"", 1057"You'll be able to", 1058"become one with", 1059"this fantastic" 1060], 1061 1062 asciiTurtlePotionP2 : 1063[ 1064"potion !", 1065"", 1066"When you will be", 1067"a turtle, you", 1068"will resist a lot", 1069"more to physical", 1070"damage. But you", 1071"will be slower,", 1072"too." 1073], 1074 1075 asciiTurtlePotionP3 : 1076[ 1077"Now, let's get", 1078"down to business.", 1079"", 1080"Put 10000", 1081"lollipops in your", 1082"cauldron. Do not", 1083"add any candy, or", 1084"your potion will", 1085"be a failure." 1086], 1087 1088 asciiTurtlePotionP4 : 1089[ 1090"Now, heat up the", 1091"cauldron until", 1092"your preparation", 1093"is boiling.", 1094"", 1095"When it's boiling,", 1096"stop heating it", 1097"up and mix a", 1098"little bit." 1099], 1100 1101 asciiTurtlePotionP5 : 1102[ 1103"Add the same", 1104"quantity of", 1105"lollipops as you", 1106"put at the", 1107"beginning, and,", 1108"one more time,", 1109"heat up", 1110"everything until", 1111"it's boiling." 1112], 1113 1114 asciiTurtlePotionP6 : 1115[ 1116"Stop boiling,", 1117"put into a bottle,", 1118"begin a quest,", 1119"drink the potion,", 1120"you're a turtle !!", 1121"", 1122" _ .----.", 1123" (_\\/ \\_,", 1124" \'uu----uu~\'" 1125], 1126 1127 asciiCloningPotionP1 : 1128[ 1129" Cloning potion", 1130"-----------------", 1131"There's a little", 1132"bit of candies in", 1133"everyone of us.", 1134"", 1135"This is actually", 1136"a physical law of", 1137"our universe." 1138], 1139 1140 asciiCloningPotionP2 : 1141[ 1142"Now, candies are", 1143"a very malleable", 1144"material.", 1145"", 1146"These two facts", 1147"led us to the", 1148"realisation of", 1149"this cloning", 1150"potion." 1151], 1152 1153 asciiCloningPotionP3 : 1154[ 1155"The potion will", 1156"copy your inner", 1157"structure and", 1158"make a clone of", 1159"you almost", 1160"entirely made", 1161"of candies", 1162"(there's a bit of", 1163"water, too)." 1164], 1165 1166 asciiCloningPotionP4 : 1167[ 1168"Steps :", 1169"", 1170"Burn the water in", 1171"your cauldron.", 1172"", 1173"Then, while it's", 1174"still burning,", 1175"add as many", 1176"candies as you", 1177"can." 1178], 1179 1180 asciiCloningPotionP5 : 1181[ 1182"It's simple : the", 1183"more candies you", 1184"put, the more", 1185"potions you'll", 1186"get !", 1187"", 1188"(be sure to put", 1189" a minimum", 1190"quantity, though)" 1191], 1192 1193 asciiCloningPotionP6 : 1194[ 1195" \\o/ -> \\o/", 1196"", 1197" ^ |", 1198" | V", 1199"", 1200" \\o/ <- \\o/", 1201"", 1202" \"The circle", 1203" of life\"" 1204], 1205 1206 asciiGMOOHPotionP1 : 1207[ 1208"G.M.O.O.H. potion", 1209"-----------------", 1210"G.M.O.O.H. means", 1211"\"Get Me Out Of", 1212"Here\".", 1213"", 1214"This potion is to", 1215"be used in", 1216"critical", 1217"situations." 1218], 1219 1220 asciiGMOOHPotionP2 : 1221[ 1222"It will teleport", 1223"you to another", 1224"location.", 1225"", 1226"Maybe it will", 1227"be safer, maybe", 1228"it won't. Who", 1229"knows ?", 1230"Quite exciting", 1231"isn't it ?" 1232], 1233 1234 asciiGMOOHPotionP3 : 1235[ 1236"First, put in", 1237"your cauldron a", 1238"base quantity of", 1239"10 000 candies.", 1240"", 1241"Then, add 500", 1242"lollipops for", 1243"each potion you", 1244"want to brew." 1245], 1246 1247 asciiGMOOHPotionP4 : 1248[ 1249"Never change the", 1250"base quantity of", 1251"10 000 candies.", 1252"", 1253"Then, mix a little", 1254"bit and put into", 1255"bottles.", 1256"", 1257"Enjoy your random", 1258"potions !" 1259], 1260 1261 asciiSupermanPotionP1 : 1262[ 1263" Superman potion", 1264"-----------------", 1265"This potion will", 1266"transform you", 1267"into Superman,", 1268"providing you", 1269"a fantastic cape.", 1270"", 1271"Some people say", 1272"that this isn't" 1273], 1274 1275 asciiSupermanPotionP2 : 1276[ 1277"useful.", 1278"", 1279"We respond them", 1280"that it is just",
1281"so cooooool !", 1282"", 1283"Anyway, to make", 1284"one :", 1285"", 1286"Put 180 candies" 1287], 1288 1289 asciiSupermanPotionP3 : 1290[ 1291"in your cauldron.", 1292"", 1293"Mix them.", 1294"", 1295"Think about", 1296"Superman.", 1297"", 1298"Think once again.", 1299"", 1300"Put into bottle." 1301], 1302 1303 asciiSupermanPotionP4 : 1304[ 1305"You're done !", 1306"", 1307" ___________", 1308" /.\'_______` \\", 1309" /( <_______`-\'\\", 1310" `.`.______ \\.\'", 1311" `..-.___>.\'", 1312" `.__ .\'", 1313" `.\'" 1314], 1315 1316 asciiSeedP1 : 1317[ 1318" Seed", 1319"-----------------", 1320"According to an", 1321"ancient legend,", 1322"trees would be", 1323"the source of all", 1324"candies in the", 1325"whole world.", 1326"", 1327"There would exist" 1328], 1329 1330 asciiSeedP2 : 1331[ 1332"somewhere in the", 1333"universe a giant", 1334"tree, which", 1335"remains unnamed.", 1336"", 1337"This tree would", 1338"provide its", 1339"discoverer an", 1340"infinite flow of", 1341"candies." 1342], 1343 1344 asciiSeedP3 : 1345[ 1346"Anyway, we didn't", 1347"find it yet, but", 1348"we found that it", 1349"was possible to", 1350"craft a magical", 1351"seed so that it", 1352"grows a resistant", 1353"tree. And this", 1354"can be useful", 1355"during a quest." 1356], 1357 1358 asciiSeedP4 : 1359[ 1360"Heat up the water", 1361"in your cauldron.", 1362"", 1363"Add 650 candies,", 1364"stop boiling and", 1365"put the seed into", 1366"a bottle.", 1367"", 1368"Now, plant some", 1369"trees !" 1370], 1371 1372 asciiJellyP1 : 1373[ 1374" Jelly", 1375"-----------------", 1376"Did you ever", 1377"thought about", 1378"some kind of bomb", 1379"that you could", 1380"use during a", 1381"quest ? If so,", 1382"then this magical", 1383"jelly should" 1384], 1385 1386 asciiJellyP2 : 1387[ 1388"please you !", 1389"", 1390"It is a bit hard", 1391"to prepare, but", 1392"it's quite", 1393"powerful.", 1394"", 1395"This jelly", 1396"explodes on", 1397"contact and deals" 1398], 1399 1400 asciiJellyP3 : 1401[ 1402"high damage.", 1403"", 1404"There are three", 1405"peparation steps", 1406"which correspond", 1407"to the three", 1408"layers of the", 1409"jelly.", 1410"", 1411"First step :" 1412], 1413 1414 asciiJellyP4 : 1415[ 1416"Put 600 candies,", 1417"boil the water,", 1418"stop boiling.", 1419"", 1420"Second step :", 1421"", 1422"Add 6 000", 1423"lollipops,", 1424"mix,", 1425"stop mixing." 1426], 1427 1428 asciiJellyP5 : 1429[ 1430"Third step :", 1431"", 1432"Repeat first step.", 1433"", 1434"Note that you can", 1435"only place the", 1436"jelly behind you.", 1437"", 1438"Good luck for", 1439"your quests !" 1440], 1441 1442 asciiEndP1 : 1443[ 1444" ~ The end ~", 1445"-----------------", 1446"", 1447" Thanks for", 1448" reading !", 1449"", 1450"We hope this book", 1451"helped you. Feel", 1452" free to", 1453"redistribute it !", 1454], 1455 1456 asciiEndP2 : 1457[ 1458"Co-authors :", 1459"", 1460"- the sorceress", 1461"- the necromancer", 1462"- a shoemaker", 1463"- a mathematician", 1464"- ???", 1465"", 1466" Happy brewing ~" 1467] 1468 1469};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.