if (attacker != null/* && attacker is PlayerMobile*/ && defender != null && defender is PlayerMobile)
{
Item manashield = defender.Backpack.FindItemByType(typeof(manashield));
if (defender.Backpack != null && manashield != null)
{
int toShield = damage / 2;
if (defender.Mana >= toShield)
{
defender.Mana -= toShield;
damage -= toShield;
}
else
{
damage -= defender.Mana;
defender.Mana = 0;
}
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.