Igor_Z
You can change this now in User CP.
- Reaction score
- 61
Hey guys i made some triggers about a spell that the hero has a chance to do 1 cleaving attack but i dunno where to add the actions to remove the spellbook. Can some 1 tell me?
Code:
Cleaving Strike Damage source add
Events
Unit - A unit Is attacked
Conditions
Actions
Set Cleaving_Strike_Units[1] = (Attacking unit)
Set Cleaving_Strike_Units[2] = (Attacked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Cleaving Strike for Cleaving_Strike_Units[1]) Greater than 0
(Cleaving_Strike_Units[2] is in Cleaving_Strike_Group) Equal to False
Then - Actions
Unit Group - Add Cleaving_Strike_Units[2] to Cleaving_Strike_Group
Trigger - Add to Cleaving Strike Doing 1 <gen> the event (Unit - Cleaving_Strike_Units[2] Takes damage)
Trigger - Add to Cleaving Strike Doing 2 <gen> the event (Unit - Cleaving_Strike_Units[2] Takes damage)
Else - Actions
Code:
Cleaving Strike Doing 1
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Less than or equal to (5 + (5 x (Level of Cleaving Strike for Cleaving_Strike_Units[1])))
Then - Actions
Unit - Add Spell Book (Cleaving Strike) to Cleaving_Strike_Units[1]
Unit - Set level of Spell Book (Cleaving Strike) for Cleaving_Strike_Units[1] to (Level of Cleaving Strike for Cleaving_Strike_Units[1])
Player - Disable Spell Book (Cleaving Strike) for (Owner of Cleaving_Strike_Units[1])
Trigger - Turn on Cleaving Strike Doing 2 <gen>
Else - Actions