Can anyone help me with this spellbook ability I'm trying to trigger? I am trying to have a spellbook that has two passive abilities. The spellbook is a hero ability, primarily because I want to have the passives get stronger as the ability does. I have to triggers for this:
Sharingan
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Sharingan
Actions
Set Hero[2] = (Triggering unit)
Set BonusLevel = (Level of Sharingan for Hero[2])
Set Sharingan[2] = ((Level of Sharingan for Uchiha Avenger 0010 <gen>) x ((Random integer number between 2 and 4) + (Random integer number between 1 and (Level of Sharingan for Hero[2]))))
Set Sharingan[3] = ((Level of Sharingan for Uchiha Avenger 0010 <gen>) x ((Random integer number between 2 and 6) + (Random integer number between 2 and ((2 + (Level of Sharingan for Hero[2])) + 1))))
Trigger - Turn on Sharingan Bonus Level <gen>
Hero - Modify Strength of Hero[2]: Add (Sharingan[2] + 0)
Hero - Modify Agility of Hero[2]: Add (Sharingan[3] + 0)
Animation - Change Uchiha Avenger 0010 <gen>'s animation speed to 140.00% of its original speed
Wait 20.00 seconds
Hero - Modify Strength of Hero[2]: Subtract (Sharingan[2] + 0)
Hero - Modify Agility of Hero[2]: Subtract (Sharingan[3] + 0)
Animation - Change Uchiha Avenger 0010 <gen>'s animation speed to 100.00% of its original speed
Player - Enable Sharingan Bonus for (Owner of Uchiha Avenger 0010 <gen>)
Unit - Remove Sharingan Bonus from Hero[2]
The trigger that is turned on by this one:
Sharingan Bonus Level
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BonusLevel Greater than or equal to 2
Then - Actions
Unit - Increase level of Sharingan Bonus for Hero[2]
Set BonusLevel = (BonusLevel - 2)
Else - Actions
Player - Disable Sharingan Bonus for (Owner of Uchiha Avenger 0010 <gen>)
Trigger - Turn off (This trigger)
Sharingan
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Sharingan
Actions
Set Hero[2] = (Triggering unit)
Set BonusLevel = (Level of Sharingan for Hero[2])
Set Sharingan[2] = ((Level of Sharingan for Uchiha Avenger 0010 <gen>) x ((Random integer number between 2 and 4) + (Random integer number between 1 and (Level of Sharingan for Hero[2]))))
Set Sharingan[3] = ((Level of Sharingan for Uchiha Avenger 0010 <gen>) x ((Random integer number between 2 and 6) + (Random integer number between 2 and ((2 + (Level of Sharingan for Hero[2])) + 1))))
Trigger - Turn on Sharingan Bonus Level <gen>
Hero - Modify Strength of Hero[2]: Add (Sharingan[2] + 0)
Hero - Modify Agility of Hero[2]: Add (Sharingan[3] + 0)
Animation - Change Uchiha Avenger 0010 <gen>'s animation speed to 140.00% of its original speed
Wait 20.00 seconds
Hero - Modify Strength of Hero[2]: Subtract (Sharingan[2] + 0)
Hero - Modify Agility of Hero[2]: Subtract (Sharingan[3] + 0)
Animation - Change Uchiha Avenger 0010 <gen>'s animation speed to 100.00% of its original speed
Player - Enable Sharingan Bonus for (Owner of Uchiha Avenger 0010 <gen>)
Unit - Remove Sharingan Bonus from Hero[2]
The trigger that is turned on by this one:
Sharingan Bonus Level
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BonusLevel Greater than or equal to 2
Then - Actions
Unit - Increase level of Sharingan Bonus for Hero[2]
Set BonusLevel = (BonusLevel - 2)
Else - Actions
Player - Disable Sharingan Bonus for (Owner of Uchiha Avenger 0010 <gen>)
Trigger - Turn off (This trigger)