Ejemplo n.º 1
0
 //=================================================================//
 public void ChooseAttackAction(Mobile target)
 {
     if (target != null)
     {
         if (From.KnownAbilities.Count > 0 && Utility.Random(From.Mana, From.BaseMana) > From.HitPoints)
         {
             From.BeginCast(Utility.Random(0, From.KnownAbilities.Count), target);
         }
     }
 }
Ejemplo n.º 2
0
 public void HealAction()
 {
     foreach (object obj in From.KnownObjects())
     {
         if (obj is Mobile)
         {
             Mobile t = obj as Mobile;
             if (From.Faction == t.Faction && !t.Dead && t.HitPoints != t.BaseHitPoints)
             {
                 Console.WriteLine("HitPoint = {0}, BaseHitPoint = {1}", t.HitPoints, t.BaseHitPoints);
                 From.BeginCast(Utility.Random(0, From.KnownAbilities.Count), t);
                 break;
             }
         }
     }
 }