unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, SynEdit, JvEdit, JvSpin, StdCtrls;

type
  TForm1 = class(TForm)
    SynEdit1: TSynEdit;
    Panel1: TPanel;
    Label1: TLabel;
    eName: TEdit;
    Label2: TLabel;
    eNum: TJvSpinEdit;
    Label3: TLabel;
    eHealth: TJvSpinEdit;
    Label4: TLabel;
    eExpa: TJvSpinEdit;
    Label5: TLabel;
    eStrength: TJvSpinEdit;
    Label6: TLabel;
    eRasseyannost: TJvSpinEdit;
    Label7: TLabel;
    eNyuh: TJvSpinEdit;
    Label8: TLabel;
    eSluh: TJvSpinEdit;
    Label9: TLabel;
    eCharacter: TEdit;
    Label10: TLabel;
    eCharColor: TComboBox;
    lTest: TLabel;
    Label11: TLabel;
    eProtect_base: TJvSpinEdit;
    Label12: TLabel;
    eProtect_fire: TJvSpinEdit;
    Label13: TLabel;
    eProtect_electric: TJvSpinEdit;
    Label14: TLabel;
    eProtect_psi: TJvSpinEdit;
    Label15: TLabel;
    eChance_blood: TJvSpinEdit;
    Label16: TLabel;
    eChance_bolen: TJvSpinEdit;
    Label17: TLabel;
    eAIModel: TComboBox;
    Label18: TLabel;
    eDeathType: TComboBox;
    Label19: TLabel;
    eVoiceStrength: TJvSpinEdit;
    Label20: TLabel;
    eZapahStrength: TJvSpinEdit;
    Label21: TLabel;
    eSex: TComboBox;
    Label22: TLabel;
    eItem: TJvSpinEdit;
    Label23: TLabel;
    eCount: TJvSpinEdit;
    Label24: TLabel;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    CheckBox3: TCheckBox;
    CheckBox4: TCheckBox;
    CheckBox5: TCheckBox;
    CheckBox6: TCheckBox;
    CheckBox7: TCheckBox;
    CheckBox8: TCheckBox;
    CheckBox9: TCheckBox;
    CheckBox10: TCheckBox;
    CheckBox11: TCheckBox;
    Button1: TButton;
    procedure eCharacterChange(Sender: TObject);
    procedure eCharColorChange(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.eCharacterChange(Sender: TObject);
begin
  lTest.Caption := eCharacter.text;
end;

procedure TForm1.eCharColorChange(Sender: TObject);
begin
(*  Case Combobox1.ItemIndex of
    0: lTest.Font.Color := clBlack;
    1: lTest.Font.Color := clBlue;
    2: lTest.Font.Color := clGreen;
    3: lTest.Font.Color := $00F0F000;
    4: lTest.Font.Color := clRed;
    5: lTest.Font.Color := $00F200F2;
    6: lTest.Font.Color := $00005BB7;
    7: lTest.Font.Color
{
     DarkGray = 8;
     LightBlue = 9;
     LightGreen = 10;
     LightCyan = 11;
     LightRed = 12;
     LightMagenta = 13;
     Yellow = 14;
     White = 15;
}
  end; *)
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  attr: word;
begin
  With synedit1 do
  begin
    Clear;
    Lines.Add('    (');
    Lines.Add('      Name: ''' + eName.Text + '''; Montype: ' + eNum.Text + ';');
    Lines.Add('      Health: ' + eHealth.Text + '; Expa: ' + eExpa.Text + ';');
    Lines.Add('      Strength: ' + eStrength.Text + '; Rasseyannost: ' + eRasseyannost.Text + '; Nyuh: ' + eNyuh.Text + '; Sluh: ' + eSluh.Text + ';');
    Lines.Add('      Character: ''' + eCharacter.Text + '''; CharColor: ' + eCharColor.Text + ';');
    Lines.Add('      Protect_base: ' + eProtect_base.Text + '; Protect_fire: ' + eProtect_fire.Text + '; Protect_electric: ' + eProtect_electric.Text + '; Protect_psi: ' + eProtect_psi.Text + ';');
    Lines.Add('      Chance_blood: ' + eChance_blood.Text + '; Chance_bolen: ' + eChance_bolen.Text + ';');
    Lines.Add('      Intellect: ' + eAIModel.Text + '; Death: ' + eDeathType.Text + ';');
    Lines.Add('      ZapahStrength: ' + eZapahStrength.Text + '; VoiceStrength: ' + eVoiceStrength.Text + ';');
    Lines.Add('      Sex: ' + eSex.Text + '; Item: ' + eItem.Text + '; Count: ' + eCount.Text + ';');
    attr := 0;
    if (CheckBox1.Checked) then
      inc(attr, 1);
    if (CheckBox2.Checked) then
      inc(attr, 2);
    if (CheckBox3.Checked) then
      inc(attr, 4);
    if (CheckBox4.Checked) then
      inc(attr, 8);
    if (CheckBox5.Checked) then
      inc(attr, 16);
    if (CheckBox11.Checked) then
      inc(attr, 32);
    if (CheckBox6.Checked) then
      inc(attr, 64);
    if (CheckBox7.Checked) then
      inc(attr, 128);
    if (CheckBox8.Checked) then
      inc(attr, 256);
    if (CheckBox9.Checked) then
      inc(attr, 512);
    if (CheckBox10.Checked) then
      inc(attr, 1024);
    Lines.Add('      w1Min: 0; w1Max: 0; w2Min: 0; w2Max: 0;');
    Lines.Add('      Attrz: ' + inttostr(attr));
    Lines.Add('    )');
    eNum.AsInteger := eNum.AsInteger + 1;
  end;
end;

end.
