unit uVar;

{$mode objfpc}{$H+}
{$codepage UTF8}

interface

uses
 inifiles;

CONST
  _CAP = 100;

type
  TGameStatus = (gsGame, gsExit, gsCombat);

  TNodeKey = record
    _keyName  : string;
    _keyValue : string;
  end;

  TNode = record
    ID       : word;
    Text     : string;
    nodeKeys : array [1..3] of TNodeKey;
  end;


  TAnswer = record
    ID       : word;
    nodeID   : word;
    goToNode : word;
    Text     : string;
    nodeIfs  : array [1..3] of TNodeKey;
    nodeSets : array [1..3] of TNodeKey;
  end;

  TVariant = record
    ID     : word;
    ansID  : word;
  end;

var
  _exit      : boolean;
  entry      : string;
  NodeNumber : word = 1;
  gameStatus : TGameStatus = gsGame;
  inCombat   : boolean;

  NodesFile, AnswersFile : TIniFile;

  _nodes     : array [1.._CAP] of TNode;
  _answers   : array [1.._CAP] of TAnswer;
  _keys      : array [1.._CAP] of TNodeKey;
  _variants  : array [1..10] of TVariant;

  Node_Text : String;

  TimerStart, currentTime : double;
  //TimerIsOn               : boolean;

  FailNodeNumber : longint = 1;

  combatRound : word = 1;
  enemyIni, heroIni  : integer;
  enemyDmg, heroDmg  : integer;
  enemyAct           : byte;

  STR : integer = 5;
  DEX : integer = 5;
  INT : integer = 5;
  CHR : integer = 5;

implementation

end.

