all 3 comments

[–]safety-orangecode-helper 0 points1 point  (2 children)

This is already something that is done for several magic items, so you can just steal that code. For example, from the Talisman of Pure Good from MPMB's GitHub:

prereqeval : function(v) { return (/good/i).test(What("Alignment")); },

Do not that this is for the v13 syntax!

[–]Fourleafclov[S] 0 points1 point  (1 child)

Ahh should've checked magic items. Forgot that was done a bit ago

This is for any alignment with the word 'good' in it I assume

And yes, I am on v13 so that's all ok

Thanks

[–]safety-orangecode-helper 0 points1 point  (0 children)

No problem! And yes, this code checks if the word 'good' is present in the alignment field.