Exemplo n.º 1
0
 public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox)
 {
     if (ArchaeaItem.Elapsed(10))
     {
         Projectile.NewProjectileDirect(hitbox.Center(), new Vector2(4f * player.direction, -3f), mod.ProjectileType <Pixel>(), item.damage, item.knockBack, player.whoAmI, Pixel.Mercury, Pixel.Sword);
     }
 }
Exemplo n.º 2
0
 public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox)
 {
     if (ArchaeaItem.Elapsed(10))
     {
         Projectile.NewProjectileDirect(hitbox.Center(), NPCs.ArchaeaNPC.AngleToSpeed(player.AngleTo(Main.MouseWorld), VelocityWeight(player, 4f)), mod.ProjectileType <Pixel>(), item.damage, item.knockBack, player.whoAmI, Pixel.Mercury, Pixel.Sword);
     }
 }
Exemplo n.º 3
0
        protected Projectile Throw(Player player, int ai)
        {
            float   angle    = NPCs.ArchaeaNPC.AngleTo(player.Center, Main.MouseWorld);
            Vector2 velocity = NPCs.ArchaeaNPC.AngleToSpeed(angle, item.shootSpeed);

            return(Projectile.NewProjectileDirect(new Vector2(ArchaeaItem.StartThrowX(player), player.Center.Y - 24f), velocity, mod.ProjectileType <Flail>(), item.damage, item.knockBack, player.whoAmI, ai));
        }
Exemplo n.º 4
0
 public override void HoldItem(Player player)
 {
     if (ground == null)
     {
         return;
     }
     if (index < ground.Length)
     {
         if (ArchaeaItem.Elapsed(5))
         {
             Projectile.NewProjectileDirect(ground[index++], Vector2.Zero, mod.ProjectileType <Mercury>(), item.damage, item.knockBack, player.whoAmI, Mercury.Ground);
         }
     }
 }
Exemplo n.º 5
0
 public override void HoldItem(Player player)
 {
     if (index != -1)
     {
         if (index == 6)
         {
             index = -1;
             return;
         }
         if (ArchaeaItem.Elapsed(10))
         {
             Vector2 start = NPCs.ArchaeaNPC.AngleBased(player.Center, angle, 45f);
             projs[index++] = Projectile.NewProjectileDirect(start, Vector2.Zero, mod.ProjectileType <Orbital>(), item.damage, item.knockBack, player.whoAmI, angle);
             angle         += (float)Math.PI / 3f;
         }
     }
 }
Exemplo n.º 6
0
 public override void HoldItem(Item item, Player player)
 {
     if (player.releaseUseItem && player.controlUseItem && item.thrown)
     {
         float    range   = 500f;
         Target[] targets = Target.GetTargets(player, range).Where(t => t != null).ToArray();
         if (targets == null)
         {
             return;
         }
         if (ArchaeaItem.ArmorSet(player, "Shock Mask", "Shock Plate", "Shock Greaves"))
         {
             foreach (Target target in targets)
             {
                 if (Target.HitByThrown(player, target))
                 {
                     Vector2 start = target.npc.Center - new Vector2(0f, 500f);
                     ArchaeaItem.Bolt(player, target.npc, ref start);
                 }
                 break;
             }
         }
     }
 }