@@ -38,16 +38,15 @@ function Wolf() {
this.hasName = false;
this.description = function() { return "wolf"; };
this.description = function(prefix ) { return prefix + " wolf"; };
this.attacks = [];
this.attacks.push(wolfBite(this));
//this.attacks.push(wolfSwallow(this));
this.attacks.push(wolfHowl(this));
this.attacks.push(wolfTackle(this));
// this.attacks.push(wolfTackleBite(this));
this.attacks.push(wolfTackleBite(this));
this.attacks.push(wolfTackleSwallow(this));
this.attacks.push(wolfDigest(this));
@@ -57,15 +56,15 @@ function Wolf() {
this.flags.stage = "combat";
this.startCombat = function(player) {
return ["Oh no a feral wolf "];
return ["A snapping twig grabs your attention. You turn and find yourself facing a large, mangy wolf. The cur stands at least half your height at the shoulder, and it looks <i>hungry.</i> "];
};
this.finishCombat = function() {
return ["Oops eaten "];
return ["The wolf knocks you to the ground. You bash your head on a rock and black out. "];
};
this.status = function(player) {
return ["It's a wolf" ];
return [];
};
}
@@ -88,6 +87,26 @@ function wolfBite(attacker) {
};
}
function wolfHowl(attacker) {
return {
attackPlayer: function(defender){
attacker.statBuffs.push(new StatBuff("str", 1.25));
return ["The wolf backs up and lets out a long, wailing howl.",newline,"It seems emboldened."];
},
requirements: [
function(attacker, defender) {
return attacker.flags.stage == "combat";
},
function(attacker, defender) {
return !attacker.flags.grappled && !defender.flags.grappled;
}
],
priority: 1,
weight: function(attacker, defender) { return 0.25; }
};
}
function wolfTackle(attacker) {
return {
attackPlayer: function(defender){
@@ -107,6 +126,29 @@ function wolfTackle(attacker) {
};
}
function wolfTackleBite(attacker) {
return {
attackPlayer: function(defender){
let damage = attack(attacker, defender, attacker.str * 1.5);
return pickRandom([
["Pain shoots through your arm as the wolf bites it for " + damage + " damage!"],
["You struggle against the wolf as it bites your shoulder for " + damage + " damage."],
["The wolf's claws dig into your legs for " + damage + " damage."]
]);
},
requirements: [
function(attacker, defender) {
return attacker.flags.stage == "combat";
},
function(attacker, defender) {
return !attacker.flags.grappled && defender.flags.grappled;
}
],
priority: 1,
weight: function(attacker, defender) { return 1 + defender.health/defender.maxHealth; }
};
}
function wolfTackleSwallow(attacker) {
return {
attackPlayer: function(defender){