diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 88f432dc9d..8524642d96 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -1,6 +1,7 @@ using CalamityMod.Events; using CalamityMod.Items.Placeables.Furniture; using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using System.Collections.Generic; @@ -375,13 +376,13 @@ namespace CalamityMod.NPCs.TownNPCs public override void TownNPCAttackProj(ref int projType, ref int attackDelay) { - projType = ModContent.ProjectileType(); + projType = ModContent.ProjectileType(); attackDelay = 1; } public override void TownNPCAttackProjSpeed(ref float multiplier, ref float gravityCorrection, ref float randomOffset) { - multiplier = 2f; + multiplier = 11.5f; } } } diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index 75f9d2bbdb..d11fe87789 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -38,7 +38,8 @@ namespace CalamityMod.Projectiles.Magic projectile.ai[0] += 1f; projectile.Opacity = Utils.InverseLerp(0f, 10f * projectile.MaxUpdates, projectile.timeLeft, true); - if (projectile.owner == Main.myPlayer && projectile.ai[0] % 12f == 0f) + int shootRate = projectile.npcProj ? 40 : 12; + if (projectile.owner == Main.myPlayer && projectile.ai[0] % shootRate == 0f) { NPC potentialTarget = projectile.Center.ClosestNPCAt(180f, false); if (potentialTarget != null) diff --git a/Projectiles/Typeless/CirrusBolt.cs b/Projectiles/Typeless/CirrusBolt.cs deleted file mode 100644 index a5480db6c2..0000000000 --- a/Projectiles/Typeless/CirrusBolt.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Typeless -{ - public class CirrusBolt : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Bolt"); - } - - public override void SetDefaults() - { - projectile.width = 4; - projectile.height = 4; - projectile.extraUpdates = 100; - projectile.friendly = true; - projectile.timeLeft = 45; - projectile.magic = true; - projectile.npcProj = true; - } - - public override void AI() - { - if (projectile.timeLeft % 2f == 0f) - { - Vector2 vector33 = projectile.position; - vector33 -= projectile.velocity * 0.25f; - int num448 = Dust.NewDust(vector33, 1, 1, 234, 0f, 0f, 0, default, 1.25f); - Main.dust[num448].position = vector33; - Main.dust[num448].noGravity = true; - Main.dust[num448].noLight = true; - Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.013f; - Main.dust[num448].velocity *= 0.1f; - } - } - } -} diff --git a/Projectiles/Typeless/CirrusOrb.cs b/Projectiles/Typeless/CirrusOrb.cs deleted file mode 100644 index 13bcddbfdc..0000000000 --- a/Projectiles/Typeless/CirrusOrb.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Typeless -{ - public class CirrusOrb : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Orb"); - } - - public override void SetDefaults() - { - projectile.width = 14; - projectile.height = 14; - projectile.friendly = true; - projectile.alpha = 255; - projectile.penetrate = -1; - projectile.timeLeft = 30; - projectile.magic = true; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; - projectile.npcProj = true; - } - - public override void AI() - { - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 150f, 6f, 6f, 2, ModContent.ProjectileType()); - } - } -} diff --git a/Projectiles/Typeless/CirrusRay.cs b/Projectiles/Typeless/CirrusRay.cs deleted file mode 100644 index 094e1ccb59..0000000000 --- a/Projectiles/Typeless/CirrusRay.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Typeless -{ - public class CirrusRay : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ray"); - } - - public override void SetDefaults() - { - projectile.width = 4; - projectile.height = 4; - projectile.friendly = true; - projectile.magic = true; - projectile.penetrate = 5; - projectile.extraUpdates = 100; - projectile.timeLeft = 300; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 0; - projectile.npcProj = true; - } - - public override void AI() - { - Lighting.AddLight(projectile.Center, 0.2f, 0.01f, 0.1f); - projectile.ai[0] += 1f; - if (projectile.ai[0] % 6f == 0f && projectile.owner == Main.myPlayer) - { - Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - } - - if (projectile.ai[0] > 16f && projectile.ai[0] % 2f == 0f) - { - Vector2 source = projectile.position; - int pink = Dust.NewDust(source, 1, 1, 234, 0f, 0f, 0, default, 1.25f); - Main.dust[pink].noGravity = true; - Main.dust[pink].noLight = true; - Main.dust[pink].position = source; - Main.dust[pink].scale = Main.rand.Next(70, 110) * 0.013f; - Main.dust[pink].velocity *= 0.1f; - } - } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - projectile.penetrate--; - if (projectile.penetrate <= 0) - { - projectile.Kill(); - } - else - { - if (projectile.velocity.X != oldVelocity.X) - { - projectile.velocity.X = -oldVelocity.X; - } - if (projectile.velocity.Y != oldVelocity.Y) - { - projectile.velocity.Y = -oldVelocity.Y; - } - } - return false; - } - } -}