Sfoglia il codice sorgente

The player can now flee

tags/v0.2.8
Fen Dweller 7 anni fa
parent
commit
e98cdf0598
2 ha cambiato i file con 20 aggiunte e 0 eliminazioni
  1. +19
    -0
      combat.js
  2. +1
    -0
      vore.js

+ 19
- 0
combat.js Vedi File

@@ -223,6 +223,25 @@ function grappledReverse(attacker) {
};
}

function flee(attacker) {
return {
name: "Flee",
desc: "Try to run away",
attack: function(defender) {
let success = statCheck(attacker, defender, "dex");
if (success) {
attacker.grappled = false;
changeMode("explore");
return "You successfully run away.";
} else {
return "You can't escape!";
}
},
requirements: [
function(attacker, defender) { return isNormal(attacker) && !attacker.isGrappling; }
]
};
}
function pass(attacker) {
return {
name: "Pass",


+ 1
- 0
vore.js Vedi File

@@ -48,6 +48,7 @@ function Player(name = "Player") {

this.attacks.push(new grappledStruggle(this));
this.attacks.push(new grappledReverse(this));
this.attacks.push(new flee(this));

this.backupAttack = new pass(this);
}


Loading…
Annulla
Salva