Pārlūkot izejas kodu

The player can now flee

tags/v0.2.8
Fen Dweller pirms 7 gadiem
vecāks
revīzija
e98cdf0598
2 mainītis faili ar 20 papildinājumiem un 0 dzēšanām
  1. +19
    -0
      combat.js
  2. +1
    -0
      vore.js

+ 19
- 0
combat.js Parādīt failu

@@ -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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt