From 0cf76d52705cc6ef09dda83114e28daf65c8c421 Mon Sep 17 00:00:00 2001 From: FyloZ Date: Tue, 14 Jul 2020 22:31:26 -0400 Subject: [PATCH] Organized projectiles. Updated The Mind trinity item. --- Content/Buffs/Buffs/ScarabEndurance.cs | 1 + Content/DecimationPlayer.cs | 2 + Content/DecimationWorld.cs | 33 +++---- Content/Items/Accessories/Trinity/Body.cs | 39 ++++---- Content/Items/Accessories/Trinity/Mind.cs | 82 ++++++++++++++-- Content/Items/Accessories/Trinity/Soul.cs | 52 +++++----- Content/Items/Accessories/Trinity/Trinity.cs | 90 +----------------- .../Accessories/Trinity/TrinityAccessory.cs | 3 +- .../Items/Accessories/Wings/ScarabWings.cs | 2 +- .../Items/Weapons/Arachnus/ChainStynger.cs | 1 + .../Items/Weapons/Bloodshot/BloodStream.cs | 1 + Content/Items/Weapons/Bloodshot/Umbra.cs | 1 + .../Items/Weapons/Bloodshot/VampiricShiv.cs | 1 + .../Weapons/DuneWyrm/StaffofShiftingSands.cs | 2 +- Content/Items/Weapons/DuneWyrm/Sundial.cs | 2 +- Content/Items/Weapons/DuneWyrm/Timekeeper.cs | 2 +- Content/Items/Weapons/HourHand.cs | 2 +- Content/Items/Weapons/MultigrainSword.cs | 2 +- Content/Items/Weapons/RodofLightning.cs | 2 +- Content/Items/Weapons/Slimer.cs | 4 +- Content/Items/Weapons/TitanicGatliStynger.cs | 2 +- Content/Items/Weapons/TitanicPike.cs | 2 +- Content/NPCs/Arachnus/Arachnus.cs | 2 +- Content/NPCs/Bloodshot/BloodshotEye.cs | 1 + Content/NPCs/DuneWyrm/DuneWyrm.cs | 3 +- Content/NPCs/LivingMagma.cs | 1 + Content/NPCs/NecroCaster.cs | 1 + Content/NPCs/TownNPCs/Skeleton.cs | 1 + .../{ => Boss/Arachnus}/ArachnusFireball.cs | 4 +- .../{ => Boss/Arachnus}/ArchingSolarBlade.cs | 2 +- .../{ => Boss/Arachnus}/ArchingSolarBlade.png | Bin .../{ => Boss/Arachnus}/BlastofHeat.cs | 4 +- .../{ => Boss/Arachnus}/BlastofHeat.png | Bin .../{ => Boss/Arachnus}/BlastofShadowFlame.cs | 4 +- .../Arachnus}/BlastofShadowFlame.png | Bin .../{ => Boss/Arachnus}/MoltenStyngerBolt.cs | 4 +- .../{ => Boss/Arachnus}/MoltenStyngerBolt.png | Bin .../{ => Boss/BloodshotEye}/BloodBeam.cs | 4 +- .../BloodshotEye}/BloodBeamFriendly.cs | 2 +- .../{ => Boss/BloodshotEye}/BloodClot.cs | 2 +- .../{ => Boss/BloodshotEye}/BloodClot.png | Bin .../{ => Boss/BloodshotEye}/BloodClotSmall.cs | 2 +- .../BloodshotEye}/BloodClotSmall.png | Bin .../{ => Boss/BloodshotEye}/Tooth.cs | 4 +- .../{ => Boss/BloodshotEye}/Tooth.png | Bin .../{ => Boss/DuneWyrm}/Ammonite.cs | 2 +- .../{ => Boss/DuneWyrm}/Ammonite.png | Bin .../{ => Boss}/DuneWyrm/AncientTombCrawler.cs | 2 +- .../{ => Boss}/DuneWyrm/HourHandProjectile.cs | 2 +- .../DuneWyrm/HourHandProjectile.png | Bin .../{ => Boss}/DuneWyrm/Sundial.cs | 4 +- .../{ => Boss}/DuneWyrm/Sundial.png | Bin .../{ => Boss}/DuneWyrm/Timekeeper.cs | 2 +- .../{ => Boss}/DuneWyrm/Timekeeper.png | Bin .../Projectiles/{ => Item/Accessory}/Ember.cs | 16 ++-- .../Item/Accessory/Trinity/TrinityBeam.cs | 48 ++++++++++ .../{ => Item/Weapon}/GreenSlime.cs | 2 +- .../{ => Item/Weapon}/LightningSphere.cs | 2 +- .../{ => Item/Weapon}/LightningSphere.png | Bin .../Projectiles/{ => Item/Weapon}/Pebble.cs | 2 +- .../Projectiles/{ => Item/Weapon}/Scarab.cs | 2 +- .../Projectiles/{ => Item/Weapon}/Scarab.png | Bin .../{ => Item/Weapon}/SiphonArrow.cs | 4 +- .../{ => Item/Weapon}/SiphonArrow.png | Bin .../Projectiles/{ => Item/Weapon}/Stinger.cs | 4 +- .../Projectiles/{ => Item/Weapon}/Stinger.png | Bin .../Weapon}/TitanicPikeProjectile.cs | 2 +- .../Weapon}/TitanicPikeProjectile.png | Bin .../{ => Item/Weapon}/TitanicStyngerBolt.cs | 2 +- .../{ => Item/Weapon}/TitanicStyngerBolt.png | Bin Content/Projectiles/{ => NPC}/Bone.cs | 2 +- Content/Projectiles/{ => NPC}/Bone.png | Bin Content/Projectiles/{ => NPC}/MagmaBall.cs | 6 +- Content/Projectiles/{ => NPC}/MagmaBall.png | Bin .../{ => NPC}/MagmaBall_Alternative.png | Bin Content/Projectiles/{ => NPC}/SkeletonBone.cs | 6 +- .../Projectiles/{ => NPC}/SkeletonBone.png | Bin Content/Synergies/FireAmuletSynergy.cs | 1 + 78 files changed, 262 insertions(+), 218 deletions(-) rename Content/Projectiles/{ => Boss/Arachnus}/ArachnusFireball.cs (82%) rename Content/Projectiles/{ => Boss/Arachnus}/ArchingSolarBlade.cs (92%) rename Content/Projectiles/{ => Boss/Arachnus}/ArchingSolarBlade.png (100%) rename Content/Projectiles/{ => Boss/Arachnus}/BlastofHeat.cs (87%) rename Content/Projectiles/{ => Boss/Arachnus}/BlastofHeat.png (100%) rename Content/Projectiles/{ => Boss/Arachnus}/BlastofShadowFlame.cs (95%) rename Content/Projectiles/{ => Boss/Arachnus}/BlastofShadowFlame.png (100%) rename Content/Projectiles/{ => Boss/Arachnus}/MoltenStyngerBolt.cs (97%) rename Content/Projectiles/{ => Boss/Arachnus}/MoltenStyngerBolt.png (100%) rename Content/Projectiles/{ => Boss/BloodshotEye}/BloodBeam.cs (92%) rename Content/Projectiles/{ => Boss/BloodshotEye}/BloodBeamFriendly.cs (93%) rename Content/Projectiles/{ => Boss/BloodshotEye}/BloodClot.cs (96%) rename Content/Projectiles/{ => Boss/BloodshotEye}/BloodClot.png (100%) rename Content/Projectiles/{ => Boss/BloodshotEye}/BloodClotSmall.cs (95%) rename Content/Projectiles/{ => Boss/BloodshotEye}/BloodClotSmall.png (100%) rename Content/Projectiles/{ => Boss/BloodshotEye}/Tooth.cs (89%) rename Content/Projectiles/{ => Boss/BloodshotEye}/Tooth.png (100%) rename Content/Projectiles/{ => Boss/DuneWyrm}/Ammonite.cs (87%) rename Content/Projectiles/{ => Boss/DuneWyrm}/Ammonite.png (100%) rename Content/Projectiles/{ => Boss}/DuneWyrm/AncientTombCrawler.cs (97%) rename Content/Projectiles/{ => Boss}/DuneWyrm/HourHandProjectile.cs (95%) rename Content/Projectiles/{ => Boss}/DuneWyrm/HourHandProjectile.png (100%) rename Content/Projectiles/{ => Boss}/DuneWyrm/Sundial.cs (96%) rename Content/Projectiles/{ => Boss}/DuneWyrm/Sundial.png (100%) rename Content/Projectiles/{ => Boss}/DuneWyrm/Timekeeper.cs (98%) rename Content/Projectiles/{ => Boss}/DuneWyrm/Timekeeper.png (100%) rename Content/Projectiles/{ => Item/Accessory}/Ember.cs (79%) create mode 100644 Content/Projectiles/Item/Accessory/Trinity/TrinityBeam.cs rename Content/Projectiles/{ => Item/Weapon}/GreenSlime.cs (98%) rename Content/Projectiles/{ => Item/Weapon}/LightningSphere.cs (86%) rename Content/Projectiles/{ => Item/Weapon}/LightningSphere.png (100%) rename Content/Projectiles/{ => Item/Weapon}/Pebble.cs (94%) rename Content/Projectiles/{ => Item/Weapon}/Scarab.cs (97%) rename Content/Projectiles/{ => Item/Weapon}/Scarab.png (100%) rename Content/Projectiles/{ => Item/Weapon}/SiphonArrow.cs (90%) rename Content/Projectiles/{ => Item/Weapon}/SiphonArrow.png (100%) rename Content/Projectiles/{ => Item/Weapon}/Stinger.cs (86%) rename Content/Projectiles/{ => Item/Weapon}/Stinger.png (100%) rename Content/Projectiles/{ => Item/Weapon}/TitanicPikeProjectile.cs (98%) rename Content/Projectiles/{ => Item/Weapon}/TitanicPikeProjectile.png (100%) rename Content/Projectiles/{ => Item/Weapon}/TitanicStyngerBolt.cs (98%) rename Content/Projectiles/{ => Item/Weapon}/TitanicStyngerBolt.png (100%) rename Content/Projectiles/{ => NPC}/Bone.cs (99%) rename Content/Projectiles/{ => NPC}/Bone.png (100%) rename Content/Projectiles/{ => NPC}/MagmaBall.cs (95%) rename Content/Projectiles/{ => NPC}/MagmaBall.png (100%) rename Content/Projectiles/{ => NPC}/MagmaBall_Alternative.png (100%) rename Content/Projectiles/{ => NPC}/SkeletonBone.cs (97%) rename Content/Projectiles/{ => NPC}/SkeletonBone.png (100%) diff --git a/Content/Buffs/Buffs/ScarabEndurance.cs b/Content/Buffs/Buffs/ScarabEndurance.cs index a3b5fb5..432cf5e 100644 --- a/Content/Buffs/Buffs/ScarabEndurance.cs +++ b/Content/Buffs/Buffs/ScarabEndurance.cs @@ -1,4 +1,5 @@ using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Item.Weapon; using Decimation.Lib.Buffs; using Microsoft.Xna.Framework; using Terraria; diff --git a/Content/DecimationPlayer.cs b/Content/DecimationPlayer.cs index 76f9098..b0c9ed0 100644 --- a/Content/DecimationPlayer.cs +++ b/Content/DecimationPlayer.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Decimation.Content.Buffs.Buffs; using Decimation.Content.Items.Accessories; +using Decimation.Content.Items.Accessories.Trinity; using Decimation.Content.Items.Amulets; using Decimation.Content.Items.Misc; using Decimation.Lib.Amulets; @@ -9,6 +10,7 @@ using Decimation.Lib.Collections; using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; +using Terraria.GameInput; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; diff --git a/Content/DecimationWorld.cs b/Content/DecimationWorld.cs index f98c062..0262cb6 100644 --- a/Content/DecimationWorld.cs +++ b/Content/DecimationWorld.cs @@ -1,15 +1,12 @@ -using System.IO; using System.Collections.Generic; -using Terraria; -using Terraria.ModLoader; -using Terraria.World.Generation; -using Terraria.GameContent.Generation; -using Terraria.ModLoader.IO; +using System.IO; +using Decimation.Content.Projectiles.Boss.DuneWyrm; using Decimation.Content.Structures; -using Microsoft.Xna.Framework; -using System; -using Decimation.Content.Projectiles.DuneWyrm; -using Terraria.ID; +using Terraria; +using Terraria.GameContent.Generation; +using Terraria.ModLoader; +using Terraria.ModLoader.IO; +using Terraria.World.Generation; namespace Decimation.Content { @@ -72,19 +69,19 @@ namespace Decimation.Content if (loadVersion == 1) { byte flags = reader.ReadByte(); - DecimationWorld.downedBloodshotEye = ((flags & 1) != 0); - DecimationWorld.downedDuneWyrm = ((flags & 2) != 0); //double flag numbers with each new boss - DecimationWorld.downedArachnus = ((flags & 4) != 0); - DecimationWorld.downedWyvern = ((flags & 8) != 0); + downedBloodshotEye = ((flags & 1) != 0); + downedDuneWyrm = ((flags & 2) != 0); //double flag numbers with each new boss + downedArachnus = ((flags & 4) != 0); + downedWyvern = ((flags & 8) != 0); } else if (loadVersion == 2) { byte flags = reader.ReadByte(); byte flags2 = reader.ReadByte(); - DecimationWorld.downedBloodshotEye = ((flags & 1) != 0); - DecimationWorld.downedDuneWyrm = ((flags & 2) != 0); - DecimationWorld.downedArachnus = ((flags & 4) != 0); - DecimationWorld.downedWyvern = ((flags & 8) != 0); + downedBloodshotEye = ((flags & 1) != 0); + downedDuneWyrm = ((flags & 2) != 0); + downedArachnus = ((flags & 4) != 0); + downedWyvern = ((flags & 8) != 0); } } diff --git a/Content/Items/Accessories/Trinity/Body.cs b/Content/Items/Accessories/Trinity/Body.cs index fbadb58..8131794 100644 --- a/Content/Items/Accessories/Trinity/Body.cs +++ b/Content/Items/Accessories/Trinity/Body.cs @@ -43,28 +43,12 @@ namespace Decimation.Content.Items.Accessories.Trinity overrideColor = ChatManager.WaveColor(Color.Red) }); } - } - class BodyProjectileEffects : GlobalProjectile - { - public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit) - { - Ricochet(projectile, target, true, ref damage); - } - - public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit) - { - if (Ricochet(projectile, target, false, ref damage)) - { - projectile.hostile = false; - projectile.friendly = true; - } - } - - private bool Ricochet(Projectile projectile, Player player, bool fromPlayer, ref int damage) + public static bool BodyEffect(Projectile projectile, Player player, bool fromPlayer, ref int damage) { if (Main.expertMode && Main.rand.NextBool(10) && - player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) + (player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType()) || + player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType()))) { return projectile.Richochet(player, fromPlayer, ref damage); } @@ -72,4 +56,21 @@ namespace Decimation.Content.Items.Accessories.Trinity return false; } } + + class BodyProjectileEffects : GlobalProjectile + { + public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit) + { + Body.BodyEffect(projectile, target, true, ref damage); + } + + public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit) + { + if (Body.BodyEffect(projectile, target, false, ref damage)) + { + projectile.hostile = false; + projectile.friendly = true; + } + } + } } \ No newline at end of file diff --git a/Content/Items/Accessories/Trinity/Mind.cs b/Content/Items/Accessories/Trinity/Mind.cs index 9666bfc..116c331 100644 --- a/Content/Items/Accessories/Trinity/Mind.cs +++ b/Content/Items/Accessories/Trinity/Mind.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; +using Decimation.Content.Projectiles.Item.Accessory.Trinity; using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ID; using Terraria.ModLoader; using Terraria.UI.Chat; @@ -10,13 +10,17 @@ namespace Decimation.Content.Items.Accessories.Trinity { public class Mind : TrinityAccessory { + private static readonly float TrinityBeamSpeed = 8f; + private static readonly int TrinityBeamDamage = 35; + protected override string ItemName => "The Mind"; + protected override string ItemTooltip => "I know all...\n" + "Increases block placement and mining speed by 10%\n" + "Increases ranged and thrown damage by 10%\n" + "Increases ranged and thrown critical hit chances by 10%\n" + - "Allows you to see nearby danger sources\n" + - "Shows the location of treasure and ore"; + "Increases view range\n" + + "Melee attacks have 4% chance to fire a Trinity Beam"; protected override void InitAccessory() { @@ -35,9 +39,7 @@ namespace Decimation.Content.Items.Accessories.Trinity player.rangedCrit = (int) (player.rangedCrit * 1.10f); player.thrownDamage *= 1.10f; player.thrownCrit = (int) (player.thrownCrit * 1.10f); - - player.AddBuff(BuffID.Spelunker, 1); - player.AddBuff(BuffID.Dangersense, 1); + player.scope = true; base.UpdateAccessory(player, hideVisual); } @@ -49,5 +51,73 @@ namespace Decimation.Content.Items.Accessories.Trinity overrideColor = ChatManager.WaveColor(Color.Yellow) }); } + + public static void MindEffect(Player player, Entity target) + { + if (Main.rand.NextBool(25) && (player.HasEquippedAccessory(ModContent.ItemType()) || player.HasEquippedAccessory(ModContent.ItemType()))) + { + bool targetIsPlayer = target.GetType() == typeof(Player); + + // Target + Entity projTarget = null; + float lastDistance = float.MaxValue; + if (targetIsPlayer) + { + for (int p = 0; p < Main.player.Length; p++) + { + Player playerTarget = Main.player[p]; + if (playerTarget != null) + { + float distance = playerTarget.Distance(target.position); + if (playerTarget.active && !playerTarget.dead && + playerTarget.whoAmI != player.whoAmI && playerTarget.whoAmI != target.whoAmI && + distance < 1000f && distance < lastDistance) + { + projTarget = playerTarget; + lastDistance = distance; + } + } + } + } + + for (int n = 0; n < Main.npc.Length; n++) + { + NPC npcTarget = Main.npc[n]; + if (npcTarget != null) + { + float distance = npcTarget.Distance(target.position); + if (npcTarget.active && !npcTarget.friendly && (targetIsPlayer || npcTarget.whoAmI != target.whoAmI) && + distance < 1000f && distance < lastDistance) + { + projTarget = npcTarget; + lastDistance = distance; + } + } + } + + if (projTarget != null) + { + Vector2 velocity = projTarget.Center - target.Center; + velocity.Normalize(); + velocity *= TrinityBeamSpeed; + + Projectile.NewProjectile(target.Center, velocity, ModContent.ProjectileType(), TrinityBeamDamage, 2f, + player.whoAmI); + } + } + } + } + + class MindItemEffects : GlobalItem + { + public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit) + { + Mind.MindEffect(player, target); + } + + public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit) + { + Mind.MindEffect(player, target); + } } } \ No newline at end of file diff --git a/Content/Items/Accessories/Trinity/Soul.cs b/Content/Items/Accessories/Trinity/Soul.cs index ea34c16..39951f3 100644 --- a/Content/Items/Accessories/Trinity/Soul.cs +++ b/Content/Items/Accessories/Trinity/Soul.cs @@ -45,24 +45,36 @@ namespace Decimation.Content.Items.Accessories.Trinity overrideColor = ChatManager.WaveColor(Color.Blue) }); } - } - class SoulItemEffects : GlobalItem - { - public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit) + public static void SoulHitEffect(Player target, ref int damage) + { + DecimationPlayer targetModPlayer = target.GetModPlayer(); + if (Main.rand.NextBool(10) && (targetModPlayer.HasEquippedAccessory(ModContent.ItemType()) || targetModPlayer.HasEquippedAccessory(ModContent.ItemType()))) + { + damage = 0; + targetModPlayer.NextHitCrit = true; + } + } + + public static void SoulEffect(Player player, Entity target, bool crit) { if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) { player.LeechMana(target); } } + } + + class SoulItemEffects : GlobalItem + { + public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit) + { + Soul.SoulEffect(player, target, crit); + } public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit) { - if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) - { - player.LeechMana(target); - } + Soul.SoulEffect(player, target, crit); } } @@ -71,41 +83,29 @@ namespace Decimation.Content.Items.Accessories.Trinity public override void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit) { Player owner = Main.player[projectile.owner]; - if (crit && owner != null && owner.active && !owner.dead && - owner.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) + if (owner != null && owner.active && !owner.dead) { - owner.LeechMana(target); + Soul.SoulEffect(owner, target, crit); } } public override void OnHitPvp(Projectile projectile, Player target, int damage, bool crit) { Player owner = Main.player[projectile.owner]; - if (crit && owner != null && owner.active && !owner.dead && - owner.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) + if (owner != null && owner.active && !owner.dead) { - owner.LeechMana(target); + Soul.SoulEffect(owner, target, crit); } } public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit) { - IgnoreHit(target, ref damage); + Soul.SoulHitEffect(target, ref damage); } public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit) { - IgnoreHit(target, ref damage); - } - - private void IgnoreHit(Player target, ref int damage) - { - DecimationPlayer targetModPlayer = target.GetModPlayer(); - if (Main.rand.NextBool(10) && targetModPlayer.HasEquippedAccessory(ModContent.ItemType())) - { - damage = 0; - targetModPlayer.NextHitCrit = true; - } + Soul.SoulHitEffect(target, ref damage); } } } \ No newline at end of file diff --git a/Content/Items/Accessories/Trinity/Trinity.cs b/Content/Items/Accessories/Trinity/Trinity.cs index 32c5d76..bc1a537 100644 --- a/Content/Items/Accessories/Trinity/Trinity.cs +++ b/Content/Items/Accessories/Trinity/Trinity.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; -using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ID; using Terraria.ModLoader; using Terraria.UI.Chat; @@ -18,8 +16,8 @@ namespace Decimation.Content.Items.Accessories.Trinity "Increases all damage by 10%\n" + "Increases all critical hit chances by 10%\n" + "Increases minions knockback by 10%\n" + - "Allows you to see nearby danger sources\n" + - "Shows the location of treasure and ore\n" + + "Increases view range\n" + + "Melee attacks have 4% chance to fire a Trinity Beam\n" + "Criticals hits leech mana\n" + "Hostile projectiles have 10% chance to phase through you,\nnegating all damage and causing your next attack to be a critical hit\n" + "Hostile projectiles have 10% chance to ricochet off you\nand target your enemies with 50% increased damage"; @@ -53,9 +51,9 @@ namespace Decimation.Content.Items.Accessories.Trinity player.rangedCrit = (int) (player.rangedCrit * 1.10f); player.thrownDamage *= 1.10f; player.thrownCrit = (int) (player.thrownCrit * 1.10f); + player.scope = true; - player.AddBuff(BuffID.Spelunker, 1); - player.AddBuff(BuffID.Dangersense, 1); + base.UpdateAccessory(player, hideVisual); } public override void ModifyTooltips(List tooltips) @@ -66,84 +64,4 @@ namespace Decimation.Content.Items.Accessories.Trinity }); } } - - class TrinityItemEffects : GlobalItem - { - public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit) - { - if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) - { - player.LeechMana(target); - } - } - - public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit) - { - if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) - { - player.LeechMana(target); - } - } - } - - class TrinityProjectileEffects : GlobalProjectile - { - public override void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit) - { - Player owner = Main.player[projectile.owner]; - if (crit && owner != null && owner.active && !owner.dead && - owner.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) - { - owner.LeechMana(target); - } - } - - public override void OnHitPvp(Projectile projectile, Player target, int damage, bool crit) - { - Player owner = Main.player[projectile.owner]; - if (crit && owner != null && owner.active && !owner.dead && - owner.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) - { - owner.LeechMana(target); - } - } - - public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit) - { - Ricochet(projectile, target, true, ref damage); - IgnoreHit(target, ref damage); - } - - public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit) - { - if (Ricochet(projectile, target, false, ref damage)) - { - projectile.hostile = false; - projectile.friendly = true; - } - - IgnoreHit(target, ref damage); - } - - private bool Ricochet(Projectile projectile, Player player, bool fromPlayer, ref int damage) - { - if (Main.expertMode && Main.rand.NextBool(10) && - player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType())) - { - return projectile.Richochet(player, fromPlayer, ref damage); - } - - return false; - } - - private void IgnoreHit(Player target, ref int damage) - { - DecimationPlayer targetModPlayer = target.GetModPlayer(); - if (Main.rand.NextBool(10) && targetModPlayer.HasEquippedAccessory(ModContent.ItemType())) - { - damage = 0; - targetModPlayer.NextHitCrit = true; - } - } - } } \ No newline at end of file diff --git a/Content/Items/Accessories/Trinity/TrinityAccessory.cs b/Content/Items/Accessories/Trinity/TrinityAccessory.cs index 071ff53..64c98af 100644 --- a/Content/Items/Accessories/Trinity/TrinityAccessory.cs +++ b/Content/Items/Accessories/Trinity/TrinityAccessory.cs @@ -13,7 +13,8 @@ namespace Decimation.Content.Items.Accessories.Trinity { return !player.HasEquippedAccessory(ModContent.ItemType()) && !player.HasEquippedAccessory(ModContent.ItemType()) && - !player.HasEquippedAccessory(ModContent.ItemType()); + !player.HasEquippedAccessory(ModContent.ItemType()) && + !player.HasEquippedAccessory(ModContent.ItemType()); } public override bool? PrefixChance(int pre, UnifiedRandom rand) diff --git a/Content/Items/Accessories/Wings/ScarabWings.cs b/Content/Items/Accessories/Wings/ScarabWings.cs index e146ff8..27df6cf 100644 --- a/Content/Items/Accessories/Wings/ScarabWings.cs +++ b/Content/Items/Accessories/Wings/ScarabWings.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Decimation.Content.Items.Misc.CondensedSouls; using Decimation.Content.Items.Ores; -using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Item.Accessory; using Decimation.Content.Tiles; using Decimation.Lib.Items; using Decimation.Lib.Util; diff --git a/Content/Items/Weapons/Arachnus/ChainStynger.cs b/Content/Items/Weapons/Arachnus/ChainStynger.cs index 2d5a8f1..97288c4 100644 --- a/Content/Items/Weapons/Arachnus/ChainStynger.cs +++ b/Content/Items/Weapons/Arachnus/ChainStynger.cs @@ -1,5 +1,6 @@ using Decimation.Content.Buffs.Debuffs; using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Boss.Arachnus; using Decimation.Lib.Items; using Terraria; using Terraria.ID; diff --git a/Content/Items/Weapons/Bloodshot/BloodStream.cs b/Content/Items/Weapons/Bloodshot/BloodStream.cs index 83e2358..0bb9baa 100644 --- a/Content/Items/Weapons/Bloodshot/BloodStream.cs +++ b/Content/Items/Weapons/Bloodshot/BloodStream.cs @@ -1,5 +1,6 @@ using Decimation.Content.Buffs.Debuffs; using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Boss.BloodshotEye; using Decimation.Lib.Items; using Decimation.Lib.Util; using Terraria; diff --git a/Content/Items/Weapons/Bloodshot/Umbra.cs b/Content/Items/Weapons/Bloodshot/Umbra.cs index 39a66db..d1d5af0 100644 --- a/Content/Items/Weapons/Bloodshot/Umbra.cs +++ b/Content/Items/Weapons/Bloodshot/Umbra.cs @@ -1,4 +1,5 @@ using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Item.Weapon; using Decimation.Lib.Items; using Decimation.Lib.Util; using Microsoft.Xna.Framework; diff --git a/Content/Items/Weapons/Bloodshot/VampiricShiv.cs b/Content/Items/Weapons/Bloodshot/VampiricShiv.cs index aff9426..34d43ef 100644 --- a/Content/Items/Weapons/Bloodshot/VampiricShiv.cs +++ b/Content/Items/Weapons/Bloodshot/VampiricShiv.cs @@ -1,4 +1,5 @@ using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Boss.BloodshotEye; using Decimation.Lib.Items; using Decimation.Lib.Util; using Microsoft.Xna.Framework; diff --git a/Content/Items/Weapons/DuneWyrm/StaffofShiftingSands.cs b/Content/Items/Weapons/DuneWyrm/StaffofShiftingSands.cs index 43b657f..7d18606 100644 --- a/Content/Items/Weapons/DuneWyrm/StaffofShiftingSands.cs +++ b/Content/Items/Weapons/DuneWyrm/StaffofShiftingSands.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using Decimation.Content.Items.Misc.Souls; -using Decimation.Content.Projectiles.DuneWyrm; +using Decimation.Content.Projectiles.Boss.DuneWyrm; using Decimation.Lib.Items; using Decimation.Lib.Util; using Decimation.Lib.Util.Builder; diff --git a/Content/Items/Weapons/DuneWyrm/Sundial.cs b/Content/Items/Weapons/DuneWyrm/Sundial.cs index cea06e2..8e76719 100644 --- a/Content/Items/Weapons/DuneWyrm/Sundial.cs +++ b/Content/Items/Weapons/DuneWyrm/Sundial.cs @@ -15,7 +15,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm protected override string ItemTooltip => "Fire bolts of pure time to eradicate your opposition"; protected override int Damages => 15; protected override DamageType DamagesType => DamageType.Magic; - protected override int ProjectileId => ModContent.ProjectileType(); + protected override int ProjectileId => ModContent.ProjectileType(); protected override void InitWeapon() { diff --git a/Content/Items/Weapons/DuneWyrm/Timekeeper.cs b/Content/Items/Weapons/DuneWyrm/Timekeeper.cs index 9bddba2..fb903ae 100644 --- a/Content/Items/Weapons/DuneWyrm/Timekeeper.cs +++ b/Content/Items/Weapons/DuneWyrm/Timekeeper.cs @@ -16,7 +16,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm protected override string ItemTooltip => "Their time has come..."; protected override int Damages => 45; protected override DamageType DamagesType => DamageType.Ranged; - protected override int ProjectileId => ModContent.ProjectileType(); + protected override int ProjectileId => ModContent.ProjectileType(); protected override int AmmoId => AmmoID.Bullet; protected override void InitWeapon() diff --git a/Content/Items/Weapons/HourHand.cs b/Content/Items/Weapons/HourHand.cs index c2e748b..7b3242a 100644 --- a/Content/Items/Weapons/HourHand.cs +++ b/Content/Items/Weapons/HourHand.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using Decimation.Content.Items.Misc.Souls; -using Decimation.Content.Projectiles.DuneWyrm; +using Decimation.Content.Projectiles.Boss.DuneWyrm; using Decimation.Lib.Items; using Decimation.Lib.Util.Builder; using Microsoft.Xna.Framework; diff --git a/Content/Items/Weapons/MultigrainSword.cs b/Content/Items/Weapons/MultigrainSword.cs index 38f3dbb..632842a 100644 --- a/Content/Items/Weapons/MultigrainSword.cs +++ b/Content/Items/Weapons/MultigrainSword.cs @@ -1,4 +1,4 @@ -using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Item.Weapon; using Decimation.Lib.Items; using Decimation.Lib.Util; using Decimation.Lib.Util.Builder; diff --git a/Content/Items/Weapons/RodofLightning.cs b/Content/Items/Weapons/RodofLightning.cs index 45e017e..9127b21 100644 --- a/Content/Items/Weapons/RodofLightning.cs +++ b/Content/Items/Weapons/RodofLightning.cs @@ -1,4 +1,4 @@ -using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Item.Weapon; using Decimation.Lib.Items; using Terraria.ModLoader; diff --git a/Content/Items/Weapons/Slimer.cs b/Content/Items/Weapons/Slimer.cs index cea57bb..2b7fe4f 100644 --- a/Content/Items/Weapons/Slimer.cs +++ b/Content/Items/Weapons/Slimer.cs @@ -1,12 +1,10 @@ -using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Item.Weapon; using Decimation.Lib.Items; using Decimation.Lib.Util; using Decimation.Lib.Util.Builder; using Terraria; -using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using SoundType = Terraria.ModLoader.SoundType; namespace Decimation.Content.Items.Weapons { diff --git a/Content/Items/Weapons/TitanicGatliStynger.cs b/Content/Items/Weapons/TitanicGatliStynger.cs index acb9552..22fa78a 100644 --- a/Content/Items/Weapons/TitanicGatliStynger.cs +++ b/Content/Items/Weapons/TitanicGatliStynger.cs @@ -1,6 +1,6 @@ using Decimation.Content.Items.Ores; using Decimation.Content.Items.Weapons.Arachnus; -using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Item.Weapon; using Decimation.Content.Tiles; using Decimation.Lib.Items; using Microsoft.Xna.Framework; diff --git a/Content/Items/Weapons/TitanicPike.cs b/Content/Items/Weapons/TitanicPike.cs index 5f81490..0b63ede 100644 --- a/Content/Items/Weapons/TitanicPike.cs +++ b/Content/Items/Weapons/TitanicPike.cs @@ -1,5 +1,5 @@ using Decimation.Content.Items.Ores; -using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Item.Weapon; using Decimation.Content.Tiles; using Decimation.Lib.Items; using Decimation.Lib.Util; diff --git a/Content/NPCs/Arachnus/Arachnus.cs b/Content/NPCs/Arachnus/Arachnus.cs index 03aed52..4e809ee 100644 --- a/Content/NPCs/Arachnus/Arachnus.cs +++ b/Content/NPCs/Arachnus/Arachnus.cs @@ -4,7 +4,7 @@ using Decimation.Content.Buffs.Debuffs; using Decimation.Content.Items.Boss.Arachnus; using Decimation.Content.Items.Misc.Souls; using Decimation.Content.Items.Weapons.Arachnus; -using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Boss.Arachnus; using Decimation.Content.Tiles.ShrineoftheMoltenOne; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; diff --git a/Content/NPCs/Bloodshot/BloodshotEye.cs b/Content/NPCs/Bloodshot/BloodshotEye.cs index 709410f..c274cf0 100644 --- a/Content/NPCs/Bloodshot/BloodshotEye.cs +++ b/Content/NPCs/Bloodshot/BloodshotEye.cs @@ -4,6 +4,7 @@ using Decimation.Content.Items.Boss.Bloodshot; using Decimation.Content.Items.Misc; using Decimation.Content.Items.Weapons.Bloodshot; using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Boss.BloodshotEye; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; diff --git a/Content/NPCs/DuneWyrm/DuneWyrm.cs b/Content/NPCs/DuneWyrm/DuneWyrm.cs index 254b599..e4ef569 100644 --- a/Content/NPCs/DuneWyrm/DuneWyrm.cs +++ b/Content/NPCs/DuneWyrm/DuneWyrm.cs @@ -4,14 +4,15 @@ using Decimation.Content.Buffs.Debuffs; using Decimation.Content.Items.Boss.DuneWyrm; using Decimation.Content.Items.Misc.Souls; using Decimation.Content.Items.Vanity.DuneWyrm; -using Decimation.Content.NPCs.DuneWyrm.AncientTombCrawler; using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Boss.DuneWyrm; using Decimation.Lib.NPCs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using AncientTombCrawlerHead = Decimation.Content.NPCs.DuneWyrm.AncientTombCrawler.AncientTombCrawlerHead; namespace Decimation.Content.NPCs.DuneWyrm { diff --git a/Content/NPCs/LivingMagma.cs b/Content/NPCs/LivingMagma.cs index 742645d..aa12bd6 100644 --- a/Content/NPCs/LivingMagma.cs +++ b/Content/NPCs/LivingMagma.cs @@ -1,5 +1,6 @@ using Decimation.Content.Buffs.Debuffs; using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.NPC; using Decimation.Content.Tiles.ShrineoftheMoltenOne; using Decimation.Lib.Util; using Microsoft.Xna.Framework; diff --git a/Content/NPCs/NecroCaster.cs b/Content/NPCs/NecroCaster.cs index ad707ae..6e5104e 100644 --- a/Content/NPCs/NecroCaster.cs +++ b/Content/NPCs/NecroCaster.cs @@ -3,6 +3,7 @@ using Decimation.Content.Dusts; using Decimation.Content.Items.Misc; using Decimation.Content.NPCs.Bloodshot; using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.NPC; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; diff --git a/Content/NPCs/TownNPCs/Skeleton.cs b/Content/NPCs/TownNPCs/Skeleton.cs index aef8fe1..88e1127 100644 --- a/Content/NPCs/TownNPCs/Skeleton.cs +++ b/Content/NPCs/TownNPCs/Skeleton.cs @@ -3,6 +3,7 @@ using Decimation.Content.Items.Boss.DuneWyrm; using Decimation.Content.Items.Misc; using Decimation.Content.Items.Misc.Souls; using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.NPC; using Decimation.Content.UI; using Terraria; using Terraria.ID; diff --git a/Content/Projectiles/ArachnusFireball.cs b/Content/Projectiles/Boss/Arachnus/ArachnusFireball.cs similarity index 82% rename from Content/Projectiles/ArachnusFireball.cs rename to Content/Projectiles/Boss/Arachnus/ArachnusFireball.cs index 159d544..b53d804 100644 --- a/Content/Projectiles/ArachnusFireball.cs +++ b/Content/Projectiles/Boss/Arachnus/ArachnusFireball.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.Arachnus { internal class ArachnusFireball : DecimationProjectile { @@ -16,7 +16,7 @@ namespace Decimation.Content.Projectiles this.projectile.light = 1f; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 120); } diff --git a/Content/Projectiles/ArchingSolarBlade.cs b/Content/Projectiles/Boss/Arachnus/ArchingSolarBlade.cs similarity index 92% rename from Content/Projectiles/ArchingSolarBlade.cs rename to Content/Projectiles/Boss/Arachnus/ArchingSolarBlade.cs index d34a379..eeaa4c8 100644 --- a/Content/Projectiles/ArchingSolarBlade.cs +++ b/Content/Projectiles/Boss/Arachnus/ArchingSolarBlade.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.Arachnus { internal class ArchingSolarBlade : DecimationProjectile { diff --git a/Content/Projectiles/ArchingSolarBlade.png b/Content/Projectiles/Boss/Arachnus/ArchingSolarBlade.png similarity index 100% rename from Content/Projectiles/ArchingSolarBlade.png rename to Content/Projectiles/Boss/Arachnus/ArchingSolarBlade.png diff --git a/Content/Projectiles/BlastofHeat.cs b/Content/Projectiles/Boss/Arachnus/BlastofHeat.cs similarity index 87% rename from Content/Projectiles/BlastofHeat.cs rename to Content/Projectiles/Boss/Arachnus/BlastofHeat.cs index e5dc29d..c63c3b3 100644 --- a/Content/Projectiles/BlastofHeat.cs +++ b/Content/Projectiles/Boss/Arachnus/BlastofHeat.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.Arachnus { internal class BlastofHeat : DecimationProjectile { @@ -25,7 +25,7 @@ namespace Decimation.Content.Projectiles projectile.extraUpdates = 3; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { if (Main.rand.Next(2) == 0) target.AddBuff(BuffID.OnFire, 600); diff --git a/Content/Projectiles/BlastofHeat.png b/Content/Projectiles/Boss/Arachnus/BlastofHeat.png similarity index 100% rename from Content/Projectiles/BlastofHeat.png rename to Content/Projectiles/Boss/Arachnus/BlastofHeat.png diff --git a/Content/Projectiles/BlastofShadowFlame.cs b/Content/Projectiles/Boss/Arachnus/BlastofShadowFlame.cs similarity index 95% rename from Content/Projectiles/BlastofShadowFlame.cs rename to Content/Projectiles/Boss/Arachnus/BlastofShadowFlame.cs index c96488e..a535960 100644 --- a/Content/Projectiles/BlastofShadowFlame.cs +++ b/Content/Projectiles/Boss/Arachnus/BlastofShadowFlame.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.ID; using Microsoft.Xna.Framework; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.Arachnus { internal class BlastofShadowFlame : DecimationProjectile { @@ -91,7 +91,7 @@ namespace Decimation.Content.Projectiles projectile.rotation += 0.3f * (float)projectile.direction; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.ShadowFlame, Main.expertMode ? 360 : 600); } diff --git a/Content/Projectiles/BlastofShadowFlame.png b/Content/Projectiles/Boss/Arachnus/BlastofShadowFlame.png similarity index 100% rename from Content/Projectiles/BlastofShadowFlame.png rename to Content/Projectiles/Boss/Arachnus/BlastofShadowFlame.png diff --git a/Content/Projectiles/MoltenStyngerBolt.cs b/Content/Projectiles/Boss/Arachnus/MoltenStyngerBolt.cs similarity index 97% rename from Content/Projectiles/MoltenStyngerBolt.cs rename to Content/Projectiles/Boss/Arachnus/MoltenStyngerBolt.cs index 53f95e8..3880d78 100644 --- a/Content/Projectiles/MoltenStyngerBolt.cs +++ b/Content/Projectiles/Boss/Arachnus/MoltenStyngerBolt.cs @@ -7,7 +7,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.Arachnus { internal class MoltenStyngerBolt : DecimationProjectile { @@ -42,7 +42,7 @@ namespace Decimation.Content.Projectiles return false; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { if (projectile.timeLeft > 3) projectile.timeLeft = 3; diff --git a/Content/Projectiles/MoltenStyngerBolt.png b/Content/Projectiles/Boss/Arachnus/MoltenStyngerBolt.png similarity index 100% rename from Content/Projectiles/MoltenStyngerBolt.png rename to Content/Projectiles/Boss/Arachnus/MoltenStyngerBolt.png diff --git a/Content/Projectiles/BloodBeam.cs b/Content/Projectiles/Boss/BloodshotEye/BloodBeam.cs similarity index 92% rename from Content/Projectiles/BloodBeam.cs rename to Content/Projectiles/Boss/BloodshotEye/BloodBeam.cs index ac24bbb..10dc012 100644 --- a/Content/Projectiles/BloodBeam.cs +++ b/Content/Projectiles/Boss/BloodshotEye/BloodBeam.cs @@ -11,7 +11,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.BloodshotEye { internal class BloodBeam : DecimationProjectile { @@ -47,7 +47,7 @@ namespace Decimation.Content.Projectiles int damages = Main.rand.Next(5, 11); target.Hurt(PlayerDeathReason.LegacyDefault(), damages, 0); - NPC bloodshotEye = Main.npc[(int)projectile.ai[0]]; + Terraria.NPC bloodshotEye = Main.npc[(int)projectile.ai[0]]; bloodshotEye.life += damages; bloodshotEye.HealEffect(damages); } diff --git a/Content/Projectiles/BloodBeamFriendly.cs b/Content/Projectiles/Boss/BloodshotEye/BloodBeamFriendly.cs similarity index 93% rename from Content/Projectiles/BloodBeamFriendly.cs rename to Content/Projectiles/Boss/BloodshotEye/BloodBeamFriendly.cs index 682c92d..82c079a 100644 --- a/Content/Projectiles/BloodBeamFriendly.cs +++ b/Content/Projectiles/Boss/BloodshotEye/BloodBeamFriendly.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.BloodshotEye { internal class BloodBeamFriendly : DecimationProjectile { diff --git a/Content/Projectiles/BloodClot.cs b/Content/Projectiles/Boss/BloodshotEye/BloodClot.cs similarity index 96% rename from Content/Projectiles/BloodClot.cs rename to Content/Projectiles/Boss/BloodshotEye/BloodClot.cs index 7d11080..0c6d33a 100644 --- a/Content/Projectiles/BloodClot.cs +++ b/Content/Projectiles/Boss/BloodshotEye/BloodClot.cs @@ -7,7 +7,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.BloodshotEye { internal class BloodClot : DecimationProjectile { diff --git a/Content/Projectiles/BloodClot.png b/Content/Projectiles/Boss/BloodshotEye/BloodClot.png similarity index 100% rename from Content/Projectiles/BloodClot.png rename to Content/Projectiles/Boss/BloodshotEye/BloodClot.png diff --git a/Content/Projectiles/BloodClotSmall.cs b/Content/Projectiles/Boss/BloodshotEye/BloodClotSmall.cs similarity index 95% rename from Content/Projectiles/BloodClotSmall.cs rename to Content/Projectiles/Boss/BloodshotEye/BloodClotSmall.cs index 8100715..a71d25e 100644 --- a/Content/Projectiles/BloodClotSmall.cs +++ b/Content/Projectiles/Boss/BloodshotEye/BloodClotSmall.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.BloodshotEye { internal class BloodClotSmall : DecimationProjectile { diff --git a/Content/Projectiles/BloodClotSmall.png b/Content/Projectiles/Boss/BloodshotEye/BloodClotSmall.png similarity index 100% rename from Content/Projectiles/BloodClotSmall.png rename to Content/Projectiles/Boss/BloodshotEye/BloodClotSmall.png diff --git a/Content/Projectiles/Tooth.cs b/Content/Projectiles/Boss/BloodshotEye/Tooth.cs similarity index 89% rename from Content/Projectiles/Tooth.cs rename to Content/Projectiles/Boss/BloodshotEye/Tooth.cs index 7f7d605..931b53d 100644 --- a/Content/Projectiles/Tooth.cs +++ b/Content/Projectiles/Boss/BloodshotEye/Tooth.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.BloodshotEye { internal class Tooth : DecimationProjectile { @@ -23,7 +23,7 @@ namespace Decimation.Content.Projectiles DamageType = DecimationWeapon.DamageType.Ranged; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { int regen = (int)(damage * 0.08f); Player owner = Main.player[projectile.owner]; diff --git a/Content/Projectiles/Tooth.png b/Content/Projectiles/Boss/BloodshotEye/Tooth.png similarity index 100% rename from Content/Projectiles/Tooth.png rename to Content/Projectiles/Boss/BloodshotEye/Tooth.png diff --git a/Content/Projectiles/Ammonite.cs b/Content/Projectiles/Boss/DuneWyrm/Ammonite.cs similarity index 87% rename from Content/Projectiles/Ammonite.cs rename to Content/Projectiles/Boss/DuneWyrm/Ammonite.cs index 7e2f70b..3426dcb 100644 --- a/Content/Projectiles/Ammonite.cs +++ b/Content/Projectiles/Boss/DuneWyrm/Ammonite.cs @@ -1,6 +1,6 @@ using Terraria.ID; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Boss.DuneWyrm { internal class Ammonite : DecimationProjectile { diff --git a/Content/Projectiles/Ammonite.png b/Content/Projectiles/Boss/DuneWyrm/Ammonite.png similarity index 100% rename from Content/Projectiles/Ammonite.png rename to Content/Projectiles/Boss/DuneWyrm/Ammonite.png diff --git a/Content/Projectiles/DuneWyrm/AncientTombCrawler.cs b/Content/Projectiles/Boss/DuneWyrm/AncientTombCrawler.cs similarity index 97% rename from Content/Projectiles/DuneWyrm/AncientTombCrawler.cs rename to Content/Projectiles/Boss/DuneWyrm/AncientTombCrawler.cs index ad8527e..eb0b61f 100644 --- a/Content/Projectiles/DuneWyrm/AncientTombCrawler.cs +++ b/Content/Projectiles/Boss/DuneWyrm/AncientTombCrawler.cs @@ -3,7 +3,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles.DuneWyrm +namespace Decimation.Content.Projectiles.Boss.DuneWyrm { class AncientTombCrawlerHead : AncientTombCrawler { diff --git a/Content/Projectiles/DuneWyrm/HourHandProjectile.cs b/Content/Projectiles/Boss/DuneWyrm/HourHandProjectile.cs similarity index 95% rename from Content/Projectiles/DuneWyrm/HourHandProjectile.cs rename to Content/Projectiles/Boss/DuneWyrm/HourHandProjectile.cs index 7575340..e02a8f7 100644 --- a/Content/Projectiles/DuneWyrm/HourHandProjectile.cs +++ b/Content/Projectiles/Boss/DuneWyrm/HourHandProjectile.cs @@ -3,7 +3,7 @@ using Decimation.Lib.Util; using Terraria; using Terraria.ID; -namespace Decimation.Content.Projectiles.DuneWyrm +namespace Decimation.Content.Projectiles.Boss.DuneWyrm { public class HourHandProjectile : DecimationProjectile { diff --git a/Content/Projectiles/DuneWyrm/HourHandProjectile.png b/Content/Projectiles/Boss/DuneWyrm/HourHandProjectile.png similarity index 100% rename from Content/Projectiles/DuneWyrm/HourHandProjectile.png rename to Content/Projectiles/Boss/DuneWyrm/HourHandProjectile.png diff --git a/Content/Projectiles/DuneWyrm/Sundial.cs b/Content/Projectiles/Boss/DuneWyrm/Sundial.cs similarity index 96% rename from Content/Projectiles/DuneWyrm/Sundial.cs rename to Content/Projectiles/Boss/DuneWyrm/Sundial.cs index 6d78cdd..68afa0e 100644 --- a/Content/Projectiles/DuneWyrm/Sundial.cs +++ b/Content/Projectiles/Boss/DuneWyrm/Sundial.cs @@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; -namespace Decimation.Content.Projectiles.DuneWyrm +namespace Decimation.Content.Projectiles.Boss.DuneWyrm { public class Sundial : DecimationProjectile { @@ -134,7 +134,7 @@ namespace Decimation.Content.Projectiles.DuneWyrm } } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { if (Index == 1) target.AddBuff(BuffID.Slow, 300); } diff --git a/Content/Projectiles/DuneWyrm/Sundial.png b/Content/Projectiles/Boss/DuneWyrm/Sundial.png similarity index 100% rename from Content/Projectiles/DuneWyrm/Sundial.png rename to Content/Projectiles/Boss/DuneWyrm/Sundial.png diff --git a/Content/Projectiles/DuneWyrm/Timekeeper.cs b/Content/Projectiles/Boss/DuneWyrm/Timekeeper.cs similarity index 98% rename from Content/Projectiles/DuneWyrm/Timekeeper.cs rename to Content/Projectiles/Boss/DuneWyrm/Timekeeper.cs index 907a1e4..d2822f9 100644 --- a/Content/Projectiles/DuneWyrm/Timekeeper.cs +++ b/Content/Projectiles/Boss/DuneWyrm/Timekeeper.cs @@ -3,7 +3,7 @@ using Decimation.Lib.Items; using Microsoft.Xna.Framework; using Terraria; -namespace Decimation.Content.Projectiles.DuneWyrm +namespace Decimation.Content.Projectiles.Boss.DuneWyrm { public class Timekeeper : DecimationProjectile { diff --git a/Content/Projectiles/DuneWyrm/Timekeeper.png b/Content/Projectiles/Boss/DuneWyrm/Timekeeper.png similarity index 100% rename from Content/Projectiles/DuneWyrm/Timekeeper.png rename to Content/Projectiles/Boss/DuneWyrm/Timekeeper.png diff --git a/Content/Projectiles/Ember.cs b/Content/Projectiles/Item/Accessory/Ember.cs similarity index 79% rename from Content/Projectiles/Ember.cs rename to Content/Projectiles/Item/Accessory/Ember.cs index 5c95745..baee2d9 100644 --- a/Content/Projectiles/Ember.cs +++ b/Content/Projectiles/Item/Accessory/Ember.cs @@ -1,12 +1,10 @@ -using System; -using Terraria; -using Terraria.ModLoader; -using Terraria.ID; -using Decimation.Content.Buffs.Buffs; -using Decimation.Content.Buffs.Debuffs; +using Decimation.Content.Buffs.Debuffs; using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Accessory { internal class Ember : DecimationProjectile { @@ -28,10 +26,10 @@ namespace Decimation.Content.Projectiles public override void AI() { - Dust.NewDust(projectile.position, projectile.width, projectile.height, 6, 0, 0, 0, new Microsoft.Xna.Framework.Color(240, 94, 27)); + Dust.NewDust(projectile.position, projectile.width, projectile.height, 6, 0, 0, 0, new Color(240, 94, 27)); } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 300); } diff --git a/Content/Projectiles/Item/Accessory/Trinity/TrinityBeam.cs b/Content/Projectiles/Item/Accessory/Trinity/TrinityBeam.cs new file mode 100644 index 0000000..7678b60 --- /dev/null +++ b/Content/Projectiles/Item/Accessory/Trinity/TrinityBeam.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; + +namespace Decimation.Content.Projectiles.Item.Accessory.Trinity +{ + public class TrinityBeam : DecimationProjectile + { + public override string Texture => "Terraria/Projectile_" + ProjectileID.LightBeam; + + protected override void Init() + { + Projectile refProjectile = new Projectile(); + refProjectile.CloneDefaults(ProjectileID.LightBeam); + + projectile.width = refProjectile.width; + projectile.height = refProjectile.height; + projectile.hostile = false; + projectile.friendly = true; + projectile.light = .7f; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.aiStyle = -1; + projectile.timeLeft = 180; + } + + public override void AI() + { + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4; + } + + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Weak, 300); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Weak, 300); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Weak, 300); + } + } +} \ No newline at end of file diff --git a/Content/Projectiles/GreenSlime.cs b/Content/Projectiles/Item/Weapon/GreenSlime.cs similarity index 98% rename from Content/Projectiles/GreenSlime.cs rename to Content/Projectiles/Item/Weapon/GreenSlime.cs index 02ce68a..8647330 100644 --- a/Content/Projectiles/GreenSlime.cs +++ b/Content/Projectiles/Item/Weapon/GreenSlime.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Weapon { public class GreenSlime : DecimationProjectile { diff --git a/Content/Projectiles/LightningSphere.cs b/Content/Projectiles/Item/Weapon/LightningSphere.cs similarity index 86% rename from Content/Projectiles/LightningSphere.cs rename to Content/Projectiles/Item/Weapon/LightningSphere.cs index 714dc63..9b2419a 100644 --- a/Content/Projectiles/LightningSphere.cs +++ b/Content/Projectiles/Item/Weapon/LightningSphere.cs @@ -1,6 +1,6 @@ using Terraria.ID; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Weapon { internal class LightningSphere : DecimationProjectile { diff --git a/Content/Projectiles/LightningSphere.png b/Content/Projectiles/Item/Weapon/LightningSphere.png similarity index 100% rename from Content/Projectiles/LightningSphere.png rename to Content/Projectiles/Item/Weapon/LightningSphere.png diff --git a/Content/Projectiles/Pebble.cs b/Content/Projectiles/Item/Weapon/Pebble.cs similarity index 94% rename from Content/Projectiles/Pebble.cs rename to Content/Projectiles/Item/Weapon/Pebble.cs index 4d4d289..4a4aca9 100644 --- a/Content/Projectiles/Pebble.cs +++ b/Content/Projectiles/Item/Weapon/Pebble.cs @@ -1,7 +1,7 @@ using Decimation.Lib.Items; using Terraria.ID; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Weapon { internal class Pebble : DecimationProjectile { diff --git a/Content/Projectiles/Scarab.cs b/Content/Projectiles/Item/Weapon/Scarab.cs similarity index 97% rename from Content/Projectiles/Scarab.cs rename to Content/Projectiles/Item/Weapon/Scarab.cs index 3b5b330..cc94665 100644 --- a/Content/Projectiles/Scarab.cs +++ b/Content/Projectiles/Item/Weapon/Scarab.cs @@ -9,7 +9,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Weapon { internal class Scarab : DecimationProjectile { diff --git a/Content/Projectiles/Scarab.png b/Content/Projectiles/Item/Weapon/Scarab.png similarity index 100% rename from Content/Projectiles/Scarab.png rename to Content/Projectiles/Item/Weapon/Scarab.png diff --git a/Content/Projectiles/SiphonArrow.cs b/Content/Projectiles/Item/Weapon/SiphonArrow.cs similarity index 90% rename from Content/Projectiles/SiphonArrow.cs rename to Content/Projectiles/Item/Weapon/SiphonArrow.cs index b71c77f..d08a1bf 100644 --- a/Content/Projectiles/SiphonArrow.cs +++ b/Content/Projectiles/Item/Weapon/SiphonArrow.cs @@ -7,7 +7,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Weapon { internal class SiphonArrow : DecimationProjectile { @@ -24,7 +24,7 @@ namespace Decimation.Content.Projectiles aiType = ProjectileID.WoodenArrowFriendly; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { Heal(damage); } diff --git a/Content/Projectiles/SiphonArrow.png b/Content/Projectiles/Item/Weapon/SiphonArrow.png similarity index 100% rename from Content/Projectiles/SiphonArrow.png rename to Content/Projectiles/Item/Weapon/SiphonArrow.png diff --git a/Content/Projectiles/Stinger.cs b/Content/Projectiles/Item/Weapon/Stinger.cs similarity index 86% rename from Content/Projectiles/Stinger.cs rename to Content/Projectiles/Item/Weapon/Stinger.cs index a1c4bb3..64649f4 100644 --- a/Content/Projectiles/Stinger.cs +++ b/Content/Projectiles/Item/Weapon/Stinger.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Weapon { internal class Stinger : DecimationProjectile @@ -25,7 +25,7 @@ namespace Decimation.Content.Projectiles projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(Terraria.NPC target, int damage, float knockback, bool crit) { if (Main.rand.Next(2) == 0) { diff --git a/Content/Projectiles/Stinger.png b/Content/Projectiles/Item/Weapon/Stinger.png similarity index 100% rename from Content/Projectiles/Stinger.png rename to Content/Projectiles/Item/Weapon/Stinger.png diff --git a/Content/Projectiles/TitanicPikeProjectile.cs b/Content/Projectiles/Item/Weapon/TitanicPikeProjectile.cs similarity index 98% rename from Content/Projectiles/TitanicPikeProjectile.cs rename to Content/Projectiles/Item/Weapon/TitanicPikeProjectile.cs index 1bf4271..b3e8a0d 100644 --- a/Content/Projectiles/TitanicPikeProjectile.cs +++ b/Content/Projectiles/Item/Weapon/TitanicPikeProjectile.cs @@ -1,7 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Weapon { internal class TitanicPikeProjectile : DecimationProjectile { diff --git a/Content/Projectiles/TitanicPikeProjectile.png b/Content/Projectiles/Item/Weapon/TitanicPikeProjectile.png similarity index 100% rename from Content/Projectiles/TitanicPikeProjectile.png rename to Content/Projectiles/Item/Weapon/TitanicPikeProjectile.png diff --git a/Content/Projectiles/TitanicStyngerBolt.cs b/Content/Projectiles/Item/Weapon/TitanicStyngerBolt.cs similarity index 98% rename from Content/Projectiles/TitanicStyngerBolt.cs rename to Content/Projectiles/Item/Weapon/TitanicStyngerBolt.cs index c6a5ffe..97c7fb0 100644 --- a/Content/Projectiles/TitanicStyngerBolt.cs +++ b/Content/Projectiles/Item/Weapon/TitanicStyngerBolt.cs @@ -7,7 +7,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.Item.Weapon { internal class TitanicStyngerBolt : DecimationProjectile { diff --git a/Content/Projectiles/TitanicStyngerBolt.png b/Content/Projectiles/Item/Weapon/TitanicStyngerBolt.png similarity index 100% rename from Content/Projectiles/TitanicStyngerBolt.png rename to Content/Projectiles/Item/Weapon/TitanicStyngerBolt.png diff --git a/Content/Projectiles/Bone.cs b/Content/Projectiles/NPC/Bone.cs similarity index 99% rename from Content/Projectiles/Bone.cs rename to Content/Projectiles/NPC/Bone.cs index 7d1ef25..28223dd 100644 --- a/Content/Projectiles/Bone.cs +++ b/Content/Projectiles/NPC/Bone.cs @@ -4,7 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.NPC { internal class Bone : DecimationProjectile { diff --git a/Content/Projectiles/Bone.png b/Content/Projectiles/NPC/Bone.png similarity index 100% rename from Content/Projectiles/Bone.png rename to Content/Projectiles/NPC/Bone.png diff --git a/Content/Projectiles/MagmaBall.cs b/Content/Projectiles/NPC/MagmaBall.cs similarity index 95% rename from Content/Projectiles/MagmaBall.cs rename to Content/Projectiles/NPC/MagmaBall.cs index 9958487..29657a7 100644 --- a/Content/Projectiles/MagmaBall.cs +++ b/Content/Projectiles/NPC/MagmaBall.cs @@ -7,11 +7,11 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.NPC { public class MagmaBall : DecimationProjectile { - public override string Texture => "Decimation/Content/Projectiles/MagmaBall"; + public override string Texture => "Decimation/Content/Projectiles/NPC/MagmaBall"; private bool HitPlayer { @@ -73,7 +73,7 @@ namespace Decimation.Content.Projectiles public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { var frameSize = new Vector2(projectile.width, projectile.height); - string texturePath = "Content/Projectiles/MagmaBall"; + string texturePath = "Content/Projectiles/NPC/MagmaBall"; if (AlternativeTexture) texturePath += "_Alternative"; var texture = mod.GetTexture(texturePath); diff --git a/Content/Projectiles/MagmaBall.png b/Content/Projectiles/NPC/MagmaBall.png similarity index 100% rename from Content/Projectiles/MagmaBall.png rename to Content/Projectiles/NPC/MagmaBall.png diff --git a/Content/Projectiles/MagmaBall_Alternative.png b/Content/Projectiles/NPC/MagmaBall_Alternative.png similarity index 100% rename from Content/Projectiles/MagmaBall_Alternative.png rename to Content/Projectiles/NPC/MagmaBall_Alternative.png diff --git a/Content/Projectiles/SkeletonBone.cs b/Content/Projectiles/NPC/SkeletonBone.cs similarity index 97% rename from Content/Projectiles/SkeletonBone.cs rename to Content/Projectiles/NPC/SkeletonBone.cs index 7483b3c..26467e7 100644 --- a/Content/Projectiles/SkeletonBone.cs +++ b/Content/Projectiles/NPC/SkeletonBone.cs @@ -4,7 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; -namespace Decimation.Content.Projectiles +namespace Decimation.Content.Projectiles.NPC { internal class SkeletonBone : DecimationProjectile { @@ -58,7 +58,7 @@ namespace Decimation.Content.Projectiles set => projectile.localAI[0] = value; } - private NPC TargetNPC => Main.npc[Target]; + private Terraria.NPC TargetNPC => Main.npc[Target]; protected override void Init() { @@ -158,7 +158,7 @@ namespace Decimation.Content.Projectiles for (int i = 0; i < Main.npc.Length; i++) { - NPC npc = Main.npc[i]; + Terraria.NPC npc = Main.npc[i]; if (npc != null && npc.active && !npc.townNPC && npc.damage > 0 && projectile.CanHit(npc)) { float distance = projectile.Distance(npc.Center); diff --git a/Content/Projectiles/SkeletonBone.png b/Content/Projectiles/NPC/SkeletonBone.png similarity index 100% rename from Content/Projectiles/SkeletonBone.png rename to Content/Projectiles/NPC/SkeletonBone.png diff --git a/Content/Synergies/FireAmuletSynergy.cs b/Content/Synergies/FireAmuletSynergy.cs index 43754da..1628a5f 100644 --- a/Content/Synergies/FireAmuletSynergy.cs +++ b/Content/Synergies/FireAmuletSynergy.cs @@ -1,6 +1,7 @@ using Decimation.Content.Buffs.Debuffs; using Decimation.Content.Items.Amulets; using Decimation.Content.Projectiles; +using Decimation.Content.Projectiles.Boss.Arachnus; using Decimation.Lib.Amulets.Synergy; using Decimation.Lib.Util; using Microsoft.Xna.Framework;