Testing for Proficiency with any Martial Weapon
There are a few instances in tomorrow's Tasha's Cauldron of Everything where we'd want to test to see if the hero is proficient in any martial weapon. This would need to be tested in an eval script in some instances and as a pre-requisite in others.
Obviously testing to see if the Hero is proficient in all martial weapons is pretty simple, as we look for the wProfReq.Martial tag. But there are plenty of Heroes that have proficiency in just one or a handful of martial weapons. Is there an easier way to test this than what I have? And how can I do it as a prerequisite, if possible? Here's the eval script code I've come up with, though I haven't had a chance to test it out yet. Code:
~set up a variable EDIT: Would it be possible to do this in reverse? Take whatever WepProf.____ tags are on the hero, go to the Thing for that weapon, then test if that weapon is martial? How would I do that? |
Elemental Adept over in feats is a good thing to look at - it shows how to put a complex script/procedure like 5CHasSpell (located in the procedures validate .user file) into a pre-req as a validation step.
|
Following up on this, I did figure it out. Take a look at the bonus proficiencies of the Tasha's sidekicks to see how.
|
Quote:
hero.tagis[the tag for Martial Weapon Prof] <> 0 There should be a tag forwarded to the hero indicating proficiency with any martial weapon and an exprreq can easily pick that up. |
The issue was that I was looking for proficiency with any martial weapon, not all martial weapons. So if a hero was proficient with just one in particular but not all of them, they'd still be eligible for the thing.
EDIT: To clarify, I did also look for the overall Martial Weapon proficiency tag first. If that's found, the script ends and skips the steps to test for proficiency with individual martial weapons, to save all that processing. |
All times are GMT -8. The time now is 06:38 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.