Add script hook onNewTurn to the end of AfterSwitchHedgehog. This should signal the very start of a new turn, immediately after CurrentTeam is switched.
--- a/hedgewars/uTeams.pas Tue Dec 07 22:02:09 2010 +0300
+++ b/hedgewars/uTeams.pas Tue Dec 07 17:29:02 2010 -0500
@@ -36,7 +36,7 @@
procedure TeamGoneEffect(var Team: TTeam);
implementation
-uses uLocale, uAmmos, uChat, uMobile, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug;
+uses uLocale, uAmmos, uChat, uMobile, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug, uScript;
const MaxTeamHealth: LongInt = 0;
@@ -291,6 +291,7 @@
CurrentTeam:= team;
AddTeam:= team;
+ScriptCall('onNewTurn');
end;
procedure RecountAllTeamsHealth;