public bool ConsumeAttributes(Mobile from, ref object message, bool consume)
{
bool consumMana = false;
bool consumHits = false;
bool consumStam = false;
if (Hits > 0 && from.Hits < Hits)
{
message = "You lack the required hit points to make that.";
return false;
}
else
{
consumHits = consume;
}
if (Mana > 0 && from.Mana < Mana)
{
message = "You lack the required mana to make that.";
return false;
}
else
{
consumMana = consume;
}
if (Stam > 0 && from.Stam < Stam)
{
message = "You lack the required stamina to make that.";
return false;
}
else
{
consumStam = consume;
}
if (consumMana)
from.Mana -= Mana;
if (consumHits)
from.Hits -= Hits;
if (consumStam)
from.Stam -= Stam;
return true;
}