, maxMana(0)
, mana(0)
-, attack(0)
-, defense(0)
-, agility(0)
-, intelligence(0)
-, gut(0)
-, magicResistance(0)
-
, level(0)
, ip(0) {
health = 0;
} else {
health -= amount;
+ int ipGain(amount * 255 / health);
+ if (ip + ipGain > 255) {
+ ip = 255;
+ } else {
+ ip += ipGain;
+ }
}
}