Exemple #1
0
        public override void OnEntitiesSelected(SpellTree tree, List <Body> entities)
        {
            foreach (Body body in entities)
            {
                Creature creature = body.GetChildrenOfType <Creature>().FirstOrDefault();

                if (creature == null)
                {
                    continue;
                }
                else
                {
                    foreach (Creature.Buff buff in Buffs)
                    {
                        if (OnCast(tree))
                        {
                            Vector3 p = creature.AI.Position + Vector3.Up;
                            IndicatorManager.DrawIndicator("-" + ManaCost + " M", p, 1.0f, Color.Red);
                            creature.AddBuff(buff.Clone());
                        }
                    }
                }
            }
            base.OnEntitiesSelected(tree, entities);
        }
Exemple #2
0
 public void Drink(Creature creature)
 {
     creature.AddBuff(Effects.Clone());
 }