int CItemEnhancement::GetDamageBonus (void) const // GetDamageBonus // // Returns the damage bonus for the weapon { switch (GetType()) { case etStrengthen: return Level2Bonus(GetLevel(), IsDisadvantage()); default: return 0; } }
int CItemEnhancement::GetHPBonus (void) const // GetHPBonus // // Returns the damage bonus for the weapon, in percentage points. // (e.g., 10 = +10%). { switch (GetType()) { case etHPBonus: return (IsDisadvantage() ? -GetDataX() : GetDataX()); case etStrengthen: return Level2Bonus(GetLevel(), IsDisadvantage()); default: return 0; } }