diff --git a/combat.js b/combat.js index 5b98cc2..2b622bc 100644 --- a/combat.js +++ b/combat.js @@ -267,6 +267,24 @@ function shrunkSwallow(attacker) { }; } +function shrunkStomp(attacker) { + return { + name: "Stomp", + desc: "Stomp on your shrunken prey", + attack: function(defender) { + let success = statCheck(attacker, defender, "dex") || statCheck(attacker, defender, "dex") || defender.stamina == 0; + defender.stamina = 0; + defender.health = Math.max(0, defender.health - 50); + return "Your paw comes crashing down on " + defender.description("the") + ", burying them under your heavy toes and pinning them down hard."; + }, + requirements: [ + function(attacker, defender) { + return isNormal(attacker) && defender.flags.grappled != true && defender.flags.shrunk == true; + } + ] + }; +} + function flee(attacker) { return { name: "Flee", diff --git a/customs.js b/customs.js index 1f8e585..62ffb26 100644 --- a/customs.js +++ b/customs.js @@ -139,7 +139,7 @@ function getaStomp(attacker) { 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."; + return attacker.description() + "'s paw 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."; } diff --git a/dialog.js b/dialog.js index 0665334..4a77b45 100644 --- a/dialog.js +++ b/dialog.js @@ -4,6 +4,8 @@ function DialogNode() { this.text = "Foo bar baz."; this.hooks = []; + this.requirements = []; + this.visit = function() { for (let i=0; i result && test(player, currentFoe), true); let li = document.createElement("li"); let button = document.createElement("button"); button.classList.add("dialog-button"); button.innerHTML = currentDialog.choices[i].text; button.addEventListener("click", function() { dialogClicked(i); }); + if (!activated) { + button.classList.add("disabled-button"); + button.disabled = true; + } li.appendChild(button); list.appendChild(li); } @@ -416,7 +421,7 @@ function struggleClicked(index) { if (result.escape) { changeMode("explore"); } else { - let digest = pick(filterValid(currentFoe.digests, FurrentFoe, player), currentFoe, player); + let digest = pick(filterValid(currentFoe.digests, currentFoe, player), currentFoe, player); if (digest == null) { digest = currentFoe.backupDigest; diff --git a/vore.js b/vore.js index e70a891..f21a0c1 100644 --- a/vore.js +++ b/vore.js @@ -65,6 +65,7 @@ function Player(name = "Player") { this.attacks.push(new shrunkGrapple(this)); this.attacks.push(new shrunkSwallow(this)); + this.attacks.push(new shrunkStomp(this)); this.attacks.push(new flee(this));