diff --git a/js/initialization.js b/js/initialization.js index a22adf86f..0d39edbd3 100644 --- a/js/initialization.js +++ b/js/initialization.js @@ -66,7 +66,8 @@ function initialize(a) { speedModifier: 0.73, speedUpKeyHeld: false, creationSpeedModifier: 0.73, - comboTime: 310 + comboTime: 310, + casualMode: true }; } else { settings = { diff --git a/js/main.js b/js/main.js index 5d8aae365..c7329bd0b 100644 --- a/js/main.js +++ b/js/main.js @@ -362,7 +362,11 @@ function showHelp() { } } - $("#inst_main_body").html("
HOW TO PLAY

The goal of Hextris is to stop blocks from leaving the inside of the outer gray hexagon.

" + (settings.platform != 'mobile' ? 'Press the right and left arrow keys' : 'Tap the left and right sides of the screen') + " to rotate the Hexagon." + (settings.platform != 'mobile' ? ' Press the down arrow to speed up the block falling': '') + "

Clear blocks and get points by making 3 or more blocks of the same color touch.

Time left before your combo streak disappears is indicated by the colored lines on the outer hexagon


By Logan Engstrom & Garrett Finucane
Find Hextris on iOS & Android
More @ the Hextris Website"); + $("#inst_main_body").html("
HOW TO PLAY

The goal of Hextris is to stop blocks from leaving the inside of the outer gray hexagon.

" + (settings.platform != 'mobile' ? 'Press the right and left arrow keys' : 'Tap the left and right sides of the screen') + " to rotate the Hexagon." + (settings.platform != 'mobile' ? ' Press the down arrow to speed up the block falling': '') + "

Clear blocks and get points by making 3 or more blocks of the same color touch.

Time left before your combo streak disappears is indicated by the colored lines on the outer hexagon


Casual Mode

By Logan Engstrom & Garrett Finucane
Find Hextris on iOS & Android
More @ the Hextris Website"); + $("#casualToggle").on('touchstart mousedown', function() { + settings.casualMode = !document.getElementById("casualSwitch").checked + }); + if (gameState == 1) { pause(); } diff --git a/js/wavegen.js b/js/wavegen.js index a4e85ff77..63d774924 100644 --- a/js/wavegen.js +++ b/js/wavegen.js @@ -1,4 +1,11 @@ function blockDestroyed() { + var maxDifficulty = 35; + if (settings.casualMode === undefined){ + settings.casualMode = false + } else if (settings.casualMode){ + maxDifficulty = 8; + } + if (waveone.nextGen > 1350) { waveone.nextGen -= 30 * settings.creationSpeedModifier; } else if (waveone.nextGen > 600) { @@ -7,10 +14,10 @@ function blockDestroyed() { waveone.nextGen = 600; } - if (waveone.difficulty < 35) { + if (waveone.difficulty < maxDifficulty) { waveone.difficulty += 0.085 * settings.speedModifier; } else { - waveone.difficulty = 35; + waveone.difficulty = maxDifficulty; } } diff --git a/style/style.css b/style/style.css index b57f23e85..1585fdaaa 100644 --- a/style/style.css +++ b/style/style.css @@ -99,6 +99,21 @@ button:focus { } +#casualSwitch:checked + #casualToggle { + background-color: aqua; + box-shadow: 0 0 6px rgba(0, 204, 255, 1); +} + +#casualSwitch{ + visibility: hidden; +} + +#casualToggle{ + font-size: 8px; + padding: 0px 12px; + border-radius: 5px; + background-color: #ccc; +} #pauseBtn { display:none;