Sfoglia il codice sorgente

Let the player run away from the anaconda

tags/v0.2.9
Fen Dweller 5 anni fa
parent
commit
470067a01b
1 ha cambiato i file con 24 aggiunte e 0 eliminazioni
  1. +24
    -0
      forest.js

+ 24
- 0
forest.js Vedi File

@@ -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…
Annulla
Salva