timers: Add Shadow Veil protection detection (#14687)

This commit is contained in:
ProjectileRage
2022-05-12 15:53:01 -07:00
committed by GitHub
parent 7cce1fc7c3
commit b2bdb0204b

View File

@@ -126,6 +126,7 @@ public class TimersPlugin extends Plugin
private static final String WARD_OF_ARCEUUS_MESSAGE = ">Your defence against Arceuus magic has been strengthened.</col>";
private static final String PICKPOCKET_FAILURE_MESSAGE = "You fail to pick the ";
private static final String DODGY_NECKLACE_PROTECTION_MESSAGE = "Your dodgy necklace protects you.";
private static final String SHADOW_VEIL_PROTECTION_MESSAGE = "Your attempt to steal goes unnoticed.";
private static final Pattern TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you(?: by .+)?\\. It will expire in (?<mins>\\d+) minutes?(?:, (?<secs>\\d+) seconds?)?\\.");
private static final Pattern DIVINE_POTION_PATTERN = Pattern.compile("You drink some of your divine (.+) potion\\.");
@@ -510,7 +511,7 @@ public class TimersPlugin extends Plugin
return;
}
if (message.contains(DODGY_NECKLACE_PROTECTION_MESSAGE))
if (message.contains(DODGY_NECKLACE_PROTECTION_MESSAGE) || message.contains(SHADOW_VEIL_PROTECTION_MESSAGE))
{
removeGameTimer(PICKPOCKET_STUN);
}