Explorar el Código

The player can now flee

tags/v0.2.8
Fen Dweller hace 7 años
padre
commit
e98cdf0598
Se han modificado 2 ficheros con 20 adiciones y 0 borrados
  1. +19
    -0
      combat.js
  2. +1
    -0
      vore.js

+ 19
- 0
combat.js Ver fichero

@@ -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 Ver fichero

@@ -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);
}


Cargando…
Cancelar
Guardar