Beispiel #1
0
        public override void AI()
        {
            if (Main.netMode == NetmodeID.Server)
            {
                return;
            }
            bool self = Source.Glyphs[(byte)GlyphType.Moon].modItem is Moon_Green;

            if ((!self || CirclingProtection.Count(spell => spell.projectile.active) <= Source.ProjCount - 3) && Cooldown <= 0)
            {
                if (!self)
                {
                    GetTarget();
                    if (Distance <= 480f && Attack)
                    {
                        if (GetType() == typeof(ProceduralMinion))
                        {
                            Source.CastSpell(Main.player[projectile.owner], projectile.Center, Target.Center, projectile);
                        }
                        //if (this is ProceduralMinion)
                        //Source.CastSpell(Main.player[projectile.owner], projectile.Center, Target.Center, projectile);
                    }
                }
                else if (GetType() == typeof(ProceduralMinion))
                {
                    Source.CastSpell(Main.player[projectile.owner], projectile.Center, projectile.Center, projectile);
                }

                Cooldown = Source.Cooldown * 2;
            }
            else
            {
                Cooldown -= 1;
            }
        }
Beispiel #2
0
 public override void Kill(int timeLeft)
 {
     foreach (ProceduralSpellProj spell in CirclingProtection)
     {
         spell.projectile.Kill();
     }
     CirclingProtection.Clear();
     SmallProt?.projectile.Kill();
 }