浏览代码

Vore escape can return to combat. Added a subdue option for grappling

tags/v0.2.8
Fen Dweller 7 年前
父节点
当前提交
ec2813d2c5
共有 4 个文件被更改,包括 59 次插入7 次删除
  1. +21
    -0
      combat.js
  2. +3
    -1
      customs.js
  3. +3
    -1
      feast.js
  4. +32
    -5
      vore.js

+ 21
- 0
combat.js 查看文件

@@ -97,6 +97,26 @@ function grapple(attacker) {
};
}

function grappleSubdue(attacker) {
return {
name: "Subdue",
desc: "Try to subdue your opponent",
attack: function(defender) {
return ["You beat on " + defender.description("the") + " for " + attack(attacker, defender, attacker.str * 2) + " damage."];
},
attackPlayer: function(defender) {
return [attacker.description("The") + " beats you for " + attack(attacker, defender, attacker.str * 2) + " damage"];
},
requirements: [
function(attacker, defender) {
return isNormal(attacker) && isGrappled(defender);
}
],
priority: 1,
weight: function(attacker, defender) { return 1 - defender.health / defender.maxHealth; }
};
}

function grappleDevour(attacker) {
return {
name: "Devour",
@@ -128,6 +148,7 @@ function grappleDevour(attacker) {
function(attacker, defender) { return defender.prefs.prey; }
],
priority: 1,
weight: function(attacker, defender) { return defender.health / defender.maxHealth; }
};
}



+ 3
- 1
customs.js 查看文件

@@ -222,7 +222,9 @@ function Trance() {

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

this.attacks.push(new grappledReverse(this));
this.attacks.push(new grappledDevour(this));

this.backupAttack = new pass(this);
@@ -232,7 +234,7 @@ function Trance() {
this.digests.push(new digestPlayerStomach(this,50));
this.struggles = [];

this.struggles.push(new struggle(this));
this.struggles.push(new struggleStay(this));

this.startCombat = function() { return ["You yelp and turn around as hot breath spills over your shoulder. A massive sergal has crept up on you...and he looks <i>hungry</i>"]; };
this.digestFinish = function() { return ["The sergal's crushing guts reduce you to a pool of chyme..."]; };


+ 3
- 1
feast.js 查看文件

@@ -434,7 +434,9 @@ function struggleClicked(index) {

update([result.lines]);

if (result.escape) {
if (result.escape == "stay") {
changeMode("combat");
} else if (result.escape == "escape") {
changeMode("explore");
} else {
let digest = pick(filterValid(currentFoe.digests, currentFoe, player), currentFoe, player);


+ 32
- 5
vore.js 查看文件

@@ -65,6 +65,7 @@ function Player(name = "Player") {
this.attacks.push(new flankAttack(this));

this.attacks.push(new grapple(this));
this.attacks.push(new grappleSubdue(this));
this.attacks.push(new grappleDevour(this));
this.attacks.push(new grappleAnalVore(this));
this.attacks.push(new grappleRelease(this));
@@ -366,12 +367,12 @@ function plead(predator) {

if (escape) {
return {
"escape": escape,
"escape": "escape",
"lines": ["You plead for " + predator.description("the") + " to let you free, and they begrudingly agree, horking you up and leaving you shivering on the ground"]
};
} else {
return {
"escape": escape,
"escape": "stuck",
"lines": ["You plead with " + predator.description("the") + " to let you go, but they refuse."]
};
}
@@ -391,12 +392,12 @@ function struggle(predator) {

if (escape) {
return {
"escape": escape,
"escape": "escape",
"lines": ["You struggle and squirm, forcing " + predator.description("the") + " to hork you up. They groan and stumble away, exhausted by your efforts."]
};
} else {
return {
"escape": escape,
"escape": "stuck",
"lines": ["You squirm and writhe within " + predator.description("the") + " to no avail."]
};
}
@@ -404,13 +405,39 @@ function struggle(predator) {
};
}

function struggleStay(predator) {
return {
name: "Struggle",
desc: "Try to squirm free. More effective if you've hurt your predator.",
struggle: function(player) {
let escape = Math.random() > predator.health / predator.maxHealth && Math.random() < 0.33;
if (player.health <= 0) {
escape = escape && Math.random() < 0.25;
}

if (escape) {
return {
"escape": "stay",
"lines": ["You struggle and squirm, forcing " + predator.description("the") + " to hork you up. They're not done with you yet..."]
};
} else {
return {
"escape": "stuck",
"lines": ["You squirm and writhe within " + predator.description("the") + " to no avail."]
};
}
}
};
}


function rub(predator) {
return {
name: "Rub",
desc: "Rub rub rub",
struggle: function(player) {
return {
"escape": false,
"escape": "stuck",
"lines": ["You rub the walls of your predator's belly. At least " + predator.description("the") + " is getting something out of this."]
};
}


正在加载...
取消
保存