• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Armor Mastery Class Ability

Lawful_g

Well-known member
At 4th level, the Knight gets an ability called Armor mastery, which lets him move at normal speed in medium and eventually heavy armors. This is what I have got so far, culled from the Mithril scripts and modified a bit.

Phase: First Priority: 11000
~ If we're medium armor, remove the speed penalty
var result as number
if (hero.tagis[mClass.Medium] <> 0) then
result = delete[mCategory.Slows]
endif

However, it is not functioning when I equip medium armor, obviously, so how do I fix it? Thanks for your help, as always.
 
Are you trying this on a class special? That may explain why it's not working. I think you need to delete the tag mCategory.Slows from the armor itself.
 
mCategory.Slows is on the armor. You're looking for the tag on the hero.

(note that for mithral armor, the material is added as a child of the armor, which is how its script can go directly to the parent item.)

Use a foreach loop to check every piece of armor.

It's not been mentioned in the documentation yet, but note the more efficient assign/delete statement they added an update or two ago.

Code:
   foreach pick in hero where "EquipType.Armor & mClass.Medium & mCategory.Slows"
      perform each.delete[mCategory.Slows]
   nexteach
 
Lawful_g wrote:
>
>
> At 4th level, the Knight gets an ability called Armor mastery, which
> lets him move at normal speed in medium and eventually heavy armors.
> This is what I have got so far, culled from the Mithril scripts and
> modified a bit.
>
> Phase: First Priority: 11000
> ~ If we're medium armor, remove the speed penalty
> var result as number
> if (hero.tagis[mClass.Medium] <> 0) then
> result = delete[mCategory.Slows]
> endif
>
> However, it is not functioning when I equip medium armor, obviously, so
> how do I fix it? Thanks for your help, as always.


This script should do the trick:

~ Medium armor doesn't Slow any more
foreach pick in hero where "mClass.Medium"
perform each.delete[mCategory.Slows]
nexteach

It goes through each piece of medium armor, and deletes the "slows" tag
from it.


Hope this helps,

--
Colen McAlister, colen@wolflair.com
 
Back
Top