| @@ -19,6 +19,7 @@ | |||||
| "describe_all": true, | "describe_all": true, | ||||
| "contents_insert": true, | "contents_insert": true, | ||||
| "contents_remove": true, | "contents_remove": true, | ||||
| "contents_replace": true | |||||
| "contents_replace": true, | |||||
| "getSound": true | |||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,28 @@ | |||||
| let sounds = { | |||||
| "crush": ["Thump.", "Crunch.", "Crrruunch.", "CRUNCH!", "CRRRUNNCH!", "SKRRRRUNCH!", "SKRRRRRRRSMASH!"], | |||||
| "swallow": ["Ulp.", "Gulp.", "Glrph.", "Glrrrpkh.", "Gluuuurrkph!","GLRP!","GLRRRRPKH!","GLUUUUURRPKH!"], | |||||
| "liquid": ["Dribble.","Splat.","Splash.","Sploosh.","SPLASH!","SPLOOSH!","SPLOOOOOOSH!"], | |||||
| "insert": ["Slp.","Shlp.","Shlllp.","Shlllrp.","SHLP!","SHLLLLRP!"], | |||||
| "drop": ["Thump.","Thump!","Splat.","Splat!","SPLAT!"], | |||||
| "belch": ["Burp.","Urph.","Urrrrrph.","UuuuuuuRRRRRPPHHHhhhh.","UUUURRRRPHH!","BUUUURRRRRRRRPPPHHH!"], | |||||
| "fart": | |||||
| ["Pft.","Pffft.","Pfffffbt.","Frrrrrrrt.","FRRRRRRRRPBBT!"], | |||||
| "scat": | |||||
| ["Clench.","Squeeeeeze.","Squeeeeeeeeeeeze.","Sqlllllch.","SQLLLLLLCH!"], | |||||
| "digest": | |||||
| ["Grrgle.","Grrrrgle","Grrrrlglorp.","GrrrrGLRRRLPH!","GRRRRRLGPRLHK!"], | |||||
| }; | |||||
| function pickByMass(list, mass) { | |||||
| let index = Math.floor(Math.log10(mass/100)/2); | |||||
| index = Math.max(index, 0); | |||||
| if (index < list.length) | |||||
| return list[index]; | |||||
| else | |||||
| return list[list.length-1]; | |||||
| } | |||||
| function getSound(name, mass) { | |||||
| return pickByMass(sounds[name],mass); | |||||
| } | |||||
| @@ -1,10 +1,11 @@ | |||||
| <!DOCTYPE html> | |||||
| 0.5.26<!DOCTYPE html> | |||||
| <html lang="en"> | <html lang="en"> | ||||
| <head> | <head> | ||||
| <meta charset="utf-8"> | <meta charset="utf-8"> | ||||
| <title>Stroll</title> | <title>Stroll</title> | ||||
| <link rel="stylesheet" href="style.css"> | <link rel="stylesheet" href="style.css"> | ||||
| <script src="sounds.js"></script> | |||||
| <script src="presets.js"></script> | <script src="presets.js"></script> | ||||
| <script src="units.js"></script> | <script src="units.js"></script> | ||||
| <script src="recursive-macro.js"></script> | <script src="recursive-macro.js"></script> | ||||
| @@ -89,7 +90,7 @@ | |||||
| </div> | </div> | ||||
| <div id="log-area"> | <div id="log-area"> | ||||
| <div id="log"> | <div id="log"> | ||||
| <div>Welcome to Stroll 0.5.24</div> | |||||
| <div>Welcome to Stroll 0.5.26</div> | |||||
| <div><b>This game features 18+ content</b></div> | <div><b>This game features 18+ content</b></div> | ||||
| <div>It's a nice day for a walk</div> | <div>It's a nice day for a walk</div> | ||||
| <div> </div> | <div> </div> | ||||