Pārlūkot izejas kodu

Added a way to struggle out of a grapple

tags/v0.2.8
Fen Dweller pirms 7 gadiem
vecāks
revīzija
0b9169035d
3 mainītis faili ar 35 papildinājumiem un 3 dzēšanām
  1. +28
    -0
      combat.js
  2. +1
    -1
      feast.html
  3. +6
    -2
      vore.js

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

@@ -115,6 +115,34 @@ function grappleRelease(attacker) {
}; };
} }


function grappledStruggle(attacker) {
return {
name: "Struggle",
desc: "Try to break your opponent's pin",
attack: function(defender) {
let success = Math.random() < 0.5 + (1 - defender.health / defender.maxHealth)*0.5;
if (success) {
attacker.grappled = false;
return "You struggle and shove the " + defender.description() + " off of you.";
} else {
return "You struggle, but to no avail.";
}
},
attackPlayer: function(defender) {
let success = Math.random() < 0.5 + (1 - defender.health / defender.maxHealth)*0.5 && Math.random() < 0.5;
if (success) {
attacker.grappled = false;
return "Your prey shoves you back, breaking your grapple!";
} else {
return "Your prey squirms, but remains pinned.";
}
},
requirements: [
function(attacker, defender) { return isGrappled(attacker) && isNormal(defender); }
]
};
}

function pass(attacker) { function pass(attacker) {
return { return {
name: "Pass", name: "Pass",


+ 1
- 1
feast.html Parādīt failu

@@ -24,7 +24,7 @@
<div id="game"> <div id="game">
<div id="game-and-stats"> <div id="game-and-stats">
<div id="log"> <div id="log">
Welcome to Feast v0.0.3
Welcome to Feast v0.0.4
</div> </div>
<div id="stats"> <div id="stats">
<div class="stat-line" id="time">Time: to get a watch</div> <div class="stat-line" id="time">Time: to get a watch</div>


+ 6
- 2
vore.js Parādīt failu

@@ -29,11 +29,13 @@ function Player(name = "Player") {


this.attacks.push(new punchAttack(this)); this.attacks.push(new punchAttack(this));
this.attacks.push(new flankAttack(this)); this.attacks.push(new flankAttack(this));
this.attacks.push(new grapple(this));


this.attacks.push(new grapple(this));
this.attacks.push(new grappleDevour(this)); this.attacks.push(new grappleDevour(this));
this.attacks.push(new grappleRelease(this)); this.attacks.push(new grappleRelease(this));


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

this.backupAttack = new pass(this); this.backupAttack = new pass(this);
this.str = 15; this.str = 15;
this.dex = 15; this.dex = 15;
@@ -58,10 +60,12 @@ function Anthro() {


this.attacks.push(new punchAttack(this)); this.attacks.push(new punchAttack(this));
this.attacks.push(new flankAttack(this)); this.attacks.push(new flankAttack(this));
this.attacks.push(new grapple(this));


this.attacks.push(new grapple(this));
this.attacks.push(new grappleDevour(this)); this.attacks.push(new grappleDevour(this));


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

this.backupAttack = new pass(this); this.backupAttack = new pass(this);


this.struggles = []; this.struggles = [];


Notiek ielāde…
Atcelt
Saglabāt