func void TICK_TOCK()
{
/////////////////////////////////////////////////////////////////////////
/////////////////////////////uniwersalny mainflag//////////////////////
/////////////////////////////////////////////////////////////////////////
if (miecz_on == 1){
item_kat_nf_ff = item_kat_ff;
item_super_flag = item_axe;
}
else{
item_kat_nf_ff = item_kat_nf;
item_super_flag = item_2hd_axe;
};
////////////////////////////////////////////////////////////////
////////////////////////ustawienie pasków na ekranie/////////
///////////////////////////////////////////////////////////////////
const int hp_vposx = 80;
const int hp_vposy = 7272;
const int mana_vposx = 80;
const int mana_vposy = 7722;
// ----- an die Bars rankommen -----
MEM_InitGlobalInst ();
var oCViewStatusBar bar_hp; bar_hp = MEM_PtrToInst (MEM_GAME.hpBar);
var oCViewStatusBar bar_mana; bar_mana = MEM_PtrToInst (MEM_GAME.manaBar);
// ----- Bars an die alte Position -----
bar_hp.zCView_vposx = hp_vposx;
bar_hp.zCView_vposy = hp_vposy;
bar_mana.zCView_vposx = mana_vposx;
bar_mana.zCView_vposy = mana_vposy;
////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////regeneracja///////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
if (regeneracja >= 1){
licznik += 1;
if (hero.attribute[atr_hitpoints] == 1){
hero.attribute[atr_hitpoints] = 1;
}
else
if hero.attribute[ATR_HITPOINTS] < hero.attribute[ATR_HITPOINTS_max]{
if (licznik >= 8){
hero.attribute[ATR_HITPOINTS] = hero.attribute[ATR_HITPOINTS] + 1;
licznik = 0;
if (regeneracja >= 2){
hero.attribute[ATR_HITPOINTS] = hero.attribute[ATR_HITPOINTS] + 2;
if (regeneracja >= 3){
hero.attribute[ATR_HITPOINTS] = hero.attribute[ATR_HITPOINTS] + 3;
if (hero.attribute[atr_strength] >= 150){
hero.attribute[ATR_HITPOINTS] = hero.attribute[ATR_HITPOINTS] + 4;
};
};
};
};
};
if (hero.attribute[ATR_HITPOINTS] > hero.attribute[ATR_HITPOINTS_max]){
hero.attribute[ATR_HITPOINTS] = hero.attribute[ATR_HITPOINTS_max];
};
};
////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////regeneracja many///////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
if (regeneracjamana >= 1){
licznikmana += 1;
if hero.attribute[ATR_mana] < hero.attribute[ATR_mana_max]{
if (licznikmana >= 8){
hero.attribute[ATR_mana] = hero.attribute[ATR_mana] + 1;
licznikmana = 0;
if (regeneracjamana >= 2){
hero.attribute[ATR_mana] = hero.attribute[ATR_mana] + 1;
if (regeneracjamana >= 3){
hero.attribute[ATR_mana] = hero.attribute[ATR_mana] + 2;
};
};
};
};
if (hero.attribute[ATR_mana] >= hero.attribute[ATR_mana_max]){
hero.attribute[ATR_mana] = hero.attribute[ATR_mana_max];
};
};
//////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////wyświetlanie hp i many/////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
hp = ConcatStrings (IntToString(hero.attribute[atr_hitpoints]), "/");
hp_max = ConcatStrings (IntToString(hero.attribute[atr_hitpoints_max]), "");
hp_finish = ConcatStrings (hp, hp_max);
PrintScreen (hp_finish, 2, 91, FONT_ScreenSmall, 2);
ma = ConcatStrings (IntToString(hero.attribute[atr_mana]), "/");
ma_max = ConcatStrings (IntToString(hero.attribute[atr_mana_max]), "");
ma_finish = ConcatStrings (ma, ma_max);
PrintScreen (ma_finish, 2, 97, FONT_ScreenSmall, 2);
//////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////Reputacja/////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
R_key = mem_keystate(key_r);
if (r_key == key_pressed)
{
wyswietlanie_rep_orkowie = ConcatStrings ("Reputacja u Orków: ",intToString(rep_orkowie));
wyswietlanie_rep_Rebelia = ConcatStrings ("Reputacja u Rebeliantów: ",intToString(rep_rebelia));
wyswietlanie_rep_assasyn = ConcatStrings ("Reputacja u Assasynów: ",intToString(rep_assasyn));
wyswietlanie_rep_MO = ConcatStrings ("Reputacja u Magów Ognia: ",intToString(rep_MO));
wyswietlanie_rep_MW = ConcatStrings ("Reputacja u Magów Wody: ",intToString(rep_MW));
wyswietlanie_rep_nekro = ConcatStrings ("Reputacja u Nekromantów: ",intToString(rep_nekro));
wyswietlanie_rep_mys = ConcatStrings ("Reputacja u Myśliwych: ",intToString(rep_mys));
wyswietlanie_rep_druid = ConcatStrings ("Reputacja u Druidów: ",intToString(rep_druid));
wyswietlanie_rep_deze = ConcatStrings ("Reputacja u Dezerterów: ",intToString(rep_deze));
var int nDocID;
nDocID = Doc_Create();
Doc_SetPages(nDocID,1);
Doc_SetPage(nDocID,0,"letters.TGA",0);
Doc_SetFont(nDocID,0,FONT_BookHeadline);
Doc_SetMargins(nDocID,-1,50,50,50,50,1);
Doc_PrintLine(nDocID,0,"Moja reputacja");
Doc_SetFont(nDocID,0,FONT_Book);
Doc_PrintLine(nDocID,0,"");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_orkowie);
Doc_PrintLines(nDocID,0, "");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_Rebelia);
Doc_PrintLines(nDocID,0, "");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_assasyn);
Doc_PrintLines(nDocID,0, "");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_deze);
Doc_PrintLines(nDocID,0, "");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_mys);
Doc_PrintLines(nDocID,0, "");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_MW);
Doc_PrintLines(nDocID,0, "");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_MO);
Doc_PrintLines(nDocID,0, "");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_nekro);
Doc_PrintLines(nDocID,0, "");
Doc_PrintLines(nDocID,0, wyswietlanie_rep_druid);
Doc_Show(nDocID);
};
//////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////koniec///////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
};