소스 검색

Add magic to pause digestion

master
Fen Dweller 5 년 전
부모
커밋
8ac42dc5f8
No known key found for this signature in database GPG 키 ID: E80B35A6F11C3656
2개의 변경된 파일31개의 추가작업 그리고 0개의 파일을 삭제
  1. +12
    -0
      features.js
  2. +19
    -0
      game.js

+ 12
- 0
features.js 파일 보기

@@ -469,6 +469,10 @@ const panels = {
{
"name": "Fast Digestion",
"target": "magic_fast_digestion"
},
{
"name": "Pause Digestion",
"target": "magic_pause_digestion"
}
]
},
@@ -2105,6 +2109,14 @@ options = [
"default": true,
"tooltip": "Fast Digestion allows you to speed up your digestion for a short duration."
},
{
"name": "Pause digestion",
"id": "magicPauseDigestion",
"type": "checkbox",
"buttons": ["magic_pause_digestion"],
"default": true,
"tooltip": "Pause Digestion allows you to halt digestion until you cast it again."
}
]
},
{


+ 19
- 0
game.js 파일 보기

@@ -70,6 +70,7 @@ let macro = //macro controls every customizable part of the players body
"shrunkPrey": null,
"fastDigestFactor": 1,
"fastDigestTimer": null,
"pauseDigest": false,
"walkSpeed": 1,

"growthPoints": 0,
@@ -560,6 +561,10 @@ let macro = //macro controls every customizable part of the players body
setTimeout(function() { owner.digest(owner, organ, time); }, time * 1000 / organ.stages / macro.fastDigestFactor);
}

if (macro.pauseDigest) {
return;
}

let count = Math.min(organ.contents.length, organ.maxDigest);

let container = organ.contents.pop();
@@ -4329,6 +4334,20 @@ function magic_fast_digestion()
update([line, newline]);
}

function magic_pause_digestion()
{
let line;

if (macro.pauseDigest) {
line = "You end the spell, and your body resumes its work.";
} else {
line = "Your magic halts your digestive processes.";
}

macro.pauseDigest = !macro.pauseDigest;

update([line, newline]);
}
function wings_flap()
{
let area = macro.wingArea * 2;


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