unit JobKnight;

//騎士class

interface

uses
  Classes, SysUtils, JobCommon, Misc, Uutils;

type
  TKnight = Class(TjobClass)
  private
    function GetfRecoveryAp: double;
    function GetfRecoveryHp: double;
    procedure SetfRecoveryAp(const Value: double);
    procedure SetfRecoveryHp(const Value: double);
  public
    constructor Create;
    destructor Destroy; override;

    procedure DataChange;override;

    property fRecoveryHp: double read GetfRecoveryHp write SetfRecoveryHp;
    property fRecoveryAp: double read GetfRecoveryAp write SetfRecoveryAp;

  published

  end;

implementation

{ TKnight }

constructor TKnight.Create;
begin
  inherited;

{$IFDEF LoadIniJobData}

{$ELSE}
  Self.SetJobDatas(opHP,50,15,20);
  Self.SetJobDatas(opAP,30,3,5);
  Self.SetJobDatas(opATTACK,5,0.667,0);
  Self.SetJobDatas(opMAGIC,0,0.77,0);
  Self.SetJobDatas(opHIT,30,1.0,1.15);
  Self.SetJobDatas(opEVASION,0,0.4,1.8);
  Self.SetJobDatas(opCRITICAL,0,0.2,0);
  Self.SetJobDatas(opRHP,0,0.2,25,4,2);
  Self.SetJobDatas(opRAP,0,0.2,35,6,5);

{$ENDIF}
  inherited UseSkillLv := False;
end;

procedure TKnight.DataChange;
var
  JSeedList : TStringList;
  rHpSeedArray : TDoubleDynArray;
  rApSeedArray : TDoubleDynArray;
  StatusCon,StatusMen:integer;
begin
  JSeedList := TStringList.Create;
  SetLength(rHpSeedArray,5);
  SetLength(rApSeedArray,5);
  try
    JSeedList.Text := inherited GetCalcSeedList;
    rHpSeedArray := CommaTexttoArray(JSeedList.Values['JDRHp']);
    rApSeedArray := CommaTexttoArray(JSeedList.Values['JDRAp']);

    StatusCon := fState[Trunc(rHpSeedArray[4])];
    StatusMen := fState[Trunc(rApSeedArray[4])];

    (* ここでHP/APの回復量を上書き *)
    //HP
    if StatusCon > rHpSeedArray[2] then
    begin
      fRecoveryHp := int(StatusCon * rHpSeedArray[1]);
    end
    else
    begin
      fRecoveryHp := int(rHpSeedArray[3]);
    end;

    //AP
    if StatusMen > rApSeedArray[2] then
    begin
      fRecoveryAp := int(StatusMen * rApSeedArray[1]);
    end
    else
    begin
      fRecoveryAp := int(rApSeedArray[3]);
    end;

  finally
    JSeedList.Free;
  end;

  inherited;
end;

destructor TKnight.Destroy;
begin

  inherited;
end;

function TKnight.GetfRecoveryAp: double;
begin
  Result := inherited fRecoveryAp;
end;

function TKnight.GetfRecoveryHp: double;
begin
  Result := inherited fRecoveryHp;
end;

procedure TKnight.SetfRecoveryAp(const Value: double);
begin
  inherited fRecoveryAp := Value;
end;

procedure TKnight.SetfRecoveryHp(const Value: double);
begin
  inherited fRecoveryHp := Value;
end;

end.

Gポイントポイ活 Amazon Yahoo 楽天

無料ホームページ 楽天モバイル[UNLIMITが今なら1円] 海外格安航空券 海外旅行保険が無料!