forked from phenom/healer-man
fix: preserve broad target-state talent scopes (#20)
This commit is contained in:
1 parent
b3e0445e9c
commit
6a716fb8ca
2 files changed
+25
-1
No files matched your search
@@ -451,7 +451,11 @@ export interface TalentModifierContext {
|
||||
|
||||
function namedModifierTarget(scope: string): string | undefined {
|
||||
const scopeWithoutAmount = scope.replace(/\s+by\s+-?\d+(?:\.\d+)?\s*(?:%|secs?)(?:\s*[.!?])?$/i, "");
|
||||
const target = scopeWithoutAmount.match(/\b(?:of|on|with|for|to)\s+(?:your\s+)?([^,.!?]+)$/)?.[1]?.trim();
|
||||
// These are the source tooltip forms used for named abilities (for example,
|
||||
// "cooldown on Death and Decay" and "damage of your Fire Blast"). Other
|
||||
// prepositions can describe a target condition instead, as in "damage
|
||||
// caused to that target", and must leave the modifier broadly applicable.
|
||||
const target = scopeWithoutAmount.match(/\b(?:of|on)\s+(?:your\s+)?([^,.!?]+)$/)?.[1]?.trim();
|
||||
if (!target) return undefined;
|
||||
|
||||
// Generic descriptors describe a category of spells, effects, or targets.
|
||||
|
||||
Reference in new issue
Block a user