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

Added paw crush for geta

tags/v0.2.8
Fen Dweller пре 8 година
родитељ
комит
799e4b0c9c
2 измењених фајлова са 49 додато и 2 уклоњено
  1. +48
    -1
      customs.js
  2. +1
    -1
      feast.js

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

@@ -15,6 +15,9 @@ function Geta() {
this.attacks.push(new getaSalivaSwallow(this)); this.attacks.push(new getaSalivaSwallow(this));
this.attacks.push(new getaSwallow(this)); this.attacks.push(new getaSwallow(this));


this.attacks.push(new getaStomp(this));
this.attacks.push(new getaStompFinish(this));

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


this.digests = []; this.digests = [];
@@ -50,10 +53,15 @@ function getaGrab(attacker) {
defender.flags.grappled = true; defender.flags.grappled = true;
return attacker.description() + " leans down and snatches you up, stuffing you into his maw."; return attacker.description() + " leans down and snatches you up, stuffing you into his maw.";
}, },
conditions: [
function(prefs) {
return prefs.player.prey;
}
],
requirements: [ requirements: [
function(attacker, defender) { function(attacker, defender) {
return isNormal(attacker) && defender.flags.shrunk == true && defender.flags.grappled != true; return isNormal(attacker) && defender.flags.shrunk == true && defender.flags.grappled != true;
}
},
], ],
priority: 2 priority: 2
}; };
@@ -119,6 +127,45 @@ function getaSwallow(attacker) {
}; };
} }


function getaStomp(attacker) {
return {
attackPlayer: function(defender) {
let success = statCheck(attacker, defender, "dex") || statCheck(attacker, defender, "dex") || defender.stamina == 0;
if (success) {
defender.health = Math.max(-100, defender.health - 50 - Math.round(Math.random() * 25));
defender.stamina = 0;
return attacker.description() + "'s paws comes crashing down on your little body, smashing you into the dirt.";
} else {
return "You dive away as " + attacker.description() + "'s paw slams down, narrowly missing your little body.";
}
},
requirements: [
function(attacker, defender) {
return isNormal(attacker) && defender.flags.shrunk == true && defender.flags.grappled != true;
}
],
priority: 2,
};
}

function getaStompFinish(attacker) {
return {
attackPlayer: function(defender) {
defender.health = -100;
return attacker.description() + " looms over your stunned body. You can only watch as his toes flex, squeeze...and come down hard. The fox's paw crushes you like an insect, tearing you open and spilling your guts across the dusty trail. He grinds you a few times more for good measure, leaving a disfigured, broken mess in your place.";
},
requirements: [
function(attacker, defender) {
return isNormal(attacker) && defender.flags.shrunk == true && defender.flags.grappled != true;
},
function(attacker, defender) {
return defender.stamina <= 0;
}
],
priority: 3,
};
}

function GetaObj() { function GetaObj() {
GameObject.call(this, "Geta"); GameObject.call(this, "Geta");
this.actions.push( { this.actions.push( {


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

@@ -395,7 +395,7 @@ function attackClicked(index) {
update([attack.attackPlayer(player)]); update([attack.attackPlayer(player)]);


if (player.health <= 0) { if (player.health <= 0) {
update(["You fall to the ground..."]);
update(["You die..."]);
if (prefs.player.prey) { if (prefs.player.prey) {
changeMode("eaten"); changeMode("eaten");
} else { } else {


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