anchor.diff:    end;
   
   implementation
  +
  +{ TCreatureInstInfo }
  +
  +function TCreatureInstInfo.GetRawRandom: integer;
  +begin
  +  Result := (Level - 1) * 2 + ifthen(Upgraded, 1, 0);
  +end;
  +
  +procedure TCreatureInstInfo.SetRawRandom(AValue: integer);
  +var
  +  random_type: Integer;
  +begin
  +  random_type := AValue;
  +
  +  if (random_type < 0) or (random_type > 13) then
  +  begin
  +    raise Exception.CreateFmt('Invalid raw random type %d ', [random_type]);
  +  end;
  +
  +  Level:= (random_type div 2) + 1;
  +  Upgraded:=(random_type mod 2) > 0;
  +end;
  +
  +function TCreatureInstInfo.IsEmpty: Boolean;
  +begin
  +  Result:=inherited IsEmpty and (FLevel = 0) and (FUpgraded = false);
  +end;
   
   { TRewardPrimarySkills }
   
  
positive.code:   public
      constructor Create(AOwner: IMapObject);
      property AllowedReward:TAllowedRewards read FAllowedReward write SetAllowedReward;
  
      procedure AddOrUpdateReward(AType: TMetaclass; AIdentifier: AnsiString; AValue: Int64);
  
      function GetValue(AType: TMetaclass; AIdentifier: AnsiString = ''): Int64;
  
      property Owner: IMapObject read FOwner;
    end;
  
  
negative.code:   Result:=True;
  end;
  
  { TBaseCreatureInstInfo }
  
  constructor TBaseCreatureInstInfo.Create(ACollection: TCollection);
  begin
    inherited Create(ACollection);
  end;
  
  function TBaseCreatureInstInfo.IsEmpty: Boolean;
  begin
    Result := (FType = '') and (FAmount = 0);
  end;
  
  procedure TBaseCreatureInstInfo.SetAmount(AValue: Integer);
  begin
    FAmount := AValue;
  end;
  
  procedure TBaseCreatureInstInfo.SetType(AValue: AnsiString);
  begin
    if FType=AValue then Exit;
  
  