Beispiel #1
0
        public void CureRandomAlien(double rate)
        {
            IMonster target = null;

            foreach (IMonster o in Map.GetAllMonster(Position))
            {
                if (o.IsLeft == IsLeft && o.HpRate < 100 && o.Id != Id)
                {
                    if (target == null || target.HpRate > o.HpRate)
                    {
                        target = o;
                    }
                }
            }
            if (target != null)
            {
                target.AddHpRate(rate);
                BattleManager.Instance.EffectQueue.Add(new ActiveEffect(EffectBook.GetEffect("yellowstar"), (LiveMonster)target, false));
            }
        }