Facebook
From Social Owl, 7 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 302
  1. case POINT_MAX_HP:
  2.                         {
  3.                                 SetPoint(type, GetPoint(type) + amount);
  4.  
  5.                                 int curMaxHP = GetMaxHP();
  6.                                 int hp = GetRealPoint(POINT_MAX_HP);
  7.                                 int add_hp = MIN(3500, hp * GetPoint(POINT_MAX_HP_PCT) / 100);
  8.                                 add_hp += GetPoint(POINT_MAX_HP);
  9.                                 add_hp += GetPoint(POINT_PARTY_TANKER_BONUS);
  10.                                
  11.                                 // BONUSY ZA PUNKTY RANGI
  12.                                 int ali = GetAlignment()/10;
  13.                                 if (ali >= 1000)
  14.                                         add_hp += (((ali / 1000)*0.2f)/100)*hp;
  15.                                 else if (ali <= -1000)
  16.                                         add_hp -= (((ali / 1000)*0.2f)/100)*hp;
  17.                                        
  18.                                 // BONUSY ZA PUNKTY RANGI END
  19.  
  20.                                 SetMaxHP(hp + add_hp);
  21.                                 float fRatio = (float)GetMaxHP() / (float)curMaxHP;
  22.                                 PointChange(POINT_HP, GetHP() * fRatio - GetHP());
  23.                                 val = GetMaxHP();
  24.                         }
  25.                         break;