diff --git a/combat.js b/combat.js index 254247a..b474651 100644 --- a/combat.js +++ b/combat.js @@ -223,6 +223,25 @@ function grappledReverse(attacker) { }; } +function flee(attacker) { + return { + name: "Flee", + desc: "Try to run away", + attack: function(defender) { + let success = statCheck(attacker, defender, "dex"); + if (success) { + attacker.grappled = false; + changeMode("explore"); + return "You successfully run away."; + } else { + return "You can't escape!"; + } + }, + requirements: [ + function(attacker, defender) { return isNormal(attacker) && !attacker.isGrappling; } + ] + }; +} function pass(attacker) { return { name: "Pass", diff --git a/vore.js b/vore.js index 9845ba2..ff90f7e 100644 --- a/vore.js +++ b/vore.js @@ -48,6 +48,7 @@ function Player(name = "Player") { this.attacks.push(new grappledStruggle(this)); this.attacks.push(new grappledReverse(this)); + this.attacks.push(new flee(this)); this.backupAttack = new pass(this); }