Преглед изворни кода

Added Trance. More stuff for Fen. start/finish text per enemy

tags/v0.2.8
Fen Dweller пре 7 година
родитељ
комит
17d7cd865e
5 измењених фајлова са 61 додато и 4 уклоњено
  1. +23
    -1
      combat.js
  2. +29
    -0
      customs.js
  3. +2
    -2
      feast.js
  4. +1
    -1
      objects.js
  5. +6
    -0
      vore.js

+ 23
- 1
combat.js Прегледај датотеку

@@ -131,6 +131,28 @@ function grappleDevour(attacker) {
};
}

function grappledDevour(attacker) {
return {
name: "Devour",
desc: "Try to consume your grappling opponent",
attackPlayer: function(defender) {
let success = statHealthCheck(attacker, defender, "str");
if(success) {
defender.flags.grappled = false;
changeMode("eaten");
return [attacker.description("The") + " breaks your pin and crams your upper body into their maw, swallowing you down in seconds."];
} else {
return [attacker.description("The") + " thrashes at you in an attempt to devour you, but you avoid their jaws."];
}
}, requirements: [
function(attacker, defender) { return isGrappled(attacker) && isNormal(defender) && attacker.flags.shrunk != true; }
], conditions: [
function(attacker, defender) { return defender.prefs.prey; }
],
priority: 1,
};
}

function grappleAnalVore(attacker) {
return {
name: "Anal Vore",
@@ -332,7 +354,7 @@ function devourPlayer(attacker) {
],
attackPlayer: function(defender) {
changeMode("eaten");
return ["The voracious " + attacker.description() + " pins you down and devours you in seconds."];
return ["The voracious " + attacker.description() + " pins you down, his slimy maw spreading wide and engulfing your upper body with ease. He swallows and shoves you deeper, cramming your succulent frame into churning, crushing depths in seconds. A lazy, drawn-out <i>belch</i> escapes his gullet, his hunger briefly sated...and your existence now in inescapable peril."];
},
priority: 1,
};


+ 29
- 0
customs.js Прегледај датотеку

@@ -208,3 +208,32 @@ function GetaDialog() {
this.addChoice("Leave him be", nodeIgnore);
}
}

/* TRANCE */

function Trance() {
Creature.call(this, "Trance", 20, 15, 20);

this.hasName = true;

this.description = function() { return "Trance"; };

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

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

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

this.backupAttack = new pass(this);

this.digests = [];

this.digests.push(new digestPlayerStomach(this,50));
this.struggles = [];

this.struggles.push(new struggle(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..."]; };
}

+ 2
- 2
feast.js Прегледај датотеку

@@ -391,7 +391,7 @@ function respawn(respawnRoom) {
function startCombat(opponent) {
currentFoe = opponent;
changeMode("combat");
update(["Oh shit it's " + opponent.description("a")]);
update(opponent.startCombat());
}

function attackClicked(index) {
@@ -446,7 +446,7 @@ function struggleClicked(index) {
update([digest.digest(player)]);

if (player.health <= -100) {
update(["You digest in the depths of " + currentFoe.description("the")]);
update(currentFoe.finishDigest());
respawn(respawnRoom);
}
}


+ 1
- 1
objects.js Прегледај датотеку

@@ -138,7 +138,7 @@ function WildernessExplore(natureTrail) {
if (outcome < 0.25) {
moveToByName("Nature Trail", "You find your way back");
} else if (outcome < 0.5) {
startCombat(new Anthro());
startCombat(new Trance());
} else {
update(["You wander around for a bit, but haven't found anything."]);
}


+ 6
- 0
vore.js Прегледај датотеку

@@ -46,6 +46,12 @@ function Creature(name = "Creature", str=10, dex=10, con=10) {
};

this.cash = Math.floor(Math.random() * 10 + 5);

this.text = {};

this.startCombat = function() { return [this.description("A") + " appears. It's a fight!"]; };

this.finishDigest = function() { return [this.description("The") + " digests you..."]; };
}

function Player(name = "Player") {


Loading…
Откажи
Сачувај