For some reason the ai sometimes use spells (some heroes) sometimes don't (some others) at all. I already made sure the spell action is correct.
-
AILearnSpells
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


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



If - Conditions
-




(Unit-type of protagonist[2]) Equal to Gawain
-
-



Then - Actions
-




Hero - Learn skill for protagonist[2]: Lightfall
-




Hero - Learn skill for protagonist[2]: Arc Light
-




Hero - Learn skill for protagonist[2]: Divine Halo
-




Hero - Learn skill for protagonist[2]: Attribute Bonus
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of protagonist[2]) Equal to Gilgamesh
-
-



Then - Actions
-




Hero - Learn skill for protagonist[2]: Holy Bolt
-




Hero - Learn skill for protagonist[2]: Pierce
-




Hero - Learn skill for protagonist[2]: Holy Judgement
-




Hero - Learn skill for protagonist[2]: Attribute Bonus
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of protagonist[2]) Equal to Golden Princess
-
-



Then - Actions
-




Hero - Learn skill for protagonist[2]: Jump
-




Hero - Learn skill for protagonist[2]: Telekinesis (GUI)
-




Hero - Learn skill for protagonist[2]: Telekinetic
-




Hero - Learn skill for protagonist[2]: Attribute Bonus
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of protagonist[2]) Equal to Ruler
-
-



Then - Actions
-




Hero - Learn skill for protagonist[2]: Restoration Field
-




Hero - Learn skill for protagonist[2]: Divine Protection
-




Hero - Learn skill for protagonist[2]: Holy Shockwave
-




Hero - Learn skill for protagonist[2]: Attribute Bonus
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of protagonist[2]) Equal to Saber
-
-



Then - Actions
-




Hero - Learn skill for protagonist[2]: Omnislash
-




Hero - Learn skill for protagonist[2]: Holy Nova
-




Hero - Learn skill for protagonist[2]: Holy Dragging Spell
-




Hero - Learn skill for protagonist[2]: Attribute Bonus
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of protagonist[2]) Equal to Saber Lily
-
-



Then - Actions
-




Hero - Learn skill for protagonist[2]: Celestial Beam
-




Hero - Learn skill for protagonist[2]: Holy Cross
-




Hero - Learn skill for protagonist[2]: Aura
-




Hero - Learn skill for protagonist[2]: Attribute Bonus
-
-



Else - Actions
-
-


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



If - Conditions
-




(Unit-type of protagonist[2]) Equal to Saber Nero
-
-



Then - Actions
-




Hero - Learn skill for protagonist[2]: Volatile Light
-




Hero - Learn skill for protagonist[2]: Assassinate
-




Hero - Learn skill for protagonist[2]: Holy Domination
-




Hero - Learn skill for protagonist[2]: Attribute Bonus
-
-



Else - Actions
-
-
-
-
RandomAISpellChance
-

Events
-


Time - Every 10.00 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer number[10]) from 1 to 3, do (Actions)
-



Loop - Actions
-




Set randomspellchance[number[10]] = (Random integer number between 1 and 100)
-
-
-
-
-
AllyUseSpells
-

Events
-


Time - Every 10.00 seconds of game time
-
-

Conditions
-

Actions
-


Custom script: set udg_temporarygroups[1] = CreateGroup()
-


Set temporarygroups[1] = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
-


Unit Group - Pick every unit in temporarygroups[1] and do (Actions)
-



Loop - Actions
-




Set pickedloc[1] = (Position of protagonist[2])
-




Set pickedloc[2] = (Position of (Picked unit))
-




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





If - Conditions
-






(Unit-type of protagonist[2]) Equal to Gawain
-






((Picked unit) is alive) Equal to True
-






(Distance between pickedloc[1] and pickedloc[2]) Less than or equal to 300.00
-
-





Then - Actions
-






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







If - Conditions
-








randomspellchance[1] Less than 50
-
-







Then - Actions
-








Unit - Order protagonist[2] to Human Dragonhawk Rider - Cloud pickedloc[2]
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 50
-
-







Then - Actions
-








Unit - Order protagonist[2] to Night Elf Warden - Fan Of Knives
-
-







Else - Actions
-
-
-





Else - Actions
-
-




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





If - Conditions
-






(Unit-type of protagonist[2]) Equal to Gilgamesh
-






((Picked unit) is alive) Equal to True
-






(Distance between pickedloc[1] and pickedloc[2]) Less than or equal to 300.00
-
-





Then - Actions
-






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







If - Conditions
-








randomspellchance[1] Less than 50
-
-







Then - Actions
-








Unit - Order protagonist[2] to Neutral Pandaren Brewmaster - Storm, Earth, And Fire
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 50
-
-







Then - Actions
-








Unit - Order protagonist[2] to Human Priest - Dispel (Picked unit)
-
-







