huntercc wrote:
>
>
> I almost have the first one working (shocker lizard). I only have two
> questions:
>
> 1) What's the best way to determine that the active hero is actually
> somebody's arcane familiar? What I've done is look for existence of the
> Hero.NoAdvance tag. I doubt this is correct, but it appears to work.
The best way is to test for the "CompIs.cArcFamil" on the hero. That tag
will only be present if you're an arcane familiar, not if you're an
animal companion or something similar.
> 2) How do you determine how many Arcane Spellcaster Levels a hero has? I
> mean actual class levels, not spell levels. For example, if I had some
> wacky combination of Wiz1/Sor1/Clr1 that would be two arcane spellcaster
> levels.
You'd need to go through all the classes on the hero and count how many
of them are arcane spellcasters. For example:
~ We start with 0 arcane spellcaster levels
var total as number
total = 0
~ Go through all classes on the hero that are arcane spellcasters
foreach pick in hero where "component.BaseClHelp & CasterSrc.Arcane"
~ Add this classes number of levels to our total
total += each.field[cMagicLev].value
~ Go on to our next class
nexteach
Hope this helps,
--
Colen McAlister,
colen@wolflair.com
Chief Engineer, Lone Wolf Development