Exemplo n.º 1
0
        void Shoot()
        {
            Main.PlaySound(SoundID.Item38, projectile.Center);
            timer += 10;
            Player player          = Main.player[projectile.owner];
            int    weaponDamage    = projectile.damage;
            float  weaponKnockback = projectile.knockBack;
            int    bulletCount     = 8 + (int)((((1 / player.meleeSpeed) - 1) * 100) / 10);

            //CombatText.NewText(player.getRect(), new Color(38, 126, 126), bulletCount, true, false);
            Item sItem = QwertyMethods.MakeItemFromID(ItemID.FlintlockPistol);

            sItem.damage = weaponDamage;
            player.PickAmmo(sItem, ref bullet, ref speedB, ref canShoot, ref weaponDamage, ref weaponKnockback, false);
            List <Projectile> bullets = QwertyMethods.ProjectileSpread(projectile.Center, bulletCount, BulVel, bullet, weaponDamage, weaponKnockback, projectile.owner);

            foreach (Projectile bul in bullets)
            {
                bul.melee  = true;
                bul.ranged = false;
                if (Main.netMode == 1)
                {
                    QwertysRandomContent.UpdateProjectileClass(bul);
                }
            }
        }
Exemplo n.º 2
0
 public override void Kill(int timeLeft)
 {
     if (Main.netMode != 1)
     {
         QwertyMethods.ProjectileSpread(projectile.Center, 8, shotSpeed, mod.ProjectileType("TurretShot"), projectile.damage, projectile.knockBack, Main.myPlayer);
         QwertyMethods.ProjectileSpread(projectile.Center, 8, shotSpeed * 1.5f, mod.ProjectileType("TurretShot"), projectile.damage, projectile.knockBack, Main.myPlayer, rotation: (float)Math.PI / 8);
     }
 }