浏览代码

Added a way to struggle out of a grapple

tags/v0.2.8
Fen Dweller 7 年前
父节点
当前提交
0b9169035d
共有 3 个文件被更改,包括 35 次插入3 次删除
  1. +28
    -0
      combat.js
  2. +1
    -1
      feast.html
  3. +6
    -2
      vore.js

+ 28
- 0
combat.js 查看文件

@@ -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) {
return {
name: "Pass",


+ 1
- 1
feast.html 查看文件

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


+ 6
- 2
vore.js 查看文件

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

this.attacks.push(new punchAttack(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 grappleRelease(this));

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

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

this.attacks.push(new punchAttack(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 grappledStruggle(this));

this.backupAttack = new pass(this);

this.struggles = [];


正在加载...
取消
保存