Ejemplo n.º 1
0
int CItemEnhancement::GetDamageBonus (void) const

//	GetDamageBonus
//
//	Returns the damage bonus for the weapon

	{
	switch (GetType())
		{
		case etStrengthen:
			return Level2Bonus(GetLevel(), IsDisadvantage());

		default:
			return 0;
		}
	}
Ejemplo n.º 2
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;
    }
}