소스 검색

Let the player run away from the anaconda

tags/v0.2.9
Fen Dweller 5 년 전
부모
커밋
470067a01b
1개의 변경된 파일24개의 추가작업 그리고 0개의 파일을 삭제
  1. +24
    -0
      forest.js

+ 24
- 0
forest.js 파일 보기

@@ -766,4 +766,28 @@ function Anaconda() {
};
}
);
this.playerAttacks.push(
function(attacker) {
return {
name: "Flee",
desc: "Try to run away",
attack: function(defender) {
let success = statCheck(attacker, defender, "dex");
if (success) {
attacker.changeStamina(-25);
attacker.clear();
changeMode("explore");
return ["You successfully run away."];
} else {
attacker.changeStamina(-25);
defender.changeStamina(-25);
return ["You can't escape!"];
}
},
requirements: [
function(attacker, defender) { return defender.flags.state == "combat"; }
]
}
});
}

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