Der ganze Spaß geht ab hier los
Code:
procedure TForm1.UpDown1Click(Sender: TObject; Button: TUDBtnType);
begin
if button = btNext then
begin
if ATP = 0 then
begin
Label7.Color:=clRed;
end
else
STG:=STG + 1;
CalcATP;
CalcATK;
Label2.caption:= 'ATK: ' + FloatToStr(ATK);
Label3.Caption:= 'Stärke: ' + FloatToStr(STG);
end;
if button = btprev then
begin
STG:= STG - 1;
CalcATK;
CalcATP;
Label2.caption:= 'ATK: ' + FloatToStr(ATK);
Label3.Caption:= 'Stärke: ' + FloatToStr(STG);
end;
end;
procedure TForm1.UpDown2Click(Sender: TObject; Button: TUDBtnType);
begin
if button = btNext then
begin
if ATP = 0 then
begin
Label7.Color:=clRed;
end
else
ITG:=ITG+1;
CalcATP;
CalcMAG;
CalcATK;
Label4.Caption:= 'Intelligenz: ' + FloatToStr(ITG);
Label6.Caption:= 'MAG:' + FloatToStr(MAG);
Label2.caption:= 'ATK: ' + FloatToStr(ATK);
end;
if button = btprev then
begin
ITG:=ITG-1;
CalcATP;
CalcMAG;
CalcATK;
Label4.Caption:= 'Intelligenz: ' + FloatToStr(ITG);
Label6.Caption:= 'MAG:' + FloatToStr(MAG);
Label2.caption:= 'ATK: ' + FloatToStr(ATK);
end;
end;
procedure TForm1.UpDown3Click(Sender: TObject; Button: TUDBtnType);
begin
if button = btNext then
begin
CalcATP;
if ATP = 0 then
begin
Label7.Color:=clRed;
end
else
KON:=KON+1;
CalcATP;
CalcHP;
Label8.Caption:= 'Konstitution: ' + FloatToStr(KON);
Label10.Caption:= 'HP: ' + FloatToStr(HP);
end;
if button = btprev then
begin
KON:= KON-1;
CalcATP;
CalcHP;
Label8.Caption:= 'Konstitution: ' + FloatToStr(KON);
Label10.Caption:= 'HP: ' + FloatToStr(HP);
end;
end;
procedure TForm1.UpDown4Click(Sender: TObject; Button: TUDBtnType);
begin
if button = btNext then
begin
CalcATP;
if ATP = 0 then
begin
Label7.Color:=clRed;
end
else
WIL:=WIL+1;
CalcATP;
CalcMP;
Label9.Caption:= 'Willenskraft: ' + FloatToStr(WIL);
Label11.Caption:= 'MP: ' + FloatToStr(MP);
end;
if button = btprev then
begin
WIL:= WIL-1;
CalcATP;
CalcMP;
Label9.Caption:= 'Willenskraft: ' + FloatToStr(WIL);
Label11.Caption:= 'MP: ' + FloatToStr(MP);
end;
end;
end.