HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell I need help with

02-01-2004, 06:09 AM#1
cool3qmr
I have a spell called axe mastery that when researched give a unit a bonus to damage. The catch is that the unit must have an axe in order to get the bonus. I use the system where every hero has strength as there primary attribute and i can easyily change there damage by adding to the primary attribute (Strength). What i need is how i can make sure the unit has the axe and if he does add extra strength points and if he doesnt do not add strength points.
02-01-2004, 06:27 AM#2
Alakafizz
Well, one way to do it is to base the skill on a self-only aura with no effect, and then:

Code:
str
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to [color=red]Axe[/color]
        ((Triggering unit) has buff [color=red]Self-only Aura[/color]) Equal to True
    Actions
        Hero - Modify Strength of (Triggering unit): Add 10

And the opposite when losing the item.
02-02-2004, 05:04 PM#3
TyRulz
Try using a variable like hasaxe.If the unit has an axe it becomes 1.if the unit loses the axe it becomes 0.while the variable is 1 the hero receives damage bonus.