From 72736df102c039dbd78e1efebf595c0e69ea6263 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 5 Apr 2022 03:39:36 -0500 Subject: [PATCH] 1 - More. --- Projectiles/Rogue/AccretionDiskProj.cs | 6 +++--- Projectiles/Rogue/AlphaVirusProjectile.cs | 6 +++--- Projectiles/Rogue/AntumbraShardProjectile.cs | 4 ++-- Projectiles/Rogue/ApoctolithProj.cs | 4 ++-- Projectiles/Rogue/AshenStalagmiteProj.cs | 4 ++-- Projectiles/Rogue/AuroradicalSplitter.cs | 4 ++-- Projectiles/Rogue/AuroradicalStar.cs | 4 ++-- Projectiles/Rogue/BallisticPoisonBombProj.cs | 6 +++--- Projectiles/Rogue/BlastBarrelProjectile.cs | 6 +++--- Projectiles/Rogue/BloodsoakedCrashax.cs | 4 ++-- Projectiles/Rogue/BouncingBettyProjectile.cs | 8 ++++---- Projectiles/Rogue/BrackishFlaskProj.cs | 10 +++++----- Projectiles/Rogue/BrackishSpear.cs | 4 ++-- Projectiles/Rogue/BrackishWater.cs | 4 ++-- Projectiles/Rogue/Brick.cs | 4 ++-- Projectiles/Rogue/BrimbladeProj.cs | 6 +++--- Projectiles/Rogue/BurningStrifeProj.cs | 10 +++++----- .../Rogue/CelestialReaperProjectile.cs | 6 +++--- Projectiles/Rogue/CelestusBoomerang.cs | 6 +++--- Projectiles/Rogue/CircletMark.cs | 4 ++-- .../Rogue/ConsecratedWaterProjectile.cs | 6 +++--- Projectiles/Rogue/ContaminatedBileFlask.cs | 4 ++-- Projectiles/Rogue/CorpusAvertorProj.cs | 4 ++-- Projectiles/Rogue/CraniumSmasherStealth.cs | 6 +++--- Projectiles/Rogue/CrystalPiercerProjectile.cs | 4 ++-- Projectiles/Rogue/Crystalline2.cs | 6 +++--- Projectiles/Rogue/CrystallineProj.cs | 4 ++-- Projectiles/Rogue/CursedDaggerProj.cs | 4 ++-- Projectiles/Rogue/DeepSeaDumbbell1.cs | 14 ++++++------- Projectiles/Rogue/DeepSeaDumbbell2.cs | 14 ++++++------- Projectiles/Rogue/DeepSeaDumbbell3.cs | 8 ++++---- Projectiles/Rogue/DeepWounderProjectile.cs | 2 +- Projectiles/Rogue/DeificThunderboltProj.cs | 2 +- Projectiles/Rogue/DesecratedWaterProj.cs | 4 ++-- Projectiles/Rogue/DestructionStar.cs | 4 ++-- Projectiles/Rogue/DukesDecapitatorProj.cs | 4 ++-- Projectiles/Rogue/DuststormInABottleProj.cs | 4 ++-- Projectiles/Rogue/EnchantedAxeProj.cs | 20 +++++++++---------- .../Rogue/EpidemicShredderProjectile.cs | 10 +++++----- Projectiles/Rogue/EquanimityProj.cs | 14 ++++++------- Projectiles/Rogue/EradicatorProjectile.cs | 4 ++-- Projectiles/Rogue/ExecutionersBladeProj.cs | 4 ++-- Projectiles/Rogue/ExorcismProj.cs | 6 +++--- Projectiles/Rogue/FantasyTalismanStealth.cs | 4 ++-- Projectiles/Rogue/FeatherKnifeProjectile.cs | 6 +++--- Projectiles/Rogue/FinalDawnFireball.cs | 4 ++-- Projectiles/Rogue/FinalDawnHorizontalSlash.cs | 4 ++-- Projectiles/Rogue/FinalDawnProjectile.cs | 10 +++++----- Projectiles/Rogue/FinalDawnThrow2.cs | 4 ++-- Projectiles/Rogue/FlameScytheProjectile.cs | 6 +++--- Projectiles/Rogue/FrostyFlareProj.cs | 6 +++--- Projectiles/Rogue/FrostyFlareStealth.cs | 8 ++++---- Projectiles/Rogue/GacruxianHome.cs | 4 ++-- Projectiles/Rogue/GacruxianProj.cs | 6 +++--- Projectiles/Rogue/GelDartProjectile.cs | 4 ++-- Projectiles/Rogue/GhoulishGougerBoomerang.cs | 4 ++-- Projectiles/Rogue/GodsParanoiaProj.cs | 4 ++-- Projectiles/Rogue/GreenDonkeyKongReference.cs | 8 ++++---- .../Rogue/HeavenfallenStardiskBoomerang.cs | 6 +++--- Projectiles/Rogue/HellsSunProj.cs | 6 +++--- Projectiles/Rogue/Honeycomb.cs | 8 ++++---- Projectiles/Rogue/HypothermiaChunk.cs | 4 ++-- Projectiles/Rogue/IceStarProjectile.cs | 10 +++++----- Projectiles/Rogue/IcebreakerHammer.cs | 6 +++--- Projectiles/Rogue/IchorSpearProj.cs | 4 ++-- Projectiles/Rogue/InfernalKrisProjectile.cs | 14 ++++++------- Projectiles/Rogue/InkBombProjectile.cs | 4 ++-- Projectiles/Rogue/JawsProjectile.cs | 6 +++--- Projectiles/Rogue/JewelSpike.cs | 4 ++-- Projectiles/Rogue/KelvinCatalystBoomerang.cs | 6 +++--- Projectiles/Rogue/LatcherMineProjectile.cs | 6 +++--- Projectiles/Rogue/LeonidCometSmall.cs | 4 ++-- .../Rogue/LeonidProgenitorBombshell.cs | 8 ++++---- Projectiles/Rogue/LionfishProj.cs | 4 ++-- Projectiles/Rogue/LuminousStrikerProj.cs | 10 +++++----- .../Rogue/MangroveChakramProjectile.cs | 4 ++-- Projectiles/Rogue/MetalChunk.cs | 8 ++++---- Projectiles/Rogue/MeteorFistProj.cs | 4 ++-- Projectiles/Rogue/MoltenAmputatorProj.cs | 4 ++-- Projectiles/Rogue/NanoblackMain.cs | 4 ++-- Projectiles/Rogue/NastyChollaBol.cs | 4 ++-- Projectiles/Rogue/NightsGazeProjectile.cs | 6 +++--- .../OrichalcumSpikedGemstoneProjectile.cs | 4 ++-- .../Rogue/PalladiumJavelinProjectile.cs | 6 +++--- Projectiles/Rogue/PenumbraBomb.cs | 2 +- Projectiles/Rogue/PhantasmalRuinProj.cs | 8 ++++---- Projectiles/Rogue/PhantomLanceProj.cs | 4 ++-- Projectiles/Rogue/PlaguenadeProj.cs | 4 ++-- Projectiles/Rogue/PoisonBol.cs | 4 ++-- Projectiles/Rogue/Prismalline3.cs | 4 ++-- Projectiles/Rogue/PrismallineProj.cs | 12 +++++------ Projectiles/Rogue/ProfanedPartisanProj.cs | 4 ++-- Projectiles/Rogue/RadiantStarKnife.cs | 6 +++--- .../Rogue/RefractionRotorProjectile.cs | 6 +++--- Projectiles/Rogue/RegulusRiotProj.cs | 6 +++--- Projectiles/Rogue/RotBallProjectile.cs | 4 ++-- Projectiles/Rogue/SandDollarStealth.cs | 4 ++-- Projectiles/Rogue/SandslasherProj.cs | 4 ++-- Projectiles/Rogue/ScarletDevilProjectile.cs | 10 +++++----- .../Rogue/ScourgeoftheSeasProjectile.cs | 4 ++-- Projectiles/Rogue/SeafoamBombProj.cs | 4 ++-- Projectiles/Rogue/SealedSingularityProj.cs | 6 +++--- Projectiles/Rogue/SearedPanProjectile.cs | 6 +++--- Projectiles/Rogue/SeraphimAngelicLight.cs | 4 ++-- Projectiles/Rogue/SeraphimAngelicLight2.cs | 2 +- Projectiles/Rogue/SeraphimProjectile.cs | 4 ++-- Projectiles/Rogue/ShatteredSunKnife.cs | 6 +++--- .../Rogue/ShatteredSunScorchedBlade.cs | 6 +++--- Projectiles/Rogue/ShockGrenadeProjectile.cs | 8 ++++---- Projectiles/Rogue/ShroomerangProj.cs | 4 ++-- Projectiles/Rogue/SkyfinNuke.cs | 6 +++--- Projectiles/Rogue/SludgeSplotchProj1.cs | 4 ++-- Projectiles/Rogue/SpearofPaleolithProj.cs | 4 ++-- .../Rogue/SpentFuelContainerProjectile.cs | 4 ++-- Projectiles/Rogue/StealthNimbus.cs | 4 ++-- Projectiles/Rogue/StealthNimbusCloud.cs | 4 ++-- .../Rogue/StormfrontRazorProjectile.cs | 4 ++-- Projectiles/Rogue/SupernovaBomb.cs | 12 +++++------ Projectiles/Rogue/SylvanSlashAttack.cs | 6 +++--- Projectiles/Rogue/TarraThornRight.cs | 4 ++-- .../Rogue/TarragonThrowingDartProjectile.cs | 6 +++--- Projectiles/Rogue/TerraDiskProjectile.cs | 8 ++++---- .../Rogue/TheAtomSplitterProjectile.cs | 6 +++--- Projectiles/Rogue/TheSyringeProj.cs | 8 ++++---- .../Rogue/TitaniumShurikenProjectile.cs | 6 +++--- Projectiles/Rogue/ToothBallProjectile.cs | 4 ++-- Projectiles/Rogue/TotalityFlask.cs | 8 ++++---- Projectiles/Rogue/TotalityTar.cs | 4 ++-- .../Rogue/ToxicantTwisterTwoPointZero.cs | 4 ++-- Projectiles/Rogue/TurbulanceProjectile.cs | 6 +++--- Projectiles/Rogue/UrchinStingerProj.cs | 4 ++-- Projectiles/Rogue/ValariBoomerang.cs | 4 ++-- Projectiles/Rogue/ValedictionBoomerang.cs | 4 ++-- Projectiles/Rogue/WrathwingSpear.cs | 6 +++--- .../Typeless/ArtifactOfResilienceShards.cs | 2 +- Projectiles/Typeless/BloodBomb.cs | 4 ++-- .../BrimstoneHellfireballFriendly2.cs | 4 ++-- Projectiles/Typeless/CursorProj.cs | 4 ++-- Projectiles/Typeless/DemonshadeRedDevil.cs | 4 ++-- .../Typeless/GodSlayerShrapnelRound.cs | 4 ++-- Projectiles/Typeless/NebulaStar.cs | 4 ++-- Projectiles/Typeless/OmegaBlueTentacle.cs | 6 +++--- Projectiles/Typeless/ReaverThornBase.cs | 4 ++-- Projectiles/Typeless/SabatonSlam.cs | 4 ++-- Projectiles/Typeless/StarStruckWaterBottle.cs | 4 ++-- Projectiles/Typeless/StormBolt.cs | 4 ++-- Projectiles/Typeless/TerminusHoldout.cs | 2 +- 147 files changed, 407 insertions(+), 407 deletions(-) diff --git a/Projectiles/Rogue/AccretionDiskProj.cs b/Projectiles/Rogue/AccretionDiskProj.cs index 49dd879d33..06f315df43 100644 --- a/Projectiles/Rogue/AccretionDiskProj.cs +++ b/Projectiles/Rogue/AccretionDiskProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -150,8 +150,8 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - int disk = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage, Projectile.knockBack, Projectile.owner); - int disk2 = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage, Projectile.knockBack, Projectile.owner); + int disk = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage, Projectile.knockBack, Projectile.owner); + int disk2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage, Projectile.knockBack, Projectile.owner); if (Projectile.Calamity().stealthStrike) { Main.projectile[disk].idStaticNPCHitCooldown = Main.projectile[disk2].idStaticNPCHitCooldown = 6; diff --git a/Projectiles/Rogue/AlphaVirusProjectile.cs b/Projectiles/Rogue/AlphaVirusProjectile.cs index 0f28c35791..99f6b3f3dc 100644 --- a/Projectiles/Rogue/AlphaVirusProjectile.cs +++ b/Projectiles/Rogue/AlphaVirusProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using CalamityMod.NPCs.StormWeaver; @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue float kb = 1f; float ai0 = 1f; // Stealth strike spawned seekers set ai[0] to 1, which makes them cling to the parent projectile. Vector2 vel = Main.rand.NextVector2CircularEdge(5f, 5f); - Projectile.NewProjectile(Projectile.Center, vel, projID, damage, kb, Projectile.owner, ai0, Projectile.identity); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, vel, projID, damage, kb, Projectile.owner, ai0, Projectile.identity); } } else @@ -202,7 +202,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numSeekers; i++) { Vector2 velocity = (MathHelper.Pi * i / 3f).ToRotationVector2() * speed; - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), damage, kb, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), damage, kb, Projectile.owner, 0f, 0f); } int numDust = 20; diff --git a/Projectiles/Rogue/AntumbraShardProjectile.cs b/Projectiles/Rogue/AntumbraShardProjectile.cs index 3dd889d34f..a5a0ff7db8 100644 --- a/Projectiles/Rogue/AntumbraShardProjectile.cs +++ b/Projectiles/Rogue/AntumbraShardProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.Calamity().stealthStrike) { - int star = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); + int star = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); Main.projectile[star].Calamity().rogue = true; } } diff --git a/Projectiles/Rogue/ApoctolithProj.cs b/Projectiles/Rogue/ApoctolithProj.cs index 68db7b245f..7c96fcfeaa 100644 --- a/Projectiles/Rogue/ApoctolithProj.cs +++ b/Projectiles/Rogue/ApoctolithProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - int shard = Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack / 2f, Projectile.owner); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack / 2f, Projectile.owner); Main.projectile[shard].frame = Main.rand.Next(3); split += 1; } diff --git a/Projectiles/Rogue/AshenStalagmiteProj.cs b/Projectiles/Rogue/AshenStalagmiteProj.cs index 479e7cb4d3..33657b0038 100644 --- a/Projectiles/Rogue/AshenStalagmiteProj.cs +++ b/Projectiles/Rogue/AshenStalagmiteProj.cs @@ -1,4 +1,4 @@ - + using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 6; i++) { int dustIndex = Dust.NewDust(Projectile.Center, 1, 1, 1, Projectile.velocity.X, Projectile.velocity.Y); - Projectile.NewProjectile(Projectile.Center, Main.dust[dustIndex].velocity, ModContent.ProjectileType(), Projectile.damage / 2, 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Main.dust[dustIndex].velocity, ModContent.ProjectileType(), Projectile.damage / 2, 0, Projectile.owner, 0, 0); } } } diff --git a/Projectiles/Rogue/AuroradicalSplitter.cs b/Projectiles/Rogue/AuroradicalSplitter.cs index d281b1e2db..6286a64e35 100644 --- a/Projectiles/Rogue/AuroradicalSplitter.cs +++ b/Projectiles/Rogue/AuroradicalSplitter.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue for (float i = 0; i < 5; i++) { float angle = MathHelper.TwoPi / 5f * i; - int star = Projectile.NewProjectile(Projectile.Center, angle.ToRotationVector2() * 5f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.87), Projectile.knockBack, Projectile.owner, 0f, 0f); + int star = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, angle.ToRotationVector2() * 5f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.87), Projectile.knockBack, Projectile.owner, 0f, 0f); Main.projectile[star].Calamity().stealthStrike = Projectile.Calamity().stealthStrike; } Projectile.position = Projectile.Center; diff --git a/Projectiles/Rogue/AuroradicalStar.cs b/Projectiles/Rogue/AuroradicalStar.cs index 51f3b9b3d6..0ae9fc7b06 100644 --- a/Projectiles/Rogue/AuroradicalStar.cs +++ b/Projectiles/Rogue/AuroradicalStar.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 pos = new Vector2(targetPos.X + width * 0.5f + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); Vector2 velocity = (targetPos - pos) / 40f; int dmg = Projectile.damage / 2; - int comet = Projectile.NewProjectile(pos, velocity, ModContent.ProjectileType(), dmg, Projectile.knockBack, Projectile.owner); + int comet = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, velocity, ModContent.ProjectileType(), dmg, Projectile.knockBack, Projectile.owner); if (comet.WithinBounds(Main.maxProjectiles)) { Main.projectile[comet].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/BallisticPoisonBombProj.cs b/Projectiles/Rogue/BallisticPoisonBombProj.cs index f3ca0201bc..810ad0f7f1 100644 --- a/Projectiles/Rogue/BallisticPoisonBombProj.cs +++ b/Projectiles/Rogue/BallisticPoisonBombProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using System; using Terraria; @@ -69,13 +69,13 @@ namespace CalamityMod.Projectiles.Rogue for (int s = 0; s < projAmt; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Projectile.owner, 0f, 0f); } int cloudAmt = Main.rand.Next(8, 13); for (int c = 0; c < cloudAmt; c++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, (float)Main.rand.Next(-45, 1)); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, (float)Main.rand.Next(-45, 1)); } } for (int d = 0; d < 5; d++) diff --git a/Projectiles/Rogue/BlastBarrelProjectile.cs b/Projectiles/Rogue/BlastBarrelProjectile.cs index d06e6b9626..63c5de7e59 100644 --- a/Projectiles/Rogue/BlastBarrelProjectile.cs +++ b/Projectiles/Rogue/BlastBarrelProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -75,12 +75,12 @@ namespace CalamityMod.Projectiles.Rogue if (Main.rand.NextBool(3)) { Vector2 shrapnelVelocity = (Vector2.UnitY * Main.rand.NextFloat(-19f, -4f)).RotatedByRandom(MathHelper.ToRadians(30f)); - Projectile.NewProjectile(Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType(), Projectile.damage, 3f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType(), Projectile.damage, 3f, Projectile.owner); } else { Vector2 fireVelocity = (Vector2.UnitY * Main.rand.NextFloat(-19f, -4f)).RotatedByRandom(MathHelper.ToRadians(40f)); - Projectile fire = Projectile.NewProjectileDirect(Projectile.Center, Projectile.velocity + fireVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), 1f, Projectile.owner); + Projectile fire = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + fireVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), 1f, Projectile.owner); fire.timeLeft = 300; fire.penetrate = 3; } diff --git a/Projectiles/Rogue/BloodsoakedCrashax.cs b/Projectiles/Rogue/BloodsoakedCrashax.cs index f94032de56..ccc970d9fe 100644 --- a/Projectiles/Rogue/BloodsoakedCrashax.cs +++ b/Projectiles/Rogue/BloodsoakedCrashax.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Rogue int projID = ModContent.ProjectileType(); int bloodDamage = Projectile.damage; float bloodKB = 1f; - int stealth = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, projID, bloodDamage, bloodKB, Projectile.owner, 1f, 0.85f + Main.rand.NextFloat() * 1.15f); + int stealth = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, projID, bloodDamage, bloodKB, Projectile.owner, 1f, 0.85f + Main.rand.NextFloat() * 1.15f); if (stealth.WithinBounds(Main.maxProjectiles)) { Main.projectile[stealth].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/BouncingBettyProjectile.cs b/Projectiles/Rogue/BouncingBettyProjectile.cs index 92c1fe9ee7..f2cca1b902 100644 --- a/Projectiles/Rogue/BouncingBettyProjectile.cs +++ b/Projectiles/Rogue/BouncingBettyProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); if (Main.myPlayer == Projectile.owner) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 8f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 8f, Projectile.owner); if (Projectile.Calamity().stealthStrike) { int projectileCount = 12; @@ -36,12 +36,12 @@ namespace CalamityMod.Projectiles.Rogue if (Main.rand.NextBool(2)) { Vector2 shrapnelVelocity = (Vector2.UnitY * Main.rand.NextFloat(-12f, -4f)).RotatedByRandom(MathHelper.ToRadians(30f)); - Projectile.NewProjectile(Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), 3f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), 3f, Projectile.owner); } else { Vector2 fireVelocity = (Vector2.UnitY * Main.rand.NextFloat(-12f, -4f)).RotatedByRandom(MathHelper.ToRadians(40f)); - Projectile fire = Projectile.NewProjectileDirect(Projectile.Center, Projectile.velocity + fireVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6f), 1f, Projectile.owner); + Projectile fire = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + fireVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6f), 1f, Projectile.owner); fire.localNPCHitCooldown = 9; fire.timeLeft = 240; } diff --git a/Projectiles/Rogue/BrackishFlaskProj.cs b/Projectiles/Rogue/BrackishFlaskProj.cs index e9467a59ee..15cb0365cd 100644 --- a/Projectiles/Rogue/BrackishFlaskProj.cs +++ b/Projectiles/Rogue/BrackishFlaskProj.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -49,16 +49,16 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, -32f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, -32f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 1f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 1f, 0f); } } } diff --git a/Projectiles/Rogue/BrackishSpear.cs b/Projectiles/Rogue/BrackishSpear.cs index 6477247aeb..c82a9add6f 100644 --- a/Projectiles/Rogue/BrackishSpear.cs +++ b/Projectiles/Rogue/BrackishSpear.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue } int dmg = Projectile.damage; float kBack = Projectile.knockBack; - int number = Projectile.NewProjectile(Projectile.position.X + Projectile.velocity.X + (float)(Projectile.width / 2), Projectile.position.Y + Projectile.velocity.Y + (float)(Projectile.height / 2), Projectile.velocity.X, Projectile.velocity.Y, projType, dmg, kBack, Projectile.owner, 0f, Projectile.ai[1] + 1f); + int number = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + Projectile.velocity.X + (float)(Projectile.width / 2), Projectile.position.Y + Projectile.velocity.Y + (float)(Projectile.height / 2), Projectile.velocity.X, Projectile.velocity.Y, projType, dmg, kBack, Projectile.owner, 0f, Projectile.ai[1] + 1f); NetMessage.SendData(MessageID.SyncProjectile, -1, -1, null, number, 0f, 0f, 0f, 0, 0, 0); } } @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - int projectile2 = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + int projectile2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); Main.projectile[projectile2].penetrate = 1; } for (int k = 0; k < 3; k++) diff --git a/Projectiles/Rogue/BrackishWater.cs b/Projectiles/Rogue/BrackishWater.cs index 1e3a313fea..4279ade70f 100644 --- a/Projectiles/Rogue/BrackishWater.cs +++ b/Projectiles/Rogue/BrackishWater.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } diff --git a/Projectiles/Rogue/Brick.cs b/Projectiles/Rogue/Brick.cs index 070338219b..3b81d9f25b 100644 --- a/Projectiles/Rogue/Brick.cs +++ b/Projectiles/Rogue/Brick.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ModLoader; using CalamityMod.Items.Weapons.Rogue; using Terraria.ID; @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), Projectile.knockBack / 2f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), Projectile.knockBack / 2f, Projectile.owner); split += 1; } } diff --git a/Projectiles/Rogue/BrimbladeProj.cs b/Projectiles/Rogue/BrimbladeProj.cs index 55003d2b59..7d746cafbf 100644 --- a/Projectiles/Rogue/BrimbladeProj.cs +++ b/Projectiles/Rogue/BrimbladeProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numProj + 1; i++) { Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X * 0.25f, perturbedSpeed.Y * 0.25f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X * 0.25f, perturbedSpeed.Y * 0.25f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); } } for (int k = 0; k < 5; k++) @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numProj + 1; i++) { Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X * 0.25f, perturbedSpeed.Y * 0.25f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X * 0.25f, perturbedSpeed.Y * 0.25f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); } } for (int k = 0; k < 5; k++) diff --git a/Projectiles/Rogue/BurningStrifeProj.cs b/Projectiles/Rogue/BurningStrifeProj.cs index e7e617b8ea..2354fb5637 100644 --- a/Projectiles/Rogue/BurningStrifeProj.cs +++ b/Projectiles/Rogue/BurningStrifeProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike && Projectile.penetrate != 1) { SoundEngine.PlaySound(SoundID.Item, Projectile.Center, 103); - int proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner); Main.projectile[proj].timeLeft += 20; Main.projectile[proj].Center = Projectile.Center; Main.projectile[proj].Calamity().rogue = true; @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike && Projectile.penetrate != 1) { SoundEngine.PlaySound(SoundID.Item, Projectile.Center, 103); - int proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner); Main.projectile[proj].timeLeft += 20; Main.projectile[proj].Center = Projectile.Center; Main.projectile[proj].Calamity().rogue = true; @@ -85,9 +85,9 @@ namespace CalamityMod.Projectiles.Rogue int proj; SoundEngine.PlaySound(SoundID.Item, Projectile.Center, 103); if(Projectile.Calamity().stealthStrike) - proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner); + proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner); else - proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner); + proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.33), Projectile.knockBack, Projectile.owner); Main.projectile[proj].Center = Projectile.Center; Main.projectile[proj].Calamity().rogue = true; } diff --git a/Projectiles/Rogue/CelestialReaperProjectile.cs b/Projectiles/Rogue/CelestialReaperProjectile.cs index 41b4e7ef9c..cc59ef7ffc 100644 --- a/Projectiles/Rogue/CelestialReaperProjectile.cs +++ b/Projectiles/Rogue/CelestialReaperProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ModLoader; @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue int projID = ModContent.ProjectileType(); int damage = (int)(Projectile.damage * 0.25f); float kb = Projectile.knockBack * 0.5f; - Projectile.NewProjectile(Projectile.Center, Projectile.velocity, projID, damage, kb, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, projID, damage, kb, Projectile.owner); } } } @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue { float angle = MathHelper.TwoPi * i / numSplits; Vector2 velocity = angle.ToRotationVector2() * speed; - Projectile.NewProjectile(Projectile.Center, velocity, projID, damage, kb, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, damage, kb, Projectile.owner); } } } diff --git a/Projectiles/Rogue/CelestusBoomerang.cs b/Projectiles/Rogue/CelestusBoomerang.cs index 8138e679ca..7a3541de0a 100644 --- a/Projectiles/Rogue/CelestusBoomerang.cs +++ b/Projectiles/Rogue/CelestusBoomerang.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -159,8 +159,8 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner); } } SoundEngine.PlaySound(SoundID.Item122, Projectile.Center); diff --git a/Projectiles/Rogue/CircletMark.cs b/Projectiles/Rogue/CircletMark.cs index 0c2b5aad18..2923c73364 100644 --- a/Projectiles/Rogue/CircletMark.cs +++ b/Projectiles/Rogue/CircletMark.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localAI[1] += 1f; if (Projectile.localAI[1] == 60f && Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 2f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 2f, Projectile.owner, 0f, 0f); } if (Projectile.localAI[1] >= 120f) { diff --git a/Projectiles/Rogue/ConsecratedWaterProjectile.cs b/Projectiles/Rogue/ConsecratedWaterProjectile.cs index cf75065365..f7aa80a8db 100644 --- a/Projectiles/Rogue/ConsecratedWaterProjectile.cs +++ b/Projectiles/Rogue/ConsecratedWaterProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue Point result; if (WorldUtils.Find(Projectile.Top.ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result)) { - Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 2f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 2f, Projectile.owner); } } //stealth strike @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue Point result; if (WorldUtils.Find((Projectile.Top + i * Main.rand.NextFloat(56f, 108f) * Vector2.UnitX).ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result)) { - Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 2f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 2f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/ContaminatedBileFlask.cs b/Projectiles/Rogue/ContaminatedBileFlask.cs index 38fe61255c..7c319e3abd 100644 --- a/Projectiles/Rogue/ContaminatedBileFlask.cs +++ b/Projectiles/Rogue/ContaminatedBileFlask.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item107, Projectile.Bottom); - Projectile explosion = Projectile.NewProjectileDirect(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner); + Projectile explosion = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner); if (explosion.whoAmI.WithinBounds(Main.maxProjectiles)) { explosion.Calamity().stealthStrike = Projectile.Calamity().stealthStrike; diff --git a/Projectiles/Rogue/CorpusAvertorProj.cs b/Projectiles/Rogue/CorpusAvertorProj.cs index 913897b9f2..0accde91bf 100644 --- a/Projectiles/Rogue/CorpusAvertorProj.cs +++ b/Projectiles/Rogue/CorpusAvertorProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue float mult = Projectile.ai[0] / 80f; // Ranges from 0.25 to 0.5 to 0.75 velocity *= mult; - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * mult), Projectile.knockBack * mult, Projectile.owner, Projectile.ai[0]); } } diff --git a/Projectiles/Rogue/CraniumSmasherStealth.cs b/Projectiles/Rogue/CraniumSmasherStealth.cs index 6c7fb4ccd7..6180c46a24 100644 --- a/Projectiles/Rogue/CraniumSmasherStealth.cs +++ b/Projectiles/Rogue/CraniumSmasherStealth.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - int smash = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); + int smash = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); Main.projectile[smash].Center = Projectile.Center; } } @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - int smash = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); + int smash = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); Main.projectile[smash].Center = Projectile.Center; } } diff --git a/Projectiles/Rogue/CrystalPiercerProjectile.cs b/Projectiles/Rogue/CrystalPiercerProjectile.cs index 3b55550801..4c40e8f2d8 100644 --- a/Projectiles/Rogue/CrystalPiercerProjectile.cs +++ b/Projectiles/Rogue/CrystalPiercerProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/Crystalline2.cs b/Projectiles/Rogue/Crystalline2.cs index b89e047d18..8105c77eea 100644 --- a/Projectiles/Rogue/Crystalline2.cs +++ b/Projectiles/Rogue/Crystalline2.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numProj + 1; i++) { Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X * 0.8f, Projectile.velocity.Y * 0.8f).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - int proj = Projectile.NewProjectile(Projectile.Center, perturbedSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, 2f); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, 2f); Main.projectile[proj].timeLeft = 20; } } @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 3; i++) { Vector2 projspeed = new Vector2(Main.rand.NextFloat(-8f, 8f), Main.rand.NextFloat(-8f, 8f)); - int shard = Projectile.NewProjectile(Projectile.Center, projspeed, ProjectileID.CrystalShard, (int)(Projectile.damage * 0.4f), 2f, Projectile.owner); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, projspeed, ProjectileID.CrystalShard, (int)(Projectile.damage * 0.4f), 2f, Projectile.owner); if (shard.WithinBounds(Main.maxProjectiles)) Main.projectile[shard].Calamity().forceRogue = true; } diff --git a/Projectiles/Rogue/CrystallineProj.cs b/Projectiles/Rogue/CrystallineProj.cs index a2b56b80e1..6d10c037b6 100644 --- a/Projectiles/Rogue/CrystallineProj.cs +++ b/Projectiles/Rogue/CrystallineProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Rogue { float AI1 = Projectile.Calamity().stealthStrike ? 1f : 0f; Vector2 perturbedSpeed = Projectile.velocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(Projectile.Center, perturbedSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, AI1); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, 0f, AI1); } } } diff --git a/Projectiles/Rogue/CursedDaggerProj.cs b/Projectiles/Rogue/CursedDaggerProj.cs index 560a0a3cbc..8ebe9c5bf4 100644 --- a/Projectiles/Rogue/CursedDaggerProj.cs +++ b/Projectiles/Rogue/CursedDaggerProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { Vector2 velocity = new Vector2(Main.rand.NextFloat(-14f, 14f), Main.rand.NextFloat(-14f, 14f)); - int flame = Projectile.NewProjectile(Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.CursedFlameFriendly : ProjectileID.CursedDartFlame, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); + int flame = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.CursedFlameFriendly : ProjectileID.CursedDartFlame, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); if (flame.WithinBounds(Main.maxProjectiles)) { Main.projectile[flame].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/DeepSeaDumbbell1.cs b/Projectiles/Rogue/DeepSeaDumbbell1.cs index 9176eaf68d..cac13e1909 100644 --- a/Projectiles/Rogue/DeepSeaDumbbell1.cs +++ b/Projectiles/Rogue/DeepSeaDumbbell1.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using System; using Terraria; @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f); float num628 = (float)Main.rand.Next(-35, 36) * 0.01f; @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f); float num628 = (float)Main.rand.Next(-35, 36) * 0.01f; @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; @@ -125,7 +125,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f); float num628 = (float)Main.rand.Next(-35, 36) * 0.01f; @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; diff --git a/Projectiles/Rogue/DeepSeaDumbbell2.cs b/Projectiles/Rogue/DeepSeaDumbbell2.cs index db4d837e17..9268dc8249 100644 --- a/Projectiles/Rogue/DeepSeaDumbbell2.cs +++ b/Projectiles/Rogue/DeepSeaDumbbell2.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using System; using Terraria; @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f); float num628 = (float)Main.rand.Next(-35, 36) * 0.01f; @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f); float num628 = (float)Main.rand.Next(-35, 36) * 0.01f; @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Main.myPlayer, 0f, 0f); float num628 = (float)Main.rand.Next(-35, 36) * 0.01f; @@ -151,7 +151,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; diff --git a/Projectiles/Rogue/DeepSeaDumbbell3.cs b/Projectiles/Rogue/DeepSeaDumbbell3.cs index 7eee9e6356..a91ed25a14 100644 --- a/Projectiles/Rogue/DeepSeaDumbbell3.cs +++ b/Projectiles/Rogue/DeepSeaDumbbell3.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using System; using Terraria; @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Rogue num629 *= -10f; } - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, num628, num629, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Main.myPlayer, 0f, 0f); num3 = num627; diff --git a/Projectiles/Rogue/DeepWounderProjectile.cs b/Projectiles/Rogue/DeepWounderProjectile.cs index 8f3a3a9d39..a4f98e62f5 100644 --- a/Projectiles/Rogue/DeepWounderProjectile.cs +++ b/Projectiles/Rogue/DeepWounderProjectile.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 waterVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); waterVelocity.Normalize(); waterVelocity *= 3; - Projectile.NewProjectile(spriteCenter, waterVelocity, ModContent.ProjectileType(), 20, 1, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spriteCenter, waterVelocity, ModContent.ProjectileType(), 20, 1, Projectile.owner, 0, 0); } } } diff --git a/Projectiles/Rogue/DeificThunderboltProj.cs b/Projectiles/Rogue/DeificThunderboltProj.cs index f8770bb860..6c44a23768 100644 --- a/Projectiles/Rogue/DeificThunderboltProj.cs +++ b/Projectiles/Rogue/DeificThunderboltProj.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 ai0 = fireTo - spawnPoint; float ai = (float)Main.rand.Next(100); Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(0.78539818525314331)) * 9f; - int proj = Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ProjectileID.CultistBossLightningOrbArc, (int)(Projectile.damage * damageMult), Projectile.knockBack, Projectile.owner, ai0.ToRotation(), ai); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ProjectileID.CultistBossLightningOrbArc, (int)(Projectile.damage * damageMult), Projectile.knockBack, Projectile.owner, ai0.ToRotation(), ai); Main.projectile[proj].extraUpdates += 9; //Does not force to Rogue because lightning is extremely abusable with Moonstone Crown Main.projectile[proj].friendly = true; diff --git a/Projectiles/Rogue/DesecratedWaterProj.cs b/Projectiles/Rogue/DesecratedWaterProj.cs index c1d633b26e..3b0b0397ff 100644 --- a/Projectiles/Rogue/DesecratedWaterProj.cs +++ b/Projectiles/Rogue/DesecratedWaterProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 value17 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); value17.Normalize(); value17 *= (float)Main.rand.Next(10, 201) * 0.01f; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 1f, Projectile.owner, (Projectile.Calamity().stealthStrike ? 1f : 0f), 1f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 1f, Projectile.owner, (Projectile.Calamity().stealthStrike ? 1f : 0f), 1f); } } } diff --git a/Projectiles/Rogue/DestructionStar.cs b/Projectiles/Rogue/DestructionStar.cs index a614233dfa..6d86d710a7 100644 --- a/Projectiles/Rogue/DestructionStar.cs +++ b/Projectiles/Rogue/DestructionStar.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < hitCount; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f); } } } diff --git a/Projectiles/Rogue/DukesDecapitatorProj.cs b/Projectiles/Rogue/DukesDecapitatorProj.cs index c7f0a4cd18..6f3fb40950 100644 --- a/Projectiles/Rogue/DukesDecapitatorProj.cs +++ b/Projectiles/Rogue/DukesDecapitatorProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue { float velocityX = Main.rand.NextFloat(-0.8f, 0.8f); float velocityY = Main.rand.NextFloat(-0.8f, -0.8f); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, velocityX, velocityY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, velocityX, velocityY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8), Projectile.knockBack, Projectile.owner); } } if (rotationAmount <= 0f) diff --git a/Projectiles/Rogue/DuststormInABottleProj.cs b/Projectiles/Rogue/DuststormInABottleProj.cs index 9b6b0b1df2..7db178b52a 100644 --- a/Projectiles/Rogue/DuststormInABottleProj.cs +++ b/Projectiles/Rogue/DuststormInABottleProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue for (int index = 0; index < cloudAmt; index++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f); - Projectile.NewProjectile(Projectile.Center, velocity, projType, Projectile.damage, Projectile.knockBack * 0.5f, Projectile.owner, stealth ? 1f : 0f, (float)Main.rand.Next(-45, 1)); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projType, Projectile.damage, Projectile.knockBack * 0.5f, Projectile.owner, stealth ? 1f : 0f, (float)Main.rand.Next(-45, 1)); } } } diff --git a/Projectiles/Rogue/EnchantedAxeProj.cs b/Projectiles/Rogue/EnchantedAxeProj.cs index 228bfd0099..c434c578ea 100644 --- a/Projectiles/Rogue/EnchantedAxeProj.cs +++ b/Projectiles/Rogue/EnchantedAxeProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Rogue } newAxeVelocity.Normalize(); newAxeVelocity *= 20f; - int p = Projectile.NewProjectile(Projectile.position, newAxeVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.2f), 2, Projectile.owner, 0, 0); + int p = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, newAxeVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.2f), 2, Projectile.owner, 0, 0); Main.projectile[p].Calamity().stealthStrike = Projectile.Calamity().stealthStrike; summonAxe = false; } @@ -108,14 +108,14 @@ namespace CalamityMod.Projectiles.Rogue { float axeSpeed = 15f; int axeDamage = Projectile.damage / 2; - Projectile.NewProjectile(Projectile.position, new Vector2(1f, 0f) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); - Projectile.NewProjectile(Projectile.position, new Vector2(0f, 1f) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); - Projectile.NewProjectile(Projectile.position, new Vector2(-1f, 0f) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); - Projectile.NewProjectile(Projectile.position, new Vector2(0f, -1f) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); - Projectile.NewProjectile(Projectile.position, Vector2.Normalize(new Vector2(1f, 1f)) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); - Projectile.NewProjectile(Projectile.position, Vector2.Normalize(new Vector2(1f, -1f)) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); - Projectile.NewProjectile(Projectile.position, Vector2.Normalize(new Vector2(-1f, -1f)) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); - Projectile.NewProjectile(Projectile.position, Vector2.Normalize(new Vector2(-1f, 1f)) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(1f, 0f) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(0f, 1f) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(-1f, 0f) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(0f, -1f) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, Vector2.Normalize(new Vector2(1f, 1f)) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, Vector2.Normalize(new Vector2(1f, -1f)) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, Vector2.Normalize(new Vector2(-1f, -1f)) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, Vector2.Normalize(new Vector2(-1f, 1f)) * axeSpeed, ModContent.ProjectileType(), axeDamage, 2, Projectile.owner, 0, 0); } } diff --git a/Projectiles/Rogue/EpidemicShredderProjectile.cs b/Projectiles/Rogue/EpidemicShredderProjectile.cs index 9a7bc005b4..5f90a8c967 100644 --- a/Projectiles/Rogue/EpidemicShredderProjectile.cs +++ b/Projectiles/Rogue/EpidemicShredderProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ModLoader; @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue } if (Projectile.timeLeft % 5 == 0 && Projectile.Calamity().stealthStrike) { - int projIndex2 = Projectile.NewProjectile(Projectile.Center, (Projectile.velocity * -1f).RotatedByRandom(MathHelper.ToRadians(15f)), ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); + int projIndex2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, (Projectile.velocity * -1f).RotatedByRandom(MathHelper.ToRadians(15f)), ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); if (projIndex2.WithinBounds(Main.maxProjectiles)) Main.projectile[projIndex2].Calamity().forceRogue = true; } @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Rogue } if (Projectile.ai[0] == 0f) { - int projIndex1 = Projectile.NewProjectile(Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); + int projIndex1 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); if (projIndex1.WithinBounds(Main.maxProjectiles)) Main.projectile[projIndex1].Calamity().forceRogue = true; Projectile.ai[0] = 12f; //0.2th of a second cooldown @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.ai[0] == 0f) { - int projectileIndex = Projectile.NewProjectile(Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); + int projectileIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); if (projectileIndex.WithinBounds(Main.maxProjectiles)) Main.projectile[projectileIndex].Calamity().forceRogue = true; Projectile.ai[0] = 12f; //0.2th of a second cooldown @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.ai[0] == 0f) { - int projectileIndex = Projectile.NewProjectile(Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); + int projectileIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); if (projectileIndex.WithinBounds(Main.maxProjectiles)) Main.projectile[projectileIndex].Calamity().forceRogue = true; Projectile.ai[0] = 12f; //0.2th of a second cooldown diff --git a/Projectiles/Rogue/EquanimityProj.cs b/Projectiles/Rogue/EquanimityProj.cs index 5358559e08..26226955c5 100644 --- a/Projectiles/Rogue/EquanimityProj.cs +++ b/Projectiles/Rogue/EquanimityProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -50,10 +50,10 @@ namespace CalamityMod.Projectiles.Rogue Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - Projectile.NewProjectile(Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner); if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner); } } @@ -84,10 +84,10 @@ namespace CalamityMod.Projectiles.Rogue Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - Projectile.NewProjectile(Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); } } } @@ -105,10 +105,10 @@ namespace CalamityMod.Projectiles.Rogue Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - Projectile.NewProjectile(Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/EradicatorProjectile.cs b/Projectiles/Rogue/EradicatorProjectile.cs index 9a3b5b5a59..ee672c59b0 100644 --- a/Projectiles/Rogue/EradicatorProjectile.cs +++ b/Projectiles/Rogue/EradicatorProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); int laserDamage = (int)(Projectile.damage * 0.12D); - Projectile laser = Projectile.NewProjectileDirect(Projectile.Center, velocity, ModContent.ProjectileType(), laserDamage, 0f, Projectile.owner); + Projectile laser = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), laserDamage, 0f, Projectile.owner); if (laser.whoAmI.WithinBounds(Main.maxProjectiles)) { laser.Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/ExecutionersBladeProj.cs b/Projectiles/Rogue/ExecutionersBladeProj.cs index 75476b7860..35fb6829bf 100644 --- a/Projectiles/Rogue/ExecutionersBladeProj.cs +++ b/Projectiles/Rogue/ExecutionersBladeProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item73, Projectile.Center); for (int i = 0; i < 20; i++) { - Projectile.NewProjectile(new Vector2(position.X + (-600 + i * 60), position.Y - 800), new Vector2(0f, 2.5f), ModContent.ProjectileType(), (int)(Projectile.damage * 1.2f), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), new Vector2(position.X + (-600 + i * 60), position.Y - 800), new Vector2(0f, 2.5f), ModContent.ProjectileType(), (int)(Projectile.damage * 1.2f), Projectile.knockBack, Projectile.owner); } } } diff --git a/Projectiles/Rogue/ExorcismProj.cs b/Projectiles/Rogue/ExorcismProj.cs index c349f6b85b..6f5bfbb184 100644 --- a/Projectiles/Rogue/ExorcismProj.cs +++ b/Projectiles/Rogue/ExorcismProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Rogue //Crystal smash sound SoundEngine.PlaySound(SoundID.Item27, Projectile.Center); // Light burst - int p = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0, Projectile.owner, Projectile.ai[0] - 1f, 0); + int p = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0, Projectile.owner, Projectile.ai[0] - 1f, 0); Main.projectile[p].rotation = Projectile.rotation; // Stars if (Projectile.Calamity().stealthStrike) @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 pos = new Vector2(Projectile.Center.X + (float)Projectile.width * 0.5f + (float)Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); float speedX = (Projectile.Center.X - pos.X) / 20f; float speedY = (Projectile.Center.Y - pos.Y) / 20f; - Projectile.NewProjectile(pos.X, pos.Y, speedX, speedY, ModContent.ProjectileType(), Projectile.damage / 2, 3, Projectile.owner, Main.rand.NextFloat(-3f, 3f), 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos.X, pos.Y, speedX, speedY, ModContent.ProjectileType(), Projectile.damage / 2, 3, Projectile.owner, Main.rand.NextFloat(-3f, 3f), 0f); } } } diff --git a/Projectiles/Rogue/FantasyTalismanStealth.cs b/Projectiles/Rogue/FantasyTalismanStealth.cs index e23bb4f53c..f22c99c298 100644 --- a/Projectiles/Rogue/FantasyTalismanStealth.cs +++ b/Projectiles/Rogue/FantasyTalismanStealth.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue // Use a tiny velocity to ensure that rotation works correctly. // The speed should be so low that it will make no meaningful mechanical difference. Vector2 soulVelocity = Projectile.velocity.SafeNormalize(Vector2.Zero) * 0.0001f; - Projectile.NewProjectile(Projectile.Center, soulVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, soulVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/FeatherKnifeProjectile.cs b/Projectiles/Rogue/FeatherKnifeProjectile.cs index f51b3efcb1..0ab9c2b0a5 100644 --- a/Projectiles/Rogue/FeatherKnifeProjectile.cs +++ b/Projectiles/Rogue/FeatherKnifeProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(Projectile.position, new Vector2(Projectile.velocity.X / 20, 2), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(Projectile.velocity.X / 20, 2), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceRogue = true; } @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - int proj = Projectile.NewProjectile(Projectile.position, new Vector2(Projectile.velocity.X / 20, 2), ModContent.ProjectileType(), (int)(Projectile.damage * 0.69), Projectile.knockBack, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, new Vector2(Projectile.velocity.X / 20, 2), ModContent.ProjectileType(), (int)(Projectile.damage * 0.69), Projectile.knockBack, Projectile.owner); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceRogue = true; } diff --git a/Projectiles/Rogue/FinalDawnFireball.cs b/Projectiles/Rogue/FinalDawnFireball.cs index 8044e67a86..1769502612 100644 --- a/Projectiles/Rogue/FinalDawnFireball.cs +++ b/Projectiles/Rogue/FinalDawnFireball.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.myPlayer == Projectile.owner) { - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs index 1f6591d91b..b167b814b9 100644 --- a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs +++ b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/FinalDawnProjectile.cs b/Projectiles/Rogue/FinalDawnProjectile.cs index 3c97555d0d..6168d38ddc 100644 --- a/Projectiles/Rogue/FinalDawnProjectile.cs +++ b/Projectiles/Rogue/FinalDawnProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Rogue // Stealth Strike if (player.Calamity().StealthStrikeAvailable() && Projectile.ai[1] != 1f) { - int stealth = Projectile.NewProjectile(player.Center, + int stealth = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), player.Center, player.SafeDirectionTo(Main.MouseWorld) * 38f, ModContent.ProjectileType(), (int)(Projectile.damage * 1.05f), @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue } else { - Projectile.NewProjectile(Projectile.Center, + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(Main.MouseWorld) * 38f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue // Stealth if (player.Calamity().StealthStrikeAvailable() && Projectile.ai[1] != 1f) { - int stealth = Projectile.NewProjectile(Projectile.Center, + int stealth = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.275f), @@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Rogue else { //This one doesn't consume stealth since it replenishes stealth on hits - Projectile.NewProjectile(Projectile.Center, + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), Projectile.damage, diff --git a/Projectiles/Rogue/FinalDawnThrow2.cs b/Projectiles/Rogue/FinalDawnThrow2.cs index 55fe8e4127..cc24334d6c 100644 --- a/Projectiles/Rogue/FinalDawnThrow2.cs +++ b/Projectiles/Rogue/FinalDawnThrow2.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 6; i++) { Vector2 velocity = Utils.NextVector2Circular(Main.rand, 7.2f, 7.2f); - Projectile.NewProjectile(Projectile.Center, velocity, + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), Projectile.knockBack, Projectile.owner, 0f, target.whoAmI); diff --git a/Projectiles/Rogue/FlameScytheProjectile.cs b/Projectiles/Rogue/FlameScytheProjectile.cs index 8d95e55fbd..68d1a8ff8f 100644 --- a/Projectiles/Rogue/FlameScytheProjectile.cs +++ b/Projectiles/Rogue/FlameScytheProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(position, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), position, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceRogue = true; if (Projectile.Calamity().stealthStrike && Projectile.localAI[0] <= 0f) @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue Point result; if (WorldUtils.Find(Projectile.Top.ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result)) { - Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5f), 2f, Projectile.owner, 1f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5f), 2f, Projectile.owner, 1f); Projectile.localAI[0] = 30f; } } diff --git a/Projectiles/Rogue/FrostyFlareProj.cs b/Projectiles/Rogue/FrostyFlareProj.cs index c3030239b5..04d224855c 100644 --- a/Projectiles/Rogue/FrostyFlareProj.cs +++ b/Projectiles/Rogue/FrostyFlareProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue vel.X += Main.rand.Next(-50, 51); vel.Normalize(); vel *= 30f; - int shard = Projectile.NewProjectile(pos, vel + Projectile.velocity / 4f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, vel + Projectile.velocity / 4f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); Main.projectile[shard].alpha = Projectile.alpha; } @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue vel.X += Main.rand.Next(-50, 51); vel.Normalize(); vel *= 30f; - int shard = Projectile.NewProjectile(pos, vel + Main.npc[id].velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, vel + Main.npc[id].velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); Main.projectile[shard].alpha = Projectile.alpha; } } diff --git a/Projectiles/Rogue/FrostyFlareStealth.cs b/Projectiles/Rogue/FrostyFlareStealth.cs index e4d6864a4a..8bd41ec94b 100644 --- a/Projectiles/Rogue/FrostyFlareStealth.cs +++ b/Projectiles/Rogue/FrostyFlareStealth.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -51,12 +51,12 @@ namespace CalamityMod.Projectiles.Rogue vel.X += Main.rand.Next(-50, 51); vel.Normalize(); vel *= 30f; - int flare = Projectile.NewProjectile(pos, vel + Projectile.velocity / 4f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + int flare = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, vel + Projectile.velocity / 4f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); Main.projectile[flare].alpha = 150; } if (Projectile.timeLeft % 10 == 0) { - int snowflake = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0f, Projectile.velocity.Y * 0f, ProjectileID.NorthPoleSnowflake, (int)(Projectile.damage * 0.25), Projectile.knockBack, Projectile.owner, 0f, Main.rand.Next(3)); + int snowflake = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0f, Projectile.velocity.Y * 0f, ProjectileID.NorthPoleSnowflake, (int)(Projectile.damage * 0.25), Projectile.knockBack, Projectile.owner, 0f, Main.rand.Next(3)); if (snowflake.WithinBounds(Main.maxProjectiles)) { Main.projectile[snowflake].Calamity().forceRogue = true; @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue vel.X += Main.rand.Next(-50, 51); vel.Normalize(); vel *= 30f; - int flare = Projectile.NewProjectile(pos, vel + Main.npc[id].velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + int flare = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, vel + Main.npc[id].velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); Main.projectile[flare].alpha = 150; } } diff --git a/Projectiles/Rogue/GacruxianHome.cs b/Projectiles/Rogue/GacruxianHome.cs index 203f6e7136..bd894a00a3 100644 --- a/Projectiles/Rogue/GacruxianHome.cs +++ b/Projectiles/Rogue/GacruxianHome.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue } if (Projectile.timeLeft % 30 == 0 && Projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceRogue = true; } diff --git a/Projectiles/Rogue/GacruxianProj.cs b/Projectiles/Rogue/GacruxianProj.cs index 17a6b8792c..3b4998428f 100644 --- a/Projectiles/Rogue/GacruxianProj.cs +++ b/Projectiles/Rogue/GacruxianProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; @@ -39,11 +39,11 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), Projectile.knockBack, Projectile.owner); } else { - int proj = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceRogue = true; } diff --git a/Projectiles/Rogue/GelDartProjectile.cs b/Projectiles/Rogue/GelDartProjectile.cs index fde60b8da7..127e1e7d60 100644 --- a/Projectiles/Rogue/GelDartProjectile.cs +++ b/Projectiles/Rogue/GelDartProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft % 8 == 0) { Vector2 velocity = new Vector2(Main.rand.NextFloat(-7f, 7f), Main.rand.NextFloat(-7f, 7f)); - int slime = Projectile.NewProjectile(Projectile.Center, velocity, ProjectileID.SlimeGun, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); + int slime = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ProjectileID.SlimeGun, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); if (slime.WithinBounds(Main.maxProjectiles)) { Main.projectile[slime].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/GhoulishGougerBoomerang.cs b/Projectiles/Rogue/GhoulishGougerBoomerang.cs index b201ab9762..bace46b4de 100644 --- a/Projectiles/Rogue/GhoulishGougerBoomerang.cs +++ b/Projectiles/Rogue/GhoulishGougerBoomerang.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Rogue { // Each soul has randomized player homing strength float ai1 = Main.rand.NextFloat() + 0.5f; - Projectile.NewProjectile(Projectile.Center, velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1); // Rotate direction for the next soul velocity = velocity.RotatedBy(MathHelper.TwoPi / numSouls); diff --git a/Projectiles/Rogue/GodsParanoiaProj.cs b/Projectiles/Rogue/GodsParanoiaProj.cs index 98e4a37220..a2b3e36d59 100644 --- a/Projectiles/Rogue/GodsParanoiaProj.cs +++ b/Projectiles/Rogue/GodsParanoiaProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue { for (int i = 0; i < 3; i++) { - int idx = Projectile.NewProjectile(startPos, kunaiSp, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner, 0f, 0f); + int idx = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), startPos, kunaiSp, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner, 0f, 0f); Main.projectile[idx].rotation = angle; } } diff --git a/Projectiles/Rogue/GreenDonkeyKongReference.cs b/Projectiles/Rogue/GreenDonkeyKongReference.cs index bb975b5a08..e4de324eb9 100644 --- a/Projectiles/Rogue/GreenDonkeyKongReference.cs +++ b/Projectiles/Rogue/GreenDonkeyKongReference.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -76,13 +76,13 @@ namespace CalamityMod.Projectiles.Rogue if (Main.rand.NextBool(3)) { Vector2 shrapnelVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(30f)); - Projectile.NewProjectile(Projectile.Center, Projectile.velocity + shrapnelVelocity, + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + shrapnelVelocity, ModContent.ProjectileType(), Projectile.damage, 3f, Projectile.owner); } else { Vector2 acidVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f)); - int acidIndex = Projectile.NewProjectile(Projectile.Center, Projectile.velocity + acidVelocity, + int acidIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + acidVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), 1f, Projectile.owner); if (acidIndex.WithinBounds(Main.maxProjectiles)) @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 6; i++) { Vector2 acidVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f)); - int acidIndex = Projectile.NewProjectile(Projectile.Center, Projectile.velocity + acidVelocity, + int acidIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity + acidVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.667f), 1f, Projectile.owner); if (acidIndex.WithinBounds(Main.maxProjectiles)) diff --git a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs index 9ab1a692be..4b1f73bb76 100644 --- a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs +++ b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -195,8 +195,8 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/HellsSunProj.cs b/Projectiles/Rogue/HellsSunProj.cs index bd5ab713cd..9d8bd55389 100644 --- a/Projectiles/Rogue/HellsSunProj.cs +++ b/Projectiles/Rogue/HellsSunProj.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Microsoft.Xna.Framework; using Terraria.ModLoader; using CalamityMod.CalPlayer; @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue vector2_2 *= 2f; Vector2 vector2_3 = velocity * 0.25f + vector2_2; Vector2 vector2_5 = vector2_3 * 0.8f; - Projectile.NewProjectile(Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f); Projectile.localAI[1] = 0.0f; } } @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Rogue vector2_2 *= 2f; Vector2 vector2_3 = velocity * 0.25f + vector2_2; Vector2 vector2_5 = vector2_3 * 0.8f; - Projectile.NewProjectile(Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X - vector2_5.X, Projectile.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0.0f); Projectile.localAI[1] = 0.0f; } } diff --git a/Projectiles/Rogue/Honeycomb.cs b/Projectiles/Rogue/Honeycomb.cs index 8dc3bc727c..ef8d0ff158 100644 --- a/Projectiles/Rogue/Honeycomb.cs +++ b/Projectiles/Rogue/Honeycomb.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); split += 1; } Projectile.penetrate--; @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); split += 1; } } @@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - Projectile.NewProjectile(Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); split += 1; } } diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index d60c932d75..d3162f55d4 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; using Microsoft.Xna.Framework; @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); int texID = Main.rand.Next(4); - Projectile.NewProjectile(Projectile.Center, velocity, type, shardDamage, shardKB, Main.myPlayer, texID, 1f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, type, shardDamage, shardKB, Main.myPlayer, texID, 1f); } } } diff --git a/Projectiles/Rogue/IceStarProjectile.cs b/Projectiles/Rogue/IceStarProjectile.cs index be707f1df7..3d7ed858ae 100644 --- a/Projectiles/Rogue/IceStarProjectile.cs +++ b/Projectiles/Rogue/IceStarProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -108,10 +108,10 @@ namespace CalamityMod.Projectiles.Rogue { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); } } @@ -133,10 +133,10 @@ namespace CalamityMod.Projectiles.Rogue { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); } } diff --git a/Projectiles/Rogue/IcebreakerHammer.cs b/Projectiles/Rogue/IcebreakerHammer.cs index 99f62c416f..9c20a2a286 100644 --- a/Projectiles/Rogue/IcebreakerHammer.cs +++ b/Projectiles/Rogue/IcebreakerHammer.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue { if (explosionCount < 3) //max amount of explosions to prevent worm memes { - int ice = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); + int ice = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); if (ice.WithinBounds(Main.maxProjectiles)) Main.projectile[ice].Calamity().forceRogue = true; explosionCount++; @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike) { //no explosion count cap in pvp - int ice = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); + int ice = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); if (ice.WithinBounds(Main.maxProjectiles)) Main.projectile[ice].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/IchorSpearProj.cs b/Projectiles/Rogue/IchorSpearProj.cs index a675b79874..3d5e692289 100644 --- a/Projectiles/Rogue/IchorSpearProj.cs +++ b/Projectiles/Rogue/IchorSpearProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.owner == Main.myPlayer) { Vector2 velocity = new Vector2(Main.rand.NextFloat(-14f, 14f), Main.rand.NextFloat(-14f, 14f)); - int ichor = Projectile.NewProjectile(Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.GoldenShowerFriendly : ProjectileID.IchorSplash, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); + int ichor = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.GoldenShowerFriendly : ProjectileID.IchorSplash, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); if (ichor.WithinBounds(Main.maxProjectiles)) { Main.projectile[ichor].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/InfernalKrisProjectile.cs b/Projectiles/Rogue/InfernalKrisProjectile.cs index f3da6f7fc4..f121b8fb3c 100644 --- a/Projectiles/Rogue/InfernalKrisProjectile.cs +++ b/Projectiles/Rogue/InfernalKrisProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -79,9 +79,9 @@ namespace CalamityMod.Projectiles.Rogue sparkVelocity.Normalize(); sparkVelocity *= 3; - Projectile.NewProjectile(Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); } - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); SoundEngine.PlaySound(SoundID.Item74, Projectile.position); } } @@ -102,9 +102,9 @@ namespace CalamityMod.Projectiles.Rogue sparkVelocity.Normalize(); sparkVelocity *= 3; - Projectile.NewProjectile(Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); } - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); SoundEngine.PlaySound(SoundID.Item74, Projectile.position); } } @@ -193,9 +193,9 @@ namespace CalamityMod.Projectiles.Rogue sparkVelocity.Normalize(); sparkVelocity *= 3; - Projectile.NewProjectile(Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); } - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); SoundEngine.PlaySound(SoundID.Item74, Projectile.position); } } diff --git a/Projectiles/Rogue/InkBombProjectile.cs b/Projectiles/Rogue/InkBombProjectile.cs index 92d6c06bd8..dacc3e14de 100644 --- a/Projectiles/Rogue/InkBombProjectile.cs +++ b/Projectiles/Rogue/InkBombProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue inkType = ModContent.ProjectileType(); break; } - int inkID = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, (int)(22 * player.RogueDamage()), 7, Projectile.owner); + int inkID = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, (int)(22 * player.RogueDamage()), 7, Projectile.owner); Main.projectile[inkID].timeLeft += Main.rand.Next(-20, 25); } Projectile.Kill(); diff --git a/Projectiles/Rogue/JawsProjectile.cs b/Projectiles/Rogue/JawsProjectile.cs index d942c3f6f8..67caf2d7b4 100644 --- a/Projectiles/Rogue/JawsProjectile.cs +++ b/Projectiles/Rogue/JawsProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike) { target.AddBuff(ModContent.BuffType(), 120); - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(100f * player.RogueDamage()), 10f, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(100f * player.RogueDamage()), 10f, Projectile.owner, 0, 0); } } @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike) { target.AddBuff(ModContent.BuffType(), 120); - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(100f * player.RogueDamage()), 10f, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(100f * player.RogueDamage()), 10f, Projectile.owner, 0, 0); } } diff --git a/Projectiles/Rogue/JewelSpike.cs b/Projectiles/Rogue/JewelSpike.cs index c82d68eff8..ed64e2523b 100644 --- a/Projectiles/Rogue/JewelSpike.cs +++ b/Projectiles/Rogue/JewelSpike.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue { float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - Projectile.NewProjectile(Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, Projectile.damage / 4, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, Projectile.damage / 4, 0f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/KelvinCatalystBoomerang.cs b/Projectiles/Rogue/KelvinCatalystBoomerang.cs index 3a0e2744ec..9b8e883c11 100644 --- a/Projectiles/Rogue/KelvinCatalystBoomerang.cs +++ b/Projectiles/Rogue/KelvinCatalystBoomerang.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -184,9 +184,9 @@ namespace CalamityMod.Projectiles.Rogue { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner); } } SoundEngine.PlaySound(SoundID.Item30, Projectile.position); diff --git a/Projectiles/Rogue/LatcherMineProjectile.cs b/Projectiles/Rogue/LatcherMineProjectile.cs index a4bf192ff4..bf803e67ca 100644 --- a/Projectiles/Rogue/LatcherMineProjectile.cs +++ b/Projectiles/Rogue/LatcherMineProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -141,12 +141,12 @@ namespace CalamityMod.Projectiles.Rogue if (Main.rand.NextBool(2) && Projectile.Calamity().stealthStrike) { Vector2 shrapnelVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f)); - Projectile.NewProjectile(Projectile.Top, shrapnelVelocity, ModContent.ProjectileType(), projdmg, 3f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Top, shrapnelVelocity, ModContent.ProjectileType(), projdmg, 3f, Projectile.owner); } else { Vector2 fireVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f)); - int fireIndex = Projectile.NewProjectile(Projectile.Top, fireVelocity, ModContent.ProjectileType(), projdmg / 3, 1f, Projectile.owner); + int fireIndex = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Top, fireVelocity, ModContent.ProjectileType(), projdmg / 3, 1f, Projectile.owner); Main.projectile[fireIndex].localNPCHitCooldown = -2; } } diff --git a/Projectiles/Rogue/LeonidCometSmall.cs b/Projectiles/Rogue/LeonidCometSmall.cs index 373054d396..2e0339750b 100644 --- a/Projectiles/Rogue/LeonidCometSmall.cs +++ b/Projectiles/Rogue/LeonidCometSmall.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner != Main.myPlayer) return; - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 3, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 3, 0f, Projectile.owner); Projectile.ai[1] = -1f; Projectile.position = Projectile.Center; Projectile.width = Projectile.height = 40; diff --git a/Projectiles/Rogue/LeonidProgenitorBombshell.cs b/Projectiles/Rogue/LeonidProgenitorBombshell.cs index cae8d08e38..cabee4b8d6 100644 --- a/Projectiles/Rogue/LeonidProgenitorBombshell.cs +++ b/Projectiles/Rogue/LeonidProgenitorBombshell.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Projectiles.Ranged; using CalamityMod.Items.Weapons.Rogue; @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item62, Projectile.position); if (Main.myPlayer == Projectile.owner) { - int flash = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, 0f, 1f); + int flash = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, 0f, 1f); if (flash.WithinBounds(Main.maxProjectiles)) { Main.projectile[flash].Calamity().forceRogue = true; @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 pos = new Vector2(Projectile.Center.X + Projectile.width * 0.5f + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); Vector2 velocity = (Projectile.Center - pos) / 40f; int dmg = Projectile.damage / 2; - Projectile.NewProjectile(pos, velocity, ModContent.ProjectileType(), dmg, Projectile.knockBack, Projectile.owner, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, velocity, ModContent.ProjectileType(), dmg, Projectile.knockBack, Projectile.owner, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); } } @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Rogue float num3 = -(num1 * 2f) / (cometAmt - 1f); for (int projIndex = 0; projIndex < cometAmt; ++projIndex) { - int index2 = Projectile.NewProjectile(Projectile.Center, spinningpoint.RotatedBy((double)num1 + (double)num3 * (double)projIndex, new Vector2()), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, -1f); + int index2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, spinningpoint.RotatedBy((double)num1 + (double)num3 * (double)projIndex, new Vector2()), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, -1f); Projectile proj = Main.projectile[index2]; for (int index3 = 0; index3 < Projectile.localNPCImmunity.Length; ++index3) { diff --git a/Projectiles/Rogue/LionfishProj.cs b/Projectiles/Rogue/LionfishProj.cs index 7656c562e9..22a9042456 100644 --- a/Projectiles/Rogue/LionfishProj.cs +++ b/Projectiles/Rogue/LionfishProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocity = Projectile.DirectionFrom(Main.player[Projectile.owner].Center); velocity *= Main.rand.NextFloat(4.5f, 6.5f); velocity = velocity.RotatedBy((Main.rand.NextDouble() - 0.5) * Math.PI * 0.5, default); - int spike = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner, -10f, 0f); + int spike = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner, -10f, 0f); if (spike.WithinBounds(Main.maxProjectiles)) Main.projectile[spike].Calamity().forceRogue = true; } diff --git a/Projectiles/Rogue/LuminousStrikerProj.cs b/Projectiles/Rogue/LuminousStrikerProj.cs index 2516e3050f..a4710d273d 100644 --- a/Projectiles/Rogue/LuminousStrikerProj.cs +++ b/Projectiles/Rogue/LuminousStrikerProj.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -50,10 +50,10 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner); } else - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0f, -2f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0f, -2f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner); } } } @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Rogue } speed.Normalize(); speed *= Main.rand.Next(30, 61) * 0.1f * 2f; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner); } } } @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Rogue } speed.Normalize(); speed *= Main.rand.Next(30, 61) * 0.1f * 2f; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/MangroveChakramProjectile.cs b/Projectiles/Rogue/MangroveChakramProjectile.cs index a87bbe77d5..5ab7ddccfd 100644 --- a/Projectiles/Rogue/MangroveChakramProjectile.cs +++ b/Projectiles/Rogue/MangroveChakramProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localAI[0] = 0f; Vector2 flowerSpawnPosition = Projectile.Center + Main.rand.NextVector2Square(-10f, 10f); Vector2 flowerShootVelocity = Projectile.velocity.RotatedByRandom(0.1f) * 0.25f; - Projectile.NewProjectile(flowerSpawnPosition, flowerShootVelocity, ModContent.ProjectileType(), Projectile.damage / 4, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), flowerSpawnPosition, flowerShootVelocity, ModContent.ProjectileType(), Projectile.damage / 4, 0f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/MetalChunk.cs b/Projectiles/Rogue/MetalChunk.cs index 48eabcbfc0..0acfbe4e6e 100644 --- a/Projectiles/Rogue/MetalChunk.cs +++ b/Projectiles/Rogue/MetalChunk.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; using Microsoft.Xna.Framework; @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue if(Projectile.ai[0] >= 10f) { Vector2 speed = new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-6f, 6f)); - Projectile.NewProjectile(Projectile.Center, speed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3f), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, speed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3f), 0f, Projectile.owner, 0f, 0f); Projectile.ai[0] = 0f; } } @@ -51,12 +51,12 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 3; i++) { Vector2 S1 = new Vector2(-Projectile.velocity.X, -Projectile.velocity.Y).RotatedBy(MathHelper.ToRadians(Main.rand.Next(-45, 46))); - int proj = Projectile.NewProjectile(Projectile.Center, S1, ProjectileID.SpikyBall, (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, S1, ProjectileID.SpikyBall, (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f); Main.projectile[proj].timeLeft = 600; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 20; S1 = new Vector2(-Projectile.velocity.X * 0.7f, -Projectile.velocity.Y*0.7f).RotatedBy(MathHelper.ToRadians(Main.rand.Next(-45, 46))); - Projectile.NewProjectile(Projectile.Center, S1, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, S1, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f); } //Dust for (int i = 0; i < 20; i++) diff --git a/Projectiles/Rogue/MeteorFistProj.cs b/Projectiles/Rogue/MeteorFistProj.cs index bbc3484684..1f4277fc1e 100644 --- a/Projectiles/Rogue/MeteorFistProj.cs +++ b/Projectiles/Rogue/MeteorFistProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Rogue newFistVelocity.Normalize(); newFistVelocity *= 10f; float AI1 = Projectile.ai[1] - 1f; - int p = Projectile.NewProjectile(Projectile.position, newFistVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, AI1); + int p = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, newFistVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, AI1); Main.projectile[p].Calamity().stealthStrike = true; } } diff --git a/Projectiles/Rogue/MoltenAmputatorProj.cs b/Projectiles/Rogue/MoltenAmputatorProj.cs index f47d20ec35..5f42216c4f 100644 --- a/Projectiles/Rogue/MoltenAmputatorProj.cs +++ b/Projectiles/Rogue/MoltenAmputatorProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue } iAmSpeed.Normalize(); iAmSpeed *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, iAmSpeed.X, iAmSpeed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, iAmSpeed.X, iAmSpeed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 0f, Projectile.owner, 0f, 0f); } } diff --git a/Projectiles/Rogue/NanoblackMain.cs b/Projectiles/Rogue/NanoblackMain.cs index aeed1fb4b4..9086c39400 100644 --- a/Projectiles/Rogue/NanoblackMain.cs +++ b/Projectiles/Rogue/NanoblackMain.cs @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocityOffset = Main.rand.NextFloat(-velocityMult, velocityMult) * Projectile.velocity; Vector2 pos = Projectile.Center + directOffset + velocityOffset; if (Projectile.owner == Main.myPlayer) - Projectile.NewProjectile(pos, Vector2.Zero, bladeID, bladeDamage, bladeKB, Projectile.owner, 0f, spin); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, Vector2.Zero, bladeID, bladeDamage, bladeKB, Projectile.owner, 0f, spin); } private void SpawnScytheAfterimage() @@ -177,7 +177,7 @@ namespace CalamityMod.Projectiles.Rogue float d = 16f; float velocityMult = 0.9f; if (Projectile.owner == Main.myPlayer) - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, bladeID, bladeDamage, bladeKB, Projectile.owner, 0f, spin); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, bladeID, bladeDamage, bladeKB, Projectile.owner, 0f, spin); } } } diff --git a/Projectiles/Rogue/NastyChollaBol.cs b/Projectiles/Rogue/NastyChollaBol.cs index 2f893ac0b6..bd2115d9a1 100644 --- a/Projectiles/Rogue/NastyChollaBol.cs +++ b/Projectiles/Rogue/NastyChollaBol.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using System; using Terraria; @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue for (int n = 0; n < needleAmt; n++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int shard = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)((NastyCholla.BaseDamage/4) * player.RogueDamage()), 0f, Projectile.owner, 0f, 0f); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)((NastyCholla.BaseDamage/4) * player.RogueDamage()), 0f, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/NightsGazeProjectile.cs b/Projectiles/Rogue/NightsGazeProjectile.cs index 66b99cf336..a14f938872 100644 --- a/Projectiles/Rogue/NightsGazeProjectile.cs +++ b/Projectiles/Rogue/NightsGazeProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue float starKB = 5f; Vector2 velocity = Projectile.velocity; - int p = Projectile.NewProjectile(Projectile.Center, velocity, projID, starDamage, starKB, Projectile.owner, 1f, 0f); + int p = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, starDamage, starKB, Projectile.owner, 1f, 0f); Main.projectile[p].penetrate = 1; } } @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)); float speed = Main.rand.NextFloat(1.5f, 2f); float moveDuration = Main.rand.Next(5, 15); - Projectile.NewProjectile(Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration); } SoundEngine.PlaySound(SoundID.Item, (int)Projectile.position.X, (int)Projectile.position.Y, 62, 0.6f); diff --git a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs index 44438e0511..6f551c0d93 100644 --- a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs +++ b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue float speedMult = 24f / pathToTravel.Length(); pathToTravel.X *= speedMult; pathToTravel.Y *= speedMult; - int petal = Projectile.NewProjectile(startPos, pathToTravel, ProjectileID.FlowerPetal, Projectile.damage, 0f, Projectile.owner); + int petal = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), startPos, pathToTravel, ProjectileID.FlowerPetal, Projectile.damage, 0f, Projectile.owner); if (petal.WithinBounds(Main.maxProjectiles)) Main.projectile[petal].Calamity().forceRogue = true; } diff --git a/Projectiles/Rogue/PalladiumJavelinProjectile.cs b/Projectiles/Rogue/PalladiumJavelinProjectile.cs index baac099543..3ba1ec5981 100644 --- a/Projectiles/Rogue/PalladiumJavelinProjectile.cs +++ b/Projectiles/Rogue/PalladiumJavelinProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -52,8 +52,8 @@ namespace CalamityMod.Projectiles.Rogue Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 144, 0f, 0f, 0, default, 1f); } - int javelin = Projectile.NewProjectile(Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(5f)), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner); - int javelin2 = Projectile.NewProjectile(Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(-5f)), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner); + int javelin = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(5f)), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner); + int javelin2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(-5f)), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner); if (javelin.WithinBounds(Main.maxProjectiles)) { Main.projectile[javelin].Calamity().lineColor = Projectile.Calamity().lineColor + 1; diff --git a/Projectiles/Rogue/PenumbraBomb.cs b/Projectiles/Rogue/PenumbraBomb.cs index daca841d1c..0a206ab91e 100644 --- a/Projectiles/Rogue/PenumbraBomb.cs +++ b/Projectiles/Rogue/PenumbraBomb.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 360; i += ad) { Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(i + randrot)); - Projectile.NewProjectile(Projectile.Center, SoulSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * dmgMult), 3f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, SoulSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * dmgMult), 3f, Projectile.owner, 0f, 0f); } //Dust int maxDust = Projectile.Calamity().stealthStrike ? 100 : 70; diff --git a/Projectiles/Rogue/PhantasmalRuinProj.cs b/Projectiles/Rogue/PhantasmalRuinProj.cs index e29eaaf244..2f0227bae8 100644 --- a/Projectiles/Rogue/PhantasmalRuinProj.cs +++ b/Projectiles/Rogue/PhantasmalRuinProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocity = ss ? (Projectile.velocity * 0.4f).RotatedBy(Main.rand.NextFloat(-0.04f, 0.04f)) : (Projectile.velocity * 0.08f) + Main.rand.NextVector2Circular(0.4f, 0.4f); - Projectile.NewProjectile(Projectile.Center, velocity, projID, damage, kb, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, damage, kb, Projectile.owner); } } @@ -84,9 +84,9 @@ namespace CalamityMod.Projectiles.Rogue // Each pair of souls has randomized player homing strength float ai1 = Main.rand.NextFloat() + 0.5f; if (Main.rand.NextBool(2)) - Projectile.NewProjectile(Projectile.Center, velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1); if (Main.rand.NextBool(2)) - Projectile.NewProjectile(Projectile.Center, -velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, -velocity, projID, soulDamage, soulKB, Projectile.owner, 0f, ai1); // Rotate direction for the next pair of souls. velocity = velocity.RotatedBy(MathHelper.TwoPi / numSouls); diff --git a/Projectiles/Rogue/PhantomLanceProj.cs b/Projectiles/Rogue/PhantomLanceProj.cs index b74150ba55..557c4ae156 100644 --- a/Projectiles/Rogue/PhantomLanceProj.cs +++ b/Projectiles/Rogue/PhantomLanceProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Magic; +using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike) damageMult = 0.7f; int soulDamage = (int)(Projectile.damage * damageMult); - int soul = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), soulDamage, Projectile.knockBack, Projectile.owner); + int soul = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), soulDamage, Projectile.knockBack, Projectile.owner); if (soul.WithinBounds(Main.maxProjectiles)) { Main.projectile[soul].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/PlaguenadeProj.cs b/Projectiles/Rogue/PlaguenadeProj.cs index 7555be6d1b..d9ba9902a1 100644 --- a/Projectiles/Rogue/PlaguenadeProj.cs +++ b/Projectiles/Rogue/PlaguenadeProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Rogue { float speedX = (float)Main.rand.Next(-35, 36) * 0.02f; float speedY = (float)Main.rand.Next(-35, 36) * 0.02f; - Projectile.NewProjectile(Projectile.position.X, Projectile.position.Y, speedX, speedY, ModContent.ProjectileType(), player.beeDamage(Projectile.damage), player.beeKB(0f), Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X, Projectile.position.Y, speedX, speedY, ModContent.ProjectileType(), player.beeDamage(Projectile.damage), player.beeKB(0f), Projectile.owner, 0f, 0f); } SoundEngine.PlaySound(SoundID.Item14, Projectile.position); if (Projectile.Calamity().stealthStrike) diff --git a/Projectiles/Rogue/PoisonBol.cs b/Projectiles/Rogue/PoisonBol.cs index ed6880d082..ba4658d0bf 100644 --- a/Projectiles/Rogue/PoisonBol.cs +++ b/Projectiles/Rogue/PoisonBol.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue velocity *= 2f; velocity += Projectile.velocity * 0.25f; velocity *= 0.8f; - int proj = Projectile.NewProjectile(Projectile.Center - velocity, velocity, Main.rand.Next(569,572), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center - velocity, velocity, Main.rand.Next(569,572), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner); if (proj.WithinBounds(Main.maxProjectiles)) { Main.projectile[proj].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/Prismalline3.cs b/Projectiles/Rogue/Prismalline3.cs index e007e74f89..7ddb60db76 100644 --- a/Projectiles/Rogue/Prismalline3.cs +++ b/Projectiles/Rogue/Prismalline3.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue for (int s = 0; s < shardCount; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int shard = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 3, 0f, Projectile.owner); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 3, 0f, Projectile.owner); if (shard.WithinBounds(Main.maxProjectiles)) { Main.projectile[shard].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/PrismallineProj.cs b/Projectiles/Rogue/PrismallineProj.cs index 76420cb68b..506788eeba 100644 --- a/Projectiles/Rogue/PrismallineProj.cs +++ b/Projectiles/Rogue/PrismallineProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -50,12 +50,12 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f, 0.2f); if (numSpecProj < 2 && !hitEnemy) { - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.1), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.1), Projectile.knockBack, Projectile.owner, 0f, 0f); ++numSpecProj; } else { - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner, 0f, 0f); } } } @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Rogue for (int num252 = 0; num252 < shardCount; num252++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int shard = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner); if (shard.WithinBounds(Main.maxProjectiles)) { Main.projectile[shard].Calamity().forceRogue = true; @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numProj + 1; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f, 0.2f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.15), Projectile.knockBack, Projectile.owner, 1f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.15), Projectile.knockBack, Projectile.owner, 1f, 0f); } } } @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Rogue for (int s = 0; s < shardCount; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int shard = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner); if (shard.WithinBounds(Main.maxProjectiles)) { Main.projectile[shard].Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index d5bb714629..dab277ab1c 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue int projID = ModContent.ProjectileType(); int spearDamage = (int)(Projectile.damage * 0.4f); float spearKB = 1f; - Projectile.NewProjectile(spearPosition, spearSpeed, projID, spearDamage, spearKB, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spearPosition, spearSpeed, projID, spearDamage, spearKB, Projectile.owner); } } } @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue int projID = ModContent.ProjectileType(); int explosionDamage = (int)(Projectile.damage * 0.8f); float explosionKB = 8f; - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, Projectile.owner); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/RadiantStarKnife.cs b/Projectiles/Rogue/RadiantStarKnife.cs index 7a9c48f2c9..097d76047f 100644 --- a/Projectiles/Rogue/RadiantStarKnife.cs +++ b/Projectiles/Rogue/RadiantStarKnife.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -87,12 +87,12 @@ namespace CalamityMod.Projectiles.Rogue } speed.Normalize(); speed *= (float)Main.rand.Next(30, 61) * 0.1f * 2.5f; - int stabber2 = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, + int stabber2 = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, Projectile.ai[0] == 1f ? 1f : 0f, 0f); Main.projectile[stabber2].Calamity().stealthStrike = Projectile.Calamity().stealthStrike; } SoundEngine.PlaySound(SoundID.Item14, Projectile.position); - int boomer = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner); + int boomer = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner); if (Projectile.Calamity().stealthStrike && boomer.WithinBounds(Main.maxProjectiles)) { Main.projectile[boomer].Calamity().stealthStrike = true; diff --git a/Projectiles/Rogue/RefractionRotorProjectile.cs b/Projectiles/Rogue/RefractionRotorProjectile.cs index 81aa429e55..c8fb0d4818 100644 --- a/Projectiles/Rogue/RefractionRotorProjectile.cs +++ b/Projectiles/Rogue/RefractionRotorProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 shootDirection = (MathHelper.TwoPi * i / 6f + Projectile.rotation + MathHelper.PiOver2).ToRotationVector2(); Vector2 spawnPosition = Projectile.Center + Projectile.Size * 0.5f * Projectile.scale * shootDirection * 0.85f; - Projectile.NewProjectile(spawnPosition, Projectile.velocity * 0.5f + shootDirection * 7f, bladeType, rocketDamage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spawnPosition, Projectile.velocity * 0.5f + shootDirection * 7f, bladeType, rocketDamage, Projectile.knockBack, Projectile.owner); } } @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < EnergyShotCount; i++) { Vector2 shootVelocity = (MathHelper.TwoPi * i / EnergyShotCount + baseDirectionRotation).ToRotationVector2() * 9f; - Projectile.NewProjectile(Projectile.Center + shootVelocity, shootVelocity, shootType, energyDamage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + shootVelocity, shootVelocity, shootType, energyDamage, Projectile.knockBack, Projectile.owner); } } diff --git a/Projectiles/Rogue/RegulusRiotProj.cs b/Projectiles/Rogue/RegulusRiotProj.cs index 85bd7c25dd..bfc3f8adf2 100644 --- a/Projectiles/Rogue/RegulusRiotProj.cs +++ b/Projectiles/Rogue/RegulusRiotProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -190,8 +190,8 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 3; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner, 0f, 0f); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/RotBallProjectile.cs b/Projectiles/Rogue/RotBallProjectile.cs index 98be8bf224..403006ec4a 100644 --- a/Projectiles/Rogue/RotBallProjectile.cs +++ b/Projectiles/Rogue/RotBallProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, -10f, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, -10f, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/SandDollarStealth.cs b/Projectiles/Rogue/SandDollarStealth.cs index 8a65c4ff70..03c6450b3f 100644 --- a/Projectiles/Rogue/SandDollarStealth.cs +++ b/Projectiles/Rogue/SandDollarStealth.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue for (int coralCount = 0; coralCount < coralAmt; coralCount++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int coral = Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 3, 0f, Projectile.owner); + int coral = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 3, 0f, Projectile.owner); if (coral.WithinBounds(Main.maxProjectiles)) Main.projectile[coral].Calamity().forceRogue = true; } diff --git a/Projectiles/Rogue/SandslasherProj.cs b/Projectiles/Rogue/SandslasherProj.cs index d949fd7905..6f46b19c22 100644 --- a/Projectiles/Rogue/SandslasherProj.cs +++ b/Projectiles/Rogue/SandslasherProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue if(Projectile.Calamity().stealthStrike && Projectile.ai[1] >= 5f) { Vector2 speed = new Vector2(Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f)); - Projectile.NewProjectile(Projectile.position, speed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, speed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner); Projectile.ai[1] = 0; } } diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index fd086c139a..30b720b43f 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 perturbedSpeed = new Vector2(-Projectile.velocity.X / 3, -Projectile.velocity.Y / 3).RotatedBy(MathHelper.Lerp(-rotationalOffset, rotationalOffset, i / (totalBullets - 1))); for (int j = 0; j < 2; j++) { - Projectile.NewProjectile(Projectile.Center, perturbedSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.03), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, perturbedSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.03), 0f, Projectile.owner, 0f, 0f); perturbedSpeed *= 1.05f; } } @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 40; i++) { Vector2 shootVelocity = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * starSpeed; - int bullet = Projectile.NewProjectile(Projectile.Center + shootVelocity, shootVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.01), 0f, Projectile.owner); + int bullet = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + shootVelocity, shootVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.01), 0f, Projectile.owner); if (Main.projectile.IndexInRange(bullet)) Main.projectile[bullet].Calamity().stealthStrike = true; } @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue for (int j = 0; j < pointsOnStarSegment; j++) { Vector2 shootVelocity = Vector2.Lerp(start, end, j / (float)pointsOnStarSegment) * starSpeed; - int bullet = Projectile.NewProjectile(Projectile.Center + shootVelocity, shootVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.01), 0f, Projectile.owner); + int bullet = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + shootVelocity, shootVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.01), 0f, Projectile.owner); if (Main.projectile.IndexInRange(bullet)) Main.projectile[bullet].Calamity().stealthStrike = true; } @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { CalamityGlobalProjectile.ExpandHitboxBy(Projectile, 150); - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.0075), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.0075), 0f, Projectile.owner); if (!Projectile.Calamity().stealthStrike) return; @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitPvp(Player target, int damage, bool crit) { CalamityGlobalProjectile.ExpandHitboxBy(Projectile, 150); - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.0075), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.0075), 0f, Projectile.owner); if (!Projectile.Calamity().stealthStrike) return; diff --git a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs index 93723bea86..ffede21c8f 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue for (int cloudIndex = 0; cloudIndex < cloudNumber; cloudIndex++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, Projectile.Calamity().stealthStrike ? 1f : 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, Projectile.Calamity().stealthStrike ? 1f : 0f); } } } diff --git a/Projectiles/Rogue/SeafoamBombProj.cs b/Projectiles/Rogue/SeafoamBombProj.cs index eb1db3dee1..1c7bca451f 100644 --- a/Projectiles/Rogue/SeafoamBombProj.cs +++ b/Projectiles/Rogue/SeafoamBombProj.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue { float posX = Projectile.Center.X + (Projectile.Calamity().stealthStrike ? Main.rand.Next(-50, 51) : 0); float posY = Projectile.Center.Y + (Projectile.Calamity().stealthStrike ? Main.rand.Next(-50, 51) : 0); - Projectile.NewProjectile(posX, posY, 0f, 0f, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.4), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), posX, posY, 0f, 0f, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.4), 0f, Projectile.owner, 0f, 0f); } CalamityUtils.ExplosionGores(Projectile.Center, (Projectile.Calamity().stealthStrike ? 6 : 3)); diff --git a/Projectiles/Rogue/SealedSingularityProj.cs b/Projectiles/Rogue/SealedSingularityProj.cs index f082494516..c498d3cf03 100644 --- a/Projectiles/Rogue/SealedSingularityProj.cs +++ b/Projectiles/Rogue/SealedSingularityProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue //glass-pot break sound SoundEngine.PlaySound(SoundID.Shatter, (int)Projectile.position.X, (int)Projectile.position.Y, 1, 1f, 0f); - int blackhole = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.Calamity().stealthStrike ? -180f : 0f, 0f); + int blackhole = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.Calamity().stealthStrike ? -180f : 0f, 0f); if (blackhole.WithinBounds(Main.maxProjectiles)) { Main.projectile[blackhole].Center = Projectile.Center; @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue { float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - Projectile.NewProjectile(Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 0f, Projectile.owner, index, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 0f, Projectile.owner, index, 0f); } } } diff --git a/Projectiles/Rogue/SearedPanProjectile.cs b/Projectiles/Rogue/SearedPanProjectile.cs index 2b0a4d2008..668dcda658 100644 --- a/Projectiles/Rogue/SearedPanProjectile.cs +++ b/Projectiles/Rogue/SearedPanProjectile.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue for (int t = 0; t < 4; t++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.2), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.2), 0f, Projectile.owner); } SoundEngine.PlaySound(SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/SearedPanSmash"), (int)Projectile.position.X, (int)Projectile.position.Y); // Stealth strikes also cause any existing fireballs to home in on their targets @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Rogue // Stealth strikes then summon five fireballs to circle the hit enemy, they will home in on their own after a second. for (int t = 0; t < 5; t++) { - int i = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), 0f, Projectile.owner, 0f, targetIndex); + int i = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), 0f, Projectile.owner, 0f, targetIndex); Main.projectile[i].ModProjectile().Timer = 61; } FireballPositions(targetIndex); @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Rogue // Summon three fireballs to circle the hit enemy for (int t = 0; t < 3; t++) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), 0f, Projectile.owner, 0f, targetIndex); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), 0f, Projectile.owner, 0f, targetIndex); } FireballPositions(targetIndex); } diff --git a/Projectiles/Rogue/SeraphimAngelicLight.cs b/Projectiles/Rogue/SeraphimAngelicLight.cs index 57512a5736..fef0ee62f5 100644 --- a/Projectiles/Rogue/SeraphimAngelicLight.cs +++ b/Projectiles/Rogue/SeraphimAngelicLight.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ModLoader; @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue int damage = Projectile.damage; Vector2 laserDirection = Projectile.SafeDirectionTo(potentialTarget.Center); - Projectile.NewProjectile(Projectile.Center, laserDirection, ModContent.ProjectileType(), damage, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, laserDirection, ModContent.ProjectileType(), damage, 0f, Projectile.owner); } public override Color? GetAlpha(Color lightColor) => new Color(255, 255, 255, 255 - Projectile.alpha); diff --git a/Projectiles/Rogue/SeraphimAngelicLight2.cs b/Projectiles/Rogue/SeraphimAngelicLight2.cs index 2332fa93a4..8a23c638c0 100644 --- a/Projectiles/Rogue/SeraphimAngelicLight2.cs +++ b/Projectiles/Rogue/SeraphimAngelicLight2.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue int damage = Projectile.damage; Vector2 laserDirection = Projectile.SafeDirectionTo(potentialTarget.Center); - int laser = Projectile.NewProjectile(Projectile.Center, laserDirection, ModContent.ProjectileType(), damage, 0f, Projectile.owner); + int laser = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, laserDirection, ModContent.ProjectileType(), damage, 0f, Projectile.owner); if (Main.projectile.IndexInRange(laser)) Main.projectile[laser].scale = 0.5f; } diff --git a/Projectiles/Rogue/SeraphimProjectile.cs b/Projectiles/Rogue/SeraphimProjectile.cs index 1af434663d..57cf5d26fb 100644 --- a/Projectiles/Rogue/SeraphimProjectile.cs +++ b/Projectiles/Rogue/SeraphimProjectile.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Rogue // Create a light projectile that explodes into a laserbeam. int damage = Projectile.damage; float kb = Projectile.knockBack; - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), damage, kb, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), damage, kb, Projectile.owner); // As well as a fan of light daggers. NPC potentialTarget = Projectile.Center.ClosestNPCAt(1600f); @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Rogue offsetAngle -= Projectile.AngleTo(potentialTarget.Center); Vector2 fanVelocity = offsetAngle.ToRotationVector2() * 10f; - Projectile.NewProjectile(Projectile.Center, fanVelocity, ModContent.ProjectileType(), damage / 2, kb, Projectile.owner, i); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, fanVelocity, ModContent.ProjectileType(), damage / 2, kb, Projectile.owner, i); } } diff --git a/Projectiles/Rogue/ShatteredSunKnife.cs b/Projectiles/Rogue/ShatteredSunKnife.cs index ea69b6230a..84c2f8b87e 100644 --- a/Projectiles/Rogue/ShatteredSunKnife.cs +++ b/Projectiles/Rogue/ShatteredSunKnife.cs @@ -1,4 +1,4 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numProj; i++) { Vector2 perturbedspeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); - int proj = Projectile.NewProjectile(Projectile.Center, perturbedspeed * 0.2f, projID, splitDamage, splitKB, Projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, perturbedspeed * 0.2f, projID, splitDamage, splitKB, Projectile.owner, 0f, 0f); Main.projectile[proj].Calamity().stealthStrike = Projectile.Calamity().stealthStrike; spread -= Main.rand.Next(2, 6); } @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Rogue int projID = ModContent.ProjectileType(); int explosionDamage = (int)(Projectile.damage * 0.45f); float explosionKB = 3f; - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, Projectile.owner, 0f, 0f); SoundEngine.PlaySound(SoundID.Item14, Projectile.position); } diff --git a/Projectiles/Rogue/ShatteredSunScorchedBlade.cs b/Projectiles/Rogue/ShatteredSunScorchedBlade.cs index 7819cdfe1b..d4aa39e608 100644 --- a/Projectiles/Rogue/ShatteredSunScorchedBlade.cs +++ b/Projectiles/Rogue/ShatteredSunScorchedBlade.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -173,7 +173,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); int projDamage = (int)(Projectile.damage * 0.6f); float kb = 1f; - int proj = Projectile.NewProjectile(owner.Center.X, owner.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, Projectile.type, projDamage, kb, Projectile.owner, 1f, Projectile.alpha); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), owner.Center.X, owner.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, Projectile.type, projDamage, kb, Projectile.owner, 1f, Projectile.alpha); spread -= Main.rand.Next(2, 6); Main.projectile[proj].ai[0] = 1f; } @@ -200,7 +200,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); int projDamage = (int)(Projectile.damage * 0.6f); float kb = 1f; - int proj = Projectile.NewProjectile(owner.Center.X, owner.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, Projectile.type, projDamage, kb, Projectile.owner, 1f, Projectile.alpha); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), owner.Center.X, owner.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, Projectile.type, projDamage, kb, Projectile.owner, 1f, Projectile.alpha); spread -= Main.rand.Next(2, 6); Main.projectile[proj].ai[0] = 1f; } diff --git a/Projectiles/Rogue/ShockGrenadeProjectile.cs b/Projectiles/Rogue/ShockGrenadeProjectile.cs index 7e2a4ba3bb..c08cdeadca 100644 --- a/Projectiles/Rogue/ShockGrenadeProjectile.cs +++ b/Projectiles/Rogue/ShockGrenadeProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -117,17 +117,17 @@ namespace CalamityMod.Projectiles.Rogue boltAI = 1; } - Projectile.NewProjectile(Projectile.Center, boltVelocity, ModContent.ProjectileType(), boltDamage, 0, Projectile.owner, boltType, boltAI); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, boltVelocity, ModContent.ProjectileType(), boltDamage, 0, Projectile.owner, boltType, boltAI); } if (Projectile.Calamity().stealthStrike) { int auraDamage = Projectile.damage / 4; - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), auraDamage, 1, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), auraDamage, 1, Projectile.owner, 0, 0); SoundEngine.PlaySound(SoundID.Item, (int)Projectile.position.X, (int)Projectile.position.Y, 93, 0.5f, 0f); } - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 3, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 3, Projectile.owner, 0, 0); } } } diff --git a/Projectiles/Rogue/ShroomerangProj.cs b/Projectiles/Rogue/ShroomerangProj.cs index 549681ea17..aa92a193dc 100644 --- a/Projectiles/Rogue/ShroomerangProj.cs +++ b/Projectiles/Rogue/ShroomerangProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatBuffs; +using CalamityMod.Buffs.StatBuffs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue vector63.Normalize(); vector63 *= (float)Main.rand.Next(45, 65) * 0.1f; vector63 = vector63.RotatedBy((Main.rand.NextDouble() - 0.5) * 1.5707963705062866, default); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, vector63.X, vector63.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack * 0.2f, Projectile.owner, -10f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, vector63.X, vector63.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack * 0.2f, Projectile.owner, -10f, 0f); } } } diff --git a/Projectiles/Rogue/SkyfinNuke.cs b/Projectiles/Rogue/SkyfinNuke.cs index e864006650..ee4f6c224c 100644 --- a/Projectiles/Rogue/SkyfinNuke.cs +++ b/Projectiles/Rogue/SkyfinNuke.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -84,11 +84,11 @@ namespace CalamityMod.Projectiles.Rogue for (int c = 0; c < cloudAmt; c++) { Vector2 velocity = CalamityUtils.RandomVelocity(50f, 10f, 50f, 0.01f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner); } if (Projectile.Calamity().stealthStrike) { - int explode = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 1f); + int explode = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 1f); Main.projectile[explode].usesLocalNPCImmunity = true; Main.projectile[explode].localNPCHitCooldown = 30; } diff --git a/Projectiles/Rogue/SludgeSplotchProj1.cs b/Projectiles/Rogue/SludgeSplotchProj1.cs index 870857cb82..e4ee41a8d5 100644 --- a/Projectiles/Rogue/SludgeSplotchProj1.cs +++ b/Projectiles/Rogue/SludgeSplotchProj1.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Rogue sparkVelocity.Normalize(); sparkVelocity *= 7; - Projectile.NewProjectile(Projectile.Center, sparkVelocity, ModContent.ProjectileType(), 7, 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), 7, 0, Projectile.owner, 0, 0); } } diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index 525ed7dd9a..a245267b28 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/SpentFuelContainerProjectile.cs b/Projectiles/Rogue/SpentFuelContainerProjectile.cs index d3385b6f9e..34c49585dc 100644 --- a/Projectiles/Rogue/SpentFuelContainerProjectile.cs +++ b/Projectiles/Rogue/SpentFuelContainerProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue Point result; if (WorldUtils.Find(Projectile.Top.ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result)) { - int proj = Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 2f, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 2f, Projectile.owner); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().stealthStrike = Projectile.Calamity().stealthStrike; } diff --git a/Projectiles/Rogue/StealthNimbus.cs b/Projectiles/Rogue/StealthNimbus.cs index 86d4a651de..653afa22c6 100644 --- a/Projectiles/Rogue/StealthNimbus.cs +++ b/Projectiles/Rogue/StealthNimbus.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Rogue { int num414 = (int)(Projectile.position.X + 14f + (float)Main.rand.Next(Projectile.width - 28)); int num415 = (int)(Projectile.position.Y + (float)Projectile.height + 4f); - Projectile.NewProjectile((float)num414, (float)num415, 0f, 5f, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[0], 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), (float)num414, (float)num415, 0f, 5f, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[0], 0f); } } } diff --git a/Projectiles/Rogue/StealthNimbusCloud.cs b/Projectiles/Rogue/StealthNimbusCloud.cs index 96d507c754..59b826bed2 100644 --- a/Projectiles/Rogue/StealthNimbusCloud.cs +++ b/Projectiles/Rogue/StealthNimbusCloud.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.ai[0], 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.ai[0], 0f); } } diff --git a/Projectiles/Rogue/StormfrontRazorProjectile.cs b/Projectiles/Rogue/StormfrontRazorProjectile.cs index a95a34b37a..949ff1421c 100644 --- a/Projectiles/Rogue/StormfrontRazorProjectile.cs +++ b/Projectiles/Rogue/StormfrontRazorProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.ai[0] >= sparkFreq) { Vector2 sparkS = new Vector2(Main.rand.NextFloat(-14f, 14f), Main.rand.NextFloat(-14f, 14f)); - Projectile.NewProjectile(Projectile.Center, sparkS, ModContent.ProjectileType(), Projectile.damage, 3f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, sparkS, ModContent.ProjectileType(), Projectile.damage, 3f, Projectile.owner); Projectile.ai[0] = 0; } if (Main.rand.NextBool(10)) diff --git a/Projectiles/Rogue/SupernovaBomb.cs b/Projectiles/Rogue/SupernovaBomb.cs index 21b62721cc..dc38b92ef4 100644 --- a/Projectiles/Rogue/SupernovaBomb.cs +++ b/Projectiles/Rogue/SupernovaBomb.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue //stealth strike if (Projectile.Calamity().stealthStrike && Projectile.timeLeft % 8 == 0 && Projectile.owner == Main.myPlayer) - Projectile.NewProjectile(Projectile.Center, Vector2.UnitY * 2f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.48), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.UnitY * 2f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.48), Projectile.knockBack, Projectile.owner, 0f, 0f); } public override void Kill(int timeLeft) @@ -81,11 +81,11 @@ namespace CalamityMod.Projectiles.Rogue int projAmt = Main.rand.Next(3, 5); if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); for (int i = 0; i < projAmt; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), 0f, Projectile.owner, 0f, 0f); } float spread = MathHelper.Pi / 3f; double startAngle = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spread / 2; @@ -94,8 +94,8 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 3; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); } } diff --git a/Projectiles/Rogue/SylvanSlashAttack.cs b/Projectiles/Rogue/SylvanSlashAttack.cs index bba95e8146..a80da4534a 100644 --- a/Projectiles/Rogue/SylvanSlashAttack.cs +++ b/Projectiles/Rogue/SylvanSlashAttack.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue float speedMult = Main.rand.NextFloat(3,6); Vector2 vector1 = new Vector2(Projectile.Center.X - player.Center.X, Projectile.Center.Y - player.Center.Y); vector1.Normalize(); - Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); } } } @@ -152,7 +152,7 @@ namespace CalamityMod.Projectiles.Rogue float speedMult = Main.rand.NextFloat(3,6); Vector2 vector1 = new Vector2(Projectile.Center.X - player.Center.X, Projectile.Center.Y - player.Center.Y); vector1.Normalize(); - Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/TarraThornRight.cs b/Projectiles/Rogue/TarraThornRight.cs index 52f070874e..2f80d040e1 100644 --- a/Projectiles/Rogue/TarraThornRight.cs +++ b/Projectiles/Rogue/TarraThornRight.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ModLoader; @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue int type = Projectile.type; if (Projectile.ai[1] >= 10f) type = ModContent.ProjectileType(); - int number = Projectile.NewProjectile(Projectile.position.X + Projectile.velocity.X + (float)(Projectile.width / 2), Projectile.position.Y + Projectile.velocity.Y + (float)(Projectile.height / 2), Projectile.velocity.X, Projectile.velocity.Y, type, Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + int number = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + Projectile.velocity.X + (float)(Projectile.width / 2), Projectile.position.Y + Projectile.velocity.Y + (float)(Projectile.height / 2), Projectile.velocity.X, Projectile.velocity.Y, type, Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); Main.projectile[number].ai[1] = Projectile.ai[1] + 1f; } } diff --git a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs index 8ebfdbc576..6f46b379de 100644 --- a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs +++ b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -74,8 +74,8 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 4; i++) { double offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f) * 2f, (float)(Math.Cos(offsetAngle) * 5f) * 2f, projID, splitDamage, splitKB, Projectile.owner); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f) * 2f, (float)(-Math.Cos(offsetAngle) * 5f) * 2f, projID, splitDamage, splitKB, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f) * 2f, (float)(Math.Cos(offsetAngle) * 5f) * 2f, projID, splitDamage, splitKB, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f) * 2f, (float)(-Math.Cos(offsetAngle) * 5f) * 2f, projID, splitDamage, splitKB, Projectile.owner); } } } diff --git a/Projectiles/Rogue/TerraDiskProjectile.cs b/Projectiles/Rogue/TerraDiskProjectile.cs index b923662e6d..f940bb5ee5 100644 --- a/Projectiles/Rogue/TerraDiskProjectile.cs +++ b/Projectiles/Rogue/TerraDiskProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -130,7 +130,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft % 8f == 0f && Main.myPlayer == Projectile.owner) { - int disk = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 4, Projectile.knockBack / 4f, Projectile.owner, Projectile.identity, Main.rand.NextFloat(0.02f, 0.1f)); + int disk = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 4, Projectile.knockBack / 4f, Projectile.owner, Projectile.identity, Main.rand.NextFloat(0.02f, 0.1f)); Main.projectile[disk].timeLeft *= 2; Main.projectile[disk].idStaticNPCHitCooldown = 8; Main.projectile[disk].usesIDStaticNPCImmunity = true; @@ -179,8 +179,8 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 3; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner); - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/TheAtomSplitterProjectile.cs b/Projectiles/Rogue/TheAtomSplitterProjectile.cs index ab028e01cd..196755ba7e 100644 --- a/Projectiles/Rogue/TheAtomSplitterProjectile.cs +++ b/Projectiles/Rogue/TheAtomSplitterProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using System.IO; using Terraria; @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 spawnPosition = target.Center + Main.rand.NextVector2CircularEdge(baseOutwardness, baseOutwardness) * Main.rand.NextFloat(0.9f, 1.15f); Vector2 shootVelocity = (target.Center - spawnPosition).SafeNormalize(Vector2.UnitY) * Main.rand.NextFloat(12f, 14f); int damage = (int)(Projectile.damage * (stealth ? StealthSplitMultiplier : NormalSplitMultiplier)); - Projectile.NewProjectile(spawnPosition, shootVelocity, ModContent.ProjectileType(), damage, Projectile.knockBack, Projectile.owner, 0f, baseOutwardness / 9f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spawnPosition, shootVelocity, ModContent.ProjectileType(), damage, Projectile.knockBack, Projectile.owner, 0f, baseOutwardness / 9f); } public void FireExtraDuplicatesAtTarget(NPC target) @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue spawnPosition.X += Main.rand.NextFloatDirection() * target.width * 0.45f; int damage = (int)(Projectile.damage * StealthSplitMultiplier); Vector2 shootVelocity = Vector2.UnitY * (target.Center.Y - spawnPosition.Y > 0f).ToDirectionInt() * Main.rand.NextFloat(14f, 16.5f); - Projectile.NewProjectile(spawnPosition, shootVelocity, ModContent.ProjectileType(), damage, Projectile.knockBack, Projectile.owner, 0f, 24f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), spawnPosition, shootVelocity, ModContent.ProjectileType(), damage, Projectile.knockBack, Projectile.owner, 0f, 24f); } public void ReleaseHitDust(Vector2 spawnPosition) diff --git a/Projectiles/Rogue/TheSyringeProj.cs b/Projectiles/Rogue/TheSyringeProj.cs index d17ea65382..2cb9bb9fd0 100644 --- a/Projectiles/Rogue/TheSyringeProj.cs +++ b/Projectiles/Rogue/TheSyringeProj.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -77,13 +77,13 @@ namespace CalamityMod.Projectiles.Rogue for (int f = 0; f < fireAmt; f++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Main.myPlayer); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Main.myPlayer); } for (int s = 0; s < 2; ++s) { float SpeedX = -Projectile.velocity.X * Main.rand.NextFloat(0.4f, 0.7f) + Main.rand.NextFloat(-8f, 8f); float SpeedY = -Projectile.velocity.Y * Main.rand.NextFloat(0.4f, 0.7f) + Main.rand.NextFloat(-8f, 8f); - Projectile.NewProjectile(Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 0f, Main.myPlayer, Main.rand.Next(3), 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 0f, Main.myPlayer, Main.rand.Next(3), 0f); } } if (Projectile.owner == Main.myPlayer && Projectile.ai[1] == 1) @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue { float speedX = Main.rand.NextFloat(-0.7f, 0.7f); float speedY = Main.rand.NextFloat(-0.7f, 0.7f); - int bee = Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, speedX, speedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Main.myPlayer); + int bee = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speedX, speedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Main.myPlayer); Main.projectile[bee].penetrate = 1; } } diff --git a/Projectiles/Rogue/TitaniumShurikenProjectile.cs b/Projectiles/Rogue/TitaniumShurikenProjectile.cs index f33a5e787a..6943b37454 100644 --- a/Projectiles/Rogue/TitaniumShurikenProjectile.cs +++ b/Projectiles/Rogue/TitaniumShurikenProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -163,7 +163,7 @@ namespace CalamityMod.Projectiles.Rogue float yVector = (float)Main.rand.Next(-35, 36) * 0.02f; xVector *= 10f; yVector *= 10f; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, xVector, yVector, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, xVector, yVector, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } } @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Rogue float yVector = (float)Main.rand.Next(-35, 36) * 0.02f; xVector *= 10f; yVector *= 10f; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, xVector, yVector, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, xVector, yVector, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/ToothBallProjectile.cs b/Projectiles/Rogue/ToothBallProjectile.cs index fdf9a8ef19..5491c91fa7 100644 --- a/Projectiles/Rogue/ToothBallProjectile.cs +++ b/Projectiles/Rogue/ToothBallProjectile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, -10f, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner, 1f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, -10f, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner, 1f, 0f); } } } diff --git a/Projectiles/Rogue/TotalityFlask.cs b/Projectiles/Rogue/TotalityFlask.cs index c41be3ead1..d4c718a18e 100644 --- a/Projectiles/Rogue/TotalityFlask.cs +++ b/Projectiles/Rogue/TotalityFlask.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack, Projectile.owner, 0f, 0f); } } } @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue //glass-pot break sound SoundEngine.PlaySound(SoundID.Shatter, (int) Projectile.position.X, (int) Projectile.position.Y, 1, 1f, 0f); - int meltdown = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + int meltdown = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); Main.projectile[meltdown].Center = Projectile.Center; //makes it centered because it's not without this Vector2 vector2 = new Vector2(20f, 20f); @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Rogue for (int t = 0; t < tarAmt; t++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 0f, Main.myPlayer, 0f, 0f); } } } diff --git a/Projectiles/Rogue/TotalityTar.cs b/Projectiles/Rogue/TotalityTar.cs index 854de45f4b..273f789176 100644 --- a/Projectiles/Rogue/TotalityTar.cs +++ b/Projectiles/Rogue/TotalityTar.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue for (int f = 0; f < fireAmt; f++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, 1f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, 1f, Main.myPlayer, 0f, 0f); } } } diff --git a/Projectiles/Rogue/ToxicantTwisterTwoPointZero.cs b/Projectiles/Rogue/ToxicantTwisterTwoPointZero.cs index 2b0858442d..f89db14791 100644 --- a/Projectiles/Rogue/ToxicantTwisterTwoPointZero.cs +++ b/Projectiles/Rogue/ToxicantTwisterTwoPointZero.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft % 20 == 0 && Main.myPlayer == Projectile.owner) { for (int i = 0; i < 2; i++) - Projectile.NewProjectile(Projectile.Center, Projectile.velocity.RotatedByRandom(0.1f) * -0.6f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.35), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedByRandom(0.1f) * -0.6f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.35), 0f, Projectile.owner); } Projectile.rotation += 0.06f * (Projectile.velocity.X > 0).ToDirectionInt(); } diff --git a/Projectiles/Rogue/TurbulanceProjectile.cs b/Projectiles/Rogue/TurbulanceProjectile.cs index 7a303d2b28..c0f35a478c 100644 --- a/Projectiles/Rogue/TurbulanceProjectile.cs +++ b/Projectiles/Rogue/TurbulanceProjectile.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; using Microsoft.Xna.Framework; @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.timeLeft % 14 == 0) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack / 2, Projectile.owner, 1f, 1f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack / 2, Projectile.owner, 1f, 1f); } } } @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue for (int w = 0; w < 4; w++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack / 3, Main.myPlayer, 0f, homeIn ? 1f : 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack / 3, Main.myPlayer, 0f, homeIn ? 1f : 0f); } } } diff --git a/Projectiles/Rogue/UrchinStingerProj.cs b/Projectiles/Rogue/UrchinStingerProj.cs index 3cab077b09..2cc33bbf5d 100644 --- a/Projectiles/Rogue/UrchinStingerProj.cs +++ b/Projectiles/Rogue/UrchinStingerProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.localAI[0] % 40 == 0 && Projectile.ai[0] == 1f) { Vector2 projspeed = new Vector2(Main.rand.NextFloat(-4f, 4f), Main.rand.NextFloat(-4f, 4f)); - int proj = Projectile.NewProjectile(Projectile.Center, projspeed, ModContent.ProjectileType(), (int)(projdmg * 0.5f), 1f, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, projspeed, ModContent.ProjectileType(), (int)(projdmg * 0.5f), 1f, Projectile.owner); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceRogue = true; } diff --git a/Projectiles/Rogue/ValariBoomerang.cs b/Projectiles/Rogue/ValariBoomerang.cs index 536fcbfed3..ca7486f2c8 100644 --- a/Projectiles/Rogue/ValariBoomerang.cs +++ b/Projectiles/Rogue/ValariBoomerang.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < icicleAmt; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int shard = Projectile.NewProjectile(Projectile.Center, velocity, Main.rand.NextBool(2) ? ModContent.ProjectileType() : ModContent.ProjectileType(), Projectile.damage / 3, 0f, Projectile.owner); + int shard = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ModContent.ProjectileType() : ModContent.ProjectileType(), Projectile.damage / 3, 0f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/ValedictionBoomerang.cs b/Projectiles/Rogue/ValedictionBoomerang.cs index dec1d24c61..8f9fd006f0 100644 --- a/Projectiles/Rogue/ValedictionBoomerang.cs +++ b/Projectiles/Rogue/ValedictionBoomerang.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Rogue } velocity.Normalize(); velocity *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile typhoon = Projectile.NewProjectileDirect(Projectile.Center, velocity, ModContent.ProjectileType(), typhoonDamage, 0f, Projectile.owner); + Projectile typhoon = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), typhoonDamage, 0f, Projectile.owner); if (typhoon.whoAmI.WithinBounds(Main.maxProjectiles)) { typhoon.Calamity().forceRogue = true; diff --git a/Projectiles/Rogue/WrathwingSpear.cs b/Projectiles/Rogue/WrathwingSpear.cs index 782170388c..25618e924b 100644 --- a/Projectiles/Rogue/WrathwingSpear.cs +++ b/Projectiles/Rogue/WrathwingSpear.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue float angleDiff = Main.rand.NextFloat(-FireballAngleVariance, FireballAngleVariance); Vector2 velocity = Projectile.velocity.RotatedBy(angleDiff) * 1.06f; float kb = Projectile.knockBack * 0.6f; - Projectile.NewProjectile(Projectile.Center, velocity, fireballID, damage, kb, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, fireballID, damage, kb, Projectile.owner); } Projectile.ai[0] -= 1f; @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue float ySpeed = x % 2 == 0 ? -13f : -19f; ySpeed *= Main.rand.NextFloat(0.85f, 1.05f); Vector2 velocity = new Vector2(x, ySpeed); - Projectile.NewProjectile(pos, velocity, eruptionID, damage, kb, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), pos, velocity, eruptionID, damage, kb, Projectile.owner); } } diff --git a/Projectiles/Typeless/ArtifactOfResilienceShards.cs b/Projectiles/Typeless/ArtifactOfResilienceShards.cs index 1444495cfc..496a63e236 100644 --- a/Projectiles/Typeless/ArtifactOfResilienceShards.cs +++ b/Projectiles/Typeless/ArtifactOfResilienceShards.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using CalamityMod.Projectiles.Damageable; using Microsoft.Xna.Framework; diff --git a/Projectiles/Typeless/BloodBomb.cs b/Projectiles/Typeless/BloodBomb.cs index 33b1766b92..79f145ffe9 100644 --- a/Projectiles/Typeless/BloodBomb.cs +++ b/Projectiles/Typeless/BloodBomb.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Typeless { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Typeless/BrimstoneHellfireballFriendly2.cs b/Projectiles/Typeless/BrimstoneHellfireballFriendly2.cs index 659794e807..f47ad89ff8 100644 --- a/Projectiles/Typeless/BrimstoneHellfireballFriendly2.cs +++ b/Projectiles/Typeless/BrimstoneHellfireballFriendly2.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Typeless { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } diff --git a/Projectiles/Typeless/CursorProj.cs b/Projectiles/Typeless/CursorProj.cs index 1ce71ac519..d57ade15c7 100644 --- a/Projectiles/Typeless/CursorProj.cs +++ b/Projectiles/Typeless/CursorProj.cs @@ -1,4 +1,4 @@ -using System; +using System; using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -217,7 +217,7 @@ namespace CalamityMod.Projectiles.Typeless for (int i = 0; i < numProj; i++) { offsetAngle = startAngle + deltaAngle * i; - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack * 0.33f, Projectile.owner, 0f, 0f); } diff --git a/Projectiles/Typeless/DemonshadeRedDevil.cs b/Projectiles/Typeless/DemonshadeRedDevil.cs index 8f4ac46a0e..607b5d4b7c 100644 --- a/Projectiles/Typeless/DemonshadeRedDevil.cs +++ b/Projectiles/Typeless/DemonshadeRedDevil.cs @@ -1,4 +1,4 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -255,7 +255,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 velocity = vector46 - Projectile.Center; velocity.Normalize(); velocity *= speed; - int trident = Projectile.NewProjectile(Projectile.Center, velocity, projType, Projectile.damage, 0f, Main.myPlayer); + int trident = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projType, Projectile.damage, 0f, Main.myPlayer); if (trident.WithinBounds(Main.maxProjectiles)) { Main.projectile[trident].timeLeft = 300; diff --git a/Projectiles/Typeless/GodSlayerShrapnelRound.cs b/Projectiles/Typeless/GodSlayerShrapnelRound.cs index b01c3b651b..ed0acc6f75 100644 --- a/Projectiles/Typeless/GodSlayerShrapnelRound.cs +++ b/Projectiles/Typeless/GodSlayerShrapnelRound.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Typeless for (int s = 0; s < shrapnelAmt; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 0f, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Typeless/NebulaStar.cs b/Projectiles/Typeless/NebulaStar.cs index cb8f828c06..7a383b1058 100644 --- a/Projectiles/Typeless/NebulaStar.cs +++ b/Projectiles/Typeless/NebulaStar.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Typeless if (Projectile.owner == Main.myPlayer && !FadingOut) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 1f, 1f, 0.3f); - Projectile.NewProjectile(Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, 0f, 0f); } } diff --git a/Projectiles/Typeless/OmegaBlueTentacle.cs b/Projectiles/Typeless/OmegaBlueTentacle.cs index d972efa6b5..3527d34a7b 100644 --- a/Projectiles/Typeless/OmegaBlueTentacle.cs +++ b/Projectiles/Typeless/OmegaBlueTentacle.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; @@ -205,7 +205,7 @@ namespace CalamityMod.Projectiles.Typeless if (Main.player[projectile.owner].statLife > Main.player[projectile.owner].statLifeMax2) Main.player[projectile.owner].statLife = Main.player[projectile.owner].statLifeMax2; Main.player[projectile.owner].HealEffect(healAmount, false);*/ - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, Projectile.owner, Projectile.owner, healAmount); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, Projectile.owner, Projectile.owner, healAmount); } } } @@ -224,7 +224,7 @@ namespace CalamityMod.Projectiles.Typeless if (Main.player[projectile.owner].statLife > Main.player[projectile.owner].statLifeMax2) Main.player[projectile.owner].statLife = Main.player[projectile.owner].statLifeMax2; Main.player[projectile.owner].HealEffect(healAmount, false);*/ - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, Projectile.owner, Projectile.owner, healAmount); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, Projectile.owner, Projectile.owner, healAmount); } } } diff --git a/Projectiles/Typeless/ReaverThornBase.cs b/Projectiles/Typeless/ReaverThornBase.cs index e8f923eba6..694e2aa11e 100644 --- a/Projectiles/Typeless/ReaverThornBase.cs +++ b/Projectiles/Typeless/ReaverThornBase.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Typeless int type = Projectile.type; if (Projectile.ai[1] >= 6f) type = ModContent.ProjectileType(); - int thorn = Projectile.NewProjectile(Projectile.Center + Projectile.velocity, Projectile.velocity, type, Projectile.damage, Projectile.knockBack, Projectile.owner); + int thorn = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + Projectile.velocity, Projectile.velocity, type, Projectile.damage, Projectile.knockBack, Projectile.owner); Main.projectile[thorn].ai[1] = Projectile.ai[1] + 1f; } } diff --git a/Projectiles/Typeless/SabatonSlam.cs b/Projectiles/Typeless/SabatonSlam.cs index e2643c811e..5137603a10 100644 --- a/Projectiles/Typeless/SabatonSlam.cs +++ b/Projectiles/Typeless/SabatonSlam.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Typeless //Spawns the shockwave if (Main.myPlayer == Projectile.owner) { - Projectile.NewProjectile(Projectile.position.X + 25, Projectile.position.Y + 25, 0f, 0f, ModContent.ProjectileType(), (int)(300 * player.AverageDamage()), 12, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position.X + 25, Projectile.position.Y + 25, 0f, 0f, ModContent.ProjectileType(), (int)(300 * player.AverageDamage()), 12, Projectile.owner); SoundEngine.PlaySound(SoundID.Item14, Projectile.position); player.Calamity().gSabatonFall = 0; Projectile.Kill(); diff --git a/Projectiles/Typeless/StarStruckWaterBottle.cs b/Projectiles/Typeless/StarStruckWaterBottle.cs index 61129d7708..e2ddb5f00b 100644 --- a/Projectiles/Typeless/StarStruckWaterBottle.cs +++ b/Projectiles/Typeless/StarStruckWaterBottle.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Typeless dust.velocity.X *= 1.5f; dust.velocity *= 3f; } - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner, 4f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner, 4f); } } } diff --git a/Projectiles/Typeless/StormBolt.cs b/Projectiles/Typeless/StormBolt.cs index 26fce7e521..d82991636d 100644 --- a/Projectiles/Typeless/StormBolt.cs +++ b/Projectiles/Typeless/StormBolt.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Typeless { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Typeless/TerminusHoldout.cs b/Projectiles/Typeless/TerminusHoldout.cs index b9caee2619..fb64bd4ca9 100644 --- a/Projectiles/Typeless/TerminusHoldout.cs +++ b/Projectiles/Typeless/TerminusHoldout.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Typeless SoundEngine.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, Main.LocalPlayer.Center); Main.LocalPlayer.Calamity().GeneralScreenShakePower = 16f; if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner); } public void CreateMysticDeathDust()