Battle Caster feat
I am trying to code the Battle Caster feat from COmplete Arcane and am not quite sure how to proceed.
I know how to detect iof a class has the ability to ignore spell failure from a specific class of armor, and I know how to adjust that for a specific class. The question I have is this: How do I detect, regardless of class, the highest level of armor the character can wear and still ignore spell failure, and how can I, again regardless of class, increase that? I understand logically how to do it Code:
[pseudocode] thanks! |
Remember to give full descriptions of what you're trying to enter does.
Battle caster requires the ability to ignore spell failure from a class of armor and increases the class of armor allowed. Okay, pulling out my copy of Complete Arcane, I don't actually understand how they intended the feat to work. If you were a warmage 8 (ignores medium armor) / bard 1 (ignores light armor) / sorcerer 1 (doesn't ignore armor, do you go up to heavy / medium / none respectively? Or do you pick one class for each time you choose the feat? First, note that you're looking at the hero to find the tags. That's actually incorrect, because the CastArmor tags stay on the Class Helper, and aren't forwarded to the hero (which is why my earlier example is processed correctly, with each class ignoring the right armor). Okay, if you're supposed to select a class to improve, you'll use: field[fChosen].chosen in place of childfound[classid] start by making sure the user chose something, and exit the script if they haven't (since this script will try to run as soon as they add the feat, before they've had a chance to select the class to apply it to): Code:
Code:
Now, for the second option - if the feat was intended to improve all classes with the ability to ignore armor: we're going to use a "foreach pick in hero" procedure, which searches everything attached to the character to find those things that match the tags you're looking for. the search expression that will find what we want is: "component.BaseClHelp & (CastArmor.Light | CastArmor.Medium)" that will find class helpers (which is what we want to modify), that can ignore either light or medium armor (why bother checking for the ones that have heavy armor - those don't need to be modified) Code:
|
Thanks! I suspect it is the second scenario, but I may do a bit of research on that. I will try this out and let you know what happens.
|
Worked perfectly with only one change. Had to call "perform" for the assign statements to keep the compiler from barfing on those lines.
Thanks for your help! |
All times are GMT -8. The time now is 12:08 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.