瀏覽代碼

Reduced stamina drain across the board

tags/v0.2.8
Fen Dweller 7 年之前
父節點
當前提交
55c8da7de3
共有 2 個檔案被更改,包括 21 行新增36 行删除
  1. +14
    -14
      combat.js
  2. +7
    -22
      customs.js

+ 14
- 14
combat.js 查看文件

@@ -245,26 +245,26 @@ function grappledStruggle(attacker) {
attack: function(defender) { attack: function(defender) {
let success = statHealthCheck(attacker, defender, "str"); let success = statHealthCheck(attacker, defender, "str");
if (success) { if (success) {
attacker.changeStamina(-25);
defender.changeStamina(-25);
attacker.changeStamina(-5);
defender.changeStamina(-10);
attacker.flags.grappled = false; attacker.flags.grappled = false;
return ["You struggle and shove " + defender.description("the") + " off of you."]; return ["You struggle and shove " + defender.description("the") + " off of you."];
} else { } else {
attacker.changeStamina(-25);
defender.changeStamina(-10);
attacker.changeStamina(-10);
defender.changeStamina(-5);
return ["You struggle, but to no avail."]; return ["You struggle, but to no avail."];
} }
}, },
attackPlayer: function(defender) { attackPlayer: function(defender) {
let success = statHealthCheck(attacker, defender, "str"); let success = statHealthCheck(attacker, defender, "str");
if (success) { if (success) {
attacker.changeStamina(-25);
defender.changeStamina(-25);
attacker.changeStamina(-5);
defender.changeStamina(-10);
attacker.flags.grappled = false; attacker.flags.grappled = false;
return ["Your prey shoves you back, breaking your grapple!"]; return ["Your prey shoves you back, breaking your grapple!"];
} else { } else {
attacker.changeStamina(-25);
defender.changeStamina(-10);
attacker.changeStamina(-10);
defender.changeStamina(-5);
return ["Your prey squirms, but remains pinned."]; return ["Your prey squirms, but remains pinned."];
} }
}, },
@@ -282,26 +282,26 @@ function grappledReverse(attacker) {
attack: function(defender) { attack: function(defender) {
let success = statHealthCheck(attacker, defender, "str"); let success = statHealthCheck(attacker, defender, "str");
if (success) { if (success) {
attacker.changeStamina(-25);
defender.changeStamina(-35);
attacker.changeStamina(-5);
defender.changeStamina(-15);
attacker.flags.grappled = false; attacker.flags.grappled = false;
defender.flags.grappled = true; defender.flags.grappled = true;
return ["You surprise " + defender.description("the") + " with a burst of strength, flipping them over and pinning them."]; return ["You surprise " + defender.description("the") + " with a burst of strength, flipping them over and pinning them."];
} else { } else {
attacker.changeStamina(-35);
attacker.changeStamina(-15);
return ["You try to throw your opponent off of you, but fail."]; return ["You try to throw your opponent off of you, but fail."];
} }
}, },
attackPlayer: function(defender) { attackPlayer: function(defender) {
let success = statHealthCheck(attacker, defender, "str"); let success = statHealthCheck(attacker, defender, "str");
if (success) { if (success) {
attacker.changeStamina(-25);
defender.changeStamina(-35);
attacker.changeStamina(-5);
defender.changeStamina(-15);
attacker.flags.grappled = false; attacker.flags.grappled = false;
defender.flags.grappled = true; defender.flags.grappled = true;
return ["Your prey suddenly grabs hold and flips you over, pinning you!"]; return ["Your prey suddenly grabs hold and flips you over, pinning you!"];
} else { } else {
attacker.changeStamina(-35);
attacker.changeStamina(-15);
return ["Your prey tries to grab at you, but you keep them under control."]; return ["Your prey tries to grab at you, but you keep them under control."];
} }
}, },


+ 7
- 22
customs.js 查看文件

@@ -1329,8 +1329,6 @@ function Lalim() {


this.attacks = []; this.attacks = [];


this.attacks.push(lalimContort(this));

this.attacks.push(lalimPin(this)); this.attacks.push(lalimPin(this));


this.attacks.push(lalimSwallow(this)); this.attacks.push(lalimSwallow(this));
@@ -1355,19 +1353,6 @@ function Lalim() {
this.prefs.prey = false; this.prefs.prey = false;
} }


function lalimContort(attacker) {
return {
attackPlayer: function(defender) {
defender.changeStamina(-30);
return ["Lalim leaps over your head, then contorts and lunges at you from behind. You leap out of the way, covering your face as he leaps past again. The effort exhausts you.."];
}, requirements: [
function(attacker, defender) { return isNormal(attacker) && isNormal(defender); }
],
priority: 1,
weight: function(attacker, defender) { return defender.stamina / defender.maxStamina; }
};
}

function lalimFeed(attacker) { function lalimFeed(attacker) {
return { return {
attackPlayer: function(defender) { attackPlayer: function(defender) {
@@ -1378,7 +1363,7 @@ function lalimFeed(attacker) {
function(attacker, defender) { return !attacker.flags.feeding && !attacker.flags.fed } function(attacker, defender) { return !attacker.flags.feeding && !attacker.flags.fed }
], ],
priority: 1, priority: 1,
weight: function(attacker, defender) { return 0.5; }
weight: function(attacker, defender) { return 0.5 + (5 - 5 * attacker.stamina / attacker.maxStamina); }
}; };
} }


@@ -1421,13 +1406,13 @@ function lalimPin(attacker) {
let success = statHealthCheck(attacker, defender, "dex"); let success = statHealthCheck(attacker, defender, "dex");


if (success) { if (success) {
attacker.changeStamina(-10);
defender.changeStamina(-25);
attacker.changeStamina(-5);
defender.changeStamina(-10);
defender.flags.grappled = true; defender.flags.grappled = true;
return ["Lalim lunges at you, knocking you to the floor. Before you can even land, his head and neck whip past; you land roughly on his translucent neck, swiftly finding yourself bound up by his slinky body."]; return ["Lalim lunges at you, knocking you to the floor. Before you can even land, his head and neck whip past; you land roughly on his translucent neck, swiftly finding yourself bound up by his slinky body."];
} else { } else {
attacker.changeStamina(-25);
defender.changeStamina(-15);
attacker.changeStamina(-15);
defender.changeStamina(-5);
return ["The beast leaps at you; you barely manage to avoid his massive frame, tumbling and stumbling back to your feet as he hisses and snarls."]; return ["The beast leaps at you; you barely manage to avoid his massive frame, tumbling and stumbling back to your feet as he hisses and snarls."];
} }
}, },
@@ -1445,7 +1430,7 @@ function lalimSwallow(attacker) {
let success = statHealthCheck(attacker, defender, "dex"); let success = statHealthCheck(attacker, defender, "dex");
if(success) { if(success) {
attacker.changeStamina(-5); attacker.changeStamina(-5);
defender.changeStamina(-15);
defender.changeStamina(-5);
defender.flags.grappled = false; defender.flags.grappled = false;
attacker.flags.stage = 1; attacker.flags.stage = 1;
changeMode("eaten"); changeMode("eaten");
@@ -1470,7 +1455,7 @@ function lalimPull(predator) {
digest: function(player) { digest: function(player) {
let success = statHealthCheck(predator, player, "dex"); let success = statHealthCheck(predator, player, "dex");
if (success) { if (success) {
player.changeStamina(-10);
player.changeStamina(-5);
predator.flags.stage += 1; predator.flags.stage += 1;


if (predator.flags.stage == 2) { if (predator.flags.stage == 2) {


Loading…
取消
儲存