dartnet wrote:
>
>
> How do you set up a prereq that is:
>
> Race: Elf or Dwarf
The Dwarf and Elf races assign tags to the hero when they're present.
The tags are Race.Elf and Race.Dwarf. To check for those tags in a
prereq, you'd do this:
if (tagis[Race.Elf] <> 0) then
@valid = 1
endif
if (tagis[Race.Dwarf] <> 0) then
@valid = 1
endif
The first 'if' statement checks for the elf tag - the second checks for
the dwarf tag. If either is present, the validity is set to 1.
A shorter (but perhaps less clear) version of the same thing would be:
@valid = tagis[Race.Elf] + tagis[Race.Dwarf]
This works because tagis returns 1 if a tag is found, and 0 otherwise.
So if the "Elf" tag is present, this translates into:
@valid = 1 + 0
or simply
@valid = 1
Hope this helps,
--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/