diff --git a/Buffs/DamageOverTime/Vaporfied.cs b/Buffs/DamageOverTime/Vaporfied.cs new file mode 100644 index 0000000000..587949fa9a --- /dev/null +++ b/Buffs/DamageOverTime/Vaporfied.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.DamageOverTime +{ + public class Vaporfied : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Vaporfied"); + Description.SetDefault("Vape"); + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + longerExpertDebuff = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.Calamity().vaporfied = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; + } + } +} diff --git a/Buffs/DamageOverTime/Vaporfied.png b/Buffs/DamageOverTime/Vaporfied.png new file mode 100644 index 0000000000..7b06cdb73f Binary files /dev/null and b/Buffs/DamageOverTime/Vaporfied.png differ diff --git a/CalamityMod.cs b/CalamityMod.cs index 660aa7d041..56edcb11a7 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1779,7 +1779,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() }; boomerangProjList = new List() @@ -1812,7 +1813,11 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType() + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() }; javelinList = new List() @@ -1959,6 +1964,7 @@ namespace CalamityMod spikyBallList = new List() { + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), @@ -1969,6 +1975,7 @@ namespace CalamityMod spikyBallProjList = new List() { + ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), diff --git a/Items/TreasureBags/LeviathanBag.cs b/Items/TreasureBags/LeviathanBag.cs index 825f438da0..cfad8e56ac 100644 --- a/Items/TreasureBags/LeviathanBag.cs +++ b/Items/TreasureBags/LeviathanBag.cs @@ -49,6 +49,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); + DropHelper.DropItemChance(player, ModContent.ItemType(), 3); // Equipment DropHelper.DropItem(player, ModContent.ItemType()); diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 60de40b5fb..6aec678d06 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic { public class HeliumFlash : ModItem { - public static int BaseDamage = 1900; + public static int BaseDamage = 1280; public static float Speed = 15f; public override void SetStaticDefaults() diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 953f32c1ce..a36466a014 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -45,7 +45,6 @@ namespace CalamityMod.Items.Weapons.Melee "[Swings leave behind exploding blood trails [Below 50% health]]\n" + "[Right click to swipe the sword, reflecting projectiles at a 50% chance]\n" + "[Activating Rage Mode releases an enormous barrage of skulls]\n" + - "Upgrades after killing the Wall of Flesh, Moon Lord, and Yharon\n" + "'Give me that thing, your dark soul'"); } //NOTE: GetWeaponDamage is in the CalamityPlayer file diff --git a/Items/Weapons/Melee/TerraDiskMelee.cs b/Items/Weapons/Melee/TerraDiskMelee.cs new file mode 100644 index 0000000000..3c7dbd4612 --- /dev/null +++ b/Items/Weapons/Melee/TerraDiskMelee.cs @@ -0,0 +1,74 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Melee +{ + public class TerraDiskMelee : ModItem + { + public static int BaseDamage = 70; + public static float Speed = 12f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Terra Disk"); + Tooltip.SetDefault(@"Throws a disk that has a chance to generate several disks if enemies are near it +A max of three disks can be active at a time"); + } + + public override void SetDefaults() + { + item.width = 46; + item.height = 46; + item.damage = BaseDamage; + item.knockBack = 4f; + item.useAnimation = 16; + item.useTime = 16; + item.autoReuse = true; + item.noMelee = true; + item.noUseGraphic = true; + + item.useStyle = 1; + item.UseSound = SoundID.Item1; + + item.value = Item.buyPrice(0, 80, 0, 0); + item.rare = 8; + + item.melee = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = Speed; + } + + public override bool CanUseItem(Player player) + { + if (player.ownedProjectileCounts[item.shoot] >= 3) + { + return false; + } + else + { + return true; + } + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); + Main.projectile[proj].Calamity().forceMelee = true; + return false; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.SetResult(this); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddTile(TileID.MythrilAnvil); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Melee/TerraDiskMelee.png b/Items/Weapons/Melee/TerraDiskMelee.png new file mode 100644 index 0000000000..32b39a6f1e Binary files /dev/null and b/Items/Weapons/Melee/TerraDiskMelee.png differ diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index 0d265139da..4c57fada4d 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 18; + item.damage = 9; item.ranged = true; item.width = 56; item.height = 28; @@ -70,7 +70,7 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = speedX + (float)Main.rand.Next(-50, 51) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-50, 51) * 0.05f; - int flare = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.75), knockBack, player.whoAmI, 0.0f, 0.0f); + int flare = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 1.6), knockBack, player.whoAmI, 0.0f, 0.0f); Main.projectile[flare].penetrate = 1; Main.projectile[flare].timeLeft = 600; Main.projectile[flare].Calamity().forceRanged = true; diff --git a/Items/Weapons/Rogue/BlazingStar.png b/Items/Weapons/Rogue/BlazingStar.png index 75c05587da..ac480e43b1 100644 Binary files a/Items/Weapons/Rogue/BlazingStar.png and b/Items/Weapons/Rogue/BlazingStar.png differ diff --git a/Items/Weapons/Rogue/BouncySpikyBall.cs b/Items/Weapons/Rogue/BouncySpikyBall.cs new file mode 100644 index 0000000000..ab8d132080 --- /dev/null +++ b/Items/Weapons/Rogue/BouncySpikyBall.cs @@ -0,0 +1,62 @@ +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class BouncySpikyBall : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bouncy Spiky Ball"); + Tooltip.SetDefault(@"Throws a very bouncy ball that richochets off walls and enemies +Receives a small boost in damage and velocity after bouncing off an enemy +Stealth strikes provide a bigger boost after richocheting"); + } + + public override void SafeSetDefaults() + { + item.width = 14; + item.damage = 10; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 18; + item.useStyle = 1; + item.useTime = 18; + item.knockBack = 1f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.consumable = true; + item.maxStack = 999; + item.height = 14; + item.value = Item.buyPrice(0, 0, 1, 0); + item.rare = 1; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 8f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + return false; + } + return true; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SpikyBall, 3); + recipe.AddIngredient(ItemID.PinkGel); + recipe.AddTile(TileID.WorkBenches); + recipe.SetResult(this, 3); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Rogue/BouncySpikyBall.png b/Items/Weapons/Rogue/BouncySpikyBall.png new file mode 100644 index 0000000000..d409a6b571 Binary files /dev/null and b/Items/Weapons/Rogue/BouncySpikyBall.png differ diff --git a/Items/Weapons/Rogue/DeepWounder.cs b/Items/Weapons/Rogue/DeepWounder.cs index 930ac3ad1b..940802e836 100644 --- a/Items/Weapons/Rogue/DeepWounder.cs +++ b/Items/Weapons/Rogue/DeepWounder.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.autoReuse = true; item.height = 48; item.maxStack = 1; - item.rare = 8; + item.rare = 7; item.value = Item.buyPrice(0, 60, 0, 0); item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; diff --git a/Items/Weapons/Rogue/DefectiveSphere.cs b/Items/Weapons/Rogue/DefectiveSphere.cs new file mode 100644 index 0000000000..92340f2238 --- /dev/null +++ b/Items/Weapons/Rogue/DefectiveSphere.cs @@ -0,0 +1,100 @@ +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class DefectiveSphere : RogueWeapon + { + public static int BaseDamage = 80; + public static float Speed = 15f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Defective Sphere"); + Tooltip.SetDefault(@"Fires a variety deadly spheres with different effects +Stacks up to 5 +Stealth strikes launch all 4 sphere types at once"); + } + + public override void SafeSetDefaults() + { + item.width = 42; + item.height = 44; + item.damage = BaseDamage; + item.knockBack = 5f; + item.useAnimation = 13; + item.useTime = 13; + item.autoReuse = true; + item.noMelee = true; + item.noUseGraphic = true; + item.maxStack = 5; + + item.useStyle = 1; + item.UseSound = SoundID.Item15; //phaseblade sound effect + + item.value = Item.buyPrice(0, 16, 0, 0); + item.rare = 8; + + item.Calamity().rogue = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = Speed; + } + + public override bool CanUseItem(Player player) + { + int UseMax = item.stack; + + if (player.Calamity().StealthStrikeAvailable()) + { + return true; + } + else if ((player.ownedProjectileCounts[item.shoot] + player.ownedProjectileCounts[ModContent.ProjectileType()] + player.ownedProjectileCounts[ModContent.ProjectileType()] + player.ownedProjectileCounts[ModContent.ProjectileType()]) >= UseMax) + { + return false; + } + else + { + return true; + } + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int sphereType = type; + if (Main.rand.NextBool(4)) + sphereType = ModContent.ProjectileType(); + else if (Main.rand.NextBool(3)) + sphereType = ModContent.ProjectileType(); + else if (Main.rand.NextBool(2)) + sphereType = ModContent.ProjectileType(); + float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedX2 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedY2 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedX3 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedY3 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedX4 = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; + float SpeedY4 = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; + + if (player.Calamity().StealthStrikeAvailable()) + { + int stealth = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage / 2, knockBack, player.whoAmI, 0f, 0f); + int stealth2 = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, ModContent.ProjectileType(), damage / 2, knockBack, player.whoAmI, 0f, 0f); + int stealth3 = Projectile.NewProjectile(position.X, position.Y, SpeedX3, SpeedY3, ModContent.ProjectileType(), damage / 2, knockBack, player.whoAmI, 0f, 0f); + int stealth4 = Projectile.NewProjectile(position.X, position.Y, SpeedX4, SpeedY4, ModContent.ProjectileType(), damage / 2, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + Main.projectile[stealth2].Calamity().stealthStrike = true; + Main.projectile[stealth3].Calamity().stealthStrike = true; + Main.projectile[stealth4].Calamity().stealthStrike = true; + } + else + { + Projectile.NewProjectile(position, new Vector2(speedX, speedY), sphereType, damage, knockBack, player.whoAmI, 0f, 0f); + } + return false; + } + } +} diff --git a/Items/Weapons/Rogue/DefectiveSphere.png b/Items/Weapons/Rogue/DefectiveSphere.png new file mode 100644 index 0000000000..c4c2b56c25 Binary files /dev/null and b/Items/Weapons/Rogue/DefectiveSphere.png differ diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index d6fd9f9830..4f258e2366 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -21,7 +21,7 @@ Stealth strikes throws three short ranged boomerangs along with a spread of icic public override void SafeSetDefaults() { - item.damage = 75; + item.damage = 70; item.knockBack = 12; item.thrown = true; item.crit = 16; @@ -67,7 +67,7 @@ Stealth strikes throws three short ranged boomerangs along with a spread of icic return true; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); @@ -77,6 +77,6 @@ Stealth strikes throws three short ranged boomerangs along with a spread of icic recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/Weapons/Rogue/GodsParanoia.cs b/Items/Weapons/Rogue/GodsParanoia.cs index 6bf8bbc59e..3b9acfeada 100644 --- a/Items/Weapons/Rogue/GodsParanoia.cs +++ b/Items/Weapons/Rogue/GodsParanoia.cs @@ -63,9 +63,9 @@ Right click to delete all existing spiky balls"); } else { - int UseMax = item.stack - 1; + int UseMax = item.stack; - if (player.ownedProjectileCounts[item.shoot] > UseMax) + if (player.ownedProjectileCounts[item.shoot] >= UseMax) { return false; } diff --git a/Items/Weapons/Rogue/HellsSun.cs b/Items/Weapons/Rogue/HellsSun.cs index 6ad54e1225..051015b9d6 100644 --- a/Items/Weapons/Rogue/HellsSun.cs +++ b/Items/Weapons/Rogue/HellsSun.cs @@ -64,9 +64,9 @@ namespace CalamityMod.Items.Weapons.Rogue } else { - int UseMax = item.stack - 1; + int UseMax = item.stack; - if (player.ownedProjectileCounts[item.shoot] > UseMax) + if (player.ownedProjectileCounts[item.shoot] >= UseMax) { return false; } diff --git a/Items/Weapons/Rogue/JawsOfOblivion.cs b/Items/Weapons/Rogue/JawsOfOblivion.cs index ee6595daed..31762b9fcc 100644 --- a/Items/Weapons/Rogue/JawsOfOblivion.cs +++ b/Items/Weapons/Rogue/JawsOfOblivion.cs @@ -13,13 +13,14 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Jaws of Oblivion"); Tooltip.SetDefault("Throws a tight spread of six venomous reaper fangs that stick in enemies\n" + - "Stealth strikes cause the teeth to emit a crushing shockwave on impact"); + "Stealth strikes cause the teeth to emit a crushing shockwave on impact\n" + + "You're gonna need a bigger boat"); } public override void SafeSetDefaults() { item.width = 42; - item.damage = 350; + item.damage = 438; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 15; @@ -33,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 20f; + item.shootSpeed = 25f; item.Calamity().postMoonLordRarity = 13; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/Kylie.cs b/Items/Weapons/Rogue/Kylie.cs index 4c95f8da8a..fbb8eb6a17 100644 --- a/Items/Weapons/Rogue/Kylie.cs +++ b/Items/Weapons/Rogue/Kylie.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue for (int i = 0; i < 3; i++) { Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread)); - int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), item.damage, item.knockBack, player.whoAmI, 0f, 1f); + int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 1f); Main.projectile[proj].Calamity().stealthStrike = true; spread -= 10; } diff --git a/Items/Weapons/Rogue/LeviathanTeeth.cs b/Items/Weapons/Rogue/LeviathanTeeth.cs index def6b51abc..42d004a446 100644 --- a/Items/Weapons/Rogue/LeviathanTeeth.cs +++ b/Items/Weapons/Rogue/LeviathanTeeth.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 36; - item.damage = 70; + item.damage = 94; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 10; diff --git a/Items/Weapons/Rogue/MonkeyDarts.cs b/Items/Weapons/Rogue/MonkeyDarts.cs index 03175521d1..b6cfcb5c74 100644 --- a/Items/Weapons/Rogue/MonkeyDarts.cs +++ b/Items/Weapons/Rogue/MonkeyDarts.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.UseSound = SoundID.Item1; item.useTime = 20; item.useAnimation = 20; - item.value = Item.buyPrice(0, 0, 1, 0); + item.value = Item.buyPrice(0, 0, 4, 0); item.rare = 7; item.shootSpeed = 8f; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Rogue/NastyCholla.cs b/Items/Weapons/Rogue/NastyCholla.cs index cf461a903e..84b0b01ee7 100644 --- a/Items/Weapons/Rogue/NastyCholla.cs +++ b/Items/Weapons/Rogue/NastyCholla.cs @@ -47,7 +47,7 @@ Stealth strikes throw five at once"); for (int i = 0; i < 5; i++) { Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread)); - int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, item.damage, item.knockBack, player.whoAmI, 0f, 0f); + int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); Main.projectile[proj].Calamity().stealthStrike = true; spread -= Main.rand.Next(1,4); } diff --git a/Items/Weapons/Rogue/PhantomLance.cs b/Items/Weapons/Rogue/PhantomLance.cs index 3ce5c04a4e..7ce313eb20 100644 --- a/Items/Weapons/Rogue/PhantomLance.cs +++ b/Items/Weapons/Rogue/PhantomLance.cs @@ -20,7 +20,7 @@ Stealth strikes don't slow down and souls always deal full damage"); public override void SafeSetDefaults() { - item.damage = 150; + item.damage = 75; item.knockBack = 5f; item.width = 62; diff --git a/Items/Weapons/Rogue/SkyStabber.cs b/Items/Weapons/Rogue/SkyStabber.cs index 972356a811..000305ce8a 100644 --- a/Items/Weapons/Rogue/SkyStabber.cs +++ b/Items/Weapons/Rogue/SkyStabber.cs @@ -60,9 +60,9 @@ namespace CalamityMod.Items.Weapons.Rogue } else { - int UseMax = item.stack - 1; + int UseMax = item.stack; - if (player.ownedProjectileCounts[item.shoot] > UseMax) + if (player.ownedProjectileCounts[item.shoot] >= UseMax) { return false; } diff --git a/Items/Weapons/Rogue/StickySpikyBall.cs b/Items/Weapons/Rogue/StickySpikyBall.cs index e3a3c32131..1b61bd93fd 100644 --- a/Items/Weapons/Rogue/StickySpikyBall.cs +++ b/Items/Weapons/Rogue/StickySpikyBall.cs @@ -45,9 +45,10 @@ Stealth strikes throw seven at once and last a lot longer"); for (int i = 0; i < 7; i++) { Vector2 perturbedspeed = new Vector2(speedX + Main.rand.Next(-3,4), speedY + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread)); - int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, item.damage, item.knockBack, player.whoAmI, 0f, 0f); + int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); Main.projectile[proj].Calamity().stealthStrike = true; Main.projectile[proj].timeLeft *= 4; + Main.projectile[proj].localNPCHitCooldown += 15; spread -= Main.rand.Next(1,4); } return false; diff --git a/Items/Weapons/Rogue/TerraDisk.cs b/Items/Weapons/Rogue/TerraDisk.cs new file mode 100644 index 0000000000..d39d6dfd97 --- /dev/null +++ b/Items/Weapons/Rogue/TerraDisk.cs @@ -0,0 +1,74 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class TerraDisk : RogueWeapon + { + public static int BaseDamage = 70; + public static float Speed = 12f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Terra Disk"); + Tooltip.SetDefault(@"Throws a disk that has a chance to generate several disks if enemies are near it +A max of three disks can be active at a time"); + } + + public override void SafeSetDefaults() + { + item.width = 46; + item.height = 46; + item.damage = BaseDamage; + item.knockBack = 4f; + item.useAnimation = 16; + item.useTime = 16; + item.autoReuse = true; + item.noMelee = true; + item.noUseGraphic = true; + + item.useStyle = 1; + item.UseSound = SoundID.Item1; + + item.value = Item.buyPrice(0, 80, 0, 0); + item.rare = 8; + + item.Calamity().rogue = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = Speed; + } + + public override bool CanUseItem(Player player) + { + if (player.ownedProjectileCounts[item.shoot] >= 3) + { + return false; + } + else + { + return true; + } + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); + Main.projectile[proj].Calamity().forceRogue = true; + return false; + } + + /*public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.SetResult(this); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddTile(TileID.MythrilAnvil); + recipe.AddRecipe(); + }*/ + } +} diff --git a/Items/Weapons/Rogue/TerraDisk.png b/Items/Weapons/Rogue/TerraDisk.png new file mode 100644 index 0000000000..32b39a6f1e Binary files /dev/null and b/Items/Weapons/Rogue/TerraDisk.png differ diff --git a/Items/Weapons/Typeless/Aestheticus.cs b/Items/Weapons/Typeless/Aestheticus.cs new file mode 100644 index 0000000000..c3caa6c93c --- /dev/null +++ b/Items/Weapons/Typeless/Aestheticus.cs @@ -0,0 +1,70 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Typeless +{ + public class Aestheticus : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Aestheticus"); + Tooltip.SetDefault("Fires crystals that explode and slow enemies down\n" + + "This weapon scales with all your damage stats at once"); + Item.staff[item.type] = true; + } + + public override void SetDefaults() + { + item.width = 58; + item.damage = 10; + item.rare = 3; + item.useAnimation = 25; + item.useTime = 25; + item.useStyle = 5; + item.knockBack = 3f; + item.UseSound = SoundID.Item109; + item.autoReuse = true; + item.noMelee = true; + item.height = 58; + item.value = Item.buyPrice(0, 4, 0, 0); + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 5f; + } + + // Lunic Eye scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts). + public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + { + float formula = 5f * (player.allDamage - 1f); + formula += player.meleeDamage - 1f; + formula += player.rangedDamage - 1f; + formula += player.magicDamage - 1f; + formula += player.minionDamage - 1f; + formula += player.Calamity().throwingDamage - 1f; + add += formula; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.HellstoneBar, 10); + recipe.AddIngredient(ItemID.MeteoriteBar, 10); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.Glass, 20); + recipe.AddIngredient(ItemID.Gel, 15); + recipe.AddIngredient(ItemID.FallenStar, 5); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Typeless/Aestheticus.png b/Items/Weapons/Typeless/Aestheticus.png new file mode 100644 index 0000000000..87b24dce11 Binary files /dev/null and b/Items/Weapons/Typeless/Aestheticus.png differ diff --git a/NPCs/Astral/Hive.png b/NPCs/Astral/Hive.png index 081ee1131b..fcd1ef8827 100644 Binary files a/NPCs/Astral/Hive.png and b/NPCs/Astral/Hive.png differ diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index fd77eab0b2..3a75681139 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -89,7 +89,8 @@ namespace CalamityMod.NPCs // Draedons Remote public static bool DraedonMayhem = false; - // Debuffs + // Debuffs + public int vaporfied = 0; public int timeSlow = 0; public int gState = 0; public int tSad = 0; @@ -529,6 +530,7 @@ namespace CalamityMod.NPCs } }*/ + ApplyDPSDebuff(vaporfied, 30, 6, ref npc.lifeRegen, ref damage); ApplyDPSDebuff(irradiated, 20, 4, ref npc.lifeRegen, ref damage); ApplyDPSDebuff(bFlames, 40, 8, ref npc.lifeRegen, ref damage); ApplyDPSDebuff(hFlames, 50, 10, ref npc.lifeRegen, ref damage); @@ -2127,6 +2129,8 @@ namespace CalamityMod.NPCs dFlames--; if (marked > 0) marked--; + if (vaporfied > 0) + vaporfied--; if (irradiated > 0) irradiated--; if (bFlames > 0) @@ -2164,8 +2168,13 @@ namespace CalamityMod.NPCs if (npc.boss || CalamityMod.movementImpairImmuneList.Contains(npc.type)) return; - if (pearlAura > 0 && !CalamityPlayer.areThereAnyDamnBosses) - npc.velocity *= 0.9f; + if (!CalamityPlayer.areThereAnyDamnBosses) + { + if (pearlAura > 0) + npc.velocity *= 0.9f; + if (vaporfied > 0) + npc.velocity *= 0.9f; + } if (!CalamityWorld.bossRushActive) { @@ -2905,7 +2914,34 @@ namespace CalamityMod.NPCs public override void DrawEffects(NPC npc, ref Color drawColor) { - if (bBlood > 0) + if (vaporfied > 0) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 246, + 242, + 229, + 226, + 247, + 187, + 234 + }); + + if (Main.rand.Next(5) < 4) + { + int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, dustType, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 3f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 1.8f; + Main.dust[dust].velocity.Y -= 0.5f; + if (Main.rand.NextBool(4)) + { + Main.dust[dust].noGravity = false; + Main.dust[dust].scale *= 0.5f; + } + } + } + + if (bBlood > 0) { if (Main.rand.Next(5) < 4) { @@ -2921,6 +2957,7 @@ namespace CalamityMod.NPCs } Lighting.AddLight(npc.position, 0.08f, 0f, 0f); } + if (bFlames > 0 || enraged > 0) { if (Main.rand.Next(5) < 4) @@ -2937,6 +2974,7 @@ namespace CalamityMod.NPCs } Lighting.AddLight(npc.position, 0.05f, 0.01f, 0.01f); } + if (aFlames > 0) { if (Main.rand.Next(5) < 4) @@ -2953,6 +2991,7 @@ namespace CalamityMod.NPCs } Lighting.AddLight(npc.position, 0.025f, 0f, 0f); } + if (pShred > 0) { if (Main.rand.Next(5) < 4) @@ -2968,6 +3007,7 @@ namespace CalamityMod.NPCs } } } + if (hFlames > 0) { if (Main.rand.Next(5) < 4) @@ -2984,6 +3024,7 @@ namespace CalamityMod.NPCs } Lighting.AddLight(npc.position, 0.25f, 0.25f, 0.1f); } + if (pFlames > 0) { if (Main.rand.Next(5) < 4) @@ -3000,6 +3041,7 @@ namespace CalamityMod.NPCs } Lighting.AddLight(npc.position, 0.07f, 0.15f, 0.01f); } + if (gsInferno > 0) { if (Main.rand.Next(5) < 4) @@ -3016,6 +3058,7 @@ namespace CalamityMod.NPCs } Lighting.AddLight(npc.position, 0.1f, 0f, 0.135f); } + if (astralInfection > 0) { if (Main.rand.Next(5) < 3) @@ -3033,6 +3076,7 @@ namespace CalamityMod.NPCs } } } + if (nightwither > 0) { Rectangle hitbox = npc.Hitbox; @@ -3044,6 +3088,7 @@ namespace CalamityMod.NPCs 27, 234 }); + int num4 = Dust.NewDust(hitbox.TopLeft(), npc.width, npc.height, num3, 0f, -2.5f, 0, default, 1f); Main.dust[num4].noGravity = true; Main.dust[num4].alpha = 200; @@ -3054,6 +3099,7 @@ namespace CalamityMod.NPCs dust.scale += Main.rand.NextFloat(); } } + if (tSad > 0 || cDepth > 0) { if (Main.rand.Next(6) < 3) @@ -3069,6 +3115,7 @@ namespace CalamityMod.NPCs } } } + if (dFlames > 0) { if (Main.rand.Next(5) < 4) @@ -3085,6 +3132,7 @@ namespace CalamityMod.NPCs } Lighting.AddLight(npc.position, 0.1f, 0f, 0.135f); } + if (sulphurPoison > 0) { if (Main.rand.Next(5) < 4) @@ -3121,7 +3169,7 @@ namespace CalamityMod.NPCs drawColor = Color.Cyan; } - if (marked > 0 || sulphurPoison > 0) + if (marked > 0 || sulphurPoison > 0 || vaporfied > 0) { drawColor = Color.Fuchsia; } diff --git a/NPCs/CeaselessVoid/CeaselessVoid_Head_Boss.png b/NPCs/CeaselessVoid/CeaselessVoid_Head_Boss.png index 19ed5a63f4..0e39586851 100644 Binary files a/NPCs/CeaselessVoid/CeaselessVoid_Head_Boss.png and b/NPCs/CeaselessVoid/CeaselessVoid_Head_Boss.png differ diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index e1b74b1441..cc780f9e3d 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -629,6 +629,7 @@ namespace CalamityMod.NPCs.Leviathan DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Equipment DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index 49bc3326d5..0c20b3b5a6 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -251,24 +251,23 @@ namespace CalamityMod.NPCs.TownNPCs { shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; - /*shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + /*shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++;*/ } if (NPC.downedPlantBoss) { shop.item[nextSlot].SetDefaults(ModContent.ItemType()); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 4, 0); nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; - /*shop.item[nextSlot].SetDefaults(ModContent.ItemType()); - nextSlot++;*/ + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + nextSlot++; } /*if (NPC.downedGolemBoss) { - shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); shop.item[nextSlot].shopCustomPrice = Item.buyPrice(1, 0, 0, 0); nextSlot++; }*/ @@ -280,7 +279,7 @@ namespace CalamityMod.NPCs.TownNPCs } /*if (CalamityWorld.downedProvidence) { - shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); shop.item[nextSlot].shopCustomPrice = Item.buyPrice(5, 0, 0, 0); nextSlot++; }*/ diff --git a/Projectiles/Magic/VolatileStarcore.cs b/Projectiles/Magic/VolatileStarcore.cs index 6799a04788..2b806079d5 100644 --- a/Projectiles/Magic/VolatileStarcore.cs +++ b/Projectiles/Magic/VolatileStarcore.cs @@ -1,5 +1,4 @@ using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Items.Weapons.Magic; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -105,7 +104,7 @@ namespace CalamityMod.Projectiles.Magic // Spawn a Helium Flash on impact int type = ModContent.ProjectileType(); - int damage = HeliumFlash.BaseDamage; + int damage = projectile.damage; float kb = 9.5f; Projectile.NewProjectile(projectile.Center, Vector2.Zero, type, damage, kb, projectile.owner, 0f, 0f); } diff --git a/Projectiles/Rogue/BlastBarrelProjectile.cs b/Projectiles/Rogue/BlastBarrelProjectile.cs index 918a27479c..ae462c7733 100644 --- a/Projectiles/Rogue/BlastBarrelProjectile.cs +++ b/Projectiles/Rogue/BlastBarrelProjectile.cs @@ -77,14 +77,14 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 shrapnelVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(30f)); Projectile.NewProjectile(projectile.Center, projectile.velocity + shrapnelVelocity, - ModContent.ProjectileType(), BlastBarrel.BaseDamage, 3f, projectile.owner); + ModContent.ProjectileType(), projectile.damage, 3f, projectile.owner); } else { Vector2 fireVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f)); int fireIndex = Projectile.NewProjectile(projectile.Center, projectile.velocity + fireVelocity, Main.rand.Next(ProjectileID.MolotovFire, ProjectileID.MolotovFire3 + 1), - BlastBarrel.BaseDamage, 1f, projectile.owner); + projectile.damage, 1f, projectile.owner); Main.projectile[fireIndex].Calamity().forceRogue = true; Main.projectile[fireIndex].penetrate = -1; Main.projectile[fireIndex].usesLocalNPCImmunity = true; diff --git a/Projectiles/Rogue/BlazingStarProj.png b/Projectiles/Rogue/BlazingStarProj.png index 75c05587da..ac480e43b1 100644 Binary files a/Projectiles/Rogue/BlazingStarProj.png and b/Projectiles/Rogue/BlazingStarProj.png differ diff --git a/Projectiles/Rogue/BouncyBol.cs b/Projectiles/Rogue/BouncyBol.cs new file mode 100644 index 0000000000..c9e3476b2c --- /dev/null +++ b/Projectiles/Rogue/BouncyBol.cs @@ -0,0 +1,115 @@ +using CalamityMod.Items.Weapons.Rogue; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class BouncyBol : ModProjectile + { + private bool hasHitEnemy = false; + private int targetNPC = -1; + private List previousNPCs = new List() { -1 }; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bouncy Ball"); + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 14; + projectile.friendly = true; + projectile.penetrate = 8; + projectile.timeLeft = 600; + projectile.Calamity().rogue = true; + projectile.aiStyle = 14; + } + + public override void AI() + { + if (hasHitEnemy == true && projectile.timeLeft < 575) + { + projectile.velocity.X *= 1.005f; //you broke up, time to yeet yourself out + projectile.velocity.Y *= 1.005f; + if (projectile.velocity.X > 16f) + { + projectile.velocity.X = 16f; + } + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + float minDist = 999f; + int index = 0; + for (int i = 0; i < Main.npc.Length; i++) + { + bool hasHitNPC = false; + for (int j = 0; j < previousNPCs.Count; j++) + { + if (previousNPCs[j] == i) + { + hasHitNPC = true; + } + } + + NPC npc = Main.npc[i]; + if (npc == target) + { + previousNPCs.Add(i); + } + if (!npc.friendly && !npc.townNPC && npc.active && !npc.dontTakeDamage && npc.chaseable && npc != target && !hasHitNPC) + { + float dist = (projectile.Center - npc.Center).Length(); + if (dist < minDist) + { + minDist = dist; + index = i; + } + } + } + + Vector2 velocityNew; + if (minDist < 999f) + { + if (projectile.Calamity().stealthStrike && hasHitEnemy == false) + { + projectile.damage = (int)(projectile.damage * 1.5f); + } + else + { + projectile.damage = (int)(projectile.damage * 1.1f); + } + hasHitEnemy = true; + targetNPC = index; + velocityNew = Main.npc[index].Center - projectile.Center; + velocityNew.Normalize(); + velocityNew *= 15f; + projectile.velocity = velocityNew; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X * 1.001f; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y * 1.001f; + } + return false; + } + } +} diff --git a/Projectiles/Rogue/BouncyBol.png b/Projectiles/Rogue/BouncyBol.png new file mode 100644 index 0000000000..d409a6b571 Binary files /dev/null and b/Projectiles/Rogue/BouncyBol.png differ diff --git a/Projectiles/Rogue/CelestialReaperProjectile.cs b/Projectiles/Rogue/CelestialReaperProjectile.cs index 2cfc9b10b5..1866d0657d 100644 --- a/Projectiles/Rogue/CelestialReaperProjectile.cs +++ b/Projectiles/Rogue/CelestialReaperProjectile.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue framesNeeded /= 6f - projectile.penetrate + 1f; //1 is to prevent division by zero. The more hits, the more afterimages if (projectile.timeLeft % (int)framesNeeded == 0f) { - Projectile.NewProjectile(projectile.Center, projectile.velocity, ModContent.ProjectileType(), CelestialReaper.BaseDamage, 2f, projectile.owner); + Projectile.NewProjectile(projectile.Center, projectile.velocity, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); } } } @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Rogue for (float i = 0f; i < 7f; i += 1f) { float angle = MathHelper.TwoPi * i / 7f; - Projectile.NewProjectile(projectile.Center, angle.ToRotationVector2() * 12f, ModContent.ProjectileType(), CelestialReaper.BaseDamage, 2f, projectile.owner); + Projectile.NewProjectile(projectile.Center, angle.ToRotationVector2() * 12f, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); } } } diff --git a/Projectiles/Rogue/ConsecratedWaterProjectile.cs b/Projectiles/Rogue/ConsecratedWaterProjectile.cs index b5b38e8234..3607442eed 100644 --- a/Projectiles/Rogue/ConsecratedWaterProjectile.cs +++ b/Projectiles/Rogue/ConsecratedWaterProjectile.cs @@ -47,7 +47,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(), ConsecratedWater.BaseDamage, 2f, projectile.owner); + Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); } } //stealth strike @@ -59,7 +59,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(), ConsecratedWater.BaseDamage, 2f, projectile.owner); + Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); } } } diff --git a/Projectiles/Rogue/GildedDaggerProj.cs b/Projectiles/Rogue/GildedDaggerProj.cs index 28a05e3464..2974718624 100644 --- a/Projectiles/Rogue/GildedDaggerProj.cs +++ b/Projectiles/Rogue/GildedDaggerProj.cs @@ -115,5 +115,12 @@ namespace CalamityMod.Projectiles.Rogue projectile.Kill(); return false; } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } } } diff --git a/Projectiles/Rogue/GleamingDaggerProj.cs b/Projectiles/Rogue/GleamingDaggerProj.cs index 0f88df2e01..5f21d9c62d 100644 --- a/Projectiles/Rogue/GleamingDaggerProj.cs +++ b/Projectiles/Rogue/GleamingDaggerProj.cs @@ -115,5 +115,12 @@ namespace CalamityMod.Projectiles.Rogue projectile.Kill(); return false; } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } } } diff --git a/Projectiles/Rogue/PhantomLanceProj.cs b/Projectiles/Rogue/PhantomLanceProj.cs index e45fe6e55a..e265185848 100644 --- a/Projectiles/Rogue/PhantomLanceProj.cs +++ b/Projectiles/Rogue/PhantomLanceProj.cs @@ -1,4 +1,3 @@ -using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -51,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue } } projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 175, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, default(Color), 0.85f); + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 175, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, default, 0.85f); projCount--; if (projCount <= 0) { @@ -59,18 +58,19 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.Calamity().stealthStrike) { - int stealthSoul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + int stealthSoulDamage = (int)(projectile.damage * 0.75f); + float stealthSoulKB = projectile.knockBack; + int stealthSoul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), stealthSoulDamage, stealthSoulKB, projectile.owner, 0f, 0f); Main.projectile[stealthSoul].Calamity().forceRogue = true; Main.projectile[stealthSoul].usesLocalNPCImmunity = true; Main.projectile[stealthSoul].localNPCHitCooldown = -2; } else { - double damageMult = 1.0; - damageMult = (double)(projectile.timeLeft) / 300.0; - double newDamage = projectile.damage * damageMult; - - int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)newDamage, projectile.knockBack, projectile.owner, 0f, 0f); + float damageMult = projectile.timeLeft * 0.75f / 300f; + int soulDamage = (int)(projectile.damage * damageMult); + float soulKB = projectile.knockBack; + int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), soulDamage, soulKB, projectile.owner, 0f, 0f); Main.projectile[soul].Calamity().forceRogue = true; Main.projectile[soul].usesLocalNPCImmunity = true; Main.projectile[soul].localNPCHitCooldown = -2; diff --git a/Projectiles/Rogue/SphereBladed.cs b/Projectiles/Rogue/SphereBladed.cs new file mode 100644 index 0000000000..32c85f80c0 --- /dev/null +++ b/Projectiles/Rogue/SphereBladed.cs @@ -0,0 +1,126 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Rogue +{ + public class SphereBladed : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bladed Sphere"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.tileCollide = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.Calamity().rogue = true; + projectile.usesIDStaticNPCImmunity = true; + projectile.idStaticNPCHitCooldown = 10; + projectile.timeLeft = 300; + projectile.tileCollide = false; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 1f, 0f, 0f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 229, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 100); + } + if (projectile.soundDelay == 0) + { + projectile.soundDelay = 8; + Main.PlaySound(SoundID.Item7, projectile.position); + } + if (projectile.ai[0] == 0f) + { + projectile.ai[1] += 1f; + if (projectile.ai[1] >= 25f) + { + projectile.ai[0] = 1f; + projectile.ai[1] = 0f; + projectile.netUpdate = true; + } + } + else + { + float num42 = 16f; + float num43 = 3.2f; + Vector2 vector2 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num44 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector2.X; + float num45 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector2.Y; + float num46 = (float)Math.Sqrt((double)(num44 * num44 + num45 * num45)); + if (num46 > 3000f) + { + projectile.Kill(); + } + num46 = num42 / num46; + num44 *= num46; + num45 *= num46; + if (projectile.velocity.X < num44) + { + projectile.velocity.X = projectile.velocity.X + num43; + if (projectile.velocity.X < 0f && num44 > 0f) + { + projectile.velocity.X = projectile.velocity.X + num43; + } + } + else if (projectile.velocity.X > num44) + { + projectile.velocity.X = projectile.velocity.X - num43; + if (projectile.velocity.X > 0f && num44 < 0f) + { + projectile.velocity.X = projectile.velocity.X - num43; + } + } + if (projectile.velocity.Y < num45) + { + projectile.velocity.Y = projectile.velocity.Y + num43; + if (projectile.velocity.Y < 0f && num45 > 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num43; + } + } + else if (projectile.velocity.Y > num45) + { + projectile.velocity.Y = projectile.velocity.Y - num43; + if (projectile.velocity.Y > 0f && num45 < 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num43; + } + } + if (Main.myPlayer == projectile.owner) + { + Rectangle rectangle = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); + Rectangle value2 = new Rectangle((int)Main.player[projectile.owner].position.X, (int)Main.player[projectile.owner].position.Y, Main.player[projectile.owner].width, Main.player[projectile.owner].height); + if (rectangle.Intersects(value2)) + { + projectile.Kill(); + } + } + } + projectile.rotation += 0.5f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Main.PlaySound(3, (int)projectile.Center.X, (int)projectile.Center.Y, 34); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Rogue/SphereBladed.png b/Projectiles/Rogue/SphereBladed.png new file mode 100644 index 0000000000..b90214da3a Binary files /dev/null and b/Projectiles/Rogue/SphereBladed.png differ diff --git a/Projectiles/Rogue/SphereBlue.cs b/Projectiles/Rogue/SphereBlue.cs new file mode 100644 index 0000000000..2b063098c7 --- /dev/null +++ b/Projectiles/Rogue/SphereBlue.cs @@ -0,0 +1,126 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using System; +namespace CalamityMod.Projectiles.Rogue +{ + public class SphereBlue : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blue Thruster Sphere"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 300; + projectile.tileCollide = false; + projectile.Calamity().rogue = true; + projectile.extraUpdates = 1; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 0f, 0f, 1f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 229, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 100); + } + projectile.ai[0] += 1f; + if (projectile.ai[0] >= 5f) + { + projectile.tileCollide = true; + } + projectile.rotation += projectile.velocity.X * 0.02f; + projectile.velocity.Y = projectile.velocity.Y + 0.085f; + projectile.velocity.X = projectile.velocity.X * 0.99f; + float pcx = projectile.Center.X; + float pcy = projectile.Center.Y; + float var1 = 800f; + bool flag = false; + for (int npcvar = 0; npcvar < 200; npcvar++) + { + if (Main.npc[npcvar].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[npcvar].Center, 1, 1)) + { + float var2 = Main.npc[npcvar].position.X + (Main.npc[npcvar].width / 2); + float var3 = Main.npc[npcvar].position.Y + (Main.npc[npcvar].height / 2); + float var4 = Math.Abs(projectile.position.X + (projectile.width / 2) - var2) + Math.Abs(projectile.position.Y + (projectile.height / 2) - var3); + if (var4 < var1) + { + var1 = var4; + pcx = var2; + pcy = var3; + flag = true; + } + } + } + if (flag) + { + float homingstrenght = 16f; + Vector2 vector1 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f); + float var6 = pcx - vector1.X; + float var7 = pcy - vector1.Y; + float var8 = (float)Math.Sqrt(var6 * var6 + var7 * var7); + var8 = homingstrenght / var8; + var6 *= var8; + var7 *= var8; + projectile.velocity.X = (projectile.velocity.X * 20f + var6) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + var7) / 21f; + } + } + + public override void Kill(int timeLeft) + { + projectile.position = projectile.Center; + projectile.width = projectile.height = 192; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.Damage(); + Main.PlaySound(4, (int)projectile.Center.X, (int)projectile.Center.Y, 37); + for (int num625 = 0; num625 < 3; num625++) + { + float scaleFactor10 = 0.33f; + if (num625 == 1) + { + scaleFactor10 = 0.66f; + } + if (num625 == 2) + { + scaleFactor10 = 1f; + } + int defectiveBruh = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(660, 662), 1f); + Main.gore[defectiveBruh].velocity *= scaleFactor10; + Main.gore[defectiveBruh].velocity += projectile.velocity; + } + for (int num194 = 0; num194 < 25; num194++) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 226, + 229 + }); + int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 1f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 0f; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Rogue/SphereBlue.png b/Projectiles/Rogue/SphereBlue.png new file mode 100644 index 0000000000..9718044895 Binary files /dev/null and b/Projectiles/Rogue/SphereBlue.png differ diff --git a/Projectiles/Rogue/SphereSpiked.cs b/Projectiles/Rogue/SphereSpiked.cs new file mode 100644 index 0000000000..f464c1fbec --- /dev/null +++ b/Projectiles/Rogue/SphereSpiked.cs @@ -0,0 +1,56 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +namespace CalamityMod.Projectiles.Rogue +{ + public class SphereSpiked : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spiked Sphere"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.aiStyle = 3; + projectile.timeLeft = 300; + aiType = 52; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 1f, 0f, 0f); + if (projectile.timeLeft == 300) + projectile.damage *= (int)1.2f; + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 229, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 100); + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Main.PlaySound(3, (int)projectile.Center.X, (int)projectile.Center.Y, 34); + if (Main.rand.NextBool(10)) //idk if this even works + { + if (!crit) + crit = true; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Rogue/SphereSpiked.png b/Projectiles/Rogue/SphereSpiked.png new file mode 100644 index 0000000000..c4c2b56c25 Binary files /dev/null and b/Projectiles/Rogue/SphereSpiked.png differ diff --git a/Projectiles/Rogue/SphereYellow.cs b/Projectiles/Rogue/SphereYellow.cs new file mode 100644 index 0000000000..a28278f01a --- /dev/null +++ b/Projectiles/Rogue/SphereYellow.cs @@ -0,0 +1,62 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +namespace CalamityMod.Projectiles.Rogue +{ + public class SphereYellow : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Yellow Thruster Sphere"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.aiStyle = 3; + projectile.timeLeft = 300; + aiType = 52; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 1f, 1f, 0f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 229, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 100); + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y; + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Main.PlaySound(3, (int)projectile.Center.X, (int)projectile.Center.Y, 34); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Rogue/SphereYellow.png b/Projectiles/Rogue/SphereYellow.png new file mode 100644 index 0000000000..b9f5952c35 Binary files /dev/null and b/Projectiles/Rogue/SphereYellow.png differ diff --git a/Projectiles/Rogue/ValariBoomerang.cs b/Projectiles/Rogue/ValariBoomerang.cs index 807754a9c0..93fdfef95e 100644 --- a/Projectiles/Rogue/ValariBoomerang.cs +++ b/Projectiles/Rogue/ValariBoomerang.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = -1; projectile.timeLeft = 360; projectile.tileCollide = false; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 15; + projectile.usesIDStaticNPCImmunity = true; + projectile.idStaticNPCHitCooldown = 15; projectile.coldDamage = true; projectile.Calamity().rogue = true; diff --git a/Projectiles/Summon/Hive.png b/Projectiles/Summon/Hive.png index 081ee1131b..fcd1ef8827 100644 Binary files a/Projectiles/Summon/Hive.png and b/Projectiles/Summon/Hive.png differ diff --git a/Projectiles/Typeless/CursorProj.cs b/Projectiles/Typeless/CursorProj.cs new file mode 100644 index 0000000000..9f97a58b2c --- /dev/null +++ b/Projectiles/Typeless/CursorProj.cs @@ -0,0 +1,221 @@ +using System; +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Typeless +{ + public class CursorProj : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Aestheticus Crystal"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.extraUpdates = 1; + projectile.alpha = 255; + projectile.timeLeft = 300; + } + + public override void AI() + { + if (projectile.alpha > 0) + projectile.alpha -= 15; + + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + + if (projectile.timeLeft > 285) + return; + + float num29 = 5f; + float num30 = 300f; + float scaleFactor = 6f; + Vector2 value7 = new Vector2(10f, 20f); + float num31 = 1f; + int num32 = 3 * projectile.MaxUpdates; + int num33 = Utils.SelectRandom(Main.rand, new int[] + { + 246, + 242, + 229, + 226, + 247 + }); + int num34 = 255; + if (projectile.ai[1] == 0f) + { + projectile.ai[1] = 1f; + projectile.localAI[0] = (float)-(float)Main.rand.Next(48); + } + else if (projectile.ai[1] == 1f && projectile.owner == Main.myPlayer) + { + int num35 = -1; + float num36 = num30; + for (int num37 = 0; num37 < 200; num37++) + { + if (Main.npc[num37].active && Main.npc[num37].CanBeChasedBy(projectile, false)) + { + Vector2 center3 = Main.npc[num37].Center; + float num38 = Vector2.Distance(center3, projectile.Center); + if (num38 < num36 && num35 == -1 && Collision.CanHitLine(projectile.Center, 1, 1, center3, 1, 1)) + { + num36 = num38; + num35 = num37; + } + } + } + if (num36 < 4f) + { + projectile.Kill(); + return; + } + if (num35 != -1) + { + projectile.ai[1] = num29 + 1f; + projectile.ai[0] = (float)num35; + projectile.netUpdate = true; + } + } + else if (projectile.ai[1] > num29) + { + projectile.ai[1] += 1f; + int num39 = (int)projectile.ai[0]; + if (!Main.npc[num39].active || !Main.npc[num39].CanBeChasedBy(projectile, false)) + { + projectile.ai[1] = 1f; + projectile.ai[0] = 0f; + projectile.netUpdate = true; + } + else + { + projectile.velocity.ToRotation(); + Vector2 vector6 = Main.npc[num39].Center - projectile.Center; + if (vector6.Length() < 10f) + { + projectile.Kill(); + return; + } + if (vector6 != Vector2.Zero) + { + vector6.Normalize(); + vector6 *= scaleFactor; + } + float num40 = 30f; + projectile.velocity = (projectile.velocity * (num40 - 1f) + vector6) / num40; + } + } + if (projectile.ai[1] >= 1f && projectile.ai[1] < num29) + { + projectile.ai[1] += 1f; + if (projectile.ai[1] == num29) + { + projectile.ai[1] = 1f; + } + } + projectile.localAI[0] += 1f; + if (projectile.localAI[0] == 48f) + { + projectile.localAI[0] = 0f; + } + if (Main.rand.NextBool(12)) + { + Vector2 value9 = -Vector2.UnitX.RotatedByRandom(0.19634954631328583).RotatedBy((double)projectile.velocity.ToRotation(), default); + int num44 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num34, 0f, 0f, 160, default, 1f); + Main.dust[num44].velocity *= 0.1f; + Main.dust[num44].position = projectile.Center + value9 * (float)projectile.width / 2f + projectile.velocity * 2f; + Main.dust[num44].fadeIn = 0.9f; + } + if (Main.rand.NextBool(18)) + { + Vector2 value10 = -Vector2.UnitX.RotatedByRandom(0.39269909262657166).RotatedBy((double)projectile.velocity.ToRotation(), default); + int num46 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 107, 0f, 0f, 155, default, 0.8f); + Main.dust[num46].velocity *= 0.3f; + Main.dust[num46].position = projectile.Center + value10 * (float)projectile.width / 2f; + if (Main.rand.NextBool(2)) + { + Main.dust[num46].fadeIn = 1.4f; + } + } + if (Main.rand.NextBool(8)) + { + Vector2 value11 = -Vector2.UnitX.RotatedByRandom(0.78539818525314331).RotatedBy((double)projectile.velocity.ToRotation(), default); + int num48 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num33, 0f, 0f, 0, default, 1f); + Main.dust[num48].velocity *= 0.3f; + Main.dust[num48].noGravity = true; + Main.dust[num48].position = projectile.Center + value11 * (float)projectile.width / 2f; + if (Main.rand.NextBool(2)) + { + Main.dust[num48].fadeIn = 1.4f; + } + } + if (Main.rand.NextBool(6)) + { + Vector2 value13 = -Vector2.UnitX.RotatedByRandom(0.19634954631328583).RotatedBy((double)projectile.velocity.ToRotation(), default); + int num50 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num34, 0f, 0f, 100, default, 1f); + Main.dust[num50].velocity *= 0.3f; + Main.dust[num50].position = projectile.Center + value13 * (float)projectile.width / 2f; + Main.dust[num50].fadeIn = 1.2f; + Main.dust[num50].scale = 1.5f; + Main.dust[num50].noGravity = true; + } + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.2f / 255f); + int num154 = 14; + int num155 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num154 * 2, projectile.height - num154 * 2, 234, 0f, 0f, 100, default, 0.8f); + Main.dust[num155].velocity *= 0.1f; + Main.dust[num155].velocity += projectile.velocity * 0.5f; + Main.dust[num155].noGravity = true; + if (Main.rand.NextBool(12)) + { + int num156 = 16; + int num157 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num156 * 2, projectile.height - num156 * 2, 159, 0f, 0f, 100, default, 1f); + Main.dust[num157].velocity *= 0.25f; + Main.dust[num157].velocity += projectile.velocity * 0.5f; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + + public override void Kill(int timeLeft) + { + Vector2 velocity = projectile.velocity; + velocity.Normalize(); + velocity *= 4f; + + int spread = 45; + int numProj = 4; + float rotation = MathHelper.ToRadians(spread); + float baseSpeed = (float)Math.Sqrt(velocity.X * velocity.X + velocity.Y * velocity.Y); + double startAngle = Math.Atan2(velocity.X, velocity.Y) - rotation / 2; + double deltaAngle = rotation / (float)numProj; + double offsetAngle; + + 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), + ModContent.ProjectileType(), projectile.damage / 3, projectile.knockBack * 0.33f, projectile.owner, 0f, 0f); + } + + Main.PlaySound(SoundID.Item110, projectile.Center); + } + } +} diff --git a/Projectiles/Typeless/CursorProj.png b/Projectiles/Typeless/CursorProj.png new file mode 100644 index 0000000000..f9596ad6f7 Binary files /dev/null and b/Projectiles/Typeless/CursorProj.png differ diff --git a/Projectiles/Typeless/CursorProjSplit.cs b/Projectiles/Typeless/CursorProjSplit.cs new file mode 100644 index 0000000000..50abac6b0b --- /dev/null +++ b/Projectiles/Typeless/CursorProjSplit.cs @@ -0,0 +1,263 @@ +using System; +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Typeless +{ + public class CursorProjSplit : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Aestheticus Crystal"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.extraUpdates = 1; + projectile.alpha = 255; + projectile.timeLeft = 300; + } + + public override void AI() + { + if (projectile.alpha > 0) + projectile.alpha -= 3; + + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + + float num29 = 5f; + float num30 = 300f; + float scaleFactor = 6f; + Vector2 value7 = new Vector2(10f, 20f); + float num31 = 1f; + int num32 = 3 * projectile.MaxUpdates; + int num33 = Utils.SelectRandom(Main.rand, new int[] + { + 246, + 242, + 229, + 226, + 247 + }); + int num34 = 255; + if (projectile.ai[1] == 0f) + { + projectile.ai[1] = 1f; + projectile.localAI[0] = (float)-(float)Main.rand.Next(48); + } + else if (projectile.ai[1] == 1f && projectile.owner == Main.myPlayer) + { + if (projectile.alpha < 128) + { + int num35 = -1; + float num36 = num30; + for (int num37 = 0; num37 < 200; num37++) + { + if (Main.npc[num37].active && Main.npc[num37].CanBeChasedBy(projectile, false)) + { + Vector2 center3 = Main.npc[num37].Center; + float num38 = Vector2.Distance(center3, projectile.Center); + if (num38 < num36 && num35 == -1 && Collision.CanHitLine(projectile.Center, 1, 1, center3, 1, 1)) + { + num36 = num38; + num35 = num37; + } + } + } + if (num36 < 4f) + { + projectile.Kill(); + return; + } + if (num35 != -1) + { + projectile.ai[1] = num29 + 1f; + projectile.ai[0] = (float)num35; + projectile.netUpdate = true; + } + } + } + else if (projectile.ai[1] > num29) + { + projectile.ai[1] += 1f; + int num39 = (int)projectile.ai[0]; + if (!Main.npc[num39].active || !Main.npc[num39].CanBeChasedBy(projectile, false)) + { + projectile.ai[1] = 1f; + projectile.ai[0] = 0f; + projectile.netUpdate = true; + } + else + { + projectile.velocity.ToRotation(); + Vector2 vector6 = Main.npc[num39].Center - projectile.Center; + if (vector6.Length() < 10f) + { + projectile.Kill(); + return; + } + if (vector6 != Vector2.Zero) + { + vector6.Normalize(); + vector6 *= scaleFactor; + } + float num40 = 30f; + projectile.velocity = (projectile.velocity * (num40 - 1f) + vector6) / num40; + } + } + if (projectile.ai[1] >= 1f && projectile.ai[1] < num29) + { + projectile.ai[1] += 1f; + if (projectile.ai[1] == num29) + { + projectile.ai[1] = 1f; + } + } + projectile.localAI[0] += 1f; + if (projectile.localAI[0] == 48f) + { + projectile.localAI[0] = 0f; + } + if (Main.rand.NextBool(12)) + { + Vector2 value9 = -Vector2.UnitX.RotatedByRandom(0.19634954631328583).RotatedBy((double)projectile.velocity.ToRotation(), default); + int num44 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num34, 0f, 0f, 100, default, 1f); + Main.dust[num44].velocity *= 0.1f; + Main.dust[num44].position = projectile.Center + value9 * (float)projectile.width / 2f + projectile.velocity * 2f; + Main.dust[num44].fadeIn = 0.9f; + } + if (Main.rand.NextBool(18)) + { + Vector2 value10 = -Vector2.UnitX.RotatedByRandom(0.39269909262657166).RotatedBy((double)projectile.velocity.ToRotation(), default); + int num46 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 107, 0f, 0f, 155, default, 0.8f); + Main.dust[num46].velocity *= 0.3f; + Main.dust[num46].position = projectile.Center + value10 * (float)projectile.width / 2f; + if (Main.rand.NextBool(2)) + { + Main.dust[num46].fadeIn = 1.4f; + } + } + if (Main.rand.NextBool(8)) + { + Vector2 value11 = -Vector2.UnitX.RotatedByRandom(0.78539818525314331).RotatedBy((double)projectile.velocity.ToRotation(), default); + int num48 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num33, 0f, 0f, 0, default, 1f); + Main.dust[num48].velocity *= 0.3f; + Main.dust[num48].noGravity = true; + Main.dust[num48].position = projectile.Center + value11 * (float)projectile.width / 2f; + if (Main.rand.NextBool(2)) + { + Main.dust[num48].fadeIn = 1.4f; + } + } + if (Main.rand.NextBool(6)) + { + Vector2 value13 = -Vector2.UnitX.RotatedByRandom(0.19634954631328583).RotatedBy((double)projectile.velocity.ToRotation(), default); + int num50 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num34, 0f, 0f, 100, default, 1f); + Main.dust[num50].velocity *= 0.3f; + Main.dust[num50].position = projectile.Center + value13 * (float)projectile.width / 2f; + Main.dust[num50].fadeIn = 1.2f; + Main.dust[num50].scale = 1.5f; + Main.dust[num50].noGravity = true; + } + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.2f / 255f); + int num154 = 14; + int num155 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num154 * 2, projectile.height - num154 * 2, 234, 0f, 0f, 100, default, 0.8f); + Main.dust[num155].velocity *= 0.1f; + Main.dust[num155].velocity += projectile.velocity * 0.5f; + Main.dust[num155].noGravity = true; + if (Main.rand.NextBool(12)) + { + int num156 = 16; + int num157 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num156 * 2, projectile.height - num156 * 2, 159, 0f, 0f, 100, default, 1f); + Main.dust[num157].velocity *= 0.25f; + Main.dust[num157].velocity += projectile.velocity * 0.5f; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + + public override bool? CanHitNPC(NPC target) + { + return projectile.alpha < 128; + } + + public override void Kill(int timeLeft) + { + int num47 = Utils.SelectRandom(Main.rand, new int[] + { + 246, + 242, + 229, + 226, + 247 + }); + + int num48 = 187; + int num49 = 234; + int height = 50; + float num50 = 1.2f; + float num51 = 0.6f; + float num52 = 1.5f; + + Vector2 value3 = (projectile.rotation - 1.57079637f).ToRotationVector2(); + Vector2 value4 = value3 * projectile.velocity.Length() * (float)projectile.MaxUpdates; + + Main.PlaySound(SoundID.Item14, projectile.Center); + + int num3; + for (int num53 = 0; num53 < 20; num53 = num3 + 1) + { + int num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num47, 0f, 0f, 200, default, num50); + Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; + Main.dust[num54].noGravity = true; + Dust dust = Main.dust[num54]; + dust.velocity.Y -= 6f; + dust.velocity *= 3f; + dust = Main.dust[num54]; + dust.velocity += value4 * Main.rand.NextFloat(); + num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num48, 0f, 0f, 100, default, num51); + Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; + dust = Main.dust[num54]; + dust.velocity.Y -= 6f; + dust.velocity *= 2f; + Main.dust[num54].noGravity = true; + Main.dust[num54].fadeIn = 1f; + Main.dust[num54].color = Color.Cyan * 0.5f; + dust = Main.dust[num54]; + dust.velocity += value4 * Main.rand.NextFloat(); + num3 = num53; + } + + for (int num55 = 0; num55 < 10; num55 = num3 + 1) + { + int num56 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num49, 0f, 0f, 0, default, num52); + Main.dust[num56].position = projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)projectile.velocity.ToRotation(), default) * (float)projectile.width / 3f; + Dust dust = Main.dust[num56]; + dust.noGravity = true; + dust.velocity.Y -= 6f; + dust.velocity *= 0.5f; + dust = Main.dust[num56]; + dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); + num3 = num55; + } + } + } +} diff --git a/Projectiles/Typeless/CursorProjSplit.png b/Projectiles/Typeless/CursorProjSplit.png new file mode 100644 index 0000000000..f9596ad6f7 Binary files /dev/null and b/Projectiles/Typeless/CursorProjSplit.png differ diff --git a/Projectiles/Typeless/GalaxySmasherHammer.cs b/Projectiles/Typeless/GalaxySmasherHammer.cs index 351efbe04b..469e88e2ba 100644 --- a/Projectiles/Typeless/GalaxySmasherHammer.cs +++ b/Projectiles/Typeless/GalaxySmasherHammer.cs @@ -171,7 +171,7 @@ namespace CalamityMod.Projectiles.Typeless // Three death lasers (aka "Nebula Shots") swarm the target. int laserID = ModContent.ProjectileType(); - int laserDamage = (int)(0.2f * GalaxySmasherMelee.BaseDamage); + int laserDamage = (int)(0.2f * projectile.damage); float laserKB = 2.5f; int numLasers = 3; for (int i = 0; i < numLasers; ++i) diff --git a/Projectiles/Typeless/GodKiller.cs b/Projectiles/Typeless/GodKiller.cs index a3bcd14cb2..62d2ccdd51 100644 --- a/Projectiles/Typeless/GodKiller.cs +++ b/Projectiles/Typeless/GodKiller.cs @@ -30,7 +30,9 @@ namespace CalamityMod.Projectiles.Typeless public override void AI() { - projectile.alpha -= 5; + if (projectile.alpha > 0) + projectile.alpha -= 5; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; if (projectile.owner == Main.myPlayer && projectile.timeLeft <= 3) { diff --git a/Projectiles/Typeless/NanoblackMain.cs b/Projectiles/Typeless/NanoblackMain.cs index 7c774402a5..f97cade254 100644 --- a/Projectiles/Typeless/NanoblackMain.cs +++ b/Projectiles/Typeless/NanoblackMain.cs @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Typeless private void SpawnEnergyBlade() { int bladeID = ModContent.ProjectileType(); - int bladeDamage = NanoblackReaperMelee.BaseDamage / 5; + int bladeDamage = projectile.damage / 5; float bladeKB = 3f; float spin = (projectile.direction <= 0) ? -1f : 1f; float d = 16f; diff --git a/Projectiles/Typeless/StellarContemptHammer.cs b/Projectiles/Typeless/StellarContemptHammer.cs index 45a306c150..407ef89340 100644 --- a/Projectiles/Typeless/StellarContemptHammer.cs +++ b/Projectiles/Typeless/StellarContemptHammer.cs @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Typeless projectile.netUpdate = true; int numFlares = 2; - int flareDamage = (int)(0.3f * StellarContemptMelee.BaseDamage); + int flareDamage = (int)(0.3f * projectile.damage); float flareKB = 4f; for (int i = 0; i < numFlares; ++i) { diff --git a/Projectiles/Typeless/TerraDiskProjectile.cs b/Projectiles/Typeless/TerraDiskProjectile.cs new file mode 100644 index 0000000000..0991fceea3 --- /dev/null +++ b/Projectiles/Typeless/TerraDiskProjectile.cs @@ -0,0 +1,114 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class TerraDiskProjectile : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Terra Disk"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 46; + projectile.height = 46; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.penetrate = -1; + projectile.aiStyle = 3; + projectile.timeLeft = 180; + aiType = 52; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 0f, (255 - projectile.alpha) * 0.75f / 255f, 0f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 107, projectile.velocity.X, projectile.velocity.Y); + } + int[] array = new int[20]; + int num428 = 0; + float num429 = 300f; + bool flag14 = false; + for (int num430 = 0; num430 < 200; num430++) + { + if (Main.npc[num430].CanBeChasedBy(projectile, false)) + { + float num431 = Main.npc[num430].position.X + (float)(Main.npc[num430].width / 2); + float num432 = Main.npc[num430].position.Y + (float)(Main.npc[num430].height / 2); + float num433 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num431) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num432); + if (num433 < num429 && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num430].Center, 1, 1)) + { + if (num428 < 20) + { + array[num428] = num430; + num428++; + } + flag14 = true; + } + } + } + if (flag14) + { + int num434 = Main.rand.Next(num428); + num434 = array[num434]; + float num435 = Main.npc[num434].position.X + (float)(Main.npc[num434].width / 2); + float num436 = Main.npc[num434].position.Y + (float)(Main.npc[num434].height / 2); + projectile.localAI[0] += 1f; + if (projectile.localAI[0] > 8f) + { + projectile.localAI[0] = 0f; + float num437 = 6f; + Vector2 value10 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + value10 += projectile.velocity * 4f; + float num438 = num435 - value10.X; + float num439 = num436 - value10.Y; + float num440 = (float)Math.Sqrt((double)(num438 * num438 + num439 * num439)); + num440 = num437 / num440; + if (Main.rand.NextBool(5)) + { + if (projectile.owner == Main.myPlayer) + { + float spread = 60f * 0.0174f; + double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; + double deltaAngle = spread / 6f; + double offsetAngle; + int i; + for (i = 0; i < 3; i++) + { + offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + if (projectile.melee) + Main.projectile[proj].Calamity().forceMelee = true; + else + Main.projectile[proj].Calamity().forceRogue = true; + int proj2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + if (projectile.melee) + Main.projectile[proj2].Calamity().forceMelee = true; + else + Main.projectile[proj2].Calamity().forceRogue = true; + } + } + } + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + } +} diff --git a/Projectiles/Typeless/TerraDiskProjectile.png b/Projectiles/Typeless/TerraDiskProjectile.png new file mode 100644 index 0000000000..32b39a6f1e Binary files /dev/null and b/Projectiles/Typeless/TerraDiskProjectile.png differ diff --git a/Projectiles/Typeless/TerraDiskProjectile2.cs b/Projectiles/Typeless/TerraDiskProjectile2.cs new file mode 100644 index 0000000000..02357760e1 --- /dev/null +++ b/Projectiles/Typeless/TerraDiskProjectile2.cs @@ -0,0 +1,45 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class TerraDiskProjectile2 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Terra Disk"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 40; + projectile.height = 40; + projectile.alpha = 75; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.penetrate = -1; + projectile.aiStyle = 3; + projectile.timeLeft = 60; + aiType = 52; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 0f, (255 - projectile.alpha) * 0.75f / 255f, 0f); + if (Main.rand.NextBool(5)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 107, projectile.velocity.X, projectile.velocity.Y); + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + } +} diff --git a/Projectiles/Typeless/TerraDiskProjectile2.png b/Projectiles/Typeless/TerraDiskProjectile2.png new file mode 100644 index 0000000000..47fd0d2130 Binary files /dev/null and b/Projectiles/Typeless/TerraDiskProjectile2.png differ