mysurvive / pf2e-thaum-vuln

Improvement for Thaumaturge Exploit Vulnerability
MIT License
10 stars 11 forks source link

Fix for mortal weakness when sourceId of target is null #141

Closed xyzzy42 closed 3 months ago

xyzzy42 commented 3 months ago

I don't know why it happens, but sometimes the sourceId for an token.actor will be null. I don't think it has anything to do with the EV module.

But if one exploits mortal weakness on a target token with a null sourceId, it will think all tokens with a null sourceId are the same type.

Change the logic to not match if the sourceId is null.

Also add a match if the prototypeToken name is the same. This does work even if the actor name has been changed via Token Mold.

mysurvive commented 3 months ago

I vaguely remember this coming up previously in a much earlier release. Completely forgot about it until you said something about it.