Kula ognia jak w GII (Gothic I) 2052 0

O temacie

Autor BlackSwordsman

Zaczęty 15.01.2017 roku

Wyświetleń 2052

Odpowiedzi 0

BlackSwordsman

BlackSwordsman

Użytkownicy
posty22
Propsy2
Profesjabrak
  • Użytkownicy
Nie wiem co jest grane męczę się już 2 godziny i ciągle działa żle! Chodzi o to że przeskakuje na następny poziom dopóki nie skończy się mana zamiast odpalić na 3 poziomie. OCB?

func int Spell_Logic_Fireball (var int manaInvested)
{
PrintDebugNpc (PD_MAGIC, "Spell_Logic_Fireball");
var int spelllevel;

/*
if (manaInvested ==(SPL_SENDCAST_FIREBALL*3)/10)
|| (manaInvested ==(SPL_SENDCAST_FIREBALL*5)/10)
|| (manaInvested ==(SPL_SENDCAST_FIREBALL*8)/10)
{ return SPL_NEXTLEVEL; };

if (manaInvested >= SPL_SENDCAST_FIREBALL)
{ return SPL_SENDCAST; };
*/

spell_parm ();

if (Npc_IsPlayer (self))
{

if (hero.attribute[ATR_MANA] >= MANACOST_FIREBALL)
{
hero.attribute[ATR_MANA] = (hero.attribute[ATR_MANA] - MANACOST_FIREBALL);

if (hero.attribute[ATR_MANA]<MANACOST_FIREBALL)
{
    return SPL_SENDCAST;
}
else
{
spelllevel = 1;
return SPL_NEXTLEVEL; //Lev1 erreicht
};
}
else if (hero.attribute[ATR_MANA] >= MANACOST_FIREBALL)
&& (spelllevel == 1)
{
hero.attribute[ATR_MANA] = (hero.attribute[ATR_MANA] - MANACOST_FIREBALL);

if (hero.attribute[ATR_MANA]<MANACOST_FIREBALL)
{
    return SPL_SENDCAST;
}
else
{
spelllevel = 2;
return SPL_NEXTLEVEL; //Lev2 erreicht
};
}
else if (hero.attribute[ATR_MANA] >= MANACOST_FIREBALL)
&& (spelllevel  == 2)
{
hero.attribute[ATR_MANA] = (hero.attribute[ATR_MANA] - MANACOST_FIREBALL);
return SPL_SENDCAST;
spelllevel = 3;
}
else if (hero.attribute[ATR_MANA]<MANACOST_FIREBALL)
{
return SPL_SENDSTOP;
};

};


return SPL_RECEIVEINVEST;
};
 


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry