Hero Activation
Variables- Variable1 //Variable used for ...
Abilities- [XXXX] //A random ability ...
Functions- Function 1
If Condition 1 is satisfied thenCall Function 2
- Function 2
Store the triggering unit as Source
Store the player owning Source as Player1
Create a region and store it as Region1
Store Player1 as Player2
Store Source as Unit2
Store the point value of Source as PointValue
If [Deathmatch isn't active] thenCall Function 3
If [Language = English and Tips1[PointValue] != null] then //See the notes for further information on how the language check is performedDisplay the "A -tips command is available if you would like some pointers for this hero" text for Player1
If [TipsActivation[PlayerID] = True] thenCall Function 5
If [TavernFogRemoved = False and SentinelHeroes[1] != null and SentinelHeroes[2] != null and SentinelHeroes[3] != null and SentinelHeroes[5] != null and SentinelHeroes[5] != null and ScourgeHeroes[1] != null and ScourgeHeroes[2] != null and ScourgeHeroes[3] != null and ScourgeHeroes[4] != null and SourgeHeroes[5] != null] thenCreate a 7 second timer and when it runs outCall Function 7
Set HeroDead[PlayerID] to False //Used to determine if the death timer on the multi-board shall be shown
Add a [-7584.0,6176.0,-6304.0,7552.0] rectangle to Region1
If [Reverse Mode is active and TimeCheck = False] then //See notes for more info on TimeCheckSet HeroPicked1[PlayerID] to True //Makes you unable to random heroes, check notes
Set Player1 to [xxxxx] //(LoadPlayerHandle(hashtable001,(2000),(550+GetPlay erId(loc_player01)))) check
Set Source to be owned by Player1
If [Source is owned by a Sentinel player] thenIf [Source is within Region1] thenSet CameraX to a random integer in the interval [-7040,-6688]
Set CameraY to a random integer in the interval [-6912,-6656.0]
ElseSet CameraX to the X coordinate of Source
Set CameraY to the Y coordinate of Source
ElseIf [Source is within Region1] thenSet CameraX to a random integer in the interval [6176,6624]
Set CameraY to a random integer in the interval [5952,6240]
ElseSet CameraX to the X coordinate of Source
Set CameraY to the Y coordinate of Source
Set HeroPicked2[PlayerID] to True //Used to determine if the player already has acquired a hero
If [Reverse Mode is not active and TimeCheck = True] thenIf [Random Draft is not active and Captains Draft is not active] thenCenter the camera of Player1 around [CameraX,CameraY]
Clear the current selection for Player1
Make Player1 select Source
Set the location of Source to [CameraX,CameraY
Set Hero[PlayerID] to Source //Can only hold the hero which was picked first, ever given new values?
Set String1 to "9"
Call Function 8
Set Boolean1 to True
- Function 3 //This function adds and removes heroes from the Circle of Power
Get the player ID of PlayerID
Set Unit1 to PowerCircle[PlayerID]
Set Unit2 to Hero[PlayerID]
Store the level of Unit2 as HeroLevel
If [Deathmatch is active] thenPrevent the rest of the function from being executed
If [LastBuybackUnit[PlayerID] != null] thenRemove unit Integers1[PlayerID] from the stock on unit Unit2
Call Function 4
Add unit BuybackUnits[BuybackLevel] to the stock of Unit2
Set LastBuybackValue[PlayerID] to BuybackUnits[BuybackLevel]
Set Unit1 to null
Set Unit2 to null
- Function 4
Store the value of the current timer as CurrentTimer
Set Time to CurrentTimer-GamestartTime
Set TimeModifier to Time/60 //This is converted from a real to an integer and is then saved as a real
Set Cost to 100+HeroLevel*HeroLevel*1.5+TimeModifier*15
Set CostModifier to Cost/50 //This is saved as an integer value
If [CostModifier < 59] thenSet BuybackLevel to CostModifier
ElseSet BuybackLevel to 59
If [CostModifier < 0] thenSet BuybackLevel to 0
ElseSet BuybackLevel to CostModifier
- Function 5
Create a timer which runs out after 10 secondsCall Function 6
Create a timer which runs out after 15 secondsCall Function 6
Create a timer which runs at a 300 second intervalCall Function 6
- Function 6
Store the amount of times this function has been executed as EvalCount
If [Language = English and Tips1[PointValue] != null] thenIf [EvalCount = 1] thenDo nothing
Else if [EvalCount = 2] thenDisplay the "Tips: +Tips1[PointValue]" to Player1
Else if [EvalCount = 3] thenDisplay the "Tips: +Tips2[PointValue]" to Player1
Else if [EvalCount = 4] thenDisplay the "Tips: +Tips3[PointValue]" to Player1
Else if [EvalCount = 5] thenDisplay the "Tips: +Tips4[PointValue]" to Player1
Else if [EvalCount = 6] thenDisplay the "Tips: +Tips5[PointValue]" to Player1
If [EvalCount = 5] thenDisable the triggering trigger
- Function 7 //Double check this function
Set TavernFogRemoved to True
Disable the triggering trigger
Remove the fog within a 700 AoE at location [-6950,6750] for Players1[0] //The Sentinel
Remove the fog within a 700 AoE at location [-6950,6750] for Players2[0] //The Scourge
Conditions- Condition 1
If a non-illusion hero unit (except [H00M] or [H07G] or [H00Y] or [H00J] or [H0B8]) enters the playable map area and Boolean1 is False ...
Notes
Units which do not trigger the entrance event;
The language check is performed through checking the name of a
[n0HH] unit, for the default english version the name of this unit is "
Language: English", and it is given other names for maps in other languages. The JASS script attempts to match this name against a string containing the value "Language: English", and if this check fails (which would mean that the unit has another name) the map is deduced to not be in english.
There are 60 different buyback "levels", each one of these adding 50 gold to the gold cost for your buyback (50*N = BuybackCost). The buyback cost is capped at 3000 gold.
The TimeCheck variable is used in conjunction with
Reverse Mode, when the mode is activated this boolean is set to
True after that 60 seconds has passed since the map initialization under the presumption that
Reverse Mode has been activated.
//What is it used for?
The HeroPicked arrays contains booleans which determine whether or not the player already has picked a hero, in case it has the -random, -random int, -random agi and -random str commands won't be usable. HeroPicked1 is used when Reverse Mode is active, HeroPicked2 is used when Reverse Mode is not active.