From 6614a502c22745703786c464a1626975bc2578ee Mon Sep 17 00:00:00 2001 From: Alexei Frolov Date: Sun, 25 Oct 2026 14:12:13 -0700 Subject: [PATCH] Treat empty list of attacks as "any weapon" In attack definitions, updates the plugin to allow any weapon to match an attack if its weaponIds list is empty. --- src/main/java/io/blert/core/AttackDefinition.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/blert/core/AttackDefinition.java b/src/main/java/io/blert/core/AttackDefinition.java index 2117032..49614ca 100644 --- a/src/main/java/io/blert/core/AttackDefinition.java +++ b/src/main/java/io/blert/core/AttackDefinition.java @@ -82,7 +82,7 @@ public enum Category { private final String name; /** - * Item IDs that can perform this attack. + * Item IDs that can perform this attack. If empty, any weapon can perform it. */ private final int[] weaponIds; @@ -158,6 +158,10 @@ public boolean is(int attackId) { * Returns whether this attack can be performed with the given weapon. */ public boolean hasWeapon(int weaponId) { + if (weaponIds.length == 0) { + // Accepts any weapon. + return true; + } for (int wid : weaponIds) { if (wid == weaponId) { return true;