diff --git a/index.html b/index.html index 17c74ed..ef5c377 100644 --- a/index.html +++ b/index.html @@ -93,6 +93,8 @@ const popup2 = document.getElementById('popup2'); const popup3 = document.getElementById('popup3'); const achievement = document.getElementById('achievement'); + const achievement2 = document.getElementById('achievement2'); + const achievement3 = document.getElementById('achievement3'); const saveData = localStorage.getItem('saveData'); if (saveData) { @@ -115,6 +117,18 @@ showPopup('Achievement Complete: First Hertz'); } + if (hz >= 60 && !achievement2.classList.contains('completed')) { + achievement2.classList.add('completed'); + achievement2.textContent = 'I can hear now'; + showPopup('Achievement Complete: I can hear now'); + } + + if (hz >= 2000 && !achievement3.classList.contains('completed')) { + achievement3.classList.add('completed'); + achievement3.textContent = 'beep thing XD'; + showPopup('Achievement Complete: beep thing XD'); + } + saveGame(); } @@ -315,6 +329,8 @@