Chain Lightning seems to have an arbitrary jump range. Make sure it's working properly.
	Update: It is, it just feels wrong somehow.
Chain Lightning should have a directional jump weighting.
	%weight = 1 - vectorDot(vectorSub(%startTarg.getHackPosition(), %endTarg.getHackPosition()),
		vectorSub(%endTarg.getHackPosition(), %obj.getHackPosition()));
Chain Lightning jumps through walls. Fix this.
Should Chain Lightning damage players that it jumps through?

Make the Knight wait to fire the Bow in the same way as the Spear.
Does toggling between forward and backward let the Horse strafe faster?
The Knight should be made Confusable; add Confused behaviors to both Knight units.

Units should not attack Confused enemies; this applies to both sides.
The Mason will break nearby blocks (but not the Castle!) while Confused.
	Update: Done.
The Medic will only heal enemies and Confused allies while Confused.
The Knight will attack Unconfused allies and only buff enemies and Confused allies.
Make the Enemy Swordsman swivel (like the Archer) when Confused and targetless.

Change the client recycler to use FIFO instead of LIFO. Make a dedicated function for this.
This function should always be used by spawning functions.

Add the Freeze spell. Freezes a target for five seconds (three for players) with a three-second unfreezability period.
Uses the schedule %pl.unfreeze - the unfreeze function schedules %pl.unfreeze = schedule(3000, 0, "doNothing");
Player frozen variable = %pl.isFrozen.
The Freeze spell has a fifteen second cooldown.

Mounted Knight attack pattern:
	If anyone the Knight can see has aggro, attack them.
		The Knight should maintain a constant distance of 20 TU from the target.
		Add a strafing ability so that it can keep the target in its los better.
	Otherwise, attack the nearest block the Knight can see.
		If there are no visible blocks, the Knight attacks the Castle instead.
		The Knight should slowly advance towards the target in both cases.

Wizard attack pattern:
	If my damage taken is at or above 50, cast Heal Self.
	If there is an enemy Wizard in range, freeze it ASAP. Then use this preference for casting:
		Fireball: Only use if the target is frozen in place. Use before Chain Lightning.
		Chain Lightning: Only use if another enemy is within 15 TU of the target.
	If there is a Confusable enemy in range, cast Confuse on it.
	If there isn't an enemy Wizard, cast Chain Lightning. Viable targets must have at least three other enemies within 15 TU.
	If there are any injured allies in range, cast Heal Other on the most injured.
	If there isn't an enemy Wizard, cast Fireball on the enemy with the most enemies in range. Allies count as a negative enemy.

Wizard AI function

Add the Freeze spell.
Make sure that enemies have a %pl.type variable. If they don't, add one.
Add faux aiming to the AI function so that the wizard APPEARS to have to aim properly.

...
	if(!isObject(%cl = %bot.client)) return;
	...   //Put the schedule loop in here.
	if(!isEventPending(%cl.cantCast))
	{
		//Verify the schedules.
		if(%bot.getDamageLevel() >= 50 && !isEventPending(%cl.cantCastHealSelf))
		{ CastHealSelf(%cl); return; }
		%least = "";
		for(%i=0;%i<%list;%i++)
		{
			if((%obj = %list[%i]).type !$= "Wizard") continue;
			if((%dist = vectorDist(%pos, %obj.getHackPosition())) < %least || %least $= "")
			{ %least = %dist; %wizard = %obj; }
		}
		if(isObject(%wizard))
		{
			if(!isEventPending(%cl.cantCastFreeze) && !isEventPending(%wizard.unfreeze))
			{ CastFreeze(%cl, %wizard); return; }
			if(%wizard.isFrozen && !isEventPending(%cl.cantCastFireball))
			{ CastFireball(%cl, %wizard); return; }
			if(!isEventPending(%cl.cantCastChainLightning))
			{
				for(%i=0;%i<%list;%i++)
				{
					if((%obj = %list[%i]) == %wizard) continue;
					if(vectorDist(%pos, %obj.getHackPosition()) <= 15)
					{ CastChainLightning(%cl, %wizard); return; }
				}
			}
		}
	}
