From 82614745f03765d52eb42bb1acb33737e2ec023a Mon Sep 17 00:00:00 2001 From: James Heston Date: Sat, 15 Jun 2019 09:40:59 -0400 Subject: [PATCH] Added target.isNpc check before !target.hasBehavior("combat") check inside Combat.js:findCombatant() to make PvP work again. Before, when trying to attack another player, even when both had meta.pvp = true set, you would only get the message "They aren't here," and combat wouldn't initiate. --- lib/Combat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Combat.js b/lib/Combat.js index 9593fb1..0fb8ce4 100644 --- a/lib/Combat.js +++ b/lib/Combat.js @@ -176,7 +176,7 @@ class Combat { throw new CombatErrors.CombatSelfError("You smack yourself in the face. Ouch!"); } - if (!target.hasBehavior('combat')) { + if (target.isNpc && !target.hasBehavior('combat')) { throw new CombatErrors.CombatPacifistError(`${target.name} is a pacifist and will not fight you.`, target); }