Heroes on my map have a passive ability that gains levels when they cast other abilities, and to show the player the level of charges they have I am going to give them a +STR passive so their unit card has like +3 next to it so they see it's level 3 without looking at the ability tooltips.
The problem is this system seems to malfunction when it maxes out. The charges are supposed to max at +5 (ability level 6). It's tricky because I can't add levels to a +STR passive as it does not change the bonus value (a bug with item abilities?) So I have to have 6 different abilities for +0 thru +5. And I run a big If/Then/Else tree of
If current = 0, then make next = 1, else
If current = 1, then make next = 2, else
...
If current = 4, then make next = 5
But when I cast a spell at +5, the +STR resets to zero but the actualy passive ability does not.
I have to use a 0.00 second countdown because if I didn't, then the ability level changes BEFORE it takes effect.
The problem is this system seems to malfunction when it maxes out. The charges are supposed to max at +5 (ability level 6). It's tricky because I can't add levels to a +STR passive as it does not change the bonus value (a bug with item abilities?) So I have to have 6 different abilities for +0 thru +5. And I run a big If/Then/Else tree of
If current = 0, then make next = 1, else
If current = 1, then make next = 2, else
...
If current = 4, then make next = 5
But when I cast a spell at +5, the +STR resets to zero but the actualy passive ability does not.
I have to use a 0.00 second countdown because if I didn't, then the ability level changes BEFORE it takes effect.
-
Divine Light 1
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Unit-type of (Triggering unit)) Equal to Paladin
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Ability being cast) Equal to PAL-6 Divine Light
-
-



Then - Actions
-




Set temp_real = (135.00 + (Real((15 x (Level of (Ability being cast) for (Triggering unit))))))
-




Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + temp_real)
-




Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + temp_real)
-




Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
-




Special Effect - Destroy (Last created special effect)
-




Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
-




Special Effect - Destroy (Last created special effect)
-




Set temp_timer_ability = Passive Bonus (+0)
-




Set temp_timer_integer = 1
-
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Level of PAL-P Healing Presence for (Triggering unit)) Less than 6
-
-





Then - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Level of Passive Bonus (+1) for (Triggering unit)) Equal to 1
-
-







Then - Actions
-








Set temp_timer_ability = Passive Bonus (+2)
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Level of Passive Bonus (+2) for (Triggering unit)) Equal to 1
-
-









Then - Actions
-










Set temp_timer_ability = Passive Bonus (+3)
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(Level of Passive Bonus (+3) for (Triggering unit)) Equal to 1
-
-











Then - Actions
-












Set temp_timer_ability = Passive Bonus (+4)
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














(Level of Passive Bonus (+4) for (Triggering unit)) Equal to 1
-
-













Then - Actions
-














Set temp_timer_ability = Passive Bonus (+5)
-
-













Else - Actions
-














Set temp_timer_ability = Passive Bonus (+1)
-
-
-
-
-
-
-
-
-






Set temp_timer_integer = ((Level of PAL-P Healing Presence for (Triggering unit)) + 1)
-
-





Else - Actions
-






Set temp_timer_ability = Passive Bonus (+5)
-
-
-
-
-


Unit - Remove Passive Bonus (+1) from (Triggering unit)
-


Unit - Remove Passive Bonus (+2) from (Triggering unit)
-


Unit - Remove Passive Bonus (+3) from (Triggering unit)
-


Unit - Remove Passive Bonus (+4) from (Triggering unit)
-


Unit - Remove Passive Bonus (+5) from (Triggering unit)
-


Set temp_timer_unit = (Triggering unit)
-


Countdown Timer - Start T_PAL_HealingPresence as a One-shot timer that will expire in 0.00 seconds
-
-
-
Divine Light 2
-

Events
-


Time - T_PAL_HealingPresence expires
-
-

Conditions
-

Actions
-


Unit - Add temp_timer_ability to temp_timer_unit
-


Unit - Set level of PAL-6 Divine Light for temp_timer_unit to temp_timer_integer
-


Unit - Set level of PAL-P Healing Presence for temp_timer_unit to temp_timer_integer
-
-




