I am trying to make a list of attacks/weapons targeted by an ability with Target.xs tags (x is the id of the weapon).
I can do this for all weapons easily enough, except for the weapons Other Melee and Other Ranged I want the list to show its livename not "Other Melee Weapon" or "Other Ranged Weapon"
For example, if the ability was the tags Target.wBite and Target.wOtherMel (with the other melee having the livename 'Touch') I want the ability to list the weapons as Bite or Touch, not Bite or Other Melee Weapon.
Here is the code I have so far:
I can do this for all weapons easily enough, except for the weapons Other Melee and Other Ranged I want the list to show its livename not "Other Melee Weapon" or "Other Ranged Weapon"
For example, if the ability was the tags Target.wBite and Target.wOtherMel (with the other melee having the livename 'Touch') I want the ability to list the weapons as Bite or Touch, not Bite or Other Melee Weapon.
Here is the code I have so far:
Code:
~ list attacks
~ parse list going though each one
var lstCnt as number
lstCnt = tagcount[Target.?]
if (lstCnt =0) then
disDesc &= field[livename].text
elseif (lstCnt = 1) then
disDesc &= tagnames[Target.?,""]
elseif (lstCnt = 2) then
disDesc &= tagnames[Target.?," or "]
else
var lst as string
lst = tagnames[Target.?,", or "]
lst = replace(lst,", or ",", ",lstCnt-2)
disDesc &= lst
endif