public void abilitySpec(String[] parts){
      //get the id
      int unitID = Integer.parseInt(parts[1]);
      String[] split = parts[2].split(",");
      Unit unit = getUnitFromID(unitID);
//      System.out.println("Main : abilitySpec : unit has " + unit.abilityPoints + " abilityPoints");
      if(unit==null){
          return;
      }
      int total = 0;
      for(int a=0;a<unit.abilities.length;a++){
          int currentInvest = unit.abilityInvestments[a];
          Ability ab = unit.abilities[a];
          ab.requiredLevel -= ab.requiredLevelIncrement*currentInvest;
          int invest = Integer.parseInt(split[a])+1;
          unit.abilityInvestments[a] = invest;
          ab.requiredLevel += ab.requiredLevelIncrement*invest;
          total += invest;
      }
      unit.abilityPoints = unit.heroLevel - total;
//      System.out.println("Main : abilitySpec : total = " + total);
//      System.out.println("Main : abilitySpec : unit has " + unit.abilityPoints + " abilityPoints");
      
      //is the unit currently selected? if so update the tooltips
      if(selected.size()>0){
          Unit select = selected.get(mainSelect);
          if(select==unit){
              for(int a=0;a<select.abilities.length;a++){
                  if(select.abilities[a]==null){
                      continue;
                  }
                  Tooltip tool = abilities[a].getControl(TooltipControl.class).script;
                  tool.tooltip = select.abilities[a].tooltips[select.abilityInvestments[a]];
              }
          }
      }
  }