Exemplo n.º 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();
                }
            }
        }
Exemplo n.º 2
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(24, 180);
     }
 }
Exemplo n.º 3
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(24, 180);
     }
 }
Exemplo n.º 4
0
 public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
 {
     return(BaseWhip.PreDraw(projectile, handleHeight, chainHeight, partHeight, tipHeight, 12, ignoreLighting, doubleCritWindow));
 }
Exemplo n.º 5
0
 public override bool?CanCutTiles()
 {
     return(BaseWhip.CanCutTiles(projectile));
 }
Exemplo n.º 6
0
 public override bool?Colliding(Rectangle projHitbox, Rectangle targetHitbox)
 {
     return(BaseWhip.Colliding(projectile, targetHitbox));
 }
Exemplo n.º 7
0
 public override void ModifyHitPvp(Player target, ref int damage, ref bool crit)
 {
     BaseWhip.ModifyHitAny(projectile, ref damage, ref crit);
 }
Exemplo n.º 8
0
 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);
 }