瀏覽代碼

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"; }
]
}
});
}

Loading…
取消
儲存