소스 검색

Added difficulty settings, hooked up cooldowns

tags/v0.7.1
Fen Dweller 7 년 전
부모
커밋
c43ee86531
2개의 변경된 파일25개의 추가작업 그리고 6개의 파일을 삭제
  1. +8
    -3
      game.js
  2. +17
    -3
      stroll.html

+ 8
- 3
game.js 파일 보기

@@ -4003,6 +4003,8 @@ function startGame(e) {
} }
} }


registerActions();

if (!macro.hasTail) { if (!macro.hasTail) {
macro.tailCount = 0; macro.tailCount = 0;
} }
@@ -4381,7 +4383,12 @@ function registerActions() {
buttons.forEach( function(button) { buttons.forEach( function(button) {
let name = button.id; let name = button.id;
name = name.replace(/button-action-/,""); name = name.replace(/button-action-/,"");
button.addEventListener("click", function() { window[name](); });
if (macro.difficulty > 0) {
button.addEventListener("click", function() { cooldown_start(name); window[name](); });
} else {
button.addEventListener("click", function() { window[name](); });
}

}); });
} }


@@ -4469,8 +4476,6 @@ window.addEventListener('load', function(event) {
element.addEventListener("click",actionTab); element.addEventListener("click",actionTab);
}); });


registerActions();

document.getElementById("button-look").addEventListener("click",look); document.getElementById("button-look").addEventListener("click",look);
document.getElementById("button-stroll").addEventListener("click",toggle_auto); document.getElementById("button-stroll").addEventListener("click",toggle_auto);
document.getElementById("button-numbers").addEventListener("click",toggle_numbers); document.getElementById("button-numbers").addEventListener("click",toggle_numbers);


+ 17
- 3
stroll.html 파일 보기

@@ -335,9 +335,7 @@
<div class="character-build" id="character-build-area"> <div class="character-build" id="character-build-area">
<p>Welcome to Stroll 0.7.0</p> <p>Welcome to Stroll 0.7.0</p>
<p><b>This game features 18+ content</b></p> <p><b>This game features 18+ content</b></p>
<p><a href="https://chemicalcrux.org/stroll">Changelog</a></p>
<p><a href="https://t.me/joinchat/BSXHzUZmSqc-CXB1khkuYw">Telegram discussion group</a></p>
<div><a href="https://discord.gg/7pdcVhD">Discord discussion group</a></div>
<p><a href="https://chemicalcrux.org/stroll">Changelog</a> - <a href="https://t.me/joinchat/BSXHzUZmSqc-CXB1khkuYw">Telegram</a> - <a href="https://discord.gg/7pdcVhD">Discord</a></p>


<p>Stroll is a text-based macro game. Stomp things, eat things, abuse things - then grow larger and do it all over again. </p> <p>Stroll is a text-based macro game. Stomp things, eat things, abuse things - then grow larger and do it all over again. </p>


@@ -448,6 +446,22 @@
</div> </div>
</div> </div>


<div class="custom-category">
<div class="custom-header-static">Difficulty</div>
<div>
<div>
<li>
<input autocomplete="off" type="radio" name="difficulty" checked="true" id="difficulty-0" value="0">
<label for="difficulty-0" class="has-tooltip" title="No restrictions">Sandbox</label>
</li>
<li>
<input autocomplete="off" type="radio" name="difficulty" id="difficulty-1" value="1">
<label for="difficulty-1" class="has-tooltip" title="Growth points required to get big, actions have cooldowns">Stompvival</label>
</li>
</div>
</div>
</div>

<div class="custom-category"> <div class="custom-category">
<div class="custom-header-static">Brutality</div> <div class="custom-header-static">Brutality</div>
<div> <div>


불러오는 중...
취소
저장