Note: Custom describtion removed.
[trigger=MM Constants]MM Constants
Events
Map initialization
Conditions
Actions
Hashtable - Create a hashtable
Set MM_Hashtable = (Last created hashtable)
Set MM_ShowAll = False
Set MM_Extra_Regeneration_Factor = 2.00
Set MM_Fast_Regeneration_Limit = 150.00
Set MM_MinSize = 8.00
Set MM_MaxSize = 16.00
Set MM_MinColourBlue = 65.00
Set MM_MaxColourBlue = 90.00
Set MM_MinColourGreen = 15.00
Set MM_MaxColourGreen = 50.00
Set MM_MinColourRed = 0.00
Set MM_MaxColourRed = 5.00
Set MM_MinTransparency = 60.00
Set MM_MaxTransparency = 85.00
Set MM_MinFadingAge = 1.00
Set MM_MaxFadingAge = 3.00
Set MM_TargetMinFadingAge = 0.00
Set MM_TargetMaxFadingAge = 0.50
Set MM_MinLifespan = 1.00
Set MM_MaxLifespan = 5.00
Set MM_TargetMinLifespan = 1.50
Set MM_TargetMaxLifespan = 2.00
Set MM_MinVelocity = 45.00
Set MM_MaxVelocity = 80.00
Set MM_TargetMinVelocity = 30.00
Set MM_TargetMaxVelocity = 45.00
Set MM_Area_of_Effect[1] = 350.00
Set MM_Area_of_Effect[2] = 400.00
Set MM_Area_of_Effect[3] = 450.00
Set MM_ManaRegeneration[1] = 0.20
Set MM_ManaRegeneration[2] = 0.40
Set MM_ManaRegeneration[3] = 0.60
[/trigger]
[trigger=MM Init]Martyrs Memorandum Init
Events
Unit - A unit Learns a skill
Conditions
(Level of Martyr's Memorandum for (Triggering unit)) Greater than 0
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in MM_Group) Equal to 0
Then - Actions
Trigger - Turn on Martyrs Memorandum Loop <gen>
Else - Actions
Set MM_Ability_Level = (Level of Martyr's Memorandum for (Triggering unit))
Hashtable - Save MM_ManaRegeneration[MM_Ability_Level] as 1 of (Key (Triggering unit)) in MM_Hashtable
Unit Group - Add (Triggering unit) to MM_Group
[/trigger]
[trigger=MM Loop]Martyrs Memorandum Loop
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in MM_Group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
Then - Actions
Set MM_AuraUnit = (Picked unit)
Set MM_ManaRegLoop = (Load 1 of (Key (Picked unit)) from MM_Hashtable)
Unit - Set mana of MM_AuraUnit to ((Mana of MM_AuraUnit) + (MM_Extra_Regeneration_Factor x MM_ManaRegLoop))
Floating Text - Create floating text that reads + above MM_AuraUnit with Z offset -150.00, using font size (Random real number between MM_MinSize and MM_MaxSize), color ((Random real number between MM_MinColourRed and MM_MaxColourRed)%,
(Random real number between MM_MinColourGreen and MM_MaxColourGreen)%, (Random real number between MM_MinColourBlue and MM_MaxColourBlue)%),
and (Random real number between MM_MinTransparency and MM_MaxTransparency)% transparency
Floating Text - Set the velocity of (Last created floating text) to (Random real number between MM_MinVelocity and MM_MaxVelocity) towards (Random real number between 0.00 and 360.00) degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to (Random real number between MM_MinLifespan and MM_MaxLifespan) seconds
Floating Text - Change the fading age of (Last created floating text) to (Random real number between MM_MinFadingAge and MM_MaxFadingAge) seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MM_ShowAll Equal to False
Then - Actions
Set MM_ForceLeak = (All allies of (Owner of MM_AuraUnit))
Floating Text - Hide (Last created floating text) for (All players)
Floating Text - Show (Last created floating text) for MM_ForceLeak
Custom script: call DestroyForce (udg_MM_ForceLeak)
Else - Actions
Set MM_Point = (Position of MM_AuraUnit)
Set MM_Refresh_Group = (Units within MM_Area_of_Effect[MM_Ability_Level] of MM_Point matching ((((Matching unit) is A structure) Not equal to True)
and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to True)
Unit Group - Pick every unit in MM_Refresh_Group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Mana of (Picked unit)) Less than or equal to MM_Fast_Regeneration_Limit
Then - Actions
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + (MM_Extra_Regeneration_Factor x MM_ManaRegLoop))
Else - Actions
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + MM_ManaRegLoop)
Floating Text - Create floating text that reads + above (Picked unit) with Z offset -150.00, using font size (Random real number between MM_MinSize and MM_MaxSize), color ((Random real number between MM_MinColourRed and MM_MaxColourRed)%,
(Random real number between MM_MinColourGreen and MM_MaxColourGreen)%, (Random real number between MM_MinColourBlue and MM_MaxColourBlue)%),
and (Random real number between MM_MinTransparency and MM_MaxTransparency)% transparency
Floating Text - Set the velocity of (Last created floating text) to (Random real number between MM_TargetMinVelocity and MM_TargetMaxVelocity) towards (Random real number between 0.00 and 360.00) degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to (Random real number between MM_TargetMinLifespan and MM_TargetMaxLifespan) seconds
Floating Text - Change the fading age of (Last created floating text) to (Random real number between MM_TargetMinFadingAge and MM_TargetMaxFadingAge) seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MM_ShowAll Equal to False
Then - Actions
Set MM_ForceLeak = (All allies of (Owner of (Picked unit)))
Floating Text - Hide (Last created floating text) for (All players)
Floating Text - Show (Last created floating text) for MM_ForceLeak
Custom script: call DestroyForce (udg_MM_ForceLeak)
Else - Actions
Custom script: call DestroyGroup (udg_MM_Refresh_Group)
Custom script: call RemoveLocation (udg_MM_Point)
Else - Actions
[/trigger]