Else - Actions
-
-
-





Else - Actions
-
-




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





If - Conditions
-






(Unit-type of protagonist[2]) Equal to Golden Princess
-






((Picked unit) is alive) Equal to True
-






(Distance between pickedloc[1] and pickedloc[2]) Less than or equal to 300.00
-
-





Then - Actions
-






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







If - Conditions
-








randomspellchance[1] Less than 33
-
-







Then - Actions
-








Unit - Order protagonist[2] to Neutral Pandaren Brewmaster - Breath Of Fire pickedloc[2]
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 33
-








randomspellchance[1] Less than 66
-
-







Then - Actions
-








Unit - Order protagonist[2] to Human Archmage - Blizzard pickedloc[2]
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 66
-








randomspellchance[1] Less than or equal to 100
-
-







Then - Actions
-








Unit - Order protagonist[2] to Night Elf Warden - Fan Of Knives
-
-







Else - Actions
-
-
-





Else - Actions
-
-




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





If - Conditions
-






(Unit-type of protagonist[2]) Equal to Ruler
-






((Picked unit) is alive) Equal to True
-






(Distance between pickedloc[1] and pickedloc[2]) Less than or equal to 300.00
-
-





Then - Actions
-






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







If - Conditions
-








randomspellchance[1] Less than 33
-
-







Then - Actions
-








Unit - Order protagonist[2] to Night Elf Druid Of The Claw - Roar
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 33
-








randomspellchance[1] Less than 66
-
-







Then - Actions
-








Unit - Order protagonist[2] to Neutral Tinker - Cluster Rockets pickedloc[2]
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 66
-








randomspellchance[1] Less than or equal to 100
-
-







Then - Actions
-








Unit - Order protagonist[2] to Human Mountain King - Thunder Clap
-
-







Else - Actions
-
-
-





Else - Actions
-
-




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





If - Conditions
-






(Unit-type of protagonist[2]) Equal to Saber
-






((Picked unit) is alive) Equal to True
-






(Distance between pickedloc[1] and pickedloc[2]) Less than or equal to 300.00
-
-





Then - Actions
-






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







If - Conditions
-








randomspellchance[1] Less than 33
-
-







Then - Actions
-








Unit - Order protagonist[2] to Undead Lich - Frost Nova (Picked unit)
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 33
-








randomspellchance[1] Less than 66
-
-







Then - Actions
-








Unit - Order protagonist[2] to Human Archmage - Blizzard pickedloc[2]
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 66
-








randomspellchance[1] Less than or equal to 100
-
-







Then - Actions
-








Unit - Order protagonist[2] to Orc Far Seer - Chain Lightning (Picked unit)
-
-







Else - Actions
-
-
-





Else - Actions
-
-




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





If - Conditions
-






(Unit-type of protagonist[2]) Equal to Saber Lily
-






((Picked unit) is alive) Equal to True
-






(Distance between pickedloc[1] and pickedloc[2]) Less than or equal to 300.00
-
-





Then - Actions
-






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







If - Conditions
-








randomspellchance[1] Less than 33
-
-







Then - Actions
-








Unit - Order protagonist[2] to Undead Crypt Lord - Impale (Picked unit)
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 33
-








randomspellchance[1] Less than 66
-
-







Then - Actions
-








Unit - Order protagonist[2] to Human Archmage - Blizzard pickedloc[2]
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 66
-








randomspellchance[1] Less than or equal to 100
-
-







Then - Actions
-








Unit - Order protagonist[2] to Orc Far Seer - Feral Spirit
-
-







Else - Actions
-
-
-





Else - Actions
-
-




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





If - Conditions
-






(Unit-type of protagonist[2]) Equal to Saber Nero
-






((Picked unit) is alive) Equal to True
-






(Distance between pickedloc[1] and pickedloc[2]) Less than or equal to 300.00
-
-





Then - Actions
-






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







If - Conditions
-








randomspellchance[1] Less than 33
-
-







Then - Actions
-








Unit - Order protagonist[2] to Orc Far Seer - Chain Lightning (Picked unit)
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 33
-








randomspellchance[1] Less than 66
-
-







Then - Actions
-








Unit - Order protagonist[2] to Neutral - Monsoon pickedloc[2]
-
-







Else - Actions
-
-






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







If - Conditions
-








randomspellchance[1] Greater than or equal to 66
-








randomspellchance[1] Less than or equal to 100
-
-







Then - Actions
-








Unit - Order protagonist[2] to Night Elf Priestess Of The Moon - Starfall
-
-







Else - Actions
-
-
-





Else - Actions
-
-
-
-


Custom script: call DestroyGroup(udg_temporarygroups[1])
-


Custom script: call RemoveLocation(udg_pickedloc[1])
-


Custom script: call RemoveLocation(udg_pickedloc[2])
-
-



