Example #1
0
        public override void AI()
        {
            Vector2 endPos = BaseWhip.WhipAI(projectile, whipLength);

            //Dust effect at the end
            if (BaseWhip.IsCrit(projectile, doubleCritWindow))
            {
                for (int i = 0; i < 2; i++)
                {
                    Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 6, 0f, 0f, 0, Color.Transparent, 2.6f)];
                    dust.noGravity = true;
                    dust.velocity += projectile.localAI[0].ToRotationVector2();
                }
            }

            //Dust along projectile
            for (int i = 0; i < 18; i++)
            {
                if (Main.rand.Next(16) == 0)
                {
                    Vector2 position = projectile.position + projectile.velocity + projectile.velocity * ((float)i / 18);
                    Dust    dust2    = Main.dust[Dust.NewDust(position, projectile.width, projectile.height, 6, 0f, 0f, 0, Color.Transparent, 1.4f)];
                    dust2.noGravity = true;
                    dust2.velocity += projectile.localAI[0].ToRotationVector2();
                }
            }
        }
Example #2
0
        public override void AI()
        {
            Vector2 endPos = BaseWhip.WhipAI(projectile, whipLength);

            //Dust effect at the end
            if (projectile.ai[0] % 4 == 0)
            {
                Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 18, 0f, 0f, 200, Color.Transparent, 1.2f)];
                dust.noGravity = true;
                dust.velocity += projectile.localAI[0].ToRotationVector2();
                dust.fadeIn    = 2f;
            }
            //Dust along projectile
            for (int i = 0; i < 18; i++)
            {
                if (Main.rand.Next(16) == 0)
                {
                    Vector2 position = projectile.position + projectile.velocity + projectile.velocity * ((float)i / 18);
                    Dust    dust2    = Main.dust[Dust.NewDust(position, projectile.width, projectile.height, 14, 0f, 0f, 100, Color.Transparent, 1f)];
                    dust2.noGravity = true;
                    dust2.fadeIn    = 0.5f;
                    dust2.velocity += projectile.localAI[0].ToRotationVector2();
                }
            }
        }
Example #3
0
 public override void OnHitPvp(Player target, int damage, bool crit)
 {
     BaseWhip.OnHitAny(projectile, crit, whipSoftSound);
     if (crit || Main.rand.Next(5) == 0)
     {
         target.AddBuff(BuffID.Poisoned, 240);
     }
 }
Example #4
0
 public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
 {
     BaseWhip.OnHitAny(projectile, target, crit, whipSoftSound);
     if (crit || Main.rand.Next(5) == 0)
     {
         target.AddBuff(BuffID.Poisoned, 240);
     }
 }
Example #5
0
        public override void AI()
        {
            Vector2 endPos = BaseWhip.WhipAI(projectile, whipLength);

            //Dust effect at the end
            if (BaseWhip.IsCrit(projectile, doubleCritWindow))
            {
                for (int i = 0; i < 2; i++)
                {
                    Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 50, 0f, 0f, 0, Color.Transparent, 1.2f)];
                    dust.noGravity = true;
                }
            }
            else
            {
                if (Main.rand.Next(2) == 0)
                {
                    Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 40, 0f, 0f, 0, Color.Transparent, 1.5f)];
                    dust.noGravity = true;
                }
            }
        }
        public override void AI()
        {
            Vector2 endPos = BaseWhip.WhipAI(projectile, whipLength);

            //Dust effect at the end
            if (BaseWhip.IsCrit(projectile, doubleCritWindow))
            {
                for (int i = 0; i < 3; i++)
                {
                    Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 68 + i, 0f, 0f, 240, default(Color), 1.5f)];
                    dust.noGravity = true;
                }
            }

            //Dust along projectile
            Dust dust2 = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, Main.rand.Next(68, 71), 0f, 0f, 200, default(Color), 1.3f)];

            dust2.noGravity = true;
            dust2.velocity += projectile.localAI[0].ToRotationVector2();

            Lighting.AddLight(endPos, projectile.light, projectile.light * 0.3f, projectile.light);
        }
 public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
 {
     return(BaseWhip.PreDraw(projectile, handleHeight, chainHeight, partHeight, tipHeight, 10, ignoreLighting, doubleCritWindow));
 }
 public override bool?CanCutTiles()
 {
     return(BaseWhip.CanCutTiles(projectile));
 }
 public override bool?Colliding(Rectangle projHitbox, Rectangle targetHitbox)
 {
     return(BaseWhip.Colliding(projectile, targetHitbox));
 }
 public override void OnHitPvp(Player target, int damage, bool crit)
 {
     BaseWhip.OnHitAny(projectile, crit, whipSoftSound);
 }
 public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
 {
     BaseWhip.OnHitAny(projectile, target, crit, whipSoftSound);
 }
 public override void ModifyHitPvp(Player target, ref int damage, ref bool crit)
 {
     BaseWhip.ModifyHitAny(projectile, ref damage, ref crit);
 }
 public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 {
     BaseWhip.ModifyHitAny(projectile, ref damage, ref knockback, ref crit, doubleCritWindow);
 }
 public override void AI()
 {
     BaseWhip.WhipAI(projectile, whipLength);
 }
 public override void AI()
 {
     BaseWhip.WhipAI(projectile, whipLength, false, 0, 0);
 }