anchor.diff:    Button_DefencePosAdd.Down := (gGameCursor.Mode = cmMarkers)
                                   and (gGameCursor.Tag1 = MARKER_DEFENCE)
                                   and not CheckBox_AutoDefence.Checked;
  -  Town_DefenceRefresh;
   end;
   
   
  
positive.code:   CheckBox_MaxSoldiers.Checked := (gMySpectator.Hand.AI.Setup.MaxSoldiers >= 0);
    TrackBar_MaxSoldiers.Enabled := CheckBox_MaxSoldiers.Checked;
    TrackBar_MaxSoldiers.Position := Max(gMySpectator.Hand.AI.Setup.MaxSoldiers, 0);
  end;
  
  
  
negative.code: var
    OnlyAdvancedAIHand: Boolean;
  begin
    OnlyAdvancedAIHand := gGame.MapEditor.OnlyAdvancedAIHand(gMySpectator.HandID);
  
    CheckBox_AutoDefence.Checked := gMySpectator.Hand.AI.Setup.AutoDefend;
  