diff --git a/Buffs/Buffs/Commander.cs b/Content/Buffs/Buffs/Commander.cs similarity index 93% rename from Buffs/Buffs/Commander.cs rename to Content/Buffs/Buffs/Commander.cs index 5614fe2..7bede87 100644 --- a/Buffs/Buffs/Commander.cs +++ b/Content/Buffs/Buffs/Commander.cs @@ -1,7 +1,7 @@ using Terraria; using Terraria.ModLoader; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class Commander : DecimationBuff { diff --git a/Buffs/Buffs/Commander.png b/Content/Buffs/Buffs/Commander.png similarity index 100% rename from Buffs/Buffs/Commander.png rename to Content/Buffs/Buffs/Commander.png diff --git a/Buffs/Buffs/DemonicallyBewitched.cs b/Content/Buffs/Buffs/DemonicallyBewitched.cs similarity index 93% rename from Buffs/Buffs/DemonicallyBewitched.cs rename to Content/Buffs/Buffs/DemonicallyBewitched.cs index 9ebc0fc..c31e5dd 100644 --- a/Buffs/Buffs/DemonicallyBewitched.cs +++ b/Content/Buffs/Buffs/DemonicallyBewitched.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class DemonicallyBewitched : DecimationBuff { diff --git a/Buffs/Buffs/DemonicallyBewitched.png b/Content/Buffs/Buffs/DemonicallyBewitched.png similarity index 100% rename from Buffs/Buffs/DemonicallyBewitched.png rename to Content/Buffs/Buffs/DemonicallyBewitched.png diff --git a/Buffs/Buffs/FatesSmile.cs b/Content/Buffs/Buffs/FatesSmile.cs similarity index 93% rename from Buffs/Buffs/FatesSmile.cs rename to Content/Buffs/Buffs/FatesSmile.cs index 5d8586c..f72f0ce 100644 --- a/Buffs/Buffs/FatesSmile.cs +++ b/Content/Buffs/Buffs/FatesSmile.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using Terraria.DataStructures; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class FatesSmile : DecimationBuff { diff --git a/Buffs/Buffs/FatesSmile.png b/Content/Buffs/Buffs/FatesSmile.png similarity index 100% rename from Buffs/Buffs/FatesSmile.png rename to Content/Buffs/Buffs/FatesSmile.png diff --git a/Buffs/Buffs/MysticFlame.cs b/Content/Buffs/Buffs/MysticFlame.cs similarity index 94% rename from Buffs/Buffs/MysticFlame.cs rename to Content/Buffs/Buffs/MysticFlame.cs index 76150bc..600f45b 100644 --- a/Buffs/Buffs/MysticFlame.cs +++ b/Content/Buffs/Buffs/MysticFlame.cs @@ -1,6 +1,6 @@ using Terraria; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class MysticFlame : DecimationBuff { diff --git a/Buffs/Buffs/MysticFlame.png b/Content/Buffs/Buffs/MysticFlame.png similarity index 100% rename from Buffs/Buffs/MysticFlame.png rename to Content/Buffs/Buffs/MysticFlame.png diff --git a/Buffs/Buffs/NaturesAura.cs b/Content/Buffs/Buffs/NaturesAura.cs similarity index 93% rename from Buffs/Buffs/NaturesAura.cs rename to Content/Buffs/Buffs/NaturesAura.cs index 9e712d3..44eb421 100644 --- a/Buffs/Buffs/NaturesAura.cs +++ b/Content/Buffs/Buffs/NaturesAura.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using Terraria.DataStructures; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class NaturesAura : DecimationBuff { diff --git a/Buffs/Buffs/NaturesAura.png b/Content/Buffs/Buffs/NaturesAura.png similarity index 100% rename from Buffs/Buffs/NaturesAura.png rename to Content/Buffs/Buffs/NaturesAura.png diff --git a/Buffs/Buffs/ScarabEndurance.cs b/Content/Buffs/Buffs/ScarabEndurance.cs similarity index 96% rename from Buffs/Buffs/ScarabEndurance.cs rename to Content/Buffs/Buffs/ScarabEndurance.cs index 34efa3b..f7e4e59 100644 --- a/Buffs/Buffs/ScarabEndurance.cs +++ b/Content/Buffs/Buffs/ScarabEndurance.cs @@ -1,10 +1,10 @@ -using Decimation.Projectiles; +using Decimation.Content.Projectiles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class ScarabEndurance : DecimationBuff { diff --git a/Buffs/Buffs/ScarabEndurance.png b/Content/Buffs/Buffs/ScarabEndurance.png similarity index 100% rename from Buffs/Buffs/ScarabEndurance.png rename to Content/Buffs/Buffs/ScarabEndurance.png diff --git a/Buffs/Buffs/SlimyFeet.cs b/Content/Buffs/Buffs/SlimyFeet.cs similarity index 97% rename from Buffs/Buffs/SlimyFeet.cs rename to Content/Buffs/Buffs/SlimyFeet.cs index 51ce6ae..fdaae70 100644 --- a/Buffs/Buffs/SlimyFeet.cs +++ b/Content/Buffs/Buffs/SlimyFeet.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class SlimyFeet : DecimationBuff { diff --git a/Buffs/Buffs/SlimyFeet.png b/Content/Buffs/Buffs/SlimyFeet.png similarity index 100% rename from Buffs/Buffs/SlimyFeet.png rename to Content/Buffs/Buffs/SlimyFeet.png diff --git a/Buffs/Buffs/Ubered.cs b/Content/Buffs/Buffs/Ubered.cs similarity index 94% rename from Buffs/Buffs/Ubered.cs rename to Content/Buffs/Buffs/Ubered.cs index 1d02a23..779bdcd 100644 --- a/Buffs/Buffs/Ubered.cs +++ b/Content/Buffs/Buffs/Ubered.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class Ubered : DecimationBuff { diff --git a/Buffs/Buffs/Ubered.png b/Content/Buffs/Buffs/Ubered.png similarity index 100% rename from Buffs/Buffs/Ubered.png rename to Content/Buffs/Buffs/Ubered.png diff --git a/Buffs/Buffs/Vampire.cs b/Content/Buffs/Buffs/Vampire.cs similarity index 95% rename from Buffs/Buffs/Vampire.cs rename to Content/Buffs/Buffs/Vampire.cs index b7459bc..e3b85ea 100644 --- a/Buffs/Buffs/Vampire.cs +++ b/Content/Buffs/Buffs/Vampire.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class Vampire : DecimationBuff { diff --git a/Buffs/Buffs/Vampire.png b/Content/Buffs/Buffs/Vampire.png similarity index 100% rename from Buffs/Buffs/Vampire.png rename to Content/Buffs/Buffs/Vampire.png diff --git a/Buffs/Buffs/Warlock.cs b/Content/Buffs/Buffs/Warlock.cs similarity index 93% rename from Buffs/Buffs/Warlock.cs rename to Content/Buffs/Buffs/Warlock.cs index 5638a1c..dc2fdbd 100644 --- a/Buffs/Buffs/Warlock.cs +++ b/Content/Buffs/Buffs/Warlock.cs @@ -1,7 +1,7 @@ using Terraria; using Terraria.ModLoader; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class Warlock : DecimationBuff { diff --git a/Buffs/Buffs/Warlock.png b/Content/Buffs/Buffs/Warlock.png similarity index 100% rename from Buffs/Buffs/Warlock.png rename to Content/Buffs/Buffs/Warlock.png diff --git a/Buffs/Buffs/Werepire.cs b/Content/Buffs/Buffs/Werepire.cs similarity index 95% rename from Buffs/Buffs/Werepire.cs rename to Content/Buffs/Buffs/Werepire.cs index fcfb73a..e98be44 100644 --- a/Buffs/Buffs/Werepire.cs +++ b/Content/Buffs/Buffs/Werepire.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Buffs +namespace Decimation.Content.Buffs.Buffs { internal class Werepire : DecimationBuff { diff --git a/Buffs/Buffs/Werepire.png b/Content/Buffs/Buffs/Werepire.png similarity index 100% rename from Buffs/Buffs/Werepire.png rename to Content/Buffs/Buffs/Werepire.png diff --git a/Buffs/Debuffs/Amnesia.cs b/Content/Buffs/Debuffs/Amnesia.cs similarity index 95% rename from Buffs/Debuffs/Amnesia.cs rename to Content/Buffs/Debuffs/Amnesia.cs index 8025d46..05f9c78 100644 --- a/Buffs/Debuffs/Amnesia.cs +++ b/Content/Buffs/Debuffs/Amnesia.cs @@ -1,7 +1,7 @@ using Terraria; using Terraria.ID; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class Amnesia : DecimationBuff { diff --git a/Buffs/Debuffs/Amnesia.png b/Content/Buffs/Debuffs/Amnesia.png similarity index 100% rename from Buffs/Debuffs/Amnesia.png rename to Content/Buffs/Debuffs/Amnesia.png diff --git a/Buffs/Debuffs/AvianFlu.cs b/Content/Buffs/Debuffs/AvianFlu.cs similarity index 96% rename from Buffs/Debuffs/AvianFlu.cs rename to Content/Buffs/Debuffs/AvianFlu.cs index 66201f7..b176036 100644 --- a/Buffs/Debuffs/AvianFlu.cs +++ b/Content/Buffs/Debuffs/AvianFlu.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class AvianFlu : DecimationBuff { diff --git a/Buffs/Debuffs/AvianFlu.png b/Content/Buffs/Debuffs/AvianFlu.png similarity index 100% rename from Buffs/Debuffs/AvianFlu.png rename to Content/Buffs/Debuffs/AvianFlu.png diff --git a/Buffs/Debuffs/Corrosion.cs b/Content/Buffs/Debuffs/Corrosion.cs similarity index 95% rename from Buffs/Debuffs/Corrosion.cs rename to Content/Buffs/Debuffs/Corrosion.cs index 993b47e..e2901dd 100644 --- a/Buffs/Debuffs/Corrosion.cs +++ b/Content/Buffs/Debuffs/Corrosion.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class Corrosion : DecimationBuff { diff --git a/Buffs/Debuffs/Corrosion.png b/Content/Buffs/Debuffs/Corrosion.png similarity index 100% rename from Buffs/Debuffs/Corrosion.png rename to Content/Buffs/Debuffs/Corrosion.png diff --git a/Buffs/Debuffs/Discombobulated.cs b/Content/Buffs/Debuffs/Discombobulated.cs similarity index 94% rename from Buffs/Debuffs/Discombobulated.cs rename to Content/Buffs/Debuffs/Discombobulated.cs index d3c7bca..6f12f5d 100644 --- a/Buffs/Debuffs/Discombobulated.cs +++ b/Content/Buffs/Debuffs/Discombobulated.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class Discombobulated : DecimationBuff { diff --git a/Buffs/Debuffs/Discombobulated.png b/Content/Buffs/Debuffs/Discombobulated.png similarity index 100% rename from Buffs/Debuffs/Discombobulated.png rename to Content/Buffs/Debuffs/Discombobulated.png diff --git a/Buffs/Debuffs/Enveloped.cs b/Content/Buffs/Debuffs/Enveloped.cs similarity index 96% rename from Buffs/Debuffs/Enveloped.cs rename to Content/Buffs/Debuffs/Enveloped.cs index e62feff..d512986 100644 --- a/Buffs/Debuffs/Enveloped.cs +++ b/Content/Buffs/Debuffs/Enveloped.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class Enveloped : DecimationBuff { diff --git a/Buffs/Debuffs/Enveloped.png b/Content/Buffs/Debuffs/Enveloped.png similarity index 100% rename from Buffs/Debuffs/Enveloped.png rename to Content/Buffs/Debuffs/Enveloped.png diff --git a/Buffs/Debuffs/Hyperthermic.cs b/Content/Buffs/Debuffs/Hyperthermic.cs similarity index 96% rename from Buffs/Debuffs/Hyperthermic.cs rename to Content/Buffs/Debuffs/Hyperthermic.cs index b9b7bdc..cf6dea6 100644 --- a/Buffs/Debuffs/Hyperthermic.cs +++ b/Content/Buffs/Debuffs/Hyperthermic.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class Hyperthermic : DecimationBuff { diff --git a/Buffs/Debuffs/Hyperthermic.png b/Content/Buffs/Debuffs/Hyperthermic.png similarity index 100% rename from Buffs/Debuffs/Hyperthermic.png rename to Content/Buffs/Debuffs/Hyperthermic.png diff --git a/Buffs/Debuffs/InfernalGaze.cs b/Content/Buffs/Debuffs/InfernalGaze.cs similarity index 95% rename from Buffs/Debuffs/InfernalGaze.cs rename to Content/Buffs/Debuffs/InfernalGaze.cs index 0463cfc..39627dc 100644 --- a/Buffs/Debuffs/InfernalGaze.cs +++ b/Content/Buffs/Debuffs/InfernalGaze.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class InfernalGaze : DecimationBuff { diff --git a/Buffs/Debuffs/InfernalGaze.png b/Content/Buffs/Debuffs/InfernalGaze.png similarity index 100% rename from Buffs/Debuffs/InfernalGaze.png rename to Content/Buffs/Debuffs/InfernalGaze.png diff --git a/Buffs/Debuffs/PiercingGaze.cs b/Content/Buffs/Debuffs/PiercingGaze.cs similarity index 95% rename from Buffs/Debuffs/PiercingGaze.cs rename to Content/Buffs/Debuffs/PiercingGaze.cs index 9c9d1dd..07f7711 100644 --- a/Buffs/Debuffs/PiercingGaze.cs +++ b/Content/Buffs/Debuffs/PiercingGaze.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class PiercingGaze : DecimationBuff { diff --git a/Buffs/Debuffs/PiercingGaze.png b/Content/Buffs/Debuffs/PiercingGaze.png similarity index 100% rename from Buffs/Debuffs/PiercingGaze.png rename to Content/Buffs/Debuffs/PiercingGaze.png diff --git a/Buffs/Debuffs/Singed.cs b/Content/Buffs/Debuffs/Singed.cs similarity index 96% rename from Buffs/Debuffs/Singed.cs rename to Content/Buffs/Debuffs/Singed.cs index e38232a..116cd03 100644 --- a/Buffs/Debuffs/Singed.cs +++ b/Content/Buffs/Debuffs/Singed.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class Singed : DecimationBuff { diff --git a/Buffs/Debuffs/Singed.png b/Content/Buffs/Debuffs/Singed.png similarity index 100% rename from Buffs/Debuffs/Singed.png rename to Content/Buffs/Debuffs/Singed.png diff --git a/Buffs/Debuffs/Slimed.cs b/Content/Buffs/Debuffs/Slimed.cs similarity index 96% rename from Buffs/Debuffs/Slimed.cs rename to Content/Buffs/Debuffs/Slimed.cs index f698461..a45fa9f 100644 --- a/Buffs/Debuffs/Slimed.cs +++ b/Content/Buffs/Debuffs/Slimed.cs @@ -2,7 +2,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.DataStructures; -namespace Decimation.Buffs.Debuffs +namespace Decimation.Content.Buffs.Debuffs { internal class Slimed : DecimationBuff { diff --git a/Buffs/Debuffs/Slimed.png b/Content/Buffs/Debuffs/Slimed.png similarity index 100% rename from Buffs/Debuffs/Slimed.png rename to Content/Buffs/Debuffs/Slimed.png diff --git a/Buffs/DecimationBuff.cs b/Content/Buffs/DecimationBuff.cs similarity index 96% rename from Buffs/DecimationBuff.cs rename to Content/Buffs/DecimationBuff.cs index 276d4e5..6672a7e 100644 --- a/Buffs/DecimationBuff.cs +++ b/Content/Buffs/DecimationBuff.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Terraria.ModLoader; using Terraria; -namespace Decimation.Buffs +namespace Decimation.Content.Buffs { internal abstract class DecimationBuff : ModBuff { diff --git a/Decimation.cs b/Content/Decimation.cs similarity index 94% rename from Decimation.cs rename to Content/Decimation.cs index ea116e1..602ccc8 100644 --- a/Decimation.cs +++ b/Content/Decimation.cs @@ -1,166 +1,166 @@ -using System; -using System.IO; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Decimation.NPCs.Arachnus; -using Decimation.NPCs.AncientDuneWorm; -using Decimation.UI; -using System.Collections.Generic; -using Decimation.Core.Util; -using Terraria.UI; -using Microsoft.Xna.Framework; - -namespace Decimation -{ - public class Decimation : Mod - { - public static Decimation Instance { set; get; } - - public static AmuletSlotState amuletSlotState; - private UserInterface amuletSlotInterface; - - internal UserInterface skeletonUserInterface; - - public Decimation() - { - Instance = this; - - Properties = new ModProperties() - { - Autoload = true, - AutoloadGores = true, - AutoloadSounds = true - }; - - References.mod = this; - } - - public override void Load() - { - if (!Main.dedServ) - { - amuletSlotState = new AmuletSlotState(); - amuletSlotState.Activate(); - amuletSlotInterface = new UserInterface(); - amuletSlotInterface.SetState(amuletSlotState); - - skeletonUserInterface = new UserInterface(); - } - } - - public override void UpdateUI(GameTime gameTime) - { - Player player = Main.LocalPlayer; - if (player.GetModPlayer().necrosisStoneEquipped && player.respawnTimer != 0) - player.respawnTimer -= 1; - - amuletSlotInterface?.Update(gameTime); - skeletonUserInterface?.Update(gameTime); - } - - public override void ModifyInterfaceLayers(List layers) - { - int inventoryIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Inventory")); - - if (inventoryIndex != -1) - { - layers.Insert(inventoryIndex + 1, new LegacyGameInterfaceLayer( - "Decimation: Amulet Slot", - delegate - { - if (Main.playerInventory) - amuletSlotInterface.Draw(Main.spriteBatch, new GameTime()); - return true; - }, - InterfaceScaleType.UI) - ); - - layers.Insert(inventoryIndex + 2, new LegacyGameInterfaceLayer( - "Decimation: Skeleton UI", - delegate - { - skeletonUserInterface.Draw(Main.spriteBatch, new GameTime()); - return true; - }, - InterfaceScaleType.UI) - ); - } - } - - public override void PostSetupContent() - { - Mod bossChecklist = ModLoader.GetMod("BossChecklist"); - if (bossChecklist != null) - { - bossChecklist.Call("AddBossWithInfo", "The Bloodshot Eye", 2.5f, (Func)(() => DecimationWorld.downedBloodshotEye), "INSERT LATER"); - bossChecklist.Call("AddBossWithInfo", "The Ancient Dune Worm", 5.7f, (Func)(() => DecimationWorld.downedDuneWorm), "INSERT LATER"); - bossChecklist.Call("AddBossWithInfo", "Arachnus", 20f, (Func)(() => DecimationWorld.downedArachnus), "INSERT LATER"); - } - } - - public override void AddRecipeGroups() - { - RecipeGroup gems = new RecipeGroup(() => Lang.misc[37] + " Gem", new int[] - { - ItemID.Amethyst, - ItemID.Topaz, - ItemID.Emerald, - ItemID.Sapphire, - ItemID.Ruby, - ItemID.Diamond, - }); - - RecipeGroup threads = new RecipeGroup(() => Lang.misc[37] + " Thread", new int[] - { - ItemID.BlackThread, - ItemID.GreenThread, - ItemID.PinkThread - }); - - RecipeGroup.RegisterGroup("AnyGem", gems); - RecipeGroup.RegisterGroup("AnyThread", threads); - } - - public override void HandlePacket(BinaryReader reader, int whoAmI) - { - DecimationModMessageType msgType = (DecimationModMessageType)reader.ReadByte(); - - switch (msgType) - { - case DecimationModMessageType.Arachnus: - Arachnus arachnus = (Arachnus)Main.npc[reader.ReadInt32()].modNPC; - if (arachnus != null && arachnus.npc.active) - { - arachnus.HandlePacket(reader); - } - break; - case DecimationModMessageType.DuneWorm: - AncientDuneWormHead duneWorm = (AncientDuneWormHead)Main.npc[reader.ReadInt32()].modNPC; - if (duneWorm != null && duneWorm.npc.active) - { - // TODO multiplayer - //duneWorm.HandlePacket(reader); - } - break; - case DecimationModMessageType.SpawnBoss: - int type = reader.ReadInt32(); - int player = reader.ReadInt32(); - Main.PlaySound(15, (int)Main.player[player].position.X, (int)Main.player[player].position.Y, 0); - if (Main.netMode != 1) - NPC.SpawnOnPlayer(player, type); - break; - default: - ErrorLogger.Log("DecimationMod: Unknown Message type: " + msgType); - break; - } - } - } - - enum DecimationModMessageType : byte - { - Arachnus, - DuneWorm, - SpawnBoss - } +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Decimation.Content.NPCs.Arachnus; +using Decimation.Content.NPCs.AncientDuneWorm; +using Decimation.Content.UI; +using System.Collections.Generic; +using Decimation.Lib.Util; +using Terraria.UI; +using Microsoft.Xna.Framework; + +namespace Decimation.Content +{ + public class Decimation : Mod + { + public static Decimation Instance { set; get; } + + public static AmuletSlotState amuletSlotState; + private UserInterface amuletSlotInterface; + + internal UserInterface skeletonUserInterface; + + public Decimation() + { + Instance = this; + + Properties = new ModProperties() + { + Autoload = true, + AutoloadGores = true, + AutoloadSounds = true + }; + + References.mod = this; + } + + public override void Load() + { + if (!Main.dedServ) + { + amuletSlotState = new AmuletSlotState(); + amuletSlotState.Activate(); + amuletSlotInterface = new UserInterface(); + amuletSlotInterface.SetState(amuletSlotState); + + skeletonUserInterface = new UserInterface(); + } + } + + public override void UpdateUI(GameTime gameTime) + { + Player player = Main.LocalPlayer; + if (player.GetModPlayer().necrosisStoneEquipped && player.respawnTimer != 0) + player.respawnTimer -= 1; + + amuletSlotInterface?.Update(gameTime); + skeletonUserInterface?.Update(gameTime); + } + + public override void ModifyInterfaceLayers(List layers) + { + int inventoryIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Inventory")); + + if (inventoryIndex != -1) + { + layers.Insert(inventoryIndex + 1, new LegacyGameInterfaceLayer( + "Decimation: Amulet Slot", + delegate + { + if (Main.playerInventory) + amuletSlotInterface.Draw(Main.spriteBatch, new GameTime()); + return true; + }, + InterfaceScaleType.UI) + ); + + layers.Insert(inventoryIndex + 2, new LegacyGameInterfaceLayer( + "Decimation: Skeleton UI", + delegate + { + skeletonUserInterface.Draw(Main.spriteBatch, new GameTime()); + return true; + }, + InterfaceScaleType.UI) + ); + } + } + + public override void PostSetupContent() + { + Mod bossChecklist = ModLoader.GetMod("BossChecklist"); + if (bossChecklist != null) + { + bossChecklist.Call("AddBossWithInfo", "The Bloodshot Eye", 2.5f, (Func)(() => DecimationWorld.downedBloodshotEye), "INSERT LATER"); + bossChecklist.Call("AddBossWithInfo", "The Ancient Dune Worm", 5.7f, (Func)(() => DecimationWorld.downedDuneWorm), "INSERT LATER"); + bossChecklist.Call("AddBossWithInfo", "Arachnus", 20f, (Func)(() => DecimationWorld.downedArachnus), "INSERT LATER"); + } + } + + public override void AddRecipeGroups() + { + RecipeGroup gems = new RecipeGroup(() => Lang.misc[37] + " Gem", new int[] + { + ItemID.Amethyst, + ItemID.Topaz, + ItemID.Emerald, + ItemID.Sapphire, + ItemID.Ruby, + ItemID.Diamond, + }); + + RecipeGroup threads = new RecipeGroup(() => Lang.misc[37] + " Thread", new int[] + { + ItemID.BlackThread, + ItemID.GreenThread, + ItemID.PinkThread + }); + + RecipeGroup.RegisterGroup("AnyGem", gems); + RecipeGroup.RegisterGroup("AnyThread", threads); + } + + public override void HandlePacket(BinaryReader reader, int whoAmI) + { + DecimationModMessageType msgType = (DecimationModMessageType)reader.ReadByte(); + + switch (msgType) + { + case DecimationModMessageType.Arachnus: + Arachnus arachnus = (Arachnus)Main.npc[reader.ReadInt32()].modNPC; + if (arachnus != null && arachnus.npc.active) + { + arachnus.HandlePacket(reader); + } + break; + case DecimationModMessageType.DuneWorm: + AncientDuneWormHead duneWorm = (AncientDuneWormHead)Main.npc[reader.ReadInt32()].modNPC; + if (duneWorm != null && duneWorm.npc.active) + { + // TODO multiplayer + //duneWorm.HandlePacket(reader); + } + break; + case DecimationModMessageType.SpawnBoss: + int type = reader.ReadInt32(); + int player = reader.ReadInt32(); + Main.PlaySound(15, (int)Main.player[player].position.X, (int)Main.player[player].position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(player, type); + break; + default: + ErrorLogger.Log("DecimationMod: Unknown Message type: " + msgType); + break; + } + } + } + + enum DecimationModMessageType : byte + { + Arachnus, + DuneWorm, + SpawnBoss + } } \ No newline at end of file diff --git a/DecimationPlayer.cs b/Content/DecimationPlayerImpl.cs similarity index 95% rename from DecimationPlayer.cs rename to Content/DecimationPlayerImpl.cs index 2c0b45e..800f576 100644 --- a/DecimationPlayer.cs +++ b/Content/DecimationPlayerImpl.cs @@ -1,828 +1,832 @@ -using System; -using Decimation.Buffs.Buffs; -using Decimation.Core; -using Decimation.Core.Amulets; -using Decimation.Core.Collections; -using Decimation.Core.Util; -using Decimation.Items.Amulets; -using Decimation.Items.Misc; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.ModLoader.IO; - -namespace Decimation -{ - public class DecimationPlayer : DecimationModPlayer - { - // Amulet slot - private Amulet _amuletSlotAmulet; - private Item _amuletSlotItem; - - // amulets - public int amuletsBuff; - public byte amuletsBuffChances; - public int amuletsBuffTime; - public bool amuletsBuffWhenAttacking; - public bool closeToEnchantedAnvil; - public uint combatTime; - public uint counter; - - public int dash; - public int dashDamages; - public int dashDelay; - public int dashTime; - public bool deadeyesQuiverEquipped; - public uint enchantedHeartDropTime; - public bool endlessPouchofLifeEquipped; - public bool graniteLinedTunicEquipped; - - // Effects - public bool hasCursedAccessory; - public byte hyperStars; - public byte soulFruits; - - public bool isInCombat; - public bool jestersQuiverEquiped; - public byte lastHitCounter; - public float lastJumpBoost; - public bool necrosisStoneEquipped; - public int oldStatDefense; - public byte scarabCounter; - - // Scarab Endurance buff - public byte scarabEnduranceBuffTimeCounter; - public int[] scarabs = new int[3]; - - // Scarab shield - public int solarCounter = 0; - public bool tideTurnerEquipped; - public int ttDash; - public int ttHit; - public bool vampire; - public bool wasHurt; - - // Slimy Feet buff - public bool wasJumping = false; - - public override bool HasShield { get; set; } - public override bool HasLavaCharm { get; set; } - - public Item AmuletSlotItem - { - get => _amuletSlotItem; - set - { - _amuletSlotAmulet = AmuletList.Instance.GetAmuletForItem(value); - _amuletSlotItem = value; - } - } - - public override void Initialize() - { - this.AmuletSlotItem = new Item(); - this.AmuletSlotItem.SetDefaults(0, true); - } - - public override void ResetEffects() - { - closeToEnchantedAnvil = false; - jestersQuiverEquiped = false; - deadeyesQuiverEquipped = false; - endlessPouchofLifeEquipped = false; - graniteLinedTunicEquipped = false; - necrosisStoneEquipped = false; - tideTurnerEquipped = false; - vampire = false; - - this.HasLavaCharm = false; - this.HasShield = false; - - hasCursedAccessory = false; - - this.player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount; - this.player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount; - - if (combatTime > 360) - { - combatTime = 0; - enchantedHeartDropTime = 0; - isInCombat = false; - } - - amuletsBuff = 0; - amuletsBuffChances = 0; - amuletsBuffTime = 0; - amuletsBuffWhenAttacking = false; - - if (!this.player.HasBuff(ModContent.BuffType())) lastJumpBoost = 0; - if (!this.player.HasBuff(ModContent.BuffType())) - { - scarabEnduranceBuffTimeCounter = 0; - scarabCounter = 0; - } - - dash = 0; - dashDamages = 0; - - if (counter > uint.MaxValue - uint.MaxValue % 60) - counter = 0; - } - - public override TagCompound Save() - { - Decimation.amuletSlotState.slot.item = new Item(); - - return new TagCompound - { - {"amuletSlotItem", ItemIO.Save(this.AmuletSlotItem)}, - {"hyperStars", this.hyperStars}, - {"soulFruits", soulFruits } - }; - } - - public override void Load(TagCompound tag) - { - this.AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem")); - this.hyperStars = tag.GetByte("hyperStars"); - this.soulFruits = tag.GetByte("soulFruits"); - } - - // FIND AN ALTERNATIVE! THIS METHOD DOESN'T GET CALLED WITH EVERY WEAPONS - public override bool Shoot(Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type, - ref int damage, ref float knockBack) - { - Projectile toCheck = Main.projectile[type]; - - // Jester's Quiver - if (jestersQuiverEquiped && toCheck.arrow) - type = ProjectileID.JestersArrow; - - // Endless Pouch of Life - if (endlessPouchofLifeEquipped && References.bullets.Contains(type)) - type = ProjectileID.ChlorophyteBullet; - - // Deadeye's Quiver - if (deadeyesQuiverEquipped && (toCheck.arrow || References.bullets.Contains(type))) - { - if (toCheck.arrow) - type = ProjectileID.IchorArrow; - else - type = ProjectileID.ChlorophyteBullet; - - speedX *= 1.15f; - speedY *= 1.15f; - } - - // Frost Amulet - if (this.AmuletSlotItem.type == ModContent.ItemType() && toCheck.arrow) - { - speedX *= 1.03f; - speedY *= 1.03f; - } - - _amuletSlotAmulet?.Synergy.OnShoot(this, item, ref position, ref speedX, ref speedY, ref type, ref damage, - ref knockBack); - - return base.Shoot(item, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack); - } - - public override bool ConsumeAmmo(Item weapon, Item ammo) - { - if (deadeyesQuiverEquipped && (ammo.ammo == AmmoID.Arrow || ammo.ammo == AmmoID.Bullet) && - Main.rand.Next(20) > 3) - return false; - if (endlessPouchofLifeEquipped && ammo.ammo == AmmoID.Bullet) - return false; - if (this.AmuletSlotItem.type == ModContent.ItemType() && ammo.ammo == AmmoID.Arrow && - Main.rand.NextBool(50)) - return false; - if (this.AmuletSlotItem.type == ModContent.ItemType() && weapon.thrown && - Main.rand.NextBool(50) && weapon.thrown) - return false; - - return base.ConsumeAmmo(weapon, ammo); - } - - public override void UpdateVanityAccessories() - { - Decimation.amuletSlotState.UpdateAmulet(this); - _amuletSlotAmulet?.Synergy.Update(this); - - base.UpdateVanityAccessories(); - } - - public override void UpdateEquips(ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff) - { - DashMovement(); - - base.UpdateEquips(ref wallSpeedBuff, ref tileSpeedBuff, ref tileRangeBuff); - } - - public override void FrameEffects() - { - if (vampire) - { - this.player.head = 124; - this.player.body = 85; - this.player.legs = 72; - } - } - - public override void PostUpdate() - { - oldStatDefense = this.player.statDefense; - - if (lastHitCounter >= 60) - { - lastHitCounter = 0; - wasHurt = false; - } - - if (wasHurt) - lastHitCounter++; - - if (isInCombat) - { - combatTime++; - enchantedHeartDropTime++; - } - - counter++; - - base.PostUpdate(); - } - - public override void OnHitPvp(Item item, Player target, int damage, bool crit) - { - if (target.HasBuff(ModContent.BuffType())) this.player.AddBuff(BuffID.OnFire, 300); - - if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && - this.AmuletSlotItem.type != ModContent.ItemType()) - if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) - target.AddBuff(amuletsBuff, amuletsBuffTime); - - if (this.AmuletSlotItem.type == ModContent.ItemType()) - CrystalAmuletEffect(); - } - - public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit) - { - isInCombat = true; - combatTime = 0; - - if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && - this.AmuletSlotItem.type != ModContent.ItemType()) - if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) - target.AddBuff(amuletsBuff, amuletsBuffTime); - } - - public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit) - { - if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && - (this.AmuletSlotItem.type != ModContent.ItemType() || - this.AmuletSlotItem.type == ModContent.ItemType() && proj.thrown)) - if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) - target.AddBuff(amuletsBuff, amuletsBuffTime); - } - - public override void OnHitNPCWithProj(Projectile proj, NPC target, int damage, float knockback, bool crit) - { - isInCombat = true; - combatTime = 0; - - if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && - (this.AmuletSlotItem.type != ModContent.ItemType() || - this.AmuletSlotItem.type == ModContent.ItemType() && proj.thrown)) - if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) - target.AddBuff(amuletsBuff, amuletsBuffTime); - } - - public override void OnHitByNPC(NPC npc, int damage, bool crit) - { - if (this.player.HasBuff(ModContent.BuffType()) && scarabCounter > 0 && - lastHitCounter == 0 && - !wasHurt) - { - Main.projectile[scarabs[scarabCounter - 1]].Kill(); - scarabCounter--; - wasHurt = true; - } - - if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && !amuletsBuffWhenAttacking) - if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) - npc.AddBuff(amuletsBuff, amuletsBuffTime); - - if (graniteLinedTunicEquipped) - { - this.player.statLife += (int) (damage * 0.04f); - - if (Main.rand.Next(3, 100) < 3) - npc.AddBuff(BuffID.Confused, 600); - } - - if (tideTurnerEquipped && Main.rand.NextBool(2)) this.player.statLife += damage; - - foreach (Player otherPlayer in Main.player) - if (otherPlayer.whoAmI != this.player.whoAmI) - if (otherPlayer.GetModPlayer().AmuletSlotItem.type == - ModContent.ItemType() && otherPlayer.team == this.player.team) - { - this.player.statLife += (int) (damage * 0.03f); - break; - } - - if (this.AmuletSlotItem.type == ModContent.ItemType() && Main.rand.NextBool(25)) - CrystalAmuletEffect(); - } - - public override void OnHitByProjectile(Projectile proj, int damage, bool crit) - { - if (this.player.HasBuff(ModContent.BuffType()) && scarabCounter > 0 && - lastHitCounter == 0 && - !wasHurt) - { - Main.projectile[scarabs[scarabCounter - 1]].Kill(); - scarabCounter--; - wasHurt = true; - } - - if (amuletsBuff != 0 && amuletsBuffTime != 0 && amuletsBuffChances != 0 && !amuletsBuffWhenAttacking) - { - if (proj.npcProj && Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) - Main.npc[proj.owner].AddBuff(amuletsBuff, amuletsBuffTime); - else if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) - Main.player[proj.owner].AddBuff(amuletsBuff, amuletsBuffTime); - } - - if (graniteLinedTunicEquipped) - { - this.player.statLife += (int) (damage * 0.04f); - - if (proj.npcProj && Main.rand.Next(3, 100) < 3) - Main.npc[proj.owner].AddBuff(BuffID.Confused, 600); - else if (Main.rand.Next(3, 100) < 3) - Main.player[proj.owner].AddBuff(BuffID.Confused, 600); - } - - foreach (Player otherPlayer in Main.player) - if (otherPlayer.whoAmI != this.player.whoAmI) - if (otherPlayer.GetModPlayer().AmuletSlotItem.type == - ModContent.ItemType() && otherPlayer.team == this.player.team) - { - this.player.statLife += (int) (damage * 0.03f); - break; - } - - if (this.AmuletSlotItem.type == ModContent.ItemType() && Main.rand.NextBool(25)) - CrystalAmuletEffect(); - } - - public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit) - { - _amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage); - } - - public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit) - { - _amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage); - } - - public void DashMovement() - { - if (dash == 2 && ttDash > 0) - { - if (ttHit < 0) - { - Rectangle rectangle = - new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0), - (int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8, - this.player.height + 8); - for (int i = 0; i < 200; i++) - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly) - { - NPC nPC = Main.npc[i]; - Rectangle rect = nPC.getRect(); - if (rectangle.Intersects(rect) && (nPC.noTileCollide || this.player.CanHit(nPC))) - { - float num = dashDamages * this.player.meleeDamage; - float num2 = 9f; - bool crit = false; - if (this.player.kbGlove) num2 *= 2f; - if (this.player.kbBuff) num2 *= 1.5f; - if (Main.rand.Next(100) < this.player.meleeCrit) crit = true; - int num3 = this.player.direction; - if (this.player.velocity.X < 0f) num3 = -1; - if (this.player.velocity.X > 0f) num3 = 1; - if (this.player.whoAmI == Main.myPlayer) - this.player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit); - ttDash = 10; - dashDelay = 30; - this.player.velocity.X = (0f - num3) * 9f; - this.player.velocity.Y = -4f; - this.player.immune = true; - this.player.immuneNoBlink = true; - this.player.immuneTime = 4; - ttHit = i; - } - } - } - else if ((!this.player.controlLeft || this.player.velocity.X >= 0f) && - (!this.player.controlRight || this.player.velocity.X <= 0f)) - { - this.player.velocity.X = this.player.velocity.X * 0.95f; - } - } - - if (dash == 3 && dashDelay < 0 && this.player.whoAmI == Main.myPlayer) - { - Rectangle rectangle2 = - new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0), - (int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8, - this.player.height + 8); - for (int j = 0; j < 200; j++) - if (Main.npc[j].active && !Main.npc[j].dontTakeDamage && !Main.npc[j].friendly && - Main.npc[j].immune[this.player.whoAmI] <= 0) - { - NPC nPC2 = Main.npc[j]; - Rectangle rect2 = nPC2.getRect(); - if (rectangle2.Intersects(rect2) && (nPC2.noTileCollide || this.player.CanHit(nPC2))) - { - float num4 = 150f * this.player.meleeDamage; - float num5 = 9f; - bool crit2 = false; - if (this.player.kbGlove) num5 *= 2f; - if (this.player.kbBuff) num5 *= 1.5f; - if (Main.rand.Next(100) < this.player.meleeCrit) crit2 = true; - int direction = this.player.direction; - if (this.player.velocity.X < 0f) direction = -1; - if (this.player.velocity.X > 0f) direction = 1; - if (this.player.whoAmI == Main.myPlayer) - { - this.player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2); - int num6 = Projectile.NewProjectile(this.player.Center.X, this.player.Center.Y, 0f, 0f, - 608, 150, 15f, Main.myPlayer); - Main.projectile[num6].Kill(); - } - - nPC2.immune[this.player.whoAmI] = 6; - this.player.immune = true; - this.player.immuneNoBlink = true; - this.player.immuneTime = 4; - } - } - } - - if (dashDelay > 0) - { - if (ttDash > 0) ttDash--; - if (ttDash == 0) ttHit = -1; - dashDelay--; - } - else if (dashDelay < 0) - { - float num7 = 12f; - float num8 = 0.992f; - float num9 = Math.Max(this.player.accRunSpeed, this.player.maxRunSpeed); - float num10 = 0.96f; - int num11 = 20; - if (dash == 1) - { - for (int k = 0; k < 2; k++) - { - int num12 = this.player.velocity.Y != 0f - ? Dust.NewDust( - new Vector2(this.player.position.X, - this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31, - 0f, 0f, 100, default, 1.4f) - : Dust.NewDust( - new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f), - this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f); - Dust obj = Main.dust[num12]; - obj.velocity *= 0.1f; - Main.dust[num12].scale *= 1f + Main.rand.Next(20) * 0.01f; - Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); - } - } - else if (dash == 2) - { - for (int l = 0; l < 0; l++) - { - int num13 = this.player.velocity.Y != 0f - ? Dust.NewDust( - new Vector2(this.player.position.X, - this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31, - 0f, 0f, 100, default, 1.4f) - : Dust.NewDust( - new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f), - this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f); - Dust obj2 = Main.dust[num13]; - obj2.velocity *= 0.1f; - Main.dust[num13].scale *= 1f + Main.rand.Next(20) * 0.01f; - Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); - } - - num8 = 0.985f; - num10 = 0.94f; - num11 = 30; - } - else if (dash == 3) - { - for (int m = 0; m < 4; m++) - { - int num14 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f), - this.player.width, this.player.height - 8, 6, 0f, 0f, 100, default, 1.7f); - Dust obj3 = Main.dust[num14]; - obj3.velocity *= 0.1f; - Main.dust[num14].scale *= 1f + Main.rand.Next(20) * 0.01f; - Main.dust[num14].shader = - GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player); - Main.dust[num14].noGravity = true; - if (Main.rand.Next(2) == 0) Main.dust[num14].fadeIn = 0.5f; - } - - num7 = 14f; - num8 = 0.985f; - num10 = 0.94f; - num11 = 20; - } - else if (dash == 4) - { - for (int n = 0; n < 2; n++) - { - int num15 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f), - this.player.width, this.player.height - 8, 229, 0f, 0f, 100, default, 1.2f); - Dust obj4 = Main.dust[num15]; - obj4.velocity *= 0.1f; - Main.dust[num15].scale *= 1f + Main.rand.Next(20) * 0.01f; - Main.dust[num15].shader = GameShaders.Armor.GetSecondaryShader(this.player.cWings, this.player); - Main.dust[num15].noGravity = true; - if (Main.rand.Next(2) == 0) Main.dust[num15].fadeIn = 0.3f; - } - - num8 = 0.985f; - num10 = 0.94f; - num11 = 20; - } - - if (dash > 0) - { - this.player.vortexStealthActive = false; - if (this.player.velocity.X > num7 || this.player.velocity.X < 0f - num7) - { - this.player.velocity.X = this.player.velocity.X * num8; - } - else if (this.player.velocity.X > num9 || this.player.velocity.X < 0f - num9) - { - this.player.velocity.X = this.player.velocity.X * num10; - } - else - { - dashDelay = num11; - if (this.player.velocity.X < 0f) - this.player.velocity.X = 0f - num9; - else if (this.player.velocity.X > 0f) this.player.velocity.X = num9; - } - } - } - else if (dash > 0 && !this.player.mount.Active) - { - if (dash == 1) - { - int num16 = 0; - bool flag = false; - if (dashTime > 0) dashTime--; - if (dashTime < 0) dashTime++; - if (this.player.controlRight && this.player.releaseRight) - { - if (dashTime > 0) - { - num16 = 1; - flag = true; - dashTime = 0; - } - else - { - dashTime = 15; - } - } - else if (this.player.controlLeft && this.player.releaseLeft) - { - if (dashTime < 0) - { - num16 = -1; - flag = true; - dashTime = 0; - } - else - { - dashTime = -15; - } - } - - if (flag) - { - this.player.velocity.X = 16.9f * num16; - Point point = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, - this.player.gravDir * (0f - this.player.height) / 2f + - this.player.gravDir * 2f)).ToTileCoordinates(); - Point point2 = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, 0f)) - .ToTileCoordinates(); - if (WorldGen.SolidOrSlopedTile(point.X, point.Y) || - WorldGen.SolidOrSlopedTile(point2.X, point2.Y)) - this.player.velocity.X = this.player.velocity.X / 2f; - dashDelay = -1; - for (int num17 = 0; num17 < 20; num17++) - { - int num18 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), - this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f); - Dust dust = Main.dust[num18]; - dust.position.X = dust.position.X + Main.rand.Next(-5, 6); - Dust dust2 = Main.dust[num18]; - dust2.position.Y = dust2.position.Y + Main.rand.Next(-5, 6); - Dust obj5 = Main.dust[num18]; - obj5.velocity *= 0.2f; - Main.dust[num18].scale *= 1f + Main.rand.Next(20) * 0.01f; - Main.dust[num18].shader = - GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); - } - - int num19 = Gore.NewGore( - new Vector2(this.player.position.X + this.player.width / 2 - 24f, - this.player.position.Y + this.player.height / 2 - 34f), default, - Main.rand.Next(61, 64)); - Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f; - Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f; - Gore obj6 = Main.gore[num19]; - obj6.velocity *= 0.4f; - num19 = Gore.NewGore( - new Vector2(this.player.position.X + this.player.width / 2 - 24f, - this.player.position.Y + this.player.height / 2 - 14f), default, - Main.rand.Next(61, 64)); - Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f; - Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f; - Gore obj7 = Main.gore[num19]; - obj7.velocity *= 0.4f; - } - } - else if (dash == 2) - { - int num20 = 0; - bool flag2 = false; - if (dashTime > 0) dashTime--; - if (dashTime < 0) dashTime++; - if (this.player.controlRight && this.player.releaseRight) - { - if (dashTime > 0) - { - num20 = 1; - flag2 = true; - dashTime = 0; - } - else - { - dashTime = 15; - } - } - else if (this.player.controlLeft && this.player.releaseLeft) - { - if (dashTime < 0) - { - num20 = -1; - flag2 = true; - dashTime = 0; - } - else - { - dashTime = -15; - } - } - - if (flag2) - { - this.player.velocity.X = 14.5f * num20; - Point point3 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, - this.player.gravDir * (0f - this.player.height) / 2f + - this.player.gravDir * 2f)).ToTileCoordinates(); - Point point4 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, 0f)) - .ToTileCoordinates(); - if (WorldGen.SolidOrSlopedTile(point3.X, point3.Y) || - WorldGen.SolidOrSlopedTile(point4.X, point4.Y)) - this.player.velocity.X = this.player.velocity.X / 2f; - dashDelay = -1; - ttDash = 15; - for (int num21 = 0; num21 < 0; num21++) - { - int num22 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), - this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f); - Dust dust3 = Main.dust[num22]; - dust3.position.X = dust3.position.X + Main.rand.Next(-5, 6); - Dust dust4 = Main.dust[num22]; - dust4.position.Y = dust4.position.Y + Main.rand.Next(-5, 6); - Dust obj8 = Main.dust[num22]; - obj8.velocity *= 0.2f; - Main.dust[num22].scale *= 1f + Main.rand.Next(20) * 0.01f; - Main.dust[num22].shader = - GameShaders.Armor.GetSecondaryShader(this.player.cShield, this.player); - } - } - } - else if (dash == 3) - { - int num23 = 0; - bool flag3 = false; - if (dashTime > 0) dashTime--; - if (dashTime < 0) dashTime++; - if (this.player.controlRight && this.player.releaseRight) - { - if (dashTime > 0) - { - num23 = 1; - flag3 = true; - dashTime = 0; - } - else - { - dashTime = 15; - } - } - else if (this.player.controlLeft && this.player.releaseLeft) - { - if (dashTime < 0) - { - num23 = -1; - flag3 = true; - dashTime = 0; - } - else - { - dashTime = -15; - } - } - - if (flag3) - { - this.player.velocity.X = 21.9f * num23; - Point point5 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, - this.player.gravDir * (0f - this.player.height) / 2f + - this.player.gravDir * 2f)).ToTileCoordinates(); - Point point6 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, 0f)) - .ToTileCoordinates(); - if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) || - WorldGen.SolidOrSlopedTile(point6.X, point6.Y)) - this.player.velocity.X = this.player.velocity.X / 2f; - dashDelay = -1; - for (int num24 = 0; num24 < 20; num24++) - { - int num25 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), - this.player.width, this.player.height, 6, 0f, 0f, 100, default, 2f); - Dust dust5 = Main.dust[num25]; - dust5.position.X = dust5.position.X + Main.rand.Next(-5, 6); - Dust dust6 = Main.dust[num25]; - dust6.position.Y = dust6.position.Y + Main.rand.Next(-5, 6); - Dust obj9 = Main.dust[num25]; - obj9.velocity *= 0.2f; - Main.dust[num25].scale *= 1f + Main.rand.Next(20) * 0.01f; - Main.dust[num25].shader = - GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player); - Main.dust[num25].noGravity = true; - Main.dust[num25].fadeIn = 0.5f; - } - } - } - } - } - - private void CrystalAmuletEffect() - { - int shardNumber = Main.rand.Next(5, 11); - float angleDifference = (float) (Math.PI * 2) / shardNumber; - float speed = 5f; - float currentAngle = 0; - - for (int i = 0; i < shardNumber; i++) - { - float speedX = (float) Math.Cos(currentAngle) * speed; - float speedY = (float) Math.Sin(currentAngle) * speed; - - Projectile.NewProjectile(this.player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20, - 5, this.player.whoAmI); - - currentAngle += angleDifference; - } - } - } - - public class PlayerPropertiesUpdater : GlobalItem - { - public override void UpdateAccessory(Item item, Player player, bool hideVisual) - { - DecimationPlayer modPlayer = player.GetModPlayer(); - if (item.type == ItemID.CobaltShield || item.type == ItemID.AnkhShield || - item.type == ItemID.PaladinsShield || item.type == ItemID.ObsidianShield) modPlayer.HasShield = true; - if (item.type == ItemID.LavaCharm) modPlayer.HasLavaCharm = true; - } - } +using System; +using Decimation.Content.Buffs.Buffs; +using Decimation.Lib; +using Decimation.Lib.Amulets; +using Decimation.Lib.Collections; +using Decimation.Lib.Util; +using Decimation.Content.Items.Amulets; +using Decimation.Content.Items.Misc; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ModLoader.IO; + +namespace Decimation.Content +{ + public class DecimationPlayer : DecimationModPlayer + { + // Amulet slot + private Amulet _amuletSlotAmulet; + private Item _amuletSlotItem; + + // amulets + public int amuletsBuff; + public byte amuletsBuffChances; + public int amuletsBuffTime; + public bool amuletsBuffWhenAttacking; + public bool closeToEnchantedAnvil; + public uint combatTime; + public uint counter; + + public int dash; + public int dashDamages; + public int dashDelay; + public int dashTime; + public bool deadeyesQuiverEquipped; + public uint enchantedHeartDropTime; + public bool endlessPouchofLifeEquipped; + public bool graniteLinedTunicEquipped; + + // Effects + public bool hasCursedAccessory; + public byte hyperStars; + public byte soulFruits; + + public bool isInCombat; + public bool jestersQuiverEquiped; + public byte lastHitCounter; + public float lastJumpBoost; + public bool necrosisStoneEquipped; + public int oldStatDefense; + public byte scarabCounter; + + // Scarab Endurance buff + public byte scarabEnduranceBuffTimeCounter; + public int[] scarabs = new int[3]; + + // Scarab shield + public int solarCounter = 0; + public bool tideTurnerEquipped; + public int ttDash; + public int ttHit; + public bool vampire; + public bool wasHurt; + + // Slimy Feet buff + public bool wasJumping = false; + + public override bool HasShield { get; set; } + public override bool HasLavaCharm { get; set; } + + public Item AmuletSlotItem + { + get => _amuletSlotItem; + set + { + _amuletSlotAmulet = AmuletList.Instance.GetAmuletForItem(value); + _amuletSlotItem = value; + } + } + + public override void Initialize() + { + this.AmuletSlotItem = new Item(); + this.AmuletSlotItem.SetDefaults(0, true); + } + + public override void ResetEffects() + { + closeToEnchantedAnvil = false; + jestersQuiverEquiped = false; + deadeyesQuiverEquipped = false; + endlessPouchofLifeEquipped = false; + graniteLinedTunicEquipped = false; + necrosisStoneEquipped = false; + tideTurnerEquipped = false; + vampire = false; + + this.HasLavaCharm = false; + this.HasShield = false; + + hasCursedAccessory = false; + + this.player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount; + this.player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount; + + if (combatTime > 360) + { + combatTime = 0; + enchantedHeartDropTime = 0; + isInCombat = false; + } + + amuletsBuff = 0; + amuletsBuffChances = 0; + amuletsBuffTime = 0; + amuletsBuffWhenAttacking = false; + + if (!this.player.HasBuff(ModContent.BuffType())) lastJumpBoost = 0; + if (!this.player.HasBuff(ModContent.BuffType())) + { + scarabEnduranceBuffTimeCounter = 0; + scarabCounter = 0; + } + + dash = 0; + dashDamages = 0; + + if (counter > uint.MaxValue - uint.MaxValue % 60) + counter = 0; + } + + public override TagCompound Save() + { + Decimation.amuletSlotState.slot.item = new Item(); + + return new TagCompound + { + {"amuletSlotItem", ItemIO.Save(this.AmuletSlotItem)}, + {"hyperStars", this.hyperStars}, + {"soulFruits", soulFruits} + }; + } + + public override void Load(TagCompound tag) + { + this.AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem")); + this.hyperStars = tag.GetByte("hyperStars"); + this.soulFruits = tag.GetByte("soulFruits"); + } + + // FIND AN ALTERNATIVE! THIS METHOD DOESN'T GET CALLED WITH EVERY WEAPONS + public override bool Shoot(Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type, + ref int damage, ref float knockBack) + { + Projectile toCheck = Main.projectile[type]; + + // Jester's Quiver + if (jestersQuiverEquiped && toCheck.arrow) + type = ProjectileID.JestersArrow; + + // Endless Pouch of Life + if (endlessPouchofLifeEquipped && References.bullets.Contains(type)) + type = ProjectileID.ChlorophyteBullet; + + // Deadeye's Quiver + if (deadeyesQuiverEquipped && (toCheck.arrow || References.bullets.Contains(type))) + { + if (toCheck.arrow) + type = ProjectileID.IchorArrow; + else + type = ProjectileID.ChlorophyteBullet; + + speedX *= 1.15f; + speedY *= 1.15f; + } + + // Frost Amulet + if (this.AmuletSlotItem.type == ModContent.ItemType() && toCheck.arrow) + { + speedX *= 1.03f; + speedY *= 1.03f; + } + + _amuletSlotAmulet?.Synergy.OnShoot(this, item, ref position, ref speedX, ref speedY, ref type, ref damage, + ref knockBack); + + return base.Shoot(item, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack); + } + + public override bool ConsumeAmmo(Item weapon, Item ammo) + { + if (deadeyesQuiverEquipped && (ammo.ammo == AmmoID.Arrow || ammo.ammo == AmmoID.Bullet) && + Main.rand.Next(20) > 3) + return false; + if (endlessPouchofLifeEquipped && ammo.ammo == AmmoID.Bullet) + return false; + if (this.AmuletSlotItem.type == ModContent.ItemType() && ammo.ammo == AmmoID.Arrow && + Main.rand.NextBool(50)) + return false; + if (this.AmuletSlotItem.type == ModContent.ItemType() && weapon.thrown && + Main.rand.NextBool(50) && weapon.thrown) + return false; + + return base.ConsumeAmmo(weapon, ammo); + } + + public override void UpdateVanityAccessories() + { + Decimation.amuletSlotState.UpdateAmulet(this); + _amuletSlotAmulet?.Synergy.Update(this); + + base.UpdateVanityAccessories(); + } + + public override void UpdateEquips(ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff) + { + DashMovement(); + + base.UpdateEquips(ref wallSpeedBuff, ref tileSpeedBuff, ref tileRangeBuff); + } + + public override void FrameEffects() + { + if (vampire) + { + this.player.head = 124; + this.player.body = 85; + this.player.legs = 72; + } + } + + public override void PostUpdate() + { + oldStatDefense = this.player.statDefense; + + if (lastHitCounter >= 60) + { + lastHitCounter = 0; + wasHurt = false; + } + + if (wasHurt) + lastHitCounter++; + + if (isInCombat) + { + combatTime++; + enchantedHeartDropTime++; + } + + counter++; + + base.PostUpdate(); + } + + public override void OnHitPvp(Item item, Player target, int damage, bool crit) + { + if (target.HasBuff(ModContent.BuffType())) this.player.AddBuff(BuffID.OnFire, 300); + + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && + this.AmuletSlotItem.type != ModContent.ItemType()) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + target.AddBuff(amuletsBuff, amuletsBuffTime); + + if (this.AmuletSlotItem.type == ModContent.ItemType()) + CrystalAmuletEffect(); + } + + public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit) + { + isInCombat = true; + combatTime = 0; + + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && + this.AmuletSlotItem.type != ModContent.ItemType()) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + target.AddBuff(amuletsBuff, amuletsBuffTime); + } + + public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit) + { + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && + (this.AmuletSlotItem.type != ModContent.ItemType() || + this.AmuletSlotItem.type == ModContent.ItemType() && proj.thrown)) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + target.AddBuff(amuletsBuff, amuletsBuffTime); + } + + public override void OnHitNPCWithProj(Projectile proj, NPC target, int damage, float knockback, bool crit) + { + isInCombat = true; + combatTime = 0; + + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && + (this.AmuletSlotItem.type != ModContent.ItemType() || + this.AmuletSlotItem.type == ModContent.ItemType() && proj.thrown)) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + target.AddBuff(amuletsBuff, amuletsBuffTime); + } + + public override void OnHitByNPC(NPC npc, int damage, bool crit) + { + if (this.player.HasBuff(ModContent.BuffType()) && scarabCounter > 0 && + lastHitCounter == 0 && + !wasHurt) + { + Main.projectile[scarabs[scarabCounter - 1]].Kill(); + scarabCounter--; + wasHurt = true; + } + + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && !amuletsBuffWhenAttacking) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + npc.AddBuff(amuletsBuff, amuletsBuffTime); + + if (graniteLinedTunicEquipped) + { + this.player.statLife += (int) (damage * 0.04f); + + if (Main.rand.Next(3, 100) < 3) + npc.AddBuff(BuffID.Confused, 600); + } + + if (tideTurnerEquipped && Main.rand.NextBool(2)) + { + Main.NewText("Tide Turner"); + this.player.statLife += damage; + } + + foreach (Player otherPlayer in Main.player) + if (otherPlayer.whoAmI != this.player.whoAmI) + if (otherPlayer.GetModPlayer().AmuletSlotItem.type == + ModContent.ItemType() && otherPlayer.team == this.player.team) + { + this.player.statLife += (int) (damage * 0.03f); + break; + } + + if (this.AmuletSlotItem.type == ModContent.ItemType() && Main.rand.NextBool(25)) + CrystalAmuletEffect(); + } + + public override void OnHitByProjectile(Projectile proj, int damage, bool crit) + { + if (this.player.HasBuff(ModContent.BuffType()) && scarabCounter > 0 && + lastHitCounter == 0 && + !wasHurt) + { + Main.projectile[scarabs[scarabCounter - 1]].Kill(); + scarabCounter--; + wasHurt = true; + } + + if (amuletsBuff != 0 && amuletsBuffTime != 0 && amuletsBuffChances != 0 && !amuletsBuffWhenAttacking) + { + if (proj.npcProj && Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + Main.npc[proj.owner].AddBuff(amuletsBuff, amuletsBuffTime); + else if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + Main.player[proj.owner].AddBuff(amuletsBuff, amuletsBuffTime); + } + + if (graniteLinedTunicEquipped) + { + this.player.statLife += (int) (damage * 0.04f); + + if (proj.npcProj && Main.rand.Next(3, 100) < 3) + Main.npc[proj.owner].AddBuff(BuffID.Confused, 600); + else if (Main.rand.Next(3, 100) < 3) + Main.player[proj.owner].AddBuff(BuffID.Confused, 600); + } + + foreach (Player otherPlayer in Main.player) + if (otherPlayer.whoAmI != this.player.whoAmI) + if (otherPlayer.GetModPlayer().AmuletSlotItem.type == + ModContent.ItemType() && otherPlayer.team == this.player.team) + { + this.player.statLife += (int) (damage * 0.03f); + break; + } + + if (this.AmuletSlotItem.type == ModContent.ItemType() && Main.rand.NextBool(25)) + CrystalAmuletEffect(); + } + + public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit) + { + _amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage); + } + + public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit) + { + _amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage); + } + + public void DashMovement() + { + if (dash == 2 && ttDash > 0) + { + if (ttHit < 0) + { + Rectangle rectangle = + new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0), + (int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8, + this.player.height + 8); + for (int i = 0; i < 200; i++) + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly) + { + NPC nPC = Main.npc[i]; + Rectangle rect = nPC.getRect(); + if (rectangle.Intersects(rect) && (nPC.noTileCollide || this.player.CanHit(nPC))) + { + float num = dashDamages * this.player.meleeDamage; + float num2 = 9f; + bool crit = false; + if (this.player.kbGlove) num2 *= 2f; + if (this.player.kbBuff) num2 *= 1.5f; + if (Main.rand.Next(100) < this.player.meleeCrit) crit = true; + int num3 = this.player.direction; + if (this.player.velocity.X < 0f) num3 = -1; + if (this.player.velocity.X > 0f) num3 = 1; + if (this.player.whoAmI == Main.myPlayer) + this.player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit); + ttDash = 10; + dashDelay = 30; + this.player.velocity.X = (0f - num3) * 9f; + this.player.velocity.Y = -4f; + this.player.immune = true; + this.player.immuneNoBlink = true; + this.player.immuneTime = 4; + ttHit = i; + } + } + } + else if ((!this.player.controlLeft || this.player.velocity.X >= 0f) && + (!this.player.controlRight || this.player.velocity.X <= 0f)) + { + this.player.velocity.X = this.player.velocity.X * 0.95f; + } + } + + if (dash == 3 && dashDelay < 0 && this.player.whoAmI == Main.myPlayer) + { + Rectangle rectangle2 = + new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0), + (int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8, + this.player.height + 8); + for (int j = 0; j < 200; j++) + if (Main.npc[j].active && !Main.npc[j].dontTakeDamage && !Main.npc[j].friendly && + Main.npc[j].immune[this.player.whoAmI] <= 0) + { + NPC nPC2 = Main.npc[j]; + Rectangle rect2 = nPC2.getRect(); + if (rectangle2.Intersects(rect2) && (nPC2.noTileCollide || this.player.CanHit(nPC2))) + { + float num4 = 150f * this.player.meleeDamage; + float num5 = 9f; + bool crit2 = false; + if (this.player.kbGlove) num5 *= 2f; + if (this.player.kbBuff) num5 *= 1.5f; + if (Main.rand.Next(100) < this.player.meleeCrit) crit2 = true; + int direction = this.player.direction; + if (this.player.velocity.X < 0f) direction = -1; + if (this.player.velocity.X > 0f) direction = 1; + if (this.player.whoAmI == Main.myPlayer) + { + this.player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2); + int num6 = Projectile.NewProjectile(this.player.Center.X, this.player.Center.Y, 0f, 0f, + 608, 150, 15f, Main.myPlayer); + Main.projectile[num6].Kill(); + } + + nPC2.immune[this.player.whoAmI] = 6; + this.player.immune = true; + this.player.immuneNoBlink = true; + this.player.immuneTime = 4; + } + } + } + + if (dashDelay > 0) + { + if (ttDash > 0) ttDash--; + if (ttDash == 0) ttHit = -1; + dashDelay--; + } + else if (dashDelay < 0) + { + float num7 = 12f; + float num8 = 0.992f; + float num9 = Math.Max(this.player.accRunSpeed, this.player.maxRunSpeed); + float num10 = 0.96f; + int num11 = 20; + if (dash == 1) + { + for (int k = 0; k < 2; k++) + { + int num12 = this.player.velocity.Y != 0f + ? Dust.NewDust( + new Vector2(this.player.position.X, + this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31, + 0f, 0f, 100, default, 1.4f) + : Dust.NewDust( + new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f), + this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f); + Dust obj = Main.dust[num12]; + obj.velocity *= 0.1f; + Main.dust[num12].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); + } + } + else if (dash == 2) + { + for (int l = 0; l < 0; l++) + { + int num13 = this.player.velocity.Y != 0f + ? Dust.NewDust( + new Vector2(this.player.position.X, + this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31, + 0f, 0f, 100, default, 1.4f) + : Dust.NewDust( + new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f), + this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f); + Dust obj2 = Main.dust[num13]; + obj2.velocity *= 0.1f; + Main.dust[num13].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); + } + + num8 = 0.985f; + num10 = 0.94f; + num11 = 30; + } + else if (dash == 3) + { + for (int m = 0; m < 4; m++) + { + int num14 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f), + this.player.width, this.player.height - 8, 6, 0f, 0f, 100, default, 1.7f); + Dust obj3 = Main.dust[num14]; + obj3.velocity *= 0.1f; + Main.dust[num14].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num14].shader = + GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player); + Main.dust[num14].noGravity = true; + if (Main.rand.Next(2) == 0) Main.dust[num14].fadeIn = 0.5f; + } + + num7 = 14f; + num8 = 0.985f; + num10 = 0.94f; + num11 = 20; + } + else if (dash == 4) + { + for (int n = 0; n < 2; n++) + { + int num15 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f), + this.player.width, this.player.height - 8, 229, 0f, 0f, 100, default, 1.2f); + Dust obj4 = Main.dust[num15]; + obj4.velocity *= 0.1f; + Main.dust[num15].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num15].shader = GameShaders.Armor.GetSecondaryShader(this.player.cWings, this.player); + Main.dust[num15].noGravity = true; + if (Main.rand.Next(2) == 0) Main.dust[num15].fadeIn = 0.3f; + } + + num8 = 0.985f; + num10 = 0.94f; + num11 = 20; + } + + if (dash > 0) + { + this.player.vortexStealthActive = false; + if (this.player.velocity.X > num7 || this.player.velocity.X < 0f - num7) + { + this.player.velocity.X = this.player.velocity.X * num8; + } + else if (this.player.velocity.X > num9 || this.player.velocity.X < 0f - num9) + { + this.player.velocity.X = this.player.velocity.X * num10; + } + else + { + dashDelay = num11; + if (this.player.velocity.X < 0f) + this.player.velocity.X = 0f - num9; + else if (this.player.velocity.X > 0f) this.player.velocity.X = num9; + } + } + } + else if (dash > 0 && !this.player.mount.Active) + { + if (dash == 1) + { + int num16 = 0; + bool flag = false; + if (dashTime > 0) dashTime--; + if (dashTime < 0) dashTime++; + if (this.player.controlRight && this.player.releaseRight) + { + if (dashTime > 0) + { + num16 = 1; + flag = true; + dashTime = 0; + } + else + { + dashTime = 15; + } + } + else if (this.player.controlLeft && this.player.releaseLeft) + { + if (dashTime < 0) + { + num16 = -1; + flag = true; + dashTime = 0; + } + else + { + dashTime = -15; + } + } + + if (flag) + { + this.player.velocity.X = 16.9f * num16; + Point point = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, + this.player.gravDir * (0f - this.player.height) / 2f + + this.player.gravDir * 2f)).ToTileCoordinates(); + Point point2 = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, 0f)) + .ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(point.X, point.Y) || + WorldGen.SolidOrSlopedTile(point2.X, point2.Y)) + this.player.velocity.X = this.player.velocity.X / 2f; + dashDelay = -1; + for (int num17 = 0; num17 < 20; num17++) + { + int num18 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), + this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f); + Dust dust = Main.dust[num18]; + dust.position.X = dust.position.X + Main.rand.Next(-5, 6); + Dust dust2 = Main.dust[num18]; + dust2.position.Y = dust2.position.Y + Main.rand.Next(-5, 6); + Dust obj5 = Main.dust[num18]; + obj5.velocity *= 0.2f; + Main.dust[num18].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num18].shader = + GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); + } + + int num19 = Gore.NewGore( + new Vector2(this.player.position.X + this.player.width / 2 - 24f, + this.player.position.Y + this.player.height / 2 - 34f), default, + Main.rand.Next(61, 64)); + Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f; + Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f; + Gore obj6 = Main.gore[num19]; + obj6.velocity *= 0.4f; + num19 = Gore.NewGore( + new Vector2(this.player.position.X + this.player.width / 2 - 24f, + this.player.position.Y + this.player.height / 2 - 14f), default, + Main.rand.Next(61, 64)); + Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f; + Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f; + Gore obj7 = Main.gore[num19]; + obj7.velocity *= 0.4f; + } + } + else if (dash == 2) + { + int num20 = 0; + bool flag2 = false; + if (dashTime > 0) dashTime--; + if (dashTime < 0) dashTime++; + if (this.player.controlRight && this.player.releaseRight) + { + if (dashTime > 0) + { + num20 = 1; + flag2 = true; + dashTime = 0; + } + else + { + dashTime = 15; + } + } + else if (this.player.controlLeft && this.player.releaseLeft) + { + if (dashTime < 0) + { + num20 = -1; + flag2 = true; + dashTime = 0; + } + else + { + dashTime = -15; + } + } + + if (flag2) + { + this.player.velocity.X = 14.5f * num20; + Point point3 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, + this.player.gravDir * (0f - this.player.height) / 2f + + this.player.gravDir * 2f)).ToTileCoordinates(); + Point point4 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, 0f)) + .ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(point3.X, point3.Y) || + WorldGen.SolidOrSlopedTile(point4.X, point4.Y)) + this.player.velocity.X = this.player.velocity.X / 2f; + dashDelay = -1; + ttDash = 15; + for (int num21 = 0; num21 < 0; num21++) + { + int num22 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), + this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f); + Dust dust3 = Main.dust[num22]; + dust3.position.X = dust3.position.X + Main.rand.Next(-5, 6); + Dust dust4 = Main.dust[num22]; + dust4.position.Y = dust4.position.Y + Main.rand.Next(-5, 6); + Dust obj8 = Main.dust[num22]; + obj8.velocity *= 0.2f; + Main.dust[num22].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num22].shader = + GameShaders.Armor.GetSecondaryShader(this.player.cShield, this.player); + } + } + } + else if (dash == 3) + { + int num23 = 0; + bool flag3 = false; + if (dashTime > 0) dashTime--; + if (dashTime < 0) dashTime++; + if (this.player.controlRight && this.player.releaseRight) + { + if (dashTime > 0) + { + num23 = 1; + flag3 = true; + dashTime = 0; + } + else + { + dashTime = 15; + } + } + else if (this.player.controlLeft && this.player.releaseLeft) + { + if (dashTime < 0) + { + num23 = -1; + flag3 = true; + dashTime = 0; + } + else + { + dashTime = -15; + } + } + + if (flag3) + { + this.player.velocity.X = 21.9f * num23; + Point point5 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, + this.player.gravDir * (0f - this.player.height) / 2f + + this.player.gravDir * 2f)).ToTileCoordinates(); + Point point6 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, 0f)) + .ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) || + WorldGen.SolidOrSlopedTile(point6.X, point6.Y)) + this.player.velocity.X = this.player.velocity.X / 2f; + dashDelay = -1; + for (int num24 = 0; num24 < 20; num24++) + { + int num25 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), + this.player.width, this.player.height, 6, 0f, 0f, 100, default, 2f); + Dust dust5 = Main.dust[num25]; + dust5.position.X = dust5.position.X + Main.rand.Next(-5, 6); + Dust dust6 = Main.dust[num25]; + dust6.position.Y = dust6.position.Y + Main.rand.Next(-5, 6); + Dust obj9 = Main.dust[num25]; + obj9.velocity *= 0.2f; + Main.dust[num25].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num25].shader = + GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player); + Main.dust[num25].noGravity = true; + Main.dust[num25].fadeIn = 0.5f; + } + } + } + } + } + + private void CrystalAmuletEffect() + { + int shardNumber = Main.rand.Next(5, 11); + float angleDifference = (float) (Math.PI * 2) / shardNumber; + float speed = 5f; + float currentAngle = 0; + + for (int i = 0; i < shardNumber; i++) + { + float speedX = (float) Math.Cos(currentAngle) * speed; + float speedY = (float) Math.Sin(currentAngle) * speed; + + Projectile.NewProjectile(this.player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20, + 5, this.player.whoAmI); + + currentAngle += angleDifference; + } + } + } + + public class PlayerPropertiesUpdater : GlobalItem + { + public override void UpdateAccessory(Item item, Player player, bool hideVisual) + { + DecimationPlayer modPlayer = player.GetModPlayer(); + if (item.type == ItemID.CobaltShield || item.type == ItemID.AnkhShield || + item.type == ItemID.PaladinsShield || item.type == ItemID.ObsidianShield) modPlayer.HasShield = true; + if (item.type == ItemID.LavaCharm) modPlayer.HasLavaCharm = true; + } + } } \ No newline at end of file diff --git a/DecimationWorld.cs b/Content/DecimationWorld.cs similarity index 96% rename from DecimationWorld.cs rename to Content/DecimationWorld.cs index cfc5092..adb5ac1 100644 --- a/DecimationWorld.cs +++ b/Content/DecimationWorld.cs @@ -1,100 +1,100 @@ -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 Decimation.Structures; -using Microsoft.Xna.Framework; -using System; -using Terraria.ID; - -namespace Decimation -{ - public class DecimationWorld : ModWorld - { - public static bool downedBloodshotEye; - public static bool downedDuneWorm; - public static bool downedArachnus; - public static bool downedWyvern; - - public override void Initialize() - { - downedBloodshotEye = false; - downedDuneWorm = false; - downedArachnus = false; - downedWyvern = false; - } - - public override TagCompound Save() - { - var downed = new List(); - if (downedBloodshotEye) downed.Add("downedBloodshotEye"); - if (downedDuneWorm) downed.Add("downedDuneWorm"); - if (downedArachnus) downed.Add("downedArachnus"); - if (downedWyvern) downed.Add("downedWyvern"); - return new TagCompound { - {"downed", downed}, - }; - } - public override void Load(TagCompound tag) - { - var downed = tag.GetList("downed"); - downedBloodshotEye = downed.Contains("downedBloodshotEye"); - downedDuneWorm = downed.Contains("downedDuneWorm"); - downedArachnus = downed.Contains("downedArachnus"); - downedWyvern = downed.Contains("downedWyvern"); - } - public override void NetSend(BinaryWriter writer) - { - BitsByte flags = new BitsByte(); - flags[0] = downedBloodshotEye; //+1 flag number for each new boss - flags[1] = downedDuneWorm; - flags[2] = downedArachnus; - flags[3] = downedWyvern; - writer.Write(flags); - } - public override void NetReceive(BinaryReader reader) - { - BitsByte flags = reader.ReadByte(); - downedBloodshotEye = flags[0]; - downedDuneWorm = flags[1]; - downedArachnus = flags[2]; - downedWyvern = flags[3]; - } - public override void LoadLegacy(BinaryReader reader) - { - int loadVersion = reader.ReadInt32(); - if (loadVersion == 1) - { - byte flags = reader.ReadByte(); - DecimationWorld.downedBloodshotEye = ((flags & 1) != 0); - DecimationWorld.downedDuneWorm = ((flags & 2) != 0); //double flag numbers with each new boss - DecimationWorld.downedArachnus = ((flags & 4) != 0); - DecimationWorld.downedWyvern = ((flags & 8) != 0); - } - else if (loadVersion == 2) - { - byte flags = reader.ReadByte(); - byte flags2 = reader.ReadByte(); - DecimationWorld.downedBloodshotEye = ((flags & 1) != 0); - DecimationWorld.downedDuneWorm = ((flags & 2) != 0); - DecimationWorld.downedArachnus = ((flags & 4) != 0); - DecimationWorld.downedWyvern = ((flags & 8) != 0); - } - } - - // For custom biome - public override void ModifyWorldGenTasks(List tasks, ref float totalWeight) - { - ShrineoftheMoltenOne biome = new ShrineoftheMoltenOne(); - - int genIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes")); - tasks.Insert(genIndex + 1, new PassLegacy("[Decimation] The Shrine of the Molten One", delegate (GenerationProgress progress) - { - biome.Generate(); - })); - } - } -} +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 Decimation.Content.Structures; +using Microsoft.Xna.Framework; +using System; +using Terraria.ID; + +namespace Decimation.Content +{ + public class DecimationWorld : ModWorld + { + public static bool downedBloodshotEye; + public static bool downedDuneWorm; + public static bool downedArachnus; + public static bool downedWyvern; + + public override void Initialize() + { + downedBloodshotEye = false; + downedDuneWorm = false; + downedArachnus = false; + downedWyvern = false; + } + + public override TagCompound Save() + { + var downed = new List(); + if (downedBloodshotEye) downed.Add("downedBloodshotEye"); + if (downedDuneWorm) downed.Add("downedDuneWorm"); + if (downedArachnus) downed.Add("downedArachnus"); + if (downedWyvern) downed.Add("downedWyvern"); + return new TagCompound { + {"downed", downed}, + }; + } + public override void Load(TagCompound tag) + { + var downed = tag.GetList("downed"); + downedBloodshotEye = downed.Contains("downedBloodshotEye"); + downedDuneWorm = downed.Contains("downedDuneWorm"); + downedArachnus = downed.Contains("downedArachnus"); + downedWyvern = downed.Contains("downedWyvern"); + } + public override void NetSend(BinaryWriter writer) + { + BitsByte flags = new BitsByte(); + flags[0] = downedBloodshotEye; //+1 flag number for each new boss + flags[1] = downedDuneWorm; + flags[2] = downedArachnus; + flags[3] = downedWyvern; + writer.Write(flags); + } + public override void NetReceive(BinaryReader reader) + { + BitsByte flags = reader.ReadByte(); + downedBloodshotEye = flags[0]; + downedDuneWorm = flags[1]; + downedArachnus = flags[2]; + downedWyvern = flags[3]; + } + public override void LoadLegacy(BinaryReader reader) + { + int loadVersion = reader.ReadInt32(); + if (loadVersion == 1) + { + byte flags = reader.ReadByte(); + DecimationWorld.downedBloodshotEye = ((flags & 1) != 0); + DecimationWorld.downedDuneWorm = ((flags & 2) != 0); //double flag numbers with each new boss + DecimationWorld.downedArachnus = ((flags & 4) != 0); + DecimationWorld.downedWyvern = ((flags & 8) != 0); + } + else if (loadVersion == 2) + { + byte flags = reader.ReadByte(); + byte flags2 = reader.ReadByte(); + DecimationWorld.downedBloodshotEye = ((flags & 1) != 0); + DecimationWorld.downedDuneWorm = ((flags & 2) != 0); + DecimationWorld.downedArachnus = ((flags & 4) != 0); + DecimationWorld.downedWyvern = ((flags & 8) != 0); + } + } + + // For custom biome + public override void ModifyWorldGenTasks(List tasks, ref float totalWeight) + { + ShrineoftheMoltenOne biome = new ShrineoftheMoltenOne(); + + int genIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes")); + tasks.Insert(genIndex + 1, new PassLegacy("[Decimation] The Shrine of the Molten One", delegate (GenerationProgress progress) + { + biome.Generate(); + })); + } + } +} diff --git a/Dusts/Blood.cs b/Content/Dusts/Blood.cs similarity index 87% rename from Dusts/Blood.cs rename to Content/Dusts/Blood.cs index 2dd96de..75d7e7d 100644 --- a/Dusts/Blood.cs +++ b/Content/Dusts/Blood.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; -namespace Decimation.Dusts +namespace Decimation.Content.Dusts { class Blood : ModDust { diff --git a/Dusts/Blood.png b/Content/Dusts/Blood.png similarity index 100% rename from Dusts/Blood.png rename to Content/Dusts/Blood.png diff --git a/Items/Accessories/AlucardPendant.cs b/Content/Items/Accessories/AlucardPendant.cs similarity index 84% rename from Items/Accessories/AlucardPendant.cs rename to Content/Items/Accessories/AlucardPendant.cs index 2968a85..445443a 100644 --- a/Items/Accessories/AlucardPendant.cs +++ b/Content/Items/Accessories/AlucardPendant.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; -using Decimation.Buffs.Buffs; -using Decimation.Items.Misc.Souls; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Buffs.Buffs; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class AlucardPendant : DecimationAccessory { @@ -20,9 +20,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 46; - height = 62; - rarity = Rarity.LightPurple; + item.width = 46; + item.height = 62; + item.rare = Rarity.LightPurple.GetRarityValue(); this.item.value = Item.buyPrice(0, 4); } diff --git a/Items/Accessories/AlucardPendant.png b/Content/Items/Accessories/AlucardPendant.png similarity index 100% rename from Items/Accessories/AlucardPendant.png rename to Content/Items/Accessories/AlucardPendant.png diff --git a/Items/Accessories/CelestialTransmogrifier.cs b/Content/Items/Accessories/CelestialTransmogrifier.cs similarity index 88% rename from Items/Accessories/CelestialTransmogrifier.cs rename to Content/Items/Accessories/CelestialTransmogrifier.cs index 29c5a70..8d511cb 100644 --- a/Items/Accessories/CelestialTransmogrifier.cs +++ b/Content/Items/Accessories/CelestialTransmogrifier.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; -using Decimation.Buffs.Buffs; -using Decimation.Items.Misc.Souls; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Buffs.Buffs; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class CelestialTransmogrifier : DecimationAccessory { @@ -22,9 +22,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 46; - height = 62; - rarity = Rarity.LightPurple; + item.width = 46; + item.height = 62; + item.rare = Rarity.LightPurple.GetRarityValue(); this.item.value = Item.buyPrice(0, 4); } diff --git a/Items/Accessories/CelestialTransmogrifier.png b/Content/Items/Accessories/CelestialTransmogrifier.png similarity index 100% rename from Items/Accessories/CelestialTransmogrifier.png rename to Content/Items/Accessories/CelestialTransmogrifier.png diff --git a/Items/Accessories/CrystalSkull.cs b/Content/Items/Accessories/CrystalSkull.cs similarity index 83% rename from Items/Accessories/CrystalSkull.cs rename to Content/Items/Accessories/CrystalSkull.cs index e2da738..d494d20 100644 --- a/Items/Accessories/CrystalSkull.cs +++ b/Content/Items/Accessories/CrystalSkull.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class CrystalSkull : DecimationAccessory { @@ -15,9 +15,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 24; - height = 24; - rarity = Rarity.Green; + item.width = 24; + item.height = 24; + item.rare = Rarity.Green.GetRarityValue(); this.item.value = Item.buyPrice(0, 0, 0, 10); this.item.defense = 2; } @@ -39,5 +39,7 @@ namespace Decimation.Items.Accessories player.AddBuff(BuffID.Thorns, 1); Lighting.AddLight(player.Center, new Vector3(0.9f * 0.6f, 0.9f * 0.1f, 0.9f)); } + + } } \ No newline at end of file diff --git a/Items/Accessories/CrystalSkull.png b/Content/Items/Accessories/CrystalSkull.png similarity index 100% rename from Items/Accessories/CrystalSkull.png rename to Content/Items/Accessories/CrystalSkull.png diff --git a/Items/Accessories/DeadeyesQuiver.cs b/Content/Items/Accessories/DeadeyesQuiver.cs similarity index 84% rename from Items/Accessories/DeadeyesQuiver.cs rename to Content/Items/Accessories/DeadeyesQuiver.cs index 9ee79cb..6ce8392 100644 --- a/Items/Accessories/DeadeyesQuiver.cs +++ b/Content/Items/Accessories/DeadeyesQuiver.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; -using Decimation.Items.Misc; -using Decimation.Items.Misc.Souls; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Misc; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class DeadeyesQuiver : DecimationAccessory { @@ -19,9 +19,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 30; - height = 30; - rarity = Rarity.Red; + item.width = 30; + item.height = 30; + item.rare = Rarity.Red.GetRarityValue(); this.item.value = Item.buyPrice(0, 15); } diff --git a/Items/Accessories/DeadeyesQuiver.png b/Content/Items/Accessories/DeadeyesQuiver.png similarity index 100% rename from Items/Accessories/DeadeyesQuiver.png rename to Content/Items/Accessories/DeadeyesQuiver.png diff --git a/Items/Accessories/DraculaPendant.cs b/Content/Items/Accessories/DraculaPendant.cs similarity index 87% rename from Items/Accessories/DraculaPendant.cs rename to Content/Items/Accessories/DraculaPendant.cs index c42b727..8c3eb0e 100644 --- a/Items/Accessories/DraculaPendant.cs +++ b/Content/Items/Accessories/DraculaPendant.cs @@ -1,11 +1,11 @@ -using Decimation.Buffs.Buffs; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Buffs.Buffs; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class DraculaPendant : DecimationAccessory { @@ -18,9 +18,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 46; - height = 62; - rarity = Rarity.LightPurple; + item.width = 46; + item.height = 62; + item.rare = Rarity.LightPurple.GetRarityValue(); this.item.value = Item.buyPrice(0, 4); } diff --git a/Items/Accessories/DraculaPendant.png b/Content/Items/Accessories/DraculaPendant.png similarity index 100% rename from Items/Accessories/DraculaPendant.png rename to Content/Items/Accessories/DraculaPendant.png diff --git a/Items/Accessories/EnchantedFocuser.cs b/Content/Items/Accessories/EnchantedFocuser.cs similarity index 86% rename from Items/Accessories/EnchantedFocuser.cs rename to Content/Items/Accessories/EnchantedFocuser.cs index 75e5fc5..c18b7d1 100644 --- a/Items/Accessories/EnchantedFocuser.cs +++ b/Content/Items/Accessories/EnchantedFocuser.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class EnchantedFocuser : DecimationAccessory { @@ -14,9 +14,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 62; - height = 46; - rarity = Rarity.Green; + item.width = 62; + item.height = 46; + item.rare = Rarity.Green.GetRarityValue(); this.item.value = Item.buyPrice(0, 0, 0, 10); } diff --git a/Items/Accessories/EnchantedFocuser.png b/Content/Items/Accessories/EnchantedFocuser.png similarity index 100% rename from Items/Accessories/EnchantedFocuser.png rename to Content/Items/Accessories/EnchantedFocuser.png diff --git a/Items/Accessories/EndlessPouchofLife.cs b/Content/Items/Accessories/EndlessPouchofLife.cs similarity index 86% rename from Items/Accessories/EndlessPouchofLife.cs rename to Content/Items/Accessories/EndlessPouchofLife.cs index 3115b58..b6d93fb 100644 --- a/Items/Accessories/EndlessPouchofLife.cs +++ b/Content/Items/Accessories/EndlessPouchofLife.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class EndlessPouchofLife : DecimationAccessory { @@ -18,9 +18,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 24; - height = 32; - rarity = Rarity.Lime; + item.width = 24; + item.height = 32; + item.rare = Rarity.Lime.GetRarityValue(); this.item.value = Item.buyPrice(0, 50); } diff --git a/Items/Accessories/EndlessPouchofLife.png b/Content/Items/Accessories/EndlessPouchofLife.png similarity index 100% rename from Items/Accessories/EndlessPouchofLife.png rename to Content/Items/Accessories/EndlessPouchofLife.png diff --git a/Items/Accessories/EnergyFocuser.cs b/Content/Items/Accessories/EnergyFocuser.cs similarity index 87% rename from Items/Accessories/EnergyFocuser.cs rename to Content/Items/Accessories/EnergyFocuser.cs index aa445d4..fa6e865 100644 --- a/Items/Accessories/EnergyFocuser.cs +++ b/Content/Items/Accessories/EnergyFocuser.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class EnergyFocuser : DecimationAccessory { @@ -14,9 +14,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 62; - height = 46; - rarity = Rarity.Green; + item.width = 62; + item.height = 46; + item.rare = Rarity.Green.GetRarityValue(); this.item.value = Item.buyPrice(0, 0, 0, 10); } diff --git a/Items/Accessories/EnergyFocuser.png b/Content/Items/Accessories/EnergyFocuser.png similarity index 100% rename from Items/Accessories/EnergyFocuser.png rename to Content/Items/Accessories/EnergyFocuser.png diff --git a/Items/Accessories/Focuser.cs b/Content/Items/Accessories/Focuser.cs similarity index 84% rename from Items/Accessories/Focuser.cs rename to Content/Items/Accessories/Focuser.cs index 41df6f5..56ba27d 100644 --- a/Items/Accessories/Focuser.cs +++ b/Content/Items/Accessories/Focuser.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class Focuser : DecimationAccessory { @@ -14,9 +14,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 54; - height = 46; - rarity = Rarity.Green; + item.width = 54; + item.height = 46; + item.rare = Rarity.Green.GetRarityValue(); this.item.value = Item.buyPrice(0, 0, 0, 10); } diff --git a/Items/Accessories/Focuser.png b/Content/Items/Accessories/Focuser.png similarity index 100% rename from Items/Accessories/Focuser.png rename to Content/Items/Accessories/Focuser.png diff --git a/Items/Accessories/GraniteLinedTunic.cs b/Content/Items/Accessories/GraniteLinedTunic.cs similarity index 86% rename from Items/Accessories/GraniteLinedTunic.cs rename to Content/Items/Accessories/GraniteLinedTunic.cs index cb0549c..b5fb755 100644 --- a/Items/Accessories/GraniteLinedTunic.cs +++ b/Content/Items/Accessories/GraniteLinedTunic.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class GraniteLinedTunic : DecimationAccessory { @@ -12,8 +12,8 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 30; - height = 20; + item.width = 30; + item.height = 20; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/GraniteLinedTunic.png b/Content/Items/Accessories/GraniteLinedTunic.png similarity index 100% rename from Items/Accessories/GraniteLinedTunic.png rename to Content/Items/Accessories/GraniteLinedTunic.png diff --git a/Items/Accessories/JestersQuiver.cs b/Content/Items/Accessories/JestersQuiver.cs similarity index 90% rename from Items/Accessories/JestersQuiver.cs rename to Content/Items/Accessories/JestersQuiver.cs index 8532c1f..a67a194 100644 --- a/Items/Accessories/JestersQuiver.cs +++ b/Content/Items/Accessories/JestersQuiver.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class JestersQuiver : DecimationAccessory { @@ -15,8 +15,8 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 20; - height = 20; + item.width = 20; + item.height = 20; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/JestersQuiver.png b/Content/Items/Accessories/JestersQuiver.png similarity index 100% rename from Items/Accessories/JestersQuiver.png rename to Content/Items/Accessories/JestersQuiver.png diff --git a/Items/Accessories/LightweightGlove.cs b/Content/Items/Accessories/LightweightGlove.cs similarity index 88% rename from Items/Accessories/LightweightGlove.cs rename to Content/Items/Accessories/LightweightGlove.cs index f532de8..93529f3 100644 --- a/Items/Accessories/LightweightGlove.cs +++ b/Content/Items/Accessories/LightweightGlove.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; - using Decimation.Core.Items; + using Decimation.Lib.Items; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class LightweightGlove : DecimationAccessory { @@ -16,8 +16,8 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 22; - height = 28; + item.width = 22; + item.height = 28; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/LightweightGlove.png b/Content/Items/Accessories/LightweightGlove.png similarity index 100% rename from Items/Accessories/LightweightGlove.png rename to Content/Items/Accessories/LightweightGlove.png diff --git a/Items/Accessories/NecrosisStone.cs b/Content/Items/Accessories/NecrosisStone.cs similarity index 74% rename from Items/Accessories/NecrosisStone.cs rename to Content/Items/Accessories/NecrosisStone.cs index 8d7356a..723d1e3 100644 --- a/Items/Accessories/NecrosisStone.cs +++ b/Content/Items/Accessories/NecrosisStone.cs @@ -1,8 +1,8 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class NecrosisStone : DecimationAccessory { @@ -13,9 +13,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 20; - height = 20; - rarity = Rarity.Rainbow; + item.width = 20; + item.height = 20; + item.rare = Rarity.Rainbow.GetRarityValue(); this.item.value = Item.buyPrice(0, 5); this.item.expert = true; } diff --git a/Items/Accessories/NecrosisStone.png b/Content/Items/Accessories/NecrosisStone.png similarity index 100% rename from Items/Accessories/NecrosisStone.png rename to Content/Items/Accessories/NecrosisStone.png diff --git a/Items/Accessories/RangersPouch.cs b/Content/Items/Accessories/RangersPouch.cs similarity index 83% rename from Items/Accessories/RangersPouch.cs rename to Content/Items/Accessories/RangersPouch.cs index 090ad89..df73f94 100644 --- a/Items/Accessories/RangersPouch.cs +++ b/Content/Items/Accessories/RangersPouch.cs @@ -2,10 +2,10 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; - using Decimation.Core.Items; -using Decimation.Core.Util; + using Decimation.Lib.Items; +using Decimation.Lib.Util; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class RangersPouch : DecimationAccessory { @@ -15,10 +15,10 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 30; - height = 30; + item.width = 30; + item.height = 30; item.value = 10; - rarity = Rarity.Green; + item.rare = Rarity.Green.GetRarityValue(); } protected override List GetAdditionalRecipes() diff --git a/Items/Accessories/RangersPouch.png b/Content/Items/Accessories/RangersPouch.png similarity index 100% rename from Items/Accessories/RangersPouch.png rename to Content/Items/Accessories/RangersPouch.png diff --git a/Items/Accessories/RangersQuiver.cs b/Content/Items/Accessories/RangersQuiver.cs similarity index 84% rename from Items/Accessories/RangersQuiver.cs rename to Content/Items/Accessories/RangersQuiver.cs index b3a5a7d..d32707f 100644 --- a/Items/Accessories/RangersQuiver.cs +++ b/Content/Items/Accessories/RangersQuiver.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class RangersQuiver : DecimationAccessory { @@ -16,9 +16,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 32; - height = 32; - rarity = Rarity.Green; + item.width = 32; + item.height = 32; + item.rare = Rarity.Green.GetRarityValue(); this.item.value = Item.buyPrice(0, 0, 0, 10); } diff --git a/Items/Accessories/RangersQuiver.png b/Content/Items/Accessories/RangersQuiver.png similarity index 100% rename from Items/Accessories/RangersQuiver.png rename to Content/Items/Accessories/RangersQuiver.png diff --git a/Items/Accessories/RedHotShackle.cs b/Content/Items/Accessories/RedHotShackle.cs similarity index 79% rename from Items/Accessories/RedHotShackle.cs rename to Content/Items/Accessories/RedHotShackle.cs index 999d865..d01379e 100644 --- a/Items/Accessories/RedHotShackle.cs +++ b/Content/Items/Accessories/RedHotShackle.cs @@ -5,10 +5,10 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; - using Decimation.Core.Items; -using Decimation.Core.Util; + using Decimation.Lib.Items; +using Decimation.Lib.Util; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class RedHotShackle : DecimationAccessory { @@ -17,9 +17,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 24; - height = 24; - rarity = Rarity.Green; + item.width = 24; + item.height = 24; + item.rare = Rarity.Green.GetRarityValue(); item.value = Item.buyPrice(0, 0, 2); item.defense = 1; } diff --git a/Items/Accessories/RedHotShackle.png b/Content/Items/Accessories/RedHotShackle.png similarity index 100% rename from Items/Accessories/RedHotShackle.png rename to Content/Items/Accessories/RedHotShackle.png diff --git a/Items/Accessories/ShinySentinel.cs b/Content/Items/Accessories/ShinySentinel.cs similarity index 73% rename from Items/Accessories/ShinySentinel.cs rename to Content/Items/Accessories/ShinySentinel.cs index 979ff42..f444c9e 100644 --- a/Items/Accessories/ShinySentinel.cs +++ b/Content/Items/Accessories/ShinySentinel.cs @@ -1,8 +1,8 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class ShinySentinel : DecimationAccessory { @@ -11,9 +11,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 30; - height = 28; - rarity = Rarity.Rainbow; + item.width = 30; + item.height = 28; + item.rare = Rarity.Rainbow.GetRarityValue(); this.item.value = Item.buyPrice(0, 45); this.item.expert = true; } diff --git a/Items/Accessories/ShinySentinel.png b/Content/Items/Accessories/ShinySentinel.png similarity index 100% rename from Items/Accessories/ShinySentinel.png rename to Content/Items/Accessories/ShinySentinel.png diff --git a/Items/Accessories/SlimeBracelet.cs b/Content/Items/Accessories/SlimeBracelet.cs similarity index 78% rename from Items/Accessories/SlimeBracelet.cs rename to Content/Items/Accessories/SlimeBracelet.cs index dc56c6a..0ab2998 100644 --- a/Items/Accessories/SlimeBracelet.cs +++ b/Content/Items/Accessories/SlimeBracelet.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class SlimeBracelet : DecimationAccessory { @@ -14,9 +14,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 24; - height = 24; - rarity = Rarity.Green; + item.width = 24; + item.height = 24; + item.rare = Rarity.Green.GetRarityValue(); this.item.value = Item.buyPrice(0, 0, 0, 10); } diff --git a/Items/Accessories/SlimeBracelet.png b/Content/Items/Accessories/SlimeBracelet.png similarity index 100% rename from Items/Accessories/SlimeBracelet.png rename to Content/Items/Accessories/SlimeBracelet.png diff --git a/Items/Accessories/TideTurner.cs b/Content/Items/Accessories/TideTurner.cs similarity index 84% rename from Items/Accessories/TideTurner.cs rename to Content/Items/Accessories/TideTurner.cs index e9cc41d..df74597 100644 --- a/Items/Accessories/TideTurner.cs +++ b/Content/Items/Accessories/TideTurner.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; -using Decimation.Items.Ores; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Ores; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories +namespace Decimation.Content.Items.Accessories { internal class TideTurner : DecimationAccessory { @@ -20,9 +20,9 @@ namespace Decimation.Items.Accessories protected override void InitAccessory() { - width = 46; - height = 36; - rarity = Rarity.Rainbow; + item.width = 46; + item.height = 36; + item.rare = Rarity.Rainbow.GetRarityValue(); item.value = Item.buyPrice(0, 3); item.defense = 3; item.shieldSlot = 5; diff --git a/Items/Accessories/TideTurner.png b/Content/Items/Accessories/TideTurner.png similarity index 100% rename from Items/Accessories/TideTurner.png rename to Content/Items/Accessories/TideTurner.png diff --git a/Items/Accessories/Wings/ScarabWings.cs b/Content/Items/Accessories/Wings/ScarabWings.cs similarity index 84% rename from Items/Accessories/Wings/ScarabWings.cs rename to Content/Items/Accessories/Wings/ScarabWings.cs index 70d68bd..623e770 100644 --- a/Items/Accessories/Wings/ScarabWings.cs +++ b/Content/Items/Accessories/Wings/ScarabWings.cs @@ -1,16 +1,16 @@ using System.Collections.Generic; -using Decimation.Items.Misc.CondensedSouls; -using Decimation.Items.Ores; -using Decimation.Projectiles; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Misc.CondensedSouls; +using Decimation.Content.Items.Ores; +using Decimation.Content.Projectiles; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Accessories.Wings +namespace Decimation.Content.Items.Accessories.Wings { [AutoloadEquip(EquipType.Wings)] internal class ScarabWings : DecimationAccessory @@ -20,9 +20,9 @@ namespace Decimation.Items.Accessories.Wings protected override void InitAccessory() { - width = 26; - height = 26; - rarity = Rarity.Red; + item.width = 26; + item.height = 26; + item.rare = Rarity.Red.GetRarityValue(); this.item.value = Item.buyPrice(0, 5); } diff --git a/Items/Accessories/Wings/ScarabWings.png b/Content/Items/Accessories/Wings/ScarabWings.png similarity index 100% rename from Items/Accessories/Wings/ScarabWings.png rename to Content/Items/Accessories/Wings/ScarabWings.png diff --git a/Items/Accessories/Wings/ScarabWings_Wings.png b/Content/Items/Accessories/Wings/ScarabWings_Wings.png similarity index 100% rename from Items/Accessories/Wings/ScarabWings_Wings.png rename to Content/Items/Accessories/Wings/ScarabWings_Wings.png diff --git a/Items/Ammo/MoltenStyngerBolt.cs b/Content/Items/Ammo/MoltenStyngerBolt.cs similarity index 73% rename from Items/Ammo/MoltenStyngerBolt.cs rename to Content/Items/Ammo/MoltenStyngerBolt.cs index 7381bd5..cc7d749 100644 --- a/Items/Ammo/MoltenStyngerBolt.cs +++ b/Content/Items/Ammo/MoltenStyngerBolt.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; -using Decimation.Buffs.Debuffs; -using Decimation.Items.Misc; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Content.Items.Misc; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Ammo +namespace Decimation.Content.Items.Ammo { internal class MoltenStyngerBolt : DecimationAmmo { @@ -16,16 +16,16 @@ namespace Decimation.Items.Ammo protected override string ItemTooltip => "Explodes into molten shrapnel."; protected override string Projectile => "MoltenStyngerBolt"; protected override int Ammo => AmmoID.StyngerBolt; + protected override int Damages => 25; protected override void InitAmmo() { - width = 8; - height = 8; - damages = 25; - projKnockBack = 1; - rarity = Rarity.Orange; - value = Item.buyPrice(0, 0, 10); - consumable = true; + item.width = 8; + item.height = 8; + item.knockBack = 1; + item.rare = Rarity.Orange.GetRarityValue(); + item.value = Item.buyPrice(0, 0, 10); + item.consumable = true; this.item.shootSpeed = 2f; } diff --git a/Items/Ammo/MoltenStyngerBolt.png b/Content/Items/Ammo/MoltenStyngerBolt.png similarity index 100% rename from Items/Ammo/MoltenStyngerBolt.png rename to Content/Items/Ammo/MoltenStyngerBolt.png diff --git a/Items/Ammo/Pebble.cs b/Content/Items/Ammo/Pebble.cs similarity index 67% rename from Items/Ammo/Pebble.cs rename to Content/Items/Ammo/Pebble.cs index 705b8a4..5c8acae 100644 --- a/Items/Ammo/Pebble.cs +++ b/Content/Items/Ammo/Pebble.cs @@ -1,9 +1,9 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Ammo +namespace Decimation.Content.Items.Ammo { internal class Pebble : DecimationAmmo { @@ -11,16 +11,16 @@ namespace Decimation.Items.Ammo protected override string ItemTooltip => "For use with slings and slingshots"; protected override string Projectile => "Pebble"; protected override int Ammo => ModContent.ItemType(); + protected override int Damages => 11; protected override void InitAmmo() { - damages = 11; - width = 16; - height = 16; - this.item.maxStack = 999; - this.item.consumable = true; - projKnockBack = 1f; - this.item.value = Item.sellPrice(0, 0, 1); + item.width = 16; + item.height = 16; + item.maxStack = 999; + item.consumable = true; + item.knockBack = 1f; + item.value = Item.sellPrice(0, 0, 1); } protected override ModRecipe GetRecipe() diff --git a/Items/Ammo/Pebble.png b/Content/Items/Ammo/Pebble.png similarity index 100% rename from Items/Ammo/Pebble.png rename to Content/Items/Ammo/Pebble.png diff --git a/Items/Ammo/SiphonArrow.cs b/Content/Items/Ammo/SiphonArrow.cs similarity index 74% rename from Items/Ammo/SiphonArrow.cs rename to Content/Items/Ammo/SiphonArrow.cs index 5a939d4..c9466dc 100644 --- a/Items/Ammo/SiphonArrow.cs +++ b/Content/Items/Ammo/SiphonArrow.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -using Decimation.Items.Misc; -using Decimation.Core.Items; +using Decimation.Content.Items.Misc; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Ammo +namespace Decimation.Content.Items.Ammo { internal class SiphonArrow : DecimationAmmo { @@ -13,14 +13,14 @@ namespace Decimation.Items.Ammo protected override string ItemTooltip => "Aspires other's life"; protected override string Projectile => "SiphonArrow"; protected override int Ammo => AmmoID.Arrow; + protected override int Damages => 11; protected override void InitAmmo() { - damages = 11; - projKnockBack = 2; - width = 14; - height = 32; - value = Item.buyPrice(0, 0, 0, 55); + item.knockBack = 2; + item.width = 14; + item.height = 32; + item.value = Item.buyPrice(0, 0, 0, 55); this.item.shootSpeed = 2.5f; } diff --git a/Items/Ammo/SiphonArrow.png b/Content/Items/Ammo/SiphonArrow.png similarity index 100% rename from Items/Ammo/SiphonArrow.png rename to Content/Items/Ammo/SiphonArrow.png diff --git a/Items/Ammo/TitanicStyngerBolt.cs b/Content/Items/Ammo/TitanicStyngerBolt.cs similarity index 74% rename from Items/Ammo/TitanicStyngerBolt.cs rename to Content/Items/Ammo/TitanicStyngerBolt.cs index 69fbf4b..dca1911 100644 --- a/Items/Ammo/TitanicStyngerBolt.cs +++ b/Content/Items/Ammo/TitanicStyngerBolt.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; -using Decimation.Buffs.Debuffs; -using Decimation.Items.Ores; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Content.Items.Ores; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Ammo +namespace Decimation.Content.Items.Ammo { internal class TitanicStyngerBolt : DecimationAmmo { @@ -16,16 +16,16 @@ namespace Decimation.Items.Ammo protected override string ItemTooltip => "Explodes into deadly shrapnel."; protected override string Projectile => "TitanicStyngerBolt"; protected override int Ammo => AmmoID.StyngerBolt; + protected override int Damages => 35; protected override void InitAmmo() { - damages = 35; - projKnockBack = 2; - rarity = Rarity.Orange; - width = 8; - height = 8; - value = Item.buyPrice(0, 0, 10); - consumable = true; + item.knockBack = 2; + item.rare = Rarity.Orange.GetRarityValue(); + item.width = 8; + item.height = 8; + item.value = Item.buyPrice(0, 0, 10); + item.consumable = true; this.item.shootSpeed = 2f; } diff --git a/Items/Ammo/TitanicStyngerBolt.png b/Content/Items/Ammo/TitanicStyngerBolt.png similarity index 100% rename from Items/Ammo/TitanicStyngerBolt.png rename to Content/Items/Ammo/TitanicStyngerBolt.png diff --git a/Items/Amulets/BuildersAmulet.cs b/Content/Items/Amulets/BuildersAmulet.cs similarity index 93% rename from Items/Amulets/BuildersAmulet.cs rename to Content/Items/Amulets/BuildersAmulet.cs index bfbea75..194fd38 100644 --- a/Items/Amulets/BuildersAmulet.cs +++ b/Content/Items/Amulets/BuildersAmulet.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using Decimation.Core.Amulets; +using Decimation.Lib.Amulets; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class BuildersAmulet : Amulet { @@ -13,7 +13,7 @@ namespace Decimation.Items.Amulets protected override void InitAmulet() { - height = 34; + item.height = 34; } protected override void UpdateAmulet(Player player) diff --git a/Items/Amulets/BuildersAmulet.png b/Content/Items/Amulets/BuildersAmulet.png similarity index 100% rename from Items/Amulets/BuildersAmulet.png rename to Content/Items/Amulets/BuildersAmulet.png diff --git a/Items/Amulets/CreatorAmulet.cs b/Content/Items/Amulets/CreatorAmulet.cs similarity index 94% rename from Items/Amulets/CreatorAmulet.cs rename to Content/Items/Amulets/CreatorAmulet.cs index 65f1ea3..c9ffe1c 100644 --- a/Items/Amulets/CreatorAmulet.cs +++ b/Content/Items/Amulets/CreatorAmulet.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using Decimation.Core.Amulets; +using Decimation.Lib.Amulets; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class CreatorAmulet : Amulet { @@ -13,7 +13,7 @@ namespace Decimation.Items.Amulets protected override void InitAmulet() { - height = 32; + item.height = 32; } protected override void UpdateAmulet(Player player) diff --git a/Items/Amulets/CreatorAmulet.png b/Content/Items/Amulets/CreatorAmulet.png similarity index 100% rename from Items/Amulets/CreatorAmulet.png rename to Content/Items/Amulets/CreatorAmulet.png diff --git a/Items/Amulets/CrystalAmulet.cs b/Content/Items/Amulets/CrystalAmulet.cs similarity index 96% rename from Items/Amulets/CrystalAmulet.cs rename to Content/Items/Amulets/CrystalAmulet.cs index 76d34fe..70367fc 100644 --- a/Items/Amulets/CrystalAmulet.cs +++ b/Content/Items/Amulets/CrystalAmulet.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; -using Decimation.Core.Amulets; +using Decimation.Lib.Amulets; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class CrystalAmulet : Amulet { @@ -15,7 +15,7 @@ namespace Decimation.Items.Amulets protected override void InitAmulet() { - height = 32; + item.height = 32; } protected override void UpdateAmulet(Player player) diff --git a/Items/Amulets/CrystalAmulet.png b/Content/Items/Amulets/CrystalAmulet.png similarity index 100% rename from Items/Amulets/CrystalAmulet.png rename to Content/Items/Amulets/CrystalAmulet.png diff --git a/Items/Amulets/FireAmulet.cs b/Content/Items/Amulets/FireAmulet.cs similarity index 87% rename from Items/Amulets/FireAmulet.cs rename to Content/Items/Amulets/FireAmulet.cs index 3610059..c070366 100644 --- a/Items/Amulets/FireAmulet.cs +++ b/Content/Items/Amulets/FireAmulet.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; -using Decimation.Buffs.Debuffs; -using Decimation.Core.Amulets; -using Decimation.Core.Amulets.Synergy; -using Decimation.Items.Accessories; -using Decimation.Synergies; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Lib.Amulets; +using Decimation.Lib.Amulets.Synergy; +using Decimation.Content.Items.Accessories; +using Decimation.Content.Synergies; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class FireAmulet : Amulet { @@ -18,7 +18,7 @@ namespace Decimation.Items.Amulets protected override void InitAmulet() { - height = 34; + item.height = 34; } protected override void UpdateAmulet(Player player) diff --git a/Items/Amulets/FireAmulet.png b/Content/Items/Amulets/FireAmulet.png similarity index 100% rename from Items/Amulets/FireAmulet.png rename to Content/Items/Amulets/FireAmulet.png diff --git a/Items/Amulets/FrostAmulet.cs b/Content/Items/Amulets/FrostAmulet.cs similarity index 94% rename from Items/Amulets/FrostAmulet.cs rename to Content/Items/Amulets/FrostAmulet.cs index adcec3a..0cd50dc 100644 --- a/Items/Amulets/FrostAmulet.cs +++ b/Content/Items/Amulets/FrostAmulet.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using Decimation.Core.Amulets; +using Decimation.Lib.Amulets; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class FrostAmulet : Amulet { @@ -13,7 +13,7 @@ namespace Decimation.Items.Amulets protected override void InitAmulet() { - height = 32; + item.height = 32; } protected override void UpdateAmulet(Player player) diff --git a/Items/Amulets/FrostAmulet.png b/Content/Items/Amulets/FrostAmulet.png similarity index 100% rename from Items/Amulets/FrostAmulet.png rename to Content/Items/Amulets/FrostAmulet.png diff --git a/Items/Amulets/GraniteAmulet.cs b/Content/Items/Amulets/GraniteAmulet.cs similarity index 90% rename from Items/Amulets/GraniteAmulet.cs rename to Content/Items/Amulets/GraniteAmulet.cs index 0b64eb0..fdf7b10 100644 --- a/Items/Amulets/GraniteAmulet.cs +++ b/Content/Items/Amulets/GraniteAmulet.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; -using Decimation.Core.Amulets; -using Decimation.Core.Amulets.Synergy; -using Decimation.Items.Accessories; -using Decimation.Synergies; +using Decimation.Lib.Amulets; +using Decimation.Lib.Amulets.Synergy; +using Decimation.Content.Items.Accessories; +using Decimation.Content.Synergies; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class GraniteAmulet : Amulet { diff --git a/Items/Amulets/GraniteAmulet.png b/Content/Items/Amulets/GraniteAmulet.png similarity index 100% rename from Items/Amulets/GraniteAmulet.png rename to Content/Items/Amulets/GraniteAmulet.png diff --git a/Items/Amulets/HealtyAmulet.cs b/Content/Items/Amulets/HealtyAmulet.cs similarity index 93% rename from Items/Amulets/HealtyAmulet.cs rename to Content/Items/Amulets/HealtyAmulet.cs index 267f10e..12769c2 100644 --- a/Items/Amulets/HealtyAmulet.cs +++ b/Content/Items/Amulets/HealtyAmulet.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; -using Decimation.Core.Amulets; -using Decimation.Items.Misc; +using Decimation.Lib.Amulets; +using Decimation.Content.Items.Misc; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class HealtyAmulet : Amulet { diff --git a/Items/Amulets/HealtyAmulet.png b/Content/Items/Amulets/HealtyAmulet.png similarity index 100% rename from Items/Amulets/HealtyAmulet.png rename to Content/Items/Amulets/HealtyAmulet.png diff --git a/Items/Amulets/MarbleAmulet.cs b/Content/Items/Amulets/MarbleAmulet.cs similarity index 91% rename from Items/Amulets/MarbleAmulet.cs rename to Content/Items/Amulets/MarbleAmulet.cs index cda28b2..651896e 100644 --- a/Items/Amulets/MarbleAmulet.cs +++ b/Content/Items/Amulets/MarbleAmulet.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; -using Decimation.Core.Amulets; -using Decimation.Core.Amulets.Synergy; -using Decimation.Items.Accessories; -using Decimation.Synergies; +using Decimation.Lib.Amulets; +using Decimation.Lib.Amulets.Synergy; +using Decimation.Content.Items.Accessories; +using Decimation.Content.Synergies; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class MarbleAmulet : Amulet { diff --git a/Items/Amulets/MarbleAmulet.png b/Content/Items/Amulets/MarbleAmulet.png similarity index 100% rename from Items/Amulets/MarbleAmulet.png rename to Content/Items/Amulets/MarbleAmulet.png diff --git a/Items/Amulets/MinersAmulet.cs b/Content/Items/Amulets/MinersAmulet.cs similarity index 93% rename from Items/Amulets/MinersAmulet.cs rename to Content/Items/Amulets/MinersAmulet.cs index 222b079..4e6bd08 100644 --- a/Items/Amulets/MinersAmulet.cs +++ b/Content/Items/Amulets/MinersAmulet.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; -using Decimation.Core.Amulets; +using Decimation.Lib.Amulets; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class MinersAmulet : Amulet { @@ -13,7 +13,7 @@ namespace Decimation.Items.Amulets protected override void InitAmulet() { - height = 32; + item.height = 32; } protected override void UpdateAmulet(Player player) diff --git a/Items/Amulets/MinersAmulet.png b/Content/Items/Amulets/MinersAmulet.png similarity index 100% rename from Items/Amulets/MinersAmulet.png rename to Content/Items/Amulets/MinersAmulet.png diff --git a/Items/Amulets/SlimeAmulet.cs b/Content/Items/Amulets/SlimeAmulet.cs similarity index 95% rename from Items/Amulets/SlimeAmulet.cs rename to Content/Items/Amulets/SlimeAmulet.cs index edd72d4..a27dde3 100644 --- a/Items/Amulets/SlimeAmulet.cs +++ b/Content/Items/Amulets/SlimeAmulet.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; -using Decimation.Buffs.Debuffs; -using Decimation.Items.Accessories; -using Decimation.Core.Amulets; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Content.Items.Accessories; +using Decimation.Lib.Amulets; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Amulets +namespace Decimation.Content.Items.Amulets { internal class SlimeAmulet : Amulet { @@ -16,8 +16,8 @@ namespace Decimation.Items.Amulets protected override void InitAmulet() { - width = 24; - height = 24; + item.width = 24; + item.height = 24; } protected override void UpdateAmulet(Player player) diff --git a/Items/Amulets/SlimeAmulet.png b/Content/Items/Amulets/SlimeAmulet.png similarity index 100% rename from Items/Amulets/SlimeAmulet.png rename to Content/Items/Amulets/SlimeAmulet.png diff --git a/Items/Armors/ScarabArmor/ScarabBody.cs b/Content/Items/Armors/ScarabArmor/ScarabBody.cs similarity index 82% rename from Items/Armors/ScarabArmor/ScarabBody.cs rename to Content/Items/Armors/ScarabArmor/ScarabBody.cs index bf378df..a546497 100644 --- a/Items/Armors/ScarabArmor/ScarabBody.cs +++ b/Content/Items/Armors/ScarabArmor/ScarabBody.cs @@ -2,12 +2,12 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; -using Decimation.Tiles; -using Decimation.Items.Misc.Souls; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Tiles; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Lib.Items; +using Decimation.Lib.Util; -namespace Decimation.Items.Armors.ScarabArmor +namespace Decimation.Content.Items.Armors.ScarabArmor { [AutoloadEquip(EquipType.Body)] class ScarabBody : DecimationItem @@ -19,9 +19,9 @@ namespace Decimation.Items.Armors.ScarabArmor protected override void Init() { - width = 38; - height = 22; - rarity = Rarity.Red; + item.width = 38; + item.height = 22; + item.rare = Rarity.Red.GetRarityValue(); item.maxStack = 1; item.defense = 45; diff --git a/Items/Armors/ScarabArmor/ScarabBody.png b/Content/Items/Armors/ScarabArmor/ScarabBody.png similarity index 100% rename from Items/Armors/ScarabArmor/ScarabBody.png rename to Content/Items/Armors/ScarabArmor/ScarabBody.png diff --git a/Items/Armors/ScarabArmor/ScarabBody_Arms.png b/Content/Items/Armors/ScarabArmor/ScarabBody_Arms.png similarity index 100% rename from Items/Armors/ScarabArmor/ScarabBody_Arms.png rename to Content/Items/Armors/ScarabArmor/ScarabBody_Arms.png diff --git a/Items/Armors/ScarabArmor/ScarabBody_Body.png b/Content/Items/Armors/ScarabArmor/ScarabBody_Body.png similarity index 100% rename from Items/Armors/ScarabArmor/ScarabBody_Body.png rename to Content/Items/Armors/ScarabArmor/ScarabBody_Body.png diff --git a/Items/Armors/ScarabArmor/ScarabBody_FemaleBody.png b/Content/Items/Armors/ScarabArmor/ScarabBody_FemaleBody.png similarity index 100% rename from Items/Armors/ScarabArmor/ScarabBody_FemaleBody.png rename to Content/Items/Armors/ScarabArmor/ScarabBody_FemaleBody.png diff --git a/Items/Armors/ScarabArmor/ScarabHelmet.cs b/Content/Items/Armors/ScarabArmor/ScarabHelmet.cs similarity index 93% rename from Items/Armors/ScarabArmor/ScarabHelmet.cs rename to Content/Items/Armors/ScarabArmor/ScarabHelmet.cs index 6d0f53a..24b9ab7 100644 --- a/Items/Armors/ScarabArmor/ScarabHelmet.cs +++ b/Content/Items/Armors/ScarabArmor/ScarabHelmet.cs @@ -1,16 +1,16 @@ using System.Collections.Generic; -using Decimation.Buffs.Buffs; -using Decimation.Items.Misc.Souls; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Buffs.Buffs; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Armors.ScarabArmor +namespace Decimation.Content.Items.Armors.ScarabArmor { [AutoloadEquip(EquipType.Head)] internal class ScarabHelmet : DecimationItem @@ -22,9 +22,9 @@ namespace Decimation.Items.Armors.ScarabArmor protected override void Init() { - width = 26; - height = 26; - rarity = Rarity.Red; + item.width = 26; + item.height = 26; + item.rare = Rarity.Red.GetRarityValue(); this.item.maxStack = 1; this.item.defense = 30; diff --git a/Items/Armors/ScarabArmor/ScarabHelmet.png b/Content/Items/Armors/ScarabArmor/ScarabHelmet.png similarity index 100% rename from Items/Armors/ScarabArmor/ScarabHelmet.png rename to Content/Items/Armors/ScarabArmor/ScarabHelmet.png diff --git a/Items/Armors/ScarabArmor/ScarabHelmet_Head.png b/Content/Items/Armors/ScarabArmor/ScarabHelmet_Head.png similarity index 100% rename from Items/Armors/ScarabArmor/ScarabHelmet_Head.png rename to Content/Items/Armors/ScarabArmor/ScarabHelmet_Head.png diff --git a/Items/Armors/ScarabArmor/ScarabLeggings.cs b/Content/Items/Armors/ScarabArmor/ScarabLeggings.cs similarity index 83% rename from Items/Armors/ScarabArmor/ScarabLeggings.cs rename to Content/Items/Armors/ScarabArmor/ScarabLeggings.cs index 6c37901..67c102d 100644 --- a/Items/Armors/ScarabArmor/ScarabLeggings.cs +++ b/Content/Items/Armors/ScarabArmor/ScarabLeggings.cs @@ -2,12 +2,12 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; -using Decimation.Tiles; -using Decimation.Items.Misc.Souls; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Tiles; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Lib.Items; +using Decimation.Lib.Util; -namespace Decimation.Items.Armors.ScarabArmor +namespace Decimation.Content.Items.Armors.ScarabArmor { [AutoloadEquip(EquipType.Legs)] class ScarabLeggings : DecimationItem @@ -20,9 +20,9 @@ namespace Decimation.Items.Armors.ScarabArmor protected override void Init() { - width = 26; - height = 18; - rarity = Rarity.Red; + item.width = 26; + item.height = 18; + item.rare = Rarity.Red.GetRarityValue(); item.maxStack = 1; item.defense = 30; diff --git a/Items/Armors/ScarabArmor/ScarabLeggings.png b/Content/Items/Armors/ScarabArmor/ScarabLeggings.png similarity index 100% rename from Items/Armors/ScarabArmor/ScarabLeggings.png rename to Content/Items/Armors/ScarabArmor/ScarabLeggings.png diff --git a/Items/Armors/ScarabArmor/ScarabLeggings_Legs.png b/Content/Items/Armors/ScarabArmor/ScarabLeggings_Legs.png similarity index 100% rename from Items/Armors/ScarabArmor/ScarabLeggings_Legs.png rename to Content/Items/Armors/ScarabArmor/ScarabLeggings_Legs.png diff --git a/Items/Boss/Arachnus/ArachnusTreasureBag.cs b/Content/Items/Boss/Arachnus/ArachnusTreasureBag.cs similarity index 76% rename from Items/Boss/Arachnus/ArachnusTreasureBag.cs rename to Content/Items/Boss/Arachnus/ArachnusTreasureBag.cs index 92e66d8..d45e0e1 100644 --- a/Items/Boss/Arachnus/ArachnusTreasureBag.cs +++ b/Content/Items/Boss/Arachnus/ArachnusTreasureBag.cs @@ -1,11 +1,11 @@ -using Decimation.Items.Accessories; -using Decimation.Items.Weapons.Arachnus; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Accessories; +using Decimation.Content.Items.Weapons.Arachnus; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ModLoader; -namespace Decimation.Items.Boss.Arachnus +namespace Decimation.Content.Items.Boss.Arachnus { internal class ArachnusTreasureBag : DecimationItem { @@ -15,10 +15,10 @@ namespace Decimation.Items.Boss.Arachnus protected override void Init() { - consumable = true; - width = 32; - height = 32; - rarity = Rarity.Cyan; + item.consumable = true; + item.width = 32; + item.height = 32; + item.rare = Rarity.Cyan.GetRarityValue(); this.item.expert = true; this.item.maxStack = 999; diff --git a/Items/Boss/Arachnus/ArachnusTreasureBag.png b/Content/Items/Boss/Arachnus/ArachnusTreasureBag.png similarity index 100% rename from Items/Boss/Arachnus/ArachnusTreasureBag.png rename to Content/Items/Boss/Arachnus/ArachnusTreasureBag.png diff --git a/Items/Boss/Arachnus/MoltenArachnidsAmulet.cs b/Content/Items/Boss/Arachnus/MoltenArachnidsAmulet.cs similarity index 60% rename from Items/Boss/Arachnus/MoltenArachnidsAmulet.cs rename to Content/Items/Boss/Arachnus/MoltenArachnidsAmulet.cs index e02ccb5..e4620ba 100644 --- a/Items/Boss/Arachnus/MoltenArachnidsAmulet.cs +++ b/Content/Items/Boss/Arachnus/MoltenArachnidsAmulet.cs @@ -1,12 +1,12 @@ -using Decimation.Items.Misc; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Misc; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Boss.Arachnus +namespace Decimation.Content.Items.Boss.Arachnus { internal class MoltenArachnidsAmulet : DecimationItem { @@ -15,14 +15,14 @@ namespace Decimation.Items.Boss.Arachnus protected override void Init() { - width = 32; - height = 32; - value = Item.buyPrice(0, 45); - rarity = Rarity.Red; - consumable = true; - useStyle = 4; - useAnimation = 30; - useTime = 30; + item.width = 32; + item.height = 32; + item.value = Item.buyPrice(0, 45); + item.rare = Rarity.Red.GetRarityValue(); + item.consumable = true; + item.useStyle = 4; + item.useAnimation = 30; + item.useTime = 30; this.item.maxStack = 1; } diff --git a/Items/Boss/Arachnus/MoltenArachnidsAmulet.png b/Content/Items/Boss/Arachnus/MoltenArachnidsAmulet.png similarity index 100% rename from Items/Boss/Arachnus/MoltenArachnidsAmulet.png rename to Content/Items/Boss/Arachnus/MoltenArachnidsAmulet.png diff --git a/Items/Boss/Arachnus/MoltenKey.png b/Content/Items/Boss/Arachnus/MoltenKey.png similarity index 100% rename from Items/Boss/Arachnus/MoltenKey.png rename to Content/Items/Boss/Arachnus/MoltenKey.png diff --git a/Items/Boss/Arachnus/Moltenkey.cs b/Content/Items/Boss/Arachnus/Moltenkey.cs similarity index 71% rename from Items/Boss/Arachnus/Moltenkey.cs rename to Content/Items/Boss/Arachnus/Moltenkey.cs index f607a7c..00b16da 100644 --- a/Items/Boss/Arachnus/Moltenkey.cs +++ b/Content/Items/Boss/Arachnus/Moltenkey.cs @@ -1,10 +1,10 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Boss.Arachnus +namespace Decimation.Content.Items.Boss.Arachnus { internal class MoltenKey : DecimationItem { @@ -13,11 +13,11 @@ namespace Decimation.Items.Boss.Arachnus protected override void Init() { - width = 20; - height = 20; - consumable = true; - value = Item.buyPrice(0, 45); - rarity = Rarity.Red; + item.width = 20; + item.height = 20; + item.consumable = true; + item.value = Item.buyPrice(0, 45); + item.rare = Rarity.Red.GetRarityValue(); this.item.maxStack = 1; } diff --git a/Items/Boss/Bloodshot/BloodiedMaw.cs b/Content/Items/Boss/Bloodshot/BloodiedMaw.cs similarity index 80% rename from Items/Boss/Bloodshot/BloodiedMaw.cs rename to Content/Items/Boss/Bloodshot/BloodiedMaw.cs index e822432..db8d1f7 100644 --- a/Items/Boss/Bloodshot/BloodiedMaw.cs +++ b/Content/Items/Boss/Bloodshot/BloodiedMaw.cs @@ -1,11 +1,11 @@ -using Decimation.Items.Misc; -using Decimation.NPCs.Bloodshot; -using Decimation.Core.Items; +using Decimation.Content.Items.Misc; +using Decimation.Content.NPCs.Bloodshot; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Boss.Bloodshot +namespace Decimation.Content.Items.Boss.Bloodshot { internal class BloodiedMaw : DecimationItem { @@ -14,12 +14,12 @@ namespace Decimation.Items.Boss.Bloodshot protected override void Init() { - width = 20; - height = 24; - consumable = true; - useStyle = 4; - useAnimation = 30; - useTime = 30; + item.width = 20; + item.height = 24; + item.consumable = true; + item.useStyle = 4; + item.useAnimation = 30; + item.useTime = 30; this.item.maxStack = 1; } diff --git a/Items/Boss/Bloodshot/BloodiedMaw.png b/Content/Items/Boss/Bloodshot/BloodiedMaw.png similarity index 100% rename from Items/Boss/Bloodshot/BloodiedMaw.png rename to Content/Items/Boss/Bloodshot/BloodiedMaw.png diff --git a/Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs b/Content/Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs similarity index 78% rename from Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs rename to Content/Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs index 82c6205..e55075f 100644 --- a/Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs +++ b/Content/Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs @@ -1,14 +1,14 @@ -using Decimation.Items.Accessories; -using Decimation.Items.Misc; -using Decimation.Items.Weapons.Bloodshot; -using Decimation.NPCs.Bloodshot; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Accessories; +using Decimation.Content.Items.Misc; +using Decimation.Content.Items.Weapons.Bloodshot; +using Decimation.Content.NPCs.Bloodshot; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; -namespace Decimation.Items.Boss.Bloodshot +namespace Decimation.Content.Items.Boss.Bloodshot { internal class TreasureBagBloodshotEye : DecimationItem { @@ -18,10 +18,10 @@ namespace Decimation.Items.Boss.Bloodshot protected override void Init() { - consumable = true; - width = 24; - height = 24; - rarity = Rarity.Rainbow; + item.consumable = true; + item.width = 24; + item.height = 24; + item.rare = Rarity.Rainbow.GetRarityValue(); this.item.expert = true; } diff --git a/Items/Boss/Bloodshot/TreasureBagBloodshotEye.png b/Content/Items/Boss/Bloodshot/TreasureBagBloodshotEye.png similarity index 100% rename from Items/Boss/Bloodshot/TreasureBagBloodshotEye.png rename to Content/Items/Boss/Bloodshot/TreasureBagBloodshotEye.png diff --git a/Items/Boss/DuneWorm/DesertDessert.cs b/Content/Items/Boss/DuneWorm/DesertDessert.cs similarity index 80% rename from Items/Boss/DuneWorm/DesertDessert.cs rename to Content/Items/Boss/DuneWorm/DesertDessert.cs index 10e3d0e..f97bbcd 100644 --- a/Items/Boss/DuneWorm/DesertDessert.cs +++ b/Content/Items/Boss/DuneWorm/DesertDessert.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -using Decimation.NPCs.AncientDuneWorm; -using Decimation.Core.Items; +using Decimation.Content.NPCs.AncientDuneWorm; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Boss.DuneWorm +namespace Decimation.Content.Items.Boss.DuneWorm { internal class DesertDessert : DecimationItem { @@ -14,13 +14,13 @@ namespace Decimation.Items.Boss.DuneWorm protected override void Init() { - width = 32; - height = 32; - value = Item.buyPrice(0, 0, 13); - useStyle = 4; - useAnimation = 30; - useTime = 30; - consumable = true; + item.width = 32; + item.height = 32; + item.value = Item.buyPrice(0, 0, 13); + item.useStyle = 4; + item.useAnimation = 30; + item.useTime = 30; + item.consumable = true; this.item.maxStack = 20; } diff --git a/Items/Boss/DuneWorm/DesertDessert.png b/Content/Items/Boss/DuneWorm/DesertDessert.png similarity index 100% rename from Items/Boss/DuneWorm/DesertDessert.png rename to Content/Items/Boss/DuneWorm/DesertDessert.png diff --git a/Items/Boss/DuneWorm/DuneWormTreasureBag.cs b/Content/Items/Boss/DuneWorm/DuneWormTreasureBag.cs similarity index 69% rename from Items/Boss/DuneWorm/DuneWormTreasureBag.cs rename to Content/Items/Boss/DuneWorm/DuneWormTreasureBag.cs index d63c0a3..5fbdfa3 100644 --- a/Items/Boss/DuneWorm/DuneWormTreasureBag.cs +++ b/Content/Items/Boss/DuneWorm/DuneWormTreasureBag.cs @@ -1,15 +1,15 @@ -using Decimation.Items.Misc.Souls; -using Decimation.Items.Placeable.DuneWorm; -using Decimation.Items.Tools; -using Decimation.Items.Vanity.DuneWorm; -using Decimation.NPCs.AncientDuneWorm; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Content.Items.Placeable.DuneWorm; +using Decimation.Content.Items.Tools; +using Decimation.Content.Items.Vanity.DuneWorm; +using Decimation.Content.NPCs.AncientDuneWorm; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Boss.DuneWorm +namespace Decimation.Content.Items.Boss.DuneWorm { internal class DuneWormTreasureBag : DecimationItem { @@ -19,10 +19,10 @@ namespace Decimation.Items.Boss.DuneWorm protected override void Init() { - consumable = true; - width = 24; - height = 24; - rarity = Rarity.Rainbow; + item.consumable = true; + item.width = 24; + item.height = 24; + item.rare = Rarity.Rainbow.GetRarityValue(); this.item.expert = true; } diff --git a/Items/Boss/DuneWorm/DuneWormTreasureBag.png b/Content/Items/Boss/DuneWorm/DuneWormTreasureBag.png similarity index 100% rename from Items/Boss/DuneWorm/DuneWormTreasureBag.png rename to Content/Items/Boss/DuneWorm/DuneWormTreasureBag.png diff --git a/Items/CursedItem.cs b/Content/Items/CursedItem.cs similarity index 99% rename from Items/CursedItem.cs rename to Content/Items/CursedItem.cs index 48c357b..ebb1baf 100644 --- a/Items/CursedItem.cs +++ b/Content/Items/CursedItem.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.IO; -using Decimation.NPCs; +using Decimation.Content.NPCs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -9,7 +9,7 @@ using Terraria.ModLoader; using Terraria.ModLoader.IO; using Terraria.UI.Chat; -namespace Decimation.Items +namespace Decimation.Content.Items { internal class CursedItem : GlobalItem { diff --git a/Items/Misc/BloodiedEssence.cs b/Content/Items/Misc/BloodiedEssence.cs similarity index 67% rename from Items/Misc/BloodiedEssence.cs rename to Content/Items/Misc/BloodiedEssence.cs index 760a70c..14b45a3 100644 --- a/Items/Misc/BloodiedEssence.cs +++ b/Content/Items/Misc/BloodiedEssence.cs @@ -1,6 +1,6 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; -namespace Decimation.Items.Misc +namespace Decimation.Content.Items.Misc { internal class BloodiedEssence : DecimationItem { @@ -9,9 +9,9 @@ namespace Decimation.Items.Misc protected override void Init() { - width = 16; - height = 16; - value = 100; + item.width = 16; + item.height = 16; + item.value = 100; this.item.maxStack = 999; } diff --git a/Items/Misc/BloodiedEssence.png b/Content/Items/Misc/BloodiedEssence.png similarity index 100% rename from Items/Misc/BloodiedEssence.png rename to Content/Items/Misc/BloodiedEssence.png diff --git a/Items/Misc/BloodyLunarTablet.cs b/Content/Items/Misc/BloodyLunarTablet.cs similarity index 58% rename from Items/Misc/BloodyLunarTablet.cs rename to Content/Items/Misc/BloodyLunarTablet.cs index 7b2a47f..61a4832 100644 --- a/Items/Misc/BloodyLunarTablet.cs +++ b/Content/Items/Misc/BloodyLunarTablet.cs @@ -1,8 +1,8 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; -namespace Decimation.Items.Misc +namespace Decimation.Content.Items.Misc { internal class BloodyLunarTablet : DecimationItem { @@ -11,14 +11,14 @@ namespace Decimation.Items.Misc protected override void Init() { - width = 30; - height = 40; - rarity = Rarity.Green; - value = Item.buyPrice(gold: 5); - useStyle = 1; - useTime = 20; - useAnimation = 20; - consumable = true; + item.width = 30; + item.height = 40; + item.rare = Rarity.Green.GetRarityValue(); + item.value = Item.buyPrice(gold: 5); + item.useStyle = 1; + item.useTime = 20; + item.useAnimation = 20; + item.consumable = true; this.item.maxStack = 1; } diff --git a/Items/Misc/BloodyLunarTablet.png b/Content/Items/Misc/BloodyLunarTablet.png similarity index 100% rename from Items/Misc/BloodyLunarTablet.png rename to Content/Items/Misc/BloodyLunarTablet.png diff --git a/Items/Misc/CondensedSouls/CondensedSpite.cs b/Content/Items/Misc/CondensedSouls/CondensedSpite.cs similarity index 73% rename from Items/Misc/CondensedSouls/CondensedSpite.cs rename to Content/Items/Misc/CondensedSouls/CondensedSpite.cs index 2a35662..8cccdb2 100644 --- a/Items/Misc/CondensedSouls/CondensedSpite.cs +++ b/Content/Items/Misc/CondensedSouls/CondensedSpite.cs @@ -1,29 +1,28 @@ -using Decimation.Items.Misc.Souls; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Misc.CondensedSouls +namespace Decimation.Content.Items.Misc.CondensedSouls { internal class CondensedSpite : DecimationItem { protected override string ItemName => "Condensed Spite"; protected override string ItemTooltip => "his soul emanates a primal sense of hatred"; - protected override bool IsClone => true; protected override DrawAnimation Animation => new DrawAnimationVertical(5, 4); protected override void Init() { this.item.CloneDefaults(ItemID.SoulofSight); - width = 44; - height = 44; - value = Item.buyPrice(0, 50); - rarity = Rarity.Red; + item.width = 44; + item.height = 44; + item.value = Item.buyPrice(0, 50); + item.rare = Rarity.Red.GetRarityValue(); ItemID.Sets.AnimatesAsSoul[this.item.type] = true; ItemID.Sets.ItemIconPulse[this.item.type] = true; diff --git a/Items/Misc/CondensedSouls/CondensedSpite.gif b/Content/Items/Misc/CondensedSouls/CondensedSpite.gif similarity index 100% rename from Items/Misc/CondensedSouls/CondensedSpite.gif rename to Content/Items/Misc/CondensedSouls/CondensedSpite.gif diff --git a/Items/Misc/CondensedSouls/CondensedSpite.png b/Content/Items/Misc/CondensedSouls/CondensedSpite.png similarity index 100% rename from Items/Misc/CondensedSouls/CondensedSpite.png rename to Content/Items/Misc/CondensedSouls/CondensedSpite.png diff --git a/Items/Misc/CondensedSouls/CondensedSpiteWiki.png b/Content/Items/Misc/CondensedSouls/CondensedSpiteWiki.png similarity index 100% rename from Items/Misc/CondensedSouls/CondensedSpiteWiki.png rename to Content/Items/Misc/CondensedSouls/CondensedSpiteWiki.png diff --git a/Items/Misc/EnchantedHeart.cs b/Content/Items/Misc/EnchantedHeart.cs similarity index 86% rename from Items/Misc/EnchantedHeart.cs rename to Content/Items/Misc/EnchantedHeart.cs index 213309f..78150e0 100644 --- a/Items/Misc/EnchantedHeart.cs +++ b/Content/Items/Misc/EnchantedHeart.cs @@ -1,10 +1,10 @@ -using Decimation.Items.Amulets; -using Decimation.Core.Items; +using Decimation.Content.Items.Amulets; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Misc +namespace Decimation.Content.Items.Misc { internal class EnchantedHeart : DecimationItem { @@ -12,7 +12,6 @@ namespace Decimation.Items.Misc private const int ManaAmount = 5; protected override string ItemName => "Enchanted Heart"; - protected override bool IsClone => true; public override string Texture => "Terraria/Item_" + ItemID.Heart; protected override void Init() diff --git a/Items/Misc/HyperStar.cs b/Content/Items/Misc/HyperStar.cs similarity index 89% rename from Items/Misc/HyperStar.cs rename to Content/Items/Misc/HyperStar.cs index fa2ca29..1ef9697 100644 --- a/Items/Misc/HyperStar.cs +++ b/Content/Items/Misc/HyperStar.cs @@ -1,17 +1,16 @@ -using Decimation.Core.Items; -using Decimation.Core.Util.Builder; +using Decimation.Lib.Items; +using Decimation.Lib.Util.Builder; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Misc +namespace Decimation.Content.Items.Misc { internal class HyperStar : DecimationItem { public static readonly int ManaHealAmount = 10; protected override string ItemName => "Hyper Star"; - protected override bool IsClone => true; protected override string ItemTooltip => "Adds 10 to maximum mana"; protected override void Init() diff --git a/Items/Misc/HyperStar.png b/Content/Items/Misc/HyperStar.png similarity index 100% rename from Items/Misc/HyperStar.png rename to Content/Items/Misc/HyperStar.png diff --git a/Items/Misc/LunarTablet.cs b/Content/Items/Misc/LunarTablet.cs similarity index 59% rename from Items/Misc/LunarTablet.cs rename to Content/Items/Misc/LunarTablet.cs index 6655aa2..2c7ce1b 100644 --- a/Items/Misc/LunarTablet.cs +++ b/Content/Items/Misc/LunarTablet.cs @@ -1,8 +1,8 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; -namespace Decimation.Items.Misc +namespace Decimation.Content.Items.Misc { internal class LunarTablet : DecimationItem { @@ -11,14 +11,14 @@ namespace Decimation.Items.Misc protected override void Init() { - width = 30; - height = 40; - consumable = true; - value = Item.buyPrice(gold: 2, silver: 50); - rarity = Rarity.Green; - useStyle = 1; - useTime = 20; - useAnimation = 20; + item.width = 30; + item.height = 40; + item.consumable = true; + item.value = Item.buyPrice(gold: 2, silver: 50); + item.rare = Rarity.Green.GetRarityValue(); + item.useStyle = 1; + item.useTime = 20; + item.useAnimation = 20; this.item.maxStack = 1; } diff --git a/Items/Misc/LunarTablet.png b/Content/Items/Misc/LunarTablet.png similarity index 100% rename from Items/Misc/LunarTablet.png rename to Content/Items/Misc/LunarTablet.png diff --git a/Items/Misc/RedThread.cs b/Content/Items/Misc/RedThread.cs similarity index 71% rename from Items/Misc/RedThread.cs rename to Content/Items/Misc/RedThread.cs index 26f629b..8b554a5 100644 --- a/Items/Misc/RedThread.cs +++ b/Content/Items/Misc/RedThread.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Misc +namespace Decimation.Content.Items.Misc { internal class RedThread : DecimationItem { @@ -13,10 +13,10 @@ namespace Decimation.Items.Misc protected override void Init() { - width = 28; - height = 20; - rarity = Rarity.Gray; - value = Item.buyPrice(0, 2); + item.width = 28; + item.height = 20; + item.rare = Rarity.Gray.GetRarityValue(); + item.value = Item.buyPrice(0, 2); this.item.maxStack = 99; } diff --git a/Items/Misc/RedThread.png b/Content/Items/Misc/RedThread.png similarity index 100% rename from Items/Misc/RedThread.png rename to Content/Items/Misc/RedThread.png diff --git a/Items/Misc/SoulFruit.cs b/Content/Items/Misc/SoulFruit.cs similarity index 89% rename from Items/Misc/SoulFruit.cs rename to Content/Items/Misc/SoulFruit.cs index 01a6350..ef9157c 100644 --- a/Items/Misc/SoulFruit.cs +++ b/Content/Items/Misc/SoulFruit.cs @@ -1,17 +1,16 @@ -using Decimation.Core.Items; -using Decimation.Core.Util.Builder; +using Decimation.Lib.Items; +using Decimation.Lib.Util.Builder; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Misc +namespace Decimation.Content.Items.Misc { internal class SoulFruit : DecimationItem { public static readonly int LifeHealAmount = 5; protected override string ItemName => "Soul Fruit"; - protected override bool IsClone => true; protected override string ItemTooltip => "Adds 5 to maximum life"; protected override void Init() diff --git a/Items/Misc/SoulFruit.png b/Content/Items/Misc/SoulFruit.png similarity index 100% rename from Items/Misc/SoulFruit.png rename to Content/Items/Misc/SoulFruit.png diff --git a/Items/Misc/Souls/SoulofLife.cs b/Content/Items/Misc/Souls/SoulofLife.cs similarity index 83% rename from Items/Misc/Souls/SoulofLife.cs rename to Content/Items/Misc/Souls/SoulofLife.cs index 2afe693..0eb7875 100644 --- a/Items/Misc/Souls/SoulofLife.cs +++ b/Content/Items/Misc/Souls/SoulofLife.cs @@ -1,10 +1,10 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Misc.Souls +namespace Decimation.Content.Items.Misc.Souls { internal class SoulofLife : DecimationItem { @@ -17,10 +17,10 @@ namespace Decimation.Items.Misc.Souls Item refItem = new Item(); refItem.SetDefaults(ItemID.SoulofSight); - width = refItem.width; - height = refItem.height; - width = 20; - height = 20; + item.width = refItem.width; + item.height = refItem.height; + item.width = 20; + item.height = 20; this.item.maxStack = 999; diff --git a/Items/Misc/Souls/SoulofLife.png b/Content/Items/Misc/Souls/SoulofLife.png similarity index 100% rename from Items/Misc/Souls/SoulofLife.png rename to Content/Items/Misc/Souls/SoulofLife.png diff --git a/Items/Misc/Souls/SoulofSpite.cs b/Content/Items/Misc/Souls/SoulofSpite.cs similarity index 86% rename from Items/Misc/Souls/SoulofSpite.cs rename to Content/Items/Misc/Souls/SoulofSpite.cs index c2e5160..b488d52 100644 --- a/Items/Misc/Souls/SoulofSpite.cs +++ b/Content/Items/Misc/Souls/SoulofSpite.cs @@ -1,9 +1,9 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.DataStructures; using Terraria.ID; -namespace Decimation.Items.Misc.Souls +namespace Decimation.Content.Items.Misc.Souls { internal class SoulofSpite : DecimationItem { @@ -16,10 +16,10 @@ namespace Decimation.Items.Misc.Souls Item refItem = new Item(); refItem.SetDefaults(ItemID.SoulofSight); - width = refItem.width; - height = refItem.height; + item.width = refItem.width; + item.height = refItem.height; this.item.maxStack = 999; - value = 50000; + item.value = 50000; ItemID.Sets.AnimatesAsSoul[this.item.type] = true; ItemID.Sets.ItemIconPulse[this.item.type] = true; diff --git a/Items/Misc/Souls/SoulofSpite.png b/Content/Items/Misc/Souls/SoulofSpite.png similarity index 100% rename from Items/Misc/Souls/SoulofSpite.png rename to Content/Items/Misc/Souls/SoulofSpite.png diff --git a/Items/Misc/Souls/SoulofTime.cs b/Content/Items/Misc/Souls/SoulofTime.cs similarity index 65% rename from Items/Misc/Souls/SoulofTime.cs rename to Content/Items/Misc/Souls/SoulofTime.cs index 574b962..46f4297 100644 --- a/Items/Misc/Souls/SoulofTime.cs +++ b/Content/Items/Misc/Souls/SoulofTime.cs @@ -1,10 +1,10 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.DataStructures; using Terraria.ID; -namespace Decimation.Items.Misc.Souls +namespace Decimation.Content.Items.Misc.Souls { internal class SoulofTime : DecimationItem { @@ -14,10 +14,10 @@ namespace Decimation.Items.Misc.Souls protected override void Init() { - width = 22; - height = 24; - value = Item.buyPrice(0, 0, 1); - rarity = Rarity.Orange; + item.width = 22; + item.height = 24; + item.value = Item.buyPrice(0, 0, 1); + item.rare = Rarity.Orange.GetRarityValue(); this.item.maxStack = 999; diff --git a/Items/Misc/Souls/SoulofTime.png b/Content/Items/Misc/Souls/SoulofTime.png similarity index 100% rename from Items/Misc/Souls/SoulofTime.png rename to Content/Items/Misc/Souls/SoulofTime.png diff --git a/Items/Misc/Thermoplasm.cs b/Content/Items/Misc/Thermoplasm.cs similarity index 72% rename from Items/Misc/Thermoplasm.cs rename to Content/Items/Misc/Thermoplasm.cs index e45512d..ec3ffcb 100644 --- a/Items/Misc/Thermoplasm.cs +++ b/Content/Items/Misc/Thermoplasm.cs @@ -1,9 +1,9 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ModLoader; -namespace Decimation.Items.Misc +namespace Decimation.Content.Items.Misc { internal class Thermoplasm : DecimationItem { @@ -12,10 +12,10 @@ namespace Decimation.Items.Misc protected override void Init() { - width = 26; - height = 36; - value = Item.buyPrice(silver: 50); - rarity = Rarity.Yellow; + item.width = 26; + item.height = 36; + item.value = Item.buyPrice(silver: 50); + item.rare = Rarity.Yellow.GetRarityValue(); } } diff --git a/Items/Misc/Thermoplasm.png b/Content/Items/Misc/Thermoplasm.png similarity index 100% rename from Items/Misc/Thermoplasm.png rename to Content/Items/Misc/Thermoplasm.png diff --git a/Items/Ores/DenziumBar.cs b/Content/Items/Ores/DenziumBar.cs similarity index 71% rename from Items/Ores/DenziumBar.cs rename to Content/Items/Ores/DenziumBar.cs index 7fc1f6c..84ebbf4 100644 --- a/Items/Ores/DenziumBar.cs +++ b/Content/Items/Ores/DenziumBar.cs @@ -1,10 +1,10 @@ -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Ores +namespace Decimation.Content.Items.Ores { internal class DenziumBar : DecimationItem { @@ -13,9 +13,9 @@ namespace Decimation.Items.Ores protected override void Init() { - width = 20; - height = 20; - rarity = Rarity.Cyan; + item.width = 20; + item.height = 20; + item.rare = Rarity.Cyan.GetRarityValue(); } protected override ModRecipe GetRecipe() diff --git a/Items/Ores/DenziumBar.png b/Content/Items/Ores/DenziumBar.png similarity index 100% rename from Items/Ores/DenziumBar.png rename to Content/Items/Ores/DenziumBar.png diff --git a/Items/Ores/TitaniteBar.cs b/Content/Items/Ores/TitaniteBar.cs similarity index 71% rename from Items/Ores/TitaniteBar.cs rename to Content/Items/Ores/TitaniteBar.cs index 3e8a8b2..b6eee0a 100644 --- a/Items/Ores/TitaniteBar.cs +++ b/Content/Items/Ores/TitaniteBar.cs @@ -1,10 +1,10 @@ -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Ores +namespace Decimation.Content.Items.Ores { internal class TitaniteBar : DecimationItem { @@ -13,9 +13,9 @@ namespace Decimation.Items.Ores protected override void Init() { - width = 20; - height = 20; - rarity = Rarity.Orange; + item.width = 20; + item.height = 20; + item.rare = Rarity.Orange.GetRarityValue(); } protected override ModRecipe GetRecipe() diff --git a/Items/Ores/TitaniteBar.png b/Content/Items/Ores/TitaniteBar.png similarity index 100% rename from Items/Ores/TitaniteBar.png rename to Content/Items/Ores/TitaniteBar.png diff --git a/Items/Placeable/Basalt.cs b/Content/Items/Placeable/Basalt.cs similarity index 83% rename from Items/Placeable/Basalt.cs rename to Content/Items/Placeable/Basalt.cs index acc4cf6..719f311 100644 --- a/Items/Placeable/Basalt.cs +++ b/Content/Items/Placeable/Basalt.cs @@ -1,7 +1,7 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria.ModLoader; -namespace Decimation.Items.Placeable +namespace Decimation.Content.Items.Placeable { internal class Basalt : DecimationPlaceableItem { diff --git a/Items/Placeable/Basalt.png b/Content/Items/Placeable/Basalt.png similarity index 100% rename from Items/Placeable/Basalt.png rename to Content/Items/Placeable/Basalt.png diff --git a/Items/Placeable/ChlorophyteAnvil.cs b/Content/Items/Placeable/ChlorophyteAnvil.cs similarity index 85% rename from Items/Placeable/ChlorophyteAnvil.cs rename to Content/Items/Placeable/ChlorophyteAnvil.cs index 2270338..caa5d36 100644 --- a/Items/Placeable/ChlorophyteAnvil.cs +++ b/Content/Items/Placeable/ChlorophyteAnvil.cs @@ -1,37 +1,37 @@ -using Decimation.Items.Misc.Souls; -using Decimation.Core.Items; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Items.Placeable -{ - internal class ChlorophyteAnvil : DecimationPlaceableItem - { - protected override string ItemName => "Chlorophyte Anvil"; - protected override string ItemTooltip => "It reacts to the light."; - protected override int Tile => ModContent.TileType(); - - protected override void InitPlaceable() - { - width = 20; - height = 20; - this.item.maxStack = 1; - } - - protected override ModRecipe GetRecipe() - { - ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge); - - recipe.AddIngredient(ModContent.TileType()); - recipe.AddIngredient(ItemID.ChlorophyteBar, 5); - recipe.AddIngredient(ItemID.Vine, 5); - recipe.AddIngredient(ItemID.JungleSpores, 16); - recipe.AddIngredient(ItemID.SoulofSight, 5); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.SoulofFlight, 5); - - return recipe; - } - } +using Decimation.Content.Items.Misc.Souls; +using Decimation.Lib.Items; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Items.Placeable +{ + internal class ChlorophyteAnvil : DecimationPlaceableItem + { + protected override string ItemName => "Chlorophyte Anvil"; + protected override string ItemTooltip => "It reacts to the light."; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + item.width = 20; + item.height = 20; + this.item.maxStack = 1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge); + + recipe.AddIngredient(ModContent.TileType()); + recipe.AddIngredient(ItemID.ChlorophyteBar, 5); + recipe.AddIngredient(ItemID.Vine, 5); + recipe.AddIngredient(ItemID.JungleSpores, 16); + recipe.AddIngredient(ItemID.SoulofSight, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.SoulofFlight, 5); + + return recipe; + } + } } \ No newline at end of file diff --git a/Items/Placeable/ChlorophyteAnvil.png b/Content/Items/Placeable/ChlorophyteAnvil.png similarity index 100% rename from Items/Placeable/ChlorophyteAnvil.png rename to Content/Items/Placeable/ChlorophyteAnvil.png diff --git a/Items/Placeable/DenziumOre.cs b/Content/Items/Placeable/DenziumOre.cs similarity index 75% rename from Items/Placeable/DenziumOre.cs rename to Content/Items/Placeable/DenziumOre.cs index c787d0e..257cdad 100644 --- a/Items/Placeable/DenziumOre.cs +++ b/Content/Items/Placeable/DenziumOre.cs @@ -1,7 +1,7 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria.ModLoader; -namespace Decimation.Items.Placeable +namespace Decimation.Content.Items.Placeable { internal class DenziumOre : DecimationPlaceableItem { @@ -11,8 +11,8 @@ namespace Decimation.Items.Placeable protected override void InitPlaceable() { - width = 12; - height = 12; + item.width = 12; + item.height = 12; } } } \ No newline at end of file diff --git a/Items/Placeable/DenziumOre.png b/Content/Items/Placeable/DenziumOre.png similarity index 100% rename from Items/Placeable/DenziumOre.png rename to Content/Items/Placeable/DenziumOre.png diff --git a/Items/Placeable/DenziumWall.cs b/Content/Items/Placeable/DenziumWall.cs similarity index 70% rename from Items/Placeable/DenziumWall.cs rename to Content/Items/Placeable/DenziumWall.cs index 3362694..9deedc1 100644 --- a/Items/Placeable/DenziumWall.cs +++ b/Content/Items/Placeable/DenziumWall.cs @@ -1,6 +1,6 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; -namespace Decimation.Items.Placeable +namespace Decimation.Content.Items.Placeable { internal class DenziumWall : DecimationPlaceableItem { @@ -9,8 +9,8 @@ namespace Decimation.Items.Placeable protected override void InitPlaceable() { - width = 32; - height = 32; + item.width = 32; + item.height = 32; this.item.createWall = this.mod.WallType("DenziumWall"); } } diff --git a/Items/Placeable/DenziumWall.png b/Content/Items/Placeable/DenziumWall.png similarity index 100% rename from Items/Placeable/DenziumWall.png rename to Content/Items/Placeable/DenziumWall.png diff --git a/Items/Placeable/DuneWorm/DuneWormTrophy.cs b/Content/Items/Placeable/DuneWorm/DuneWormTrophy.cs similarity index 78% rename from Items/Placeable/DuneWorm/DuneWormTrophy.cs rename to Content/Items/Placeable/DuneWorm/DuneWormTrophy.cs index 41d4f16..9520ed1 100644 --- a/Items/Placeable/DuneWorm/DuneWormTrophy.cs +++ b/Content/Items/Placeable/DuneWorm/DuneWormTrophy.cs @@ -1,8 +1,8 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.ModLoader; -namespace Decimation.Items.Placeable.DuneWorm +namespace Decimation.Content.Items.Placeable.DuneWorm { internal class DuneWormTrophy : DecimationPlaceableItem { @@ -12,8 +12,8 @@ namespace Decimation.Items.Placeable.DuneWorm protected override void InitPlaceable() { - width = 30; - height = 30; + item.width = 30; + item.height = 30; this.item.maxStack = 99; this.item.value = Item.buyPrice(0, 5); } diff --git a/Items/Placeable/DuneWorm/DuneWormTrophy.png b/Content/Items/Placeable/DuneWorm/DuneWormTrophy.png similarity index 100% rename from Items/Placeable/DuneWorm/DuneWormTrophy.png rename to Content/Items/Placeable/DuneWorm/DuneWormTrophy.png diff --git a/Items/Placeable/EnchantedAnvil.cs b/Content/Items/Placeable/EnchantedAnvil.cs similarity index 82% rename from Items/Placeable/EnchantedAnvil.cs rename to Content/Items/Placeable/EnchantedAnvil.cs index c170e9f..46bc170 100644 --- a/Items/Placeable/EnchantedAnvil.cs +++ b/Content/Items/Placeable/EnchantedAnvil.cs @@ -1,34 +1,34 @@ -using Decimation.Items.Misc.Souls; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Decimation.Core.Items; - -namespace Decimation.Items.Placeable -{ - internal class EnchantedAnvil : DecimationPlaceableItem - { - protected override string ItemName => "Enchanted Anvil"; - protected override int Tile => ModContent.TileType(); - - protected override void InitPlaceable() - { - width = 20; - height = 20; - item.maxStack = 1; - } - - protected override ModRecipe GetRecipe() - { - ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge, true); - - recipe.AddIngredient(ItemID.MythrilAnvil, 1); - recipe.AddIngredient(ItemID.IronAnvil, 1); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.SoulofNight, 5); - recipe.AddIngredient(ItemID.SoulofMight, 5); - - return recipe; - } - } -} +using Decimation.Content.Items.Misc.Souls; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Decimation.Lib.Items; + +namespace Decimation.Content.Items.Placeable +{ + internal class EnchantedAnvil : DecimationPlaceableItem + { + protected override string ItemName => "Enchanted Anvil"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + item.width = 20; + item.height = 20; + item.maxStack = 1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge, true); + + recipe.AddIngredient(ItemID.MythrilAnvil, 1); + recipe.AddIngredient(ItemID.IronAnvil, 1); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.SoulofNight, 5); + recipe.AddIngredient(ItemID.SoulofMight, 5); + + return recipe; + } + } +} diff --git a/Items/Placeable/EnchantedAnvil.png b/Content/Items/Placeable/EnchantedAnvil.png similarity index 100% rename from Items/Placeable/EnchantedAnvil.png rename to Content/Items/Placeable/EnchantedAnvil.png diff --git a/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs b/Content/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs similarity index 67% rename from Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs rename to Content/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs index d8dc887..26aa8b4 100644 --- a/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs +++ b/Content/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs @@ -1,7 +1,7 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria.ModLoader; -namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne { internal class DeadEarth : DecimationPlaceableItem { @@ -10,8 +10,8 @@ namespace Decimation.Items.Placeable.ShrineoftheMoltenOne protected override void InitPlaceable() { - width = 12; - height = 12; + item.width = 12; + item.height = 12; } } } \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.png b/Content/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.png similarity index 100% rename from Items/Placeable/ShrineoftheMoltenOne/DeadEarth.png rename to Content/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.png diff --git a/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs b/Content/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs similarity index 68% rename from Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs rename to Content/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs index 119b577..6c7fbf0 100644 --- a/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs +++ b/Content/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs @@ -1,7 +1,7 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria.ModLoader; -namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne { internal class RedHotSpike : DecimationPlaceableItem { @@ -10,8 +10,8 @@ namespace Decimation.Items.Placeable.ShrineoftheMoltenOne protected override void InitPlaceable() { - width = 12; - height = 12; + item.width = 12; + item.height = 12; } } } \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.png b/Content/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.png similarity index 100% rename from Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.png rename to Content/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.png diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs similarity index 68% rename from Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs rename to Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs index 521bf71..2467fd7 100644 --- a/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs +++ b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs @@ -1,7 +1,7 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria.ModLoader; -namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne { internal class ShrineAltar : DecimationPlaceableItem { @@ -10,8 +10,8 @@ namespace Decimation.Items.Placeable.ShrineoftheMoltenOne protected override void InitPlaceable() { - width = 66; - height = 32; + item.width = 66; + item.height = 32; } } } \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png similarity index 100% rename from Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png rename to Content/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs similarity index 68% rename from Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs rename to Content/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs index 1b1adaa..17a29a2 100644 --- a/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs +++ b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs @@ -1,7 +1,7 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria.ModLoader; -namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne { internal class ShrineBrick : DecimationPlaceableItem { @@ -10,8 +10,8 @@ namespace Decimation.Items.Placeable.ShrineoftheMoltenOne protected override void InitPlaceable() { - width = 12; - height = 12; + item.width = 12; + item.height = 12; } } } \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.png b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.png similarity index 100% rename from Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.png rename to Content/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.png diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs similarity index 57% rename from Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs rename to Content/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs index fd68114..8c05e3a 100644 --- a/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs +++ b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs @@ -1,9 +1,9 @@ -using Decimation.Tiles.ShrineoftheMoltenOne; -using Decimation.Core.Items; +using Decimation.Content.Tiles.ShrineoftheMoltenOne; +using Decimation.Lib.Items; using Terraria; using Terraria.ModLoader; -namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +namespace Decimation.Content.Items.Placeable.ShrineoftheMoltenOne { internal class ShrineDoor : DecimationPlaceableItem { @@ -12,10 +12,10 @@ namespace Decimation.Items.Placeable.ShrineoftheMoltenOne protected override void InitPlaceable() { - width = 14; - height = 28; + item.width = 14; + item.height = 28; this.item.maxStack = 99; - value = Item.buyPrice(0, 0, 1, 50); + item.value = Item.buyPrice(0, 0, 1, 50); } } } \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.png b/Content/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.png similarity index 100% rename from Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.png rename to Content/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.png diff --git a/Items/Placeable/TalonianPillar.cs b/Content/Items/Placeable/TalonianPillar.cs similarity index 86% rename from Items/Placeable/TalonianPillar.cs rename to Content/Items/Placeable/TalonianPillar.cs index a4a2f33..ae8ec00 100644 --- a/Items/Placeable/TalonianPillar.cs +++ b/Content/Items/Placeable/TalonianPillar.cs @@ -1,7 +1,7 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria.ModLoader; -namespace Decimation.Items.Placeable +namespace Decimation.Content.Items.Placeable { internal class TalonianPillar : DecimationPlaceableItem { diff --git a/Items/Placeable/TalonianPillar.png b/Content/Items/Placeable/TalonianPillar.png similarity index 100% rename from Items/Placeable/TalonianPillar.png rename to Content/Items/Placeable/TalonianPillar.png diff --git a/Items/Placeable/TitanForge.cs b/Content/Items/Placeable/TitanForge.cs similarity index 86% rename from Items/Placeable/TitanForge.cs rename to Content/Items/Placeable/TitanForge.cs index 4850b38..d9c8a65 100644 --- a/Items/Placeable/TitanForge.cs +++ b/Content/Items/Placeable/TitanForge.cs @@ -1,39 +1,39 @@ -using Decimation.Items.Misc.Souls; -using Decimation.Core.Items; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Items.Placeable -{ - internal class TitanForge : DecimationPlaceableItem - { - protected override string ItemName => "Titan Forge"; - protected override string ItemTooltip => "Used to craft powerful weapons and armor."; - protected override int Tile => ModContent.TileType(); - - protected override void InitPlaceable() - { - width = 20; - height = 20; - this.item.maxStack = 1; - } - - protected override ModRecipe GetRecipe() - { - ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType(), true); - - recipe.AddIngredient(ItemID.AdamantiteForge); - recipe.AddIngredient(ItemID.Autohammer); - recipe.AddIngredient(ItemID.AdamantiteBar, 5); - recipe.AddIngredient(ItemID.TitaniumBar, 5); - recipe.AddIngredient(ItemID.LavaBucket); - recipe.AddIngredient(ItemID.SoulofMight, 5); - recipe.AddIngredient(ItemID.SoulofFright, 5); - recipe.AddIngredient(ItemID.SoulofSight, 5); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.SoulofFlight, 5); - - return recipe; - } - } +using Decimation.Content.Items.Misc.Souls; +using Decimation.Lib.Items; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Items.Placeable +{ + internal class TitanForge : DecimationPlaceableItem + { + protected override string ItemName => "Titan Forge"; + protected override string ItemTooltip => "Used to craft powerful weapons and armor."; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + item.width = 20; + item.height = 20; + this.item.maxStack = 1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType(), true); + + recipe.AddIngredient(ItemID.AdamantiteForge); + recipe.AddIngredient(ItemID.Autohammer); + recipe.AddIngredient(ItemID.AdamantiteBar, 5); + recipe.AddIngredient(ItemID.TitaniumBar, 5); + recipe.AddIngredient(ItemID.LavaBucket); + recipe.AddIngredient(ItemID.SoulofMight, 5); + recipe.AddIngredient(ItemID.SoulofFright, 5); + recipe.AddIngredient(ItemID.SoulofSight, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.SoulofFlight, 5); + + return recipe; + } + } } \ No newline at end of file diff --git a/Items/Placeable/TitanForge.png b/Content/Items/Placeable/TitanForge.png similarity index 100% rename from Items/Placeable/TitanForge.png rename to Content/Items/Placeable/TitanForge.png diff --git a/Items/Potions/Antidote.cs b/Content/Items/Potions/Antidote.cs similarity index 78% rename from Items/Potions/Antidote.cs rename to Content/Items/Potions/Antidote.cs index c69c049..b514f03 100644 --- a/Items/Potions/Antidote.cs +++ b/Content/Items/Potions/Antidote.cs @@ -1,9 +1,9 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Potions +namespace Decimation.Content.Items.Potions { // Not an actual potion, since it doesn't give the player any buff. internal class Antidote : DecimationItem @@ -13,14 +13,14 @@ namespace Decimation.Items.Potions protected override void Init() { - width = 20; - height = 20; + item.width = 20; + item.height = 20; this.item.maxStack = 30; - consumable = true; - useAnimation = 17; - useTime = 17; + item.consumable = true; + item.useAnimation = 17; + item.useTime = 17; this.item.useTurn = true; - useStyle = 2; + item.useStyle = 2; } public override bool UseItem(Player player) diff --git a/Items/Potions/Antidote.png b/Content/Items/Potions/Antidote.png similarity index 100% rename from Items/Potions/Antidote.png rename to Content/Items/Potions/Antidote.png diff --git a/Items/Potions/CommanderPotion.cs b/Content/Items/Potions/CommanderPotion.cs similarity index 86% rename from Items/Potions/CommanderPotion.cs rename to Content/Items/Potions/CommanderPotion.cs index 1ac05a4..b10e060 100644 --- a/Items/Potions/CommanderPotion.cs +++ b/Content/Items/Potions/CommanderPotion.cs @@ -1,10 +1,10 @@ -using Decimation.Buffs.Buffs; -using Decimation.Core.Items; +using Decimation.Content.Buffs.Buffs; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Potions +namespace Decimation.Content.Items.Potions { internal class CommanderPotion : DecimationPotion { @@ -18,7 +18,7 @@ namespace Decimation.Items.Potions protected override void InitPotion() { - value = Item.buyPrice(0, 1); + item.value = Item.buyPrice(0, 1); } protected override ModRecipe GetRecipe() diff --git a/Items/Potions/CommanderPotion.png b/Content/Items/Potions/CommanderPotion.png similarity index 100% rename from Items/Potions/CommanderPotion.png rename to Content/Items/Potions/CommanderPotion.png diff --git a/Items/Potions/EnchantedMushroom.cs b/Content/Items/Potions/EnchantedMushroom.cs similarity index 89% rename from Items/Potions/EnchantedMushroom.cs rename to Content/Items/Potions/EnchantedMushroom.cs index 1aa7f19..d2df288 100644 --- a/Items/Potions/EnchantedMushroom.cs +++ b/Content/Items/Potions/EnchantedMushroom.cs @@ -1,9 +1,9 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Potions +namespace Decimation.Content.Items.Potions { internal class EnchantedMushroom : DecimationPotion { @@ -15,7 +15,7 @@ namespace Decimation.Items.Potions protected override void InitPotion() { - value = Item.buyPrice(0, 0, 15); + item.value = Item.buyPrice(0, 0, 15); } public override bool UseItem(Player player) diff --git a/Items/Potions/EnchantedMushroom.png b/Content/Items/Potions/EnchantedMushroom.png similarity index 100% rename from Items/Potions/EnchantedMushroom.png rename to Content/Items/Potions/EnchantedMushroom.png diff --git a/Items/Potions/WarlockPotion.cs b/Content/Items/Potions/WarlockPotion.cs similarity index 85% rename from Items/Potions/WarlockPotion.cs rename to Content/Items/Potions/WarlockPotion.cs index b39dd83..96fe811 100644 --- a/Items/Potions/WarlockPotion.cs +++ b/Content/Items/Potions/WarlockPotion.cs @@ -1,10 +1,10 @@ -using Decimation.Buffs.Buffs; -using Decimation.Core.Items; +using Decimation.Content.Buffs.Buffs; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Potions +namespace Decimation.Content.Items.Potions { internal class WarlockPotion : DecimationPotion { @@ -18,7 +18,7 @@ namespace Decimation.Items.Potions protected override void InitPotion() { - value = Item.buyPrice(0, 0, 80); + item.value = Item.buyPrice(0, 0, 80); } protected override ModRecipe GetRecipe() diff --git a/Items/Potions/WarlockPotion.png b/Content/Items/Potions/WarlockPotion.png similarity index 100% rename from Items/Potions/WarlockPotion.png rename to Content/Items/Potions/WarlockPotion.png diff --git a/Items/Tools/GildedSickle.cs b/Content/Items/Tools/GildedSickle.cs similarity index 75% rename from Items/Tools/GildedSickle.cs rename to Content/Items/Tools/GildedSickle.cs index 506f262..54804fe 100644 --- a/Items/Tools/GildedSickle.cs +++ b/Content/Items/Tools/GildedSickle.cs @@ -1,27 +1,26 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Tools +namespace Decimation.Content.Items.Tools { internal class GildedSickle : DecimationTool { protected override string ItemName => "The Gilded Sickle"; protected override string ItemTooltip => "Allows the collection of hay from grass"; - protected override bool IsClone => true; protected override int MeleeDamages => 10; protected override void InitTool() { this.item.CloneDefaults(ItemID.Sickle); - width = 16; - height = 16; - value = Item.buyPrice(0, 0, 1); + item.width = 16; + item.height = 16; + item.value = Item.buyPrice(0, 0, 1); this.item.knockBack = 5; - useTime = 14; - useAnimation = 14; + item.useTime = 14; + item.useAnimation = 14; } protected override ModRecipe GetRecipe() diff --git a/Items/Tools/GildedSickle.png b/Content/Items/Tools/GildedSickle.png similarity index 100% rename from Items/Tools/GildedSickle.png rename to Content/Items/Tools/GildedSickle.png diff --git a/Items/Tools/GreatwoodHammer.cs b/Content/Items/Tools/GreatwoodHammer.cs similarity index 70% rename from Items/Tools/GreatwoodHammer.cs rename to Content/Items/Tools/GreatwoodHammer.cs index 2ca6481..4578e32 100644 --- a/Items/Tools/GreatwoodHammer.cs +++ b/Content/Items/Tools/GreatwoodHammer.cs @@ -1,10 +1,10 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Tools +namespace Decimation.Content.Items.Tools { internal class GreatwoodHammer : DecimationTool { @@ -15,14 +15,14 @@ namespace Decimation.Items.Tools protected override void InitTool() { - width = 40; - height = 40; - useTime = 10; - useAnimation = 25; + item.width = 40; + item.height = 40; + item.useTime = 10; + item.useAnimation = 25; this.item.knockBack = 5; - value = Item.buyPrice(0, 0, 10); - rarity = Rarity.Green; - useSound = SoundID.Item1; + item.value = Item.buyPrice(0, 0, 10); + item.rare = Rarity.Green.GetRarityValue(); + item.UseSound = SoundID.Item1; } protected override ModRecipe GetRecipe() diff --git a/Items/Tools/GreatwoodHammer.png b/Content/Items/Tools/GreatwoodHammer.png similarity index 100% rename from Items/Tools/GreatwoodHammer.png rename to Content/Items/Tools/GreatwoodHammer.png diff --git a/Items/Tools/MultigrainHammer.cs b/Content/Items/Tools/MultigrainHammer.cs similarity index 71% rename from Items/Tools/MultigrainHammer.cs rename to Content/Items/Tools/MultigrainHammer.cs index d8b00ce..8d65cb4 100644 --- a/Items/Tools/MultigrainHammer.cs +++ b/Content/Items/Tools/MultigrainHammer.cs @@ -1,10 +1,10 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Tools +namespace Decimation.Content.Items.Tools { internal class MultigrainHammer : DecimationTool { @@ -16,15 +16,15 @@ namespace Decimation.Items.Tools protected override void InitTool() { - width = 32; - height = 32; - useTime = 20; - useAnimation = 20; + item.width = 32; + item.height = 32; + item.useTime = 20; + item.useAnimation = 20; this.item.knockBack = 5; - value = Item.buyPrice(0, 0, 10); - rarity = Rarity.Green; + item.value = Item.buyPrice(0, 0, 10); + item.rare = Rarity.Green.GetRarityValue(); this.item.crit = 3; - useSound = SoundID.Item1; + item.UseSound = SoundID.Item1; } protected override ModRecipe GetRecipe() diff --git a/Items/Tools/MultigrainHammer.png b/Content/Items/Tools/MultigrainHammer.png similarity index 100% rename from Items/Tools/MultigrainHammer.png rename to Content/Items/Tools/MultigrainHammer.png diff --git a/Items/Tools/TheHourGlass.cs b/Content/Items/Tools/TheHourGlass.cs similarity index 64% rename from Items/Tools/TheHourGlass.cs rename to Content/Items/Tools/TheHourGlass.cs index c9cd0d5..1bf922a 100644 --- a/Items/Tools/TheHourGlass.cs +++ b/Content/Items/Tools/TheHourGlass.cs @@ -1,8 +1,8 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; -namespace Decimation.Items.Tools +namespace Decimation.Content.Items.Tools { internal class TheHourGlass : DecimationTool { @@ -12,12 +12,12 @@ namespace Decimation.Items.Tools protected override void InitTool() { this.item.mana = 50; - width = 22; - height = 36; - useTime = 16; - useAnimation = 16; - useStyle = 4; - rarity = Rarity.Purple; + item.width = 22; + item.height = 36; + item.useTime = 16; + item.useAnimation = 16; + item.useStyle = 4; + item.rare = Rarity.Purple.GetRarityValue(); this.item.expert = true; } diff --git a/Items/Tools/TheHourGlass.png b/Content/Items/Tools/TheHourGlass.png similarity index 100% rename from Items/Tools/TheHourGlass.png rename to Content/Items/Tools/TheHourGlass.png diff --git a/Items/Tools/TitanitePax.cs b/Content/Items/Tools/TitanitePax.cs similarity index 68% rename from Items/Tools/TitanitePax.cs rename to Content/Items/Tools/TitanitePax.cs index 276f117..be26601 100644 --- a/Items/Tools/TitanitePax.cs +++ b/Content/Items/Tools/TitanitePax.cs @@ -1,11 +1,11 @@ -using Decimation.Items.Ores; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Ores; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Tools +namespace Decimation.Content.Items.Tools { internal class TitanitePax : DecimationTool { @@ -16,13 +16,13 @@ namespace Decimation.Items.Tools protected override void InitTool() { - width = 48; - height = 52; + item.width = 48; + item.height = 52; this.item.crit = 14; - useTime = 5; - useAnimation = 15; + item.useTime = 5; + item.useAnimation = 15; this.item.knockBack = 7; - rarity = Rarity.LightRed; + item.rare = Rarity.LightRed.GetRarityValue(); } protected override ModRecipe GetRecipe() diff --git a/Items/Tools/TitanitePax.png b/Content/Items/Tools/TitanitePax.png similarity index 100% rename from Items/Tools/TitanitePax.png rename to Content/Items/Tools/TitanitePax.png diff --git a/Items/Vanity/DuneWorm/DuneWormMask.cs b/Content/Items/Vanity/DuneWorm/DuneWormMask.cs similarity index 66% rename from Items/Vanity/DuneWorm/DuneWormMask.cs rename to Content/Items/Vanity/DuneWorm/DuneWormMask.cs index f68a74a..40f5075 100644 --- a/Items/Vanity/DuneWorm/DuneWormMask.cs +++ b/Content/Items/Vanity/DuneWorm/DuneWormMask.cs @@ -1,8 +1,8 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria.ModLoader; -namespace Decimation.Items.Vanity.DuneWorm +namespace Decimation.Content.Items.Vanity.DuneWorm { [AutoloadEquip(EquipType.Head)] internal class DuneWormMask : DecimationItem @@ -12,9 +12,9 @@ namespace Decimation.Items.Vanity.DuneWorm protected override void Init() { - width = 36; - height = 32; - rarity = Rarity.Orange; + item.width = 36; + item.height = 32; + item.rare = Rarity.Orange.GetRarityValue(); this.item.vanity = true; } diff --git a/Items/Vanity/DuneWorm/DuneWormMask.png b/Content/Items/Vanity/DuneWorm/DuneWormMask.png similarity index 100% rename from Items/Vanity/DuneWorm/DuneWormMask.png rename to Content/Items/Vanity/DuneWorm/DuneWormMask.png diff --git a/Items/Vanity/DuneWorm/DuneWormMask_Head.png b/Content/Items/Vanity/DuneWorm/DuneWormMask_Head.png similarity index 100% rename from Items/Vanity/DuneWorm/DuneWormMask_Head.png rename to Content/Items/Vanity/DuneWorm/DuneWormMask_Head.png diff --git a/Items/Weapons/Arachnus/ChainStynger.cs b/Content/Items/Weapons/Arachnus/ChainStynger.cs similarity index 82% rename from Items/Weapons/Arachnus/ChainStynger.cs rename to Content/Items/Weapons/Arachnus/ChainStynger.cs index 4a952b6..2578b2b 100644 --- a/Items/Weapons/Arachnus/ChainStynger.cs +++ b/Content/Items/Weapons/Arachnus/ChainStynger.cs @@ -1,17 +1,16 @@ -using Decimation.Buffs.Debuffs; -using Decimation.Core.Items; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Weapons.Arachnus +namespace Decimation.Content.Items.Weapons.Arachnus { internal class ChainStynger : DecimationWeapon { protected override string ItemName => "Chain Stynger"; protected override string ItemTooltip => "Unleashe molten ashes upon your foes."; - protected override bool IsClone => true; - protected override DamageType DamagesType => DamageType.RANGED; + protected override DamageType DamagesType => DamageType.Ranged; protected override int Damages => 800; protected override string Projectile => "MoltenStyngerBolt"; @@ -19,7 +18,7 @@ namespace Decimation.Items.Weapons.Arachnus { this.item.CloneDefaults(ItemID.Stynger); - shootSpeed = 9f; + item.shootSpeed = 9f; this.item.crit *= 2; this.item.knockBack *= 2; this.item.rare = 10; diff --git a/Items/Weapons/Arachnus/ChainStynger.png b/Content/Items/Weapons/Arachnus/ChainStynger.png similarity index 100% rename from Items/Weapons/Arachnus/ChainStynger.png rename to Content/Items/Weapons/Arachnus/ChainStynger.png diff --git a/Content/Items/Weapons/Arachnus/GlaiveWeaver.cs b/Content/Items/Weapons/Arachnus/GlaiveWeaver.cs new file mode 100644 index 0000000..0dd43df --- /dev/null +++ b/Content/Items/Weapons/Arachnus/GlaiveWeaver.cs @@ -0,0 +1,28 @@ +using Decimation.Lib.Items; +using Decimation.Lib.Util; +using Terraria; + +namespace Decimation.Content.Items.Weapons.Arachnus +{ + internal class GlaiveWeaver : DecimationWeapon + { + protected override string ItemName => "Glaive Weaver"; + protected override string ItemTooltip => "Your palm burns as you wield this godly weapon."; + protected override int Damages => 850; + protected override string Projectile => "ArchingSolarBlade"; + + protected override void InitWeapon() + { + item.width = 42; + item.height = 46; + item.value = Item.buyPrice(0, 45); + item.rare = Rarity.Red.GetRarityValue(); + item.useTime = 15; + item.useAnimation = 15; + item.shootSpeed = 15; + item.crit = 10; + item.autoReuse = true; + item.knockBack = 4; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Arachnus/GlaiveWeaver.png b/Content/Items/Weapons/Arachnus/GlaiveWeaver.png similarity index 100% rename from Items/Weapons/Arachnus/GlaiveWeaver.png rename to Content/Items/Weapons/Arachnus/GlaiveWeaver.png diff --git a/Items/Weapons/Arachnus/Infernolizer.cs b/Content/Items/Weapons/Arachnus/Infernolizer.cs similarity index 68% rename from Items/Weapons/Arachnus/Infernolizer.cs rename to Content/Items/Weapons/Arachnus/Infernolizer.cs index bae1b26..d7aaea4 100644 --- a/Items/Weapons/Arachnus/Infernolizer.cs +++ b/Content/Items/Weapons/Arachnus/Infernolizer.cs @@ -1,32 +1,30 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; -namespace Decimation.Items.Weapons.Arachnus +namespace Decimation.Content.Items.Weapons.Arachnus { internal class Infernolizer : DecimationWeapon { protected override string ItemName => "Infernolizer"; protected override string ItemTooltip => "Releases flares upon your foes"; - protected override bool IsClone => true; protected override int Damages => 880; - protected override DamageType DamagesType => DamageType.MAGIC; + protected override DamageType DamagesType => DamageType.Magic; protected override bool VanillaProjectile => true; protected override string Projectile => "HeatRay"; protected override void InitWeapon() { - this.item.CloneDefaults(ItemID.HeatRay); - - criticalStrikeChance *= 2; - knockBack *= 2; - useTime /= 2; - useAnimation /= 2; - value = Item.buyPrice(0, 45); - rarity = Rarity.Red; - shootSpeed = 15f; + item.CloneDefaults(ItemID.HeatRay); + item.crit = 8; + item.knockBack = 6; + item.useTime = 10; + item.useAnimation = 10; + item.value = Item.buyPrice(0, 45); + item.rare = Rarity.Red.GetRarityValue(); + item.shootSpeed = 15f; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, diff --git a/Items/Weapons/Arachnus/Infernolizer.png b/Content/Items/Weapons/Arachnus/Infernolizer.png similarity index 100% rename from Items/Weapons/Arachnus/Infernolizer.png rename to Content/Items/Weapons/Arachnus/Infernolizer.png diff --git a/Items/Weapons/Bloodshot/BloodStream.cs b/Content/Items/Weapons/Bloodshot/BloodStream.cs similarity index 63% rename from Items/Weapons/Bloodshot/BloodStream.cs rename to Content/Items/Weapons/Bloodshot/BloodStream.cs index 89302d8..78589fd 100644 --- a/Items/Weapons/Bloodshot/BloodStream.cs +++ b/Content/Items/Weapons/Bloodshot/BloodStream.cs @@ -1,34 +1,34 @@ -using Decimation.Buffs.Debuffs; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Weapons.Bloodshot +namespace Decimation.Content.Items.Weapons.Bloodshot { internal class BloodStream : DecimationWeapon { protected override string ItemName => "Blood Stream"; protected override string ItemTooltip => "Bathe your enemies in boiling blood."; - protected override DamageType DamagesType => DamageType.MAGIC; + protected override DamageType DamagesType => DamageType.Magic; protected override int Damages => 14; protected override string Projectile => "BloodBeamFriendly"; protected override void InitWeapon() { - width = 20; - height = 20; - value = Item.buyPrice(0, 2); - rarity = Rarity.Green; - useStyle = 5; - shootSpeed = 5f; + item.width = 20; + item.height = 20; + item.value = Item.buyPrice(0, 2); + item.rare = Rarity.Green.GetRarityValue(); + item.useStyle = 5; + item.shootSpeed = 5f; this.item.mana = 1; - useTime = 5; - useAnimation = 5; - autoReuse = true; - useSound = SoundID.Item34; + item.useTime = 5; + item.useAnimation = 5; + item.autoReuse = true; + item.UseSound = SoundID.Item34; } public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) diff --git a/Items/Weapons/Bloodshot/BloodStream.png b/Content/Items/Weapons/Bloodshot/BloodStream.png similarity index 100% rename from Items/Weapons/Bloodshot/BloodStream.png rename to Content/Items/Weapons/Bloodshot/BloodStream.png diff --git a/Items/Weapons/Bloodshot/Umbra.cs b/Content/Items/Weapons/Bloodshot/Umbra.cs similarity index 65% rename from Items/Weapons/Bloodshot/Umbra.cs rename to Content/Items/Weapons/Bloodshot/Umbra.cs index c62639e..15ed3c2 100644 --- a/Items/Weapons/Bloodshot/Umbra.cs +++ b/Content/Items/Weapons/Bloodshot/Umbra.cs @@ -1,34 +1,34 @@ -using Decimation.Projectiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Projectiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Weapons.Bloodshot +namespace Decimation.Content.Items.Weapons.Bloodshot { internal class Umbra : DecimationWeapon { protected override string ItemName => "Umbra"; protected override string ItemTooltip => "Turns wooden arrows into siphon arrows."; - protected override DamageType DamagesType => DamageType.RANGED; + protected override DamageType DamagesType => DamageType.Ranged; protected override int Damages => 18; protected override string Projectile => "WoodenArrowFriendly"; protected override bool VanillaProjectile => true; protected override void InitWeapon() { - width = 20; - height = 20; - value = Item.buyPrice(0, 2); - rarity = Rarity.Green; + item.width = 20; + item.height = 20; + item.value = Item.buyPrice(0, 2); + item.rare = Rarity.Green.GetRarityValue(); this.item.useAmmo = AmmoID.Arrow; - shootSpeed = 6.8f; - useTime = 26; - useAnimation = 26; - useStyle = 5; - useSound = SoundID.Item5; + item.shootSpeed = 6.8f; + item.useTime = 26; + item.useAnimation = 26; + item.useStyle = 5; + item.UseSound = SoundID.Item5; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, diff --git a/Items/Weapons/Bloodshot/Umbra.png b/Content/Items/Weapons/Bloodshot/Umbra.png similarity index 100% rename from Items/Weapons/Bloodshot/Umbra.png rename to Content/Items/Weapons/Bloodshot/Umbra.png diff --git a/Items/Weapons/Bloodshot/VampiricShiv.cs b/Content/Items/Weapons/Bloodshot/VampiricShiv.cs similarity index 66% rename from Items/Weapons/Bloodshot/VampiricShiv.cs rename to Content/Items/Weapons/Bloodshot/VampiricShiv.cs index fbc7320..5feca32 100644 --- a/Items/Weapons/Bloodshot/VampiricShiv.cs +++ b/Content/Items/Weapons/Bloodshot/VampiricShiv.cs @@ -1,8 +1,8 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; -namespace Decimation.Items.Weapons.Bloodshot +namespace Decimation.Content.Items.Weapons.Bloodshot { internal class VampiricShiv : DecimationWeapon { @@ -12,15 +12,15 @@ namespace Decimation.Items.Weapons.Bloodshot protected override void InitWeapon() { - width = 20; - height = 20; - criticalStrikeChance = 4; - useStyle = 3; - useTime = 12; - useAnimation = 12; - rarity = Rarity.Green; - knockBack = 5; - value = Item.buyPrice(0, 2); + item.width = 20; + item.height = 20; + item.crit = 4; + item.useStyle = 3; + item.useTime = 12; + item.useAnimation = 12; + item.rare = Rarity.Green.GetRarityValue(); + item.knockBack = 5; + item.value = Item.buyPrice(0, 2); } public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) diff --git a/Items/Weapons/Bloodshot/VampiricShiv.png b/Content/Items/Weapons/Bloodshot/VampiricShiv.png similarity index 100% rename from Items/Weapons/Bloodshot/VampiricShiv.png rename to Content/Items/Weapons/Bloodshot/VampiricShiv.png diff --git a/Items/Weapons/CelestialEdge.png b/Content/Items/Weapons/CelestialEdge.png similarity index 100% rename from Items/Weapons/CelestialEdge.png rename to Content/Items/Weapons/CelestialEdge.png diff --git a/Content/Items/Weapons/HourHand.cs b/Content/Items/Weapons/HourHand.cs new file mode 100644 index 0000000..9b4c7ef --- /dev/null +++ b/Content/Items/Weapons/HourHand.cs @@ -0,0 +1,41 @@ +using Decimation.Lib.Items; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; + +namespace Decimation.Content.Items.Weapons +{ + public class HourHand : DecimationWeapon + { + protected override string ItemName => "Hour Hand"; + protected override string ItemTooltip => "The sands of time flow in your favor!"; + protected override int Damages => 45; + protected override string Projectile => "HourHandProjectile"; + + protected override void InitWeapon() + { + item.width = 35; + item.height = 35; + item.useTime = 28; + item.useAnimation = 28; + item.knockBack = 5; + item.value = Item.buyPrice(gold: 1); + item.rare = 2; + item.crit = 7; + item.shootSpeed = 10f; + } + + 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 (Main.rand.NextBool()) player.AddBuff(BuffID.Swiftness, 1500); + + return true; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + Lighting.AddLight(item.Center, 0f, 0f, 1f); + } + } +} \ No newline at end of file diff --git a/Content/Items/Weapons/HourHand.png b/Content/Items/Weapons/HourHand.png new file mode 100644 index 0000000..4f1acea Binary files /dev/null and b/Content/Items/Weapons/HourHand.png differ diff --git a/Items/Weapons/MultigrainSword.cs b/Content/Items/Weapons/MultigrainSword.cs similarity index 64% rename from Items/Weapons/MultigrainSword.cs rename to Content/Items/Weapons/MultigrainSword.cs index 7bed5c6..7049ad7 100644 --- a/Items/Weapons/MultigrainSword.cs +++ b/Content/Items/Weapons/MultigrainSword.cs @@ -1,44 +1,44 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Items.Weapons -{ - internal class MultigrainSword : DecimationWeapon - { - protected override string ItemName => "Multigrain Sword"; - protected override string ItemTooltip => "Smells like honeysuckle"; - protected override int Damages => 30; - protected override string Projectile => "Stinger"; - - protected override void InitWeapon() - { - width = 36; - height = 37; - useTime = 26; - useAnimation = 26; - knockBack = 5; - value = Item.buyPrice(0, 0, 40); - rarity = Rarity.Green; - criticalStrikeChance = 4; - autoReuse = true; - this.item.expert = false; - shootSpeed = 10f; - } - - protected override ModRecipe GetRecipe() - { - ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Anvils, true); - - recipe.AddIngredient(ItemID.CactusSword); - recipe.AddIngredient(ItemID.Pumpkin, 15); - recipe.AddIngredient(ItemID.Acorn, 5); - recipe.AddIngredient(ItemID.Hay, 15); - recipe.AddIngredient(ModContent.ItemType()); - - return recipe; - } - } +using Decimation.Lib.Items; +using Decimation.Lib.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Items.Weapons +{ + internal class MultigrainSword : DecimationWeapon + { + protected override string ItemName => "Multigrain Sword"; + protected override string ItemTooltip => "Smells like honeysuckle"; + protected override int Damages => 30; + protected override string Projectile => "Stinger"; + + protected override void InitWeapon() + { + item.width = 36; + item.height = 37; + item.useTime = 26; + item.useAnimation = 26; + item.knockBack = 5; + item.value = Item.buyPrice(0, 0, 40); + item.rare = Rarity.Green.GetRarityValue(); + item.crit = 4; + item.autoReuse = true; + item.expert = false; + item.shootSpeed = 10f; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Anvils, true); + + recipe.AddIngredient(ItemID.CactusSword); + recipe.AddIngredient(ItemID.Pumpkin, 15); + recipe.AddIngredient(ItemID.Acorn, 5); + recipe.AddIngredient(ItemID.Hay, 15); + recipe.AddIngredient(ModContent.ItemType()); + + return recipe; + } + } } \ No newline at end of file diff --git a/Items/Weapons/MultigrainSword.png b/Content/Items/Weapons/MultigrainSword.png similarity index 100% rename from Items/Weapons/MultigrainSword.png rename to Content/Items/Weapons/MultigrainSword.png diff --git a/Items/Weapons/RodofLightning.cs b/Content/Items/Weapons/RodofLightning.cs similarity index 60% rename from Items/Weapons/RodofLightning.cs rename to Content/Items/Weapons/RodofLightning.cs index 8d2db70..26e82fc 100644 --- a/Items/Weapons/RodofLightning.cs +++ b/Content/Items/Weapons/RodofLightning.cs @@ -1,23 +1,23 @@ -using Decimation.Core.Items; +using Decimation.Lib.Items; -namespace Decimation.Items.Weapons +namespace Decimation.Content.Items.Weapons { internal class RodofLightning : DecimationWeapon { protected override string ItemName => "Rod of Lightning"; protected override int Damages => 90; - protected override DamageType DamagesType => DamageType.MAGIC; + protected override DamageType DamagesType => DamageType.Magic; protected override string Projectile => "LightningSphere"; protected override void InitWeapon() { this.item.mana = 17; - knockBack = 7; - criticalStrikeChance = 15; - useStyle = 3; - useTime = 15; - useAnimation = 15; - shootSpeed = 15f; + item.knockBack = 7; + item.crit = 15; + item.useStyle = 3; + item.useTime = 15; + item.useAnimation = 15; + item.shootSpeed = 15f; } } } \ No newline at end of file diff --git a/Items/Weapons/RodofLightning.png b/Content/Items/Weapons/RodofLightning.png similarity index 100% rename from Items/Weapons/RodofLightning.png rename to Content/Items/Weapons/RodofLightning.png diff --git a/Items/Weapons/Sling.cs b/Content/Items/Weapons/Sling.cs similarity index 51% rename from Items/Weapons/Sling.cs rename to Content/Items/Weapons/Sling.cs index 89c7b58..caa255c 100644 --- a/Items/Weapons/Sling.cs +++ b/Content/Items/Weapons/Sling.cs @@ -1,28 +1,28 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; -using Terraria.ID; - -namespace Decimation.Items.Weapons -{ - internal class Sling : DecimationWeapon - { - protected override string ItemName => "Sling"; - protected override string ItemTooltip => "Uses pebbles and marbles as ammo"; - protected override DamageType DamagesType => DamageType.RANGED; - protected override int Damages => 9; - protected override string Ammo => "Pebble"; - - protected override void InitWeapon() - { - width = 30; - height = 22; - useTime = 16; - useAnimation = 16; - knockBack = 6; - rarity = Rarity.Orange; - useSound = SoundID.Item5; - shootSpeed = 10f; - criticalStrikeChance = 10; - } - } +using Decimation.Lib.Items; +using Decimation.Lib.Util; +using Terraria.ID; + +namespace Decimation.Content.Items.Weapons +{ + internal class Sling : DecimationWeapon + { + protected override string ItemName => "Sling"; + protected override string ItemTooltip => "Uses pebbles and marbles as ammo"; + protected override DamageType DamagesType => DamageType.Ranged; + protected override int Damages => 9; + protected override string Ammo => "Pebble"; + + protected override void InitWeapon() + { + item.width = 30; + item.height = 22; + item.useTime = 16; + item.useAnimation = 16; + item.knockBack = 6; + item.rare = Rarity.Orange.GetRarityValue(); + item.UseSound = SoundID.Item5; + item.shootSpeed = 10f; + item.crit = 10; + } + } } \ No newline at end of file diff --git a/Items/Weapons/Sling.png b/Content/Items/Weapons/Sling.png similarity index 100% rename from Items/Weapons/Sling.png rename to Content/Items/Weapons/Sling.png diff --git a/Items/Weapons/SlingshotWood.cs b/Content/Items/Weapons/SlingshotWood.cs similarity index 63% rename from Items/Weapons/SlingshotWood.cs rename to Content/Items/Weapons/SlingshotWood.cs index ad8c2ae..d7b6c5e 100644 --- a/Items/Weapons/SlingshotWood.cs +++ b/Content/Items/Weapons/SlingshotWood.cs @@ -1,43 +1,43 @@ -using Decimation.Items.Ammo; -using Decimation.Core.Items; -using Decimation.Core.Util; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Items.Weapons -{ - internal class SlingshotWood : DecimationWeapon - { - protected override string ItemName => "Slingshot"; - protected override string ItemTooltip => "Uses pebbles and marbles as ammo"; - protected override DamageType DamagesType => DamageType.THROW; - protected override int Damages => 7; - - protected override void InitWeapon() - { - this.item.noMelee = true; - width = 32; - height = 32; - useTime = 16; - useAnimation = 16; - useStyle = 5; - this.item.shoot = 1; - item.useAmmo = ModContent.ItemType(); - knockBack = 6; - rarity = Rarity.Orange; - useSound = SoundID.Item5; - shootSpeed = 10f; - criticalStrikeChance = 10; - } - - protected override ModRecipe GetRecipe() - { - ModRecipe recipe = GetNewModRecipe(this, 1, TileID.WorkBenches); - - recipe.AddIngredient(ItemID.Wood, 12); - // recipe.AddIngredient(null,"CrimsoniteBar", 10); - - return recipe; - } - } +using Decimation.Content.Items.Ammo; +using Decimation.Lib.Items; +using Decimation.Lib.Util; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Items.Weapons +{ + internal class SlingshotWood : DecimationWeapon + { + protected override string ItemName => "Slingshot"; + protected override string ItemTooltip => "Uses pebbles and marbles as ammo"; + protected override DamageType DamagesType => DamageType.Throw; + protected override int Damages => 7; + + protected override void InitWeapon() + { + this.item.noMelee = true; + item.width = 32; + item.height = 32; + item.useTime = 16; + item.useAnimation = 16; + item.useStyle = 5; + this.item.shoot = 1; + item.useAmmo = ModContent.ItemType(); + item.knockBack = 6; + item.rare = Rarity.Orange.GetRarityValue(); + item.UseSound = SoundID.Item5; + item.shootSpeed = 10f; + item.crit = 10; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.WorkBenches); + + recipe.AddIngredient(ItemID.Wood, 12); + // recipe.AddIngredient(null,"CrimsoniteBar", 10); + + return recipe; + } + } } \ No newline at end of file diff --git a/Items/Weapons/SlingshotWood.png b/Content/Items/Weapons/SlingshotWood.png similarity index 100% rename from Items/Weapons/SlingshotWood.png rename to Content/Items/Weapons/SlingshotWood.png diff --git a/Items/Weapons/TheGreatwoodSword.cs b/Content/Items/Weapons/TheGreatwoodSword.cs similarity index 71% rename from Items/Weapons/TheGreatwoodSword.cs rename to Content/Items/Weapons/TheGreatwoodSword.cs index 984d5d9..9e4602a 100644 --- a/Items/Weapons/TheGreatwoodSword.cs +++ b/Content/Items/Weapons/TheGreatwoodSword.cs @@ -1,40 +1,40 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Items.Weapons -{ - internal class TheGreatwoodSword : DecimationWeapon - { - protected override string ItemName => "The Greatwood Sword"; - protected override string ItemTooltip => "Who needs metal?"; - protected override int Damages => 20; - - protected override void InitWeapon() - { - width = 44; - height = 44; - useTime = 25; - useAnimation = 25; - knockBack = 5; - this.item.value = Item.buyPrice(silver: 40); - rarity = Rarity.Green; - autoReuse = true; - this.item.expert = false; - } - - protected override ModRecipe GetRecipe() - { - ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Anvils, true); - - recipe.AddIngredient(ItemID.WoodenSword); - recipe.AddIngredient(ItemID.BorealWoodSword); - recipe.AddIngredient(ItemID.ShadewoodSword); - recipe.AddIngredient(ItemID.PalmWoodSword); - - return recipe; - } - } +using Decimation.Lib.Items; +using Decimation.Lib.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Items.Weapons +{ + internal class TheGreatwoodSword : DecimationWeapon + { + protected override string ItemName => "The Greatwood Sword"; + protected override string ItemTooltip => "Who needs metal?"; + protected override int Damages => 20; + + protected override void InitWeapon() + { + item.width = 44; + item.height = 44; + item.useTime = 25; + item.useAnimation = 25; + item.knockBack = 5; + this.item.value = Item.buyPrice(silver: 40); + item.rare = Rarity.Green.GetRarityValue(); + item.autoReuse = true; + this.item.expert = false; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Anvils, true); + + recipe.AddIngredient(ItemID.WoodenSword); + recipe.AddIngredient(ItemID.BorealWoodSword); + recipe.AddIngredient(ItemID.ShadewoodSword); + recipe.AddIngredient(ItemID.PalmWoodSword); + + return recipe; + } + } } \ No newline at end of file diff --git a/Items/Weapons/TheGreatwoodSword.png b/Content/Items/Weapons/TheGreatwoodSword.png similarity index 100% rename from Items/Weapons/TheGreatwoodSword.png rename to Content/Items/Weapons/TheGreatwoodSword.png diff --git a/Items/Weapons/TitanicGatliStynger.cs b/Content/Items/Weapons/TitanicGatliStynger.cs similarity index 82% rename from Items/Weapons/TitanicGatliStynger.cs rename to Content/Items/Weapons/TitanicGatliStynger.cs index 075d6d4..cd3f80c 100644 --- a/Items/Weapons/TitanicGatliStynger.cs +++ b/Content/Items/Weapons/TitanicGatliStynger.cs @@ -1,21 +1,20 @@ -using Decimation.Items.Ores; -using Decimation.Items.Weapons.Arachnus; -using Decimation.Projectiles; -using Decimation.Tiles; -using Decimation.Core.Items; +using Decimation.Content.Items.Ores; +using Decimation.Content.Items.Weapons.Arachnus; +using Decimation.Content.Projectiles; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Weapons +namespace Decimation.Content.Items.Weapons { internal class TitanicGatliStynger : DecimationWeapon { protected override string ItemName => "Titanic Gatli Stynger"; protected override string ItemTooltip => "Feel the rage of Kronos by your side."; - protected override bool IsClone => true; - protected override DamageType DamagesType => DamageType.RANGED; + protected override DamageType DamagesType => DamageType.Ranged; protected override int Damages => 950; protected override string Projectile => "TitanicStyngerBolt"; @@ -23,9 +22,9 @@ namespace Decimation.Items.Weapons { this.item.CloneDefaults(ItemID.Stynger); - knockBack = 11; - shootSpeed = 9f; - criticalStrikeChance = 8; + item.knockBack = 11; + item.shootSpeed = 9f; + item.crit = 8; this.item.width = 52; this.item.height = 26; diff --git a/Items/Weapons/TitanicGatliStynger.png b/Content/Items/Weapons/TitanicGatliStynger.png similarity index 100% rename from Items/Weapons/TitanicGatliStynger.png rename to Content/Items/Weapons/TitanicGatliStynger.png diff --git a/Items/Weapons/TitanicLongsword.cs b/Content/Items/Weapons/TitanicLongsword.cs similarity index 64% rename from Items/Weapons/TitanicLongsword.cs rename to Content/Items/Weapons/TitanicLongsword.cs index d7ef25f..7f52985 100644 --- a/Items/Weapons/TitanicLongsword.cs +++ b/Content/Items/Weapons/TitanicLongsword.cs @@ -1,13 +1,13 @@ -using Decimation.Buffs.Debuffs; -using Decimation.Items.Ores; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Content.Items.Ores; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Weapons +namespace Decimation.Content.Items.Weapons { internal class TitanicLongsword : DecimationWeapon { @@ -16,15 +16,15 @@ namespace Decimation.Items.Weapons protected override void InitWeapon() { - useTime = 21; - useAnimation = 21; - criticalStrikeChance = 14; - knockBack = 7; + item.useTime = 21; + item.useAnimation = 21; + item.crit = 14; + item.knockBack = 7; this.item.value = Item.buyPrice(gold: 45); - rarity = Rarity.LightPurple; - width = 84; - height = 84; - autoReuse = true; + item.rare = Rarity.LightPurple.GetRarityValue(); + item.width = 84; + item.height = 84; + item.autoReuse = true; } public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool criticalStrikeChance) diff --git a/Items/Weapons/TitanicLongsword.png b/Content/Items/Weapons/TitanicLongsword.png similarity index 100% rename from Items/Weapons/TitanicLongsword.png rename to Content/Items/Weapons/TitanicLongsword.png diff --git a/Items/Weapons/TitanicPike.cs b/Content/Items/Weapons/TitanicPike.cs similarity index 67% rename from Items/Weapons/TitanicPike.cs rename to Content/Items/Weapons/TitanicPike.cs index f7f5c91..08d54ef 100644 --- a/Items/Weapons/TitanicPike.cs +++ b/Content/Items/Weapons/TitanicPike.cs @@ -1,12 +1,12 @@ -using Decimation.Items.Ores; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Ores; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Weapons +namespace Decimation.Content.Items.Weapons { internal class TitanicPike : DecimationWeapon { @@ -16,19 +16,19 @@ namespace Decimation.Items.Weapons protected override void InitWeapon() { - criticalStrikeChance = 14; - knockBack = 12; - useStyle = 5; + item.crit = 14; + item.knockBack = 12; + item.useStyle = 5; this.item.value = Item.buyPrice(gold: 45); - rarity = Rarity.LightPurple; + item.rare = Rarity.LightPurple.GetRarityValue(); this.item.noUseGraphic = true; this.item.useTurn = true; - autoReuse = true; - width = 94; - height = 94; - useAnimation = 18; - useTime = 24; - shootSpeed = 3.7f; + item.autoReuse = true; + item.width = 94; + item.height = 94; + item.useAnimation = 18; + item.useTime = 24; + item.shootSpeed = 3.7f; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/TitanicPike.png b/Content/Items/Weapons/TitanicPike.png similarity index 100% rename from Items/Weapons/TitanicPike.png rename to Content/Items/Weapons/TitanicPike.png diff --git a/Items/Weapons/TitanicRepeater.cs b/Content/Items/Weapons/TitanicRepeater.cs similarity index 59% rename from Items/Weapons/TitanicRepeater.cs rename to Content/Items/Weapons/TitanicRepeater.cs index 4452e78..64ca324 100644 --- a/Items/Weapons/TitanicRepeater.cs +++ b/Content/Items/Weapons/TitanicRepeater.cs @@ -1,35 +1,35 @@ -using Decimation.Items.Ores; -using Decimation.Tiles; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Ores; +using Decimation.Content.Tiles; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Weapons +namespace Decimation.Content.Items.Weapons { internal class TitanicRepeater : DecimationWeapon { protected override string ItemName => "Titanic Repeater"; - protected override DamageType DamagesType => DamageType.RANGED; + protected override DamageType DamagesType => DamageType.Ranged; protected override int Damages => 120; protected override void InitWeapon() { - width = 56; - height = 36; - criticalStrikeChance = 20; - useStyle = 5; - useTime = 12; - useAnimation = 12; - knockBack = 7; + item.width = 56; + item.height = 36; + item.crit = 20; + item.useStyle = 5; + item.useTime = 12; + item.useAnimation = 12; + item.knockBack = 7; this.item.shoot = 1; this.item.useAmmo = AmmoID.Arrow; - useSound = SoundID.Item5; - shootSpeed = 25; - autoReuse = true; + item.UseSound = SoundID.Item5; + item.shootSpeed = 25; + item.autoReuse = true; this.item.value = Item.buyPrice(gold: 45); - rarity = Rarity.LightPurple; + item.rare = Rarity.LightPurple.GetRarityValue(); } protected override ModRecipe GetRecipe() diff --git a/Items/Weapons/TitanicRepeater.png b/Content/Items/Weapons/TitanicRepeater.png similarity index 100% rename from Items/Weapons/TitanicRepeater.png rename to Content/Items/Weapons/TitanicRepeater.png diff --git a/Items/Weapons/VampiricEdge.cs b/Content/Items/Weapons/VampiricEdge.cs similarity index 74% rename from Items/Weapons/VampiricEdge.cs rename to Content/Items/Weapons/VampiricEdge.cs index c900e52..f2627c5 100644 --- a/Items/Weapons/VampiricEdge.cs +++ b/Content/Items/Weapons/VampiricEdge.cs @@ -1,13 +1,13 @@ -using Decimation.Items.Misc.Souls; -using Decimation.Items.Weapons.Bloodshot; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Content.Items.Weapons.Bloodshot; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Items.Weapons +namespace Decimation.Content.Items.Weapons { internal class VampiricEdge : DecimationWeapon { @@ -20,16 +20,16 @@ namespace Decimation.Items.Weapons protected override void InitWeapon() { - width = 46; - height = 52; - criticalStrikeChance = 6; - knockBack = 4.5f; - useTime = 20; - useAnimation = 20; - shootSpeed = 5f; + item.width = 46; + item.height = 52; + item.crit = 6; + item.knockBack = 4.5f; + item.useTime = 20; + item.useAnimation = 20; + item.shootSpeed = 5f; this.item.value = Item.buyPrice(0, 3); - rarity = Rarity.Green; - autoReuse = true; + item.rare = Rarity.Green.GetRarityValue(); + item.autoReuse = true; } public override void UpdateInventory(Player player) diff --git a/Items/Weapons/VampiricEdge.png b/Content/Items/Weapons/VampiricEdge.png similarity index 100% rename from Items/Weapons/VampiricEdge.png rename to Content/Items/Weapons/VampiricEdge.png diff --git a/NPCs/AncientDuneWorm/AncientDuneWorm.cs b/Content/NPCs/AncientDuneWorm/AncientDuneWorm.cs similarity index 98% rename from NPCs/AncientDuneWorm/AncientDuneWorm.cs rename to Content/NPCs/AncientDuneWorm/AncientDuneWorm.cs index 0384831..d63c878 100644 --- a/NPCs/AncientDuneWorm/AncientDuneWorm.cs +++ b/Content/NPCs/AncientDuneWorm/AncientDuneWorm.cs @@ -1,14 +1,14 @@ using System.IO; using System.Linq; -using Decimation.Buffs.Debuffs; -using Decimation.Core.NPCs; -using Decimation.Projectiles; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Lib.NPCs; +using Decimation.Content.Projectiles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs.AncientDuneWorm +namespace Decimation.Content.NPCs.AncientDuneWorm { [AutoloadBossHead] internal class AncientDuneWormHead : AncientDuneWorm diff --git a/NPCs/AncientDuneWorm/AncientDuneWormBody.png b/Content/NPCs/AncientDuneWorm/AncientDuneWormBody.png similarity index 100% rename from NPCs/AncientDuneWorm/AncientDuneWormBody.png rename to Content/NPCs/AncientDuneWorm/AncientDuneWormBody.png diff --git a/NPCs/AncientDuneWorm/AncientDuneWormHead.png b/Content/NPCs/AncientDuneWorm/AncientDuneWormHead.png similarity index 100% rename from NPCs/AncientDuneWorm/AncientDuneWormHead.png rename to Content/NPCs/AncientDuneWorm/AncientDuneWormHead.png diff --git a/NPCs/AncientDuneWorm/AncientDuneWormHead_Head_Boss.png b/Content/NPCs/AncientDuneWorm/AncientDuneWormHead_Head_Boss.png similarity index 100% rename from NPCs/AncientDuneWorm/AncientDuneWormHead_Head_Boss.png rename to Content/NPCs/AncientDuneWorm/AncientDuneWormHead_Head_Boss.png diff --git a/NPCs/AncientDuneWorm/AncientDuneWormTail.png b/Content/NPCs/AncientDuneWorm/AncientDuneWormTail.png similarity index 100% rename from NPCs/AncientDuneWorm/AncientDuneWormTail.png rename to Content/NPCs/AncientDuneWorm/AncientDuneWormTail.png diff --git a/NPCs/AncientTombCrawlerBody.cs b/Content/NPCs/AncientTombCrawlerBody.cs similarity index 99% rename from NPCs/AncientTombCrawlerBody.cs rename to Content/NPCs/AncientTombCrawlerBody.cs index 2a2dbf6..8b85b58 100644 --- a/NPCs/AncientTombCrawlerBody.cs +++ b/Content/NPCs/AncientTombCrawlerBody.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs +namespace Decimation.Content.NPCs { public class AncientTombCrawlerBody : ModNPC { diff --git a/NPCs/AncientTombCrawlerBody.png b/Content/NPCs/AncientTombCrawlerBody.png similarity index 100% rename from NPCs/AncientTombCrawlerBody.png rename to Content/NPCs/AncientTombCrawlerBody.png diff --git a/NPCs/AncientTombCrawlerHead.cs b/Content/NPCs/AncientTombCrawlerHead.cs similarity index 99% rename from NPCs/AncientTombCrawlerHead.cs rename to Content/NPCs/AncientTombCrawlerHead.cs index 17a8686..0e38553 100644 --- a/NPCs/AncientTombCrawlerHead.cs +++ b/Content/NPCs/AncientTombCrawlerHead.cs @@ -1,12 +1,12 @@ using System; -using Decimation.Items.Misc.Souls; +using Decimation.Content.Items.Misc.Souls; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs +namespace Decimation.Content.NPCs { public class AncientTombCrawlerHead : ModNPC { diff --git a/NPCs/AncientTombCrawlerHead.png b/Content/NPCs/AncientTombCrawlerHead.png similarity index 100% rename from NPCs/AncientTombCrawlerHead.png rename to Content/NPCs/AncientTombCrawlerHead.png diff --git a/NPCs/AncientTombCrawlerTail.cs b/Content/NPCs/AncientTombCrawlerTail.cs similarity index 99% rename from NPCs/AncientTombCrawlerTail.cs rename to Content/NPCs/AncientTombCrawlerTail.cs index 3f1ca66..ce3bcec 100644 --- a/NPCs/AncientTombCrawlerTail.cs +++ b/Content/NPCs/AncientTombCrawlerTail.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs +namespace Decimation.Content.NPCs { class AncientTombCrawlerTail : ModNPC { diff --git a/NPCs/AncientTombCrawlerTail.png b/Content/NPCs/AncientTombCrawlerTail.png similarity index 100% rename from NPCs/AncientTombCrawlerTail.png rename to Content/NPCs/AncientTombCrawlerTail.png diff --git a/NPCs/Arachnus/Arachnus.cs b/Content/NPCs/Arachnus/Arachnus.cs similarity index 95% rename from NPCs/Arachnus/Arachnus.cs rename to Content/NPCs/Arachnus/Arachnus.cs index 0a87bf9..2301331 100644 --- a/NPCs/Arachnus/Arachnus.cs +++ b/Content/NPCs/Arachnus/Arachnus.cs @@ -1,359 +1,359 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.IO; -using Decimation.Buffs.Debuffs; -using Decimation.Items.Boss.Arachnus; -using Decimation.Items.Misc.Souls; -using Decimation.Items.Weapons.Arachnus; -using Decimation.Projectiles; -using Decimation.Tiles.ShrineoftheMoltenOne; - -namespace Decimation.NPCs.Arachnus -{ - [AutoloadBossHead] - class Arachnus : ModNPC - { - private int counter = 0; - private int counterMax = 1320; - private float speed = 2; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Arachnus"); - Main.npcFrameCount[npc.type] = 4; - } - - public override void SetDefaults() - { - npc.aiStyle = -1; - npc.lifeMax = 80000; - npc.damage = 100; - npc.defense = 25; - npc.knockBackResist = 0f; - npc.width = 200; - npc.height = 200; - npc.value = 50000; - npc.npcSlots = 1f; - npc.boss = true; - npc.lavaImmune = true; - npc.noGravity = true; - npc.noTileCollide = false; // When not enraged - npc.HitSound = SoundID.NPCHit6; - npc.DeathSound = SoundID.NPCDeath10; - music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Drums_of_hell"); - bossBag = ModContent.ItemType(); - - npc.lavaImmune = true; - npc.buffImmune[BuffID.OnFire] = true; - npc.buffImmune[BuffID.Burning] = true; - } - - public override void ScaleExpertStats(int numPlayers, float bossLifeScale) - { - npc.lifeMax = (int)(npc.lifeMax * 0.625f * bossLifeScale); - npc.damage = (int)(npc.damage * 0.6f); - npc.defense = (int)(npc.defense + numPlayers * 2); - } - - private bool CheckDispawn() - { - bool playersActive = false; - bool playersDead = true; - - foreach (Player player in Main.player) - { - if (player.active) playersActive = true; - if (!player.dead) playersDead = false; - } - - return playersDead || !playersActive; - } - - private void Move() - { - // Rotate to player - Vector2 moveTo = Main.player[npc.target].Center - npc.Center; - float angle = (float)Math.Atan2(moveTo.Y, moveTo.X); - npc.rotation = (float)(angle + Math.PI * 0.5f); - - // Move - Vector2 move = moveTo; - float magnitude = (float)Math.Sqrt(move.X * move.X + move.Y * move.Y); - if (magnitude > speed) - { - move *= speed / magnitude; - } - float turnResistance = 50f; - move = (npc.velocity * turnResistance + move) / (turnResistance + 1f); - magnitude = (float)Math.Sqrt(move.X * move.X + move.Y * move.Y); - if (magnitude > speed) - { - move *= speed / magnitude; - } - - npc.velocity = npc.ai[1] != 99 ? move : new Vector2(0, 0); - } - - private bool CheckForShrine() - { - bool tooFarFromShrine = true; - if (counter % 60 == 0) - { - int validBlockCount = 0; - for (int i = (int)(-50 + npc.Center.X / 16f); i <= (int)(50 + npc.Center.X / 16f); i++) - { - for (int j = (int)(-50 + npc.Center.Y / 16f); j <= (int)(50 + npc.Center.Y / 16f); j++) - { - if (i >= 0 && i <= Main.maxTilesX && j >= 0 && j <= Main.maxTilesY) - { - if (Main.tile[i, j].type == ModContent.TileType() || (Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType()) || Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType()) - validBlockCount++; - } - } - } - if (validBlockCount < 15) - tooFarFromShrine = true; - else - tooFarFromShrine = false; - } - else - { - return npc.ai[2] == 1; - } - - return tooFarFromShrine; - } - - private void CheckEnraged() - { - npc.ai[2] = !Main.player[npc.target].ZoneUnderworldHeight || !Collision.CanHit(npc.Center, 0, 0, Main.player[npc.target].Center, 0, 0) || CheckForShrine() ? 1 : 0; - } - - public override void AI() - { - if (CheckDispawn()) - { - npc.velocity = new Vector2(0, 10f); - npc.noTileCollide = true; - if (npc.timeLeft > 10) - { - npc.timeLeft = 10; - } - } - - npc.TargetClosest(true); - - CheckEnraged(); - - // Normal ai - if (npc.ai[0] == 0) - { - float mouthX = (float)(((npc.height) / 2) * Math.Cos(npc.rotation - Math.PI * 0.5f)) + npc.Center.X; - float mouthY = (float)(((npc.height) / 2) * Math.Sin(npc.rotation - Math.PI * 0.5f)) + npc.Center.Y; - - //Counter - if (npc.life <= npc.lifeMax / 2) counterMax = 1500; - if (counter >= counterMax && Main.netMode != 1) - { - counter = 0; - npc.netUpdate = true; - } - - // Fireballs - if (counter <= 600) npc.ai[1] = 0; - else if (counter > 600 && counter < 800) npc.ai[1] = 98; - // Blast of Heat - else if (counter >= 800 && counter <= 1100) - { - npc.ai[1] = 1; - } - // Increase speed - else if (counter > 1320 && counter <= 1500 || (Main.expertMode && counter > 600 && counter < 800 && npc.life <= npc.lifeMax / 4)) - { - if (counter == 1321) - { - Main.PlaySound(SoundID.Roar, (int)npc.position.X, (int)npc.position.Y, 0); - if (Main.netMode == 2) - GetPacket(ArachnusMessageType.RoarSound).Send(); - } - npc.ai[1] = 2; - } - else npc.ai[1] = 99; - - if (counter % 40 == 0 && npc.ai[1] == 0 && Main.netMode != 1) - { - float speedX = (float)(6 * Math.Cos(npc.rotation - Math.PI * 0.5f)) * 2; - float speedY = (float)(6 * Math.Sin(npc.rotation - Math.PI * 0.5f)) * 2; - Projectile.NewProjectile(new Vector2(mouthX, mouthY), new Vector2(speedX, speedY), ModContent.ProjectileType(), 30, 0f); - } - else if (counter % 5 == 0 && npc.ai[1] == 1) - { - if (Main.netMode != 1) - { - float speedX = (float)(7 * Math.Cos(npc.rotation - Math.PI * 0.5f)); - float speedY = (float)(7 * Math.Sin(npc.rotation - Math.PI * 0.5f)); - Projectile.NewProjectile(new Vector2(mouthX, mouthY), new Vector2(speedX, speedY), npc.ai[2] == 1 ? ModContent.ProjectileType() : ModContent.ProjectileType(), 30, 0f, 255); - } - Main.PlaySound(SoundID.Item34, npc.position); - if (Main.netMode == 2) - GetPacket(ArachnusMessageType.FlamesSound).Send(); - } - else if (npc.ai[1] == 2) - { - speed = 20f; - if (Main.expertMode) - { - speed = (npc.lifeMax - npc.life) / 500; - if (npc.ai[2] == 1) - speed += 20; - } - else if (npc.ai[2] == 1) - speed = 40f; - } - - if (npc.ai[1] != 2) - { - speed = 2f; - } - - // Enraged - if (npc.ai[2] == 1) - { - npc.noTileCollide = true; - Dust.NewDust(npc.position, npc.width, npc.height, DustID.Shadowflame); - - if (npc.ai[1] != 2) - { - speed = 6f; - npc.defense = 300; - } - } - - counter++; - } - - Move(); - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(counter); - writer.Write(counterMax); - writer.Write(speed); - } - public override void ReceiveExtraAI(BinaryReader reader) - { - counter = reader.ReadInt32(); - counterMax = reader.ReadInt32(); - speed = reader.ReadSingle(); - } - - private ModPacket GetPacket(ArachnusMessageType type) - { - ModPacket packet = mod.GetPacket(); - packet.Write((byte)DecimationModMessageType.Arachnus); - packet.Write(npc.whoAmI); - packet.Write((byte)type); - return packet; - } - public void HandlePacket(BinaryReader reader) - { - ArachnusMessageType type = (ArachnusMessageType)reader.ReadByte(); - switch (type) - { - case ArachnusMessageType.RoarSound: - Main.PlaySound(SoundID.Roar, (int)npc.position.X, (int)npc.position.Y, 0); - break; - case ArachnusMessageType.FlamesSound: - Main.PlaySound(SoundID.Item34, npc.position); - break; - } - } - - public override void OnHitPlayer(Player target, int damage, bool crit) - { - if (npc.ai[1] == 2 && Main.expertMode) - { - target.AddBuff(ModContent.BuffType(), 900); - } - base.OnHitPlayer(target, damage, crit); - } - - public override void FindFrame(int frameHeight) - { - npc.frameCounter += 3f; - if (npc.frameCounter >= 40) - npc.frameCounter = 0; - npc.frame.Y = ((int)npc.frameCounter / 10) * frameHeight; - } - - public override void NPCLoot() - { - Item.NewItem(npc.Center, ModContent.ItemType(), Main.rand.Next(15, 31)); - - if (!Main.expertMode) - { - int rand = Main.rand.Next(3); - if (rand == 0) - Item.NewItem(npc.Center, ModContent.ItemType()); - else if (rand == 1) - Item.NewItem(npc.Center, ModContent.ItemType()); - else if (rand == 2) - Item.NewItem(npc.Center, ModContent.ItemType()); - } - else - { - npc.DropBossBags(); - } - } - - public override void BossLoot(ref string name, ref int potionType) - { - name = "Arachnus"; - // Maybe better - potionType = ItemID.SuperHealingPotion; - - DecimationWorld.downedArachnus = true; - } - - public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) - { - scale = 1.5f; - return null; - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) - { - Vector2 frameSize = new Vector2(298, 318); - Texture2D texture = mod.GetTexture("NPCs/Arachnus/Arachnus"); - - spriteBatch.Draw - ( - texture, - new Vector2 - ( - npc.position.X - Main.screenPosition.X + frameSize.X * 0.34f, - npc.position.Y - Main.screenPosition.Y + frameSize.Y * 0.31f - ), - npc.frame, - drawColor, - npc.rotation, - frameSize * 0.5f, - npc.scale, - SpriteEffects.None, - 0f - ); - return false; - } - - public enum ArachnusMessageType - { - RoarSound, - FlamesSound - } - } -} +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +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.Tiles.ShrineoftheMoltenOne; + +namespace Decimation.Content.NPCs.Arachnus +{ + [AutoloadBossHead] + class Arachnus : ModNPC + { + private int counter = 0; + private int counterMax = 1320; + private float speed = 2; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arachnus"); + Main.npcFrameCount[npc.type] = 4; + } + + public override void SetDefaults() + { + npc.aiStyle = -1; + npc.lifeMax = 80000; + npc.damage = 100; + npc.defense = 25; + npc.knockBackResist = 0f; + npc.width = 200; + npc.height = 200; + npc.value = 50000; + npc.npcSlots = 1f; + npc.boss = true; + npc.lavaImmune = true; + npc.noGravity = true; + npc.noTileCollide = false; // When not enraged + npc.HitSound = SoundID.NPCHit6; + npc.DeathSound = SoundID.NPCDeath10; + music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Drums_of_hell"); + bossBag = ModContent.ItemType(); + + npc.lavaImmune = true; + npc.buffImmune[BuffID.OnFire] = true; + npc.buffImmune[BuffID.Burning] = true; + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.625f * bossLifeScale); + npc.damage = (int)(npc.damage * 0.6f); + npc.defense = (int)(npc.defense + numPlayers * 2); + } + + private bool CheckDispawn() + { + bool playersActive = false; + bool playersDead = true; + + foreach (Player player in Main.player) + { + if (player.active) playersActive = true; + if (!player.dead) playersDead = false; + } + + return playersDead || !playersActive; + } + + private void Move() + { + // Rotate to player + Vector2 moveTo = Main.player[npc.target].Center - npc.Center; + float angle = (float)Math.Atan2(moveTo.Y, moveTo.X); + npc.rotation = (float)(angle + Math.PI * 0.5f); + + // Move + Vector2 move = moveTo; + float magnitude = (float)Math.Sqrt(move.X * move.X + move.Y * move.Y); + if (magnitude > speed) + { + move *= speed / magnitude; + } + float turnResistance = 50f; + move = (npc.velocity * turnResistance + move) / (turnResistance + 1f); + magnitude = (float)Math.Sqrt(move.X * move.X + move.Y * move.Y); + if (magnitude > speed) + { + move *= speed / magnitude; + } + + npc.velocity = npc.ai[1] != 99 ? move : new Vector2(0, 0); + } + + private bool CheckForShrine() + { + bool tooFarFromShrine = true; + if (counter % 60 == 0) + { + int validBlockCount = 0; + for (int i = (int)(-50 + npc.Center.X / 16f); i <= (int)(50 + npc.Center.X / 16f); i++) + { + for (int j = (int)(-50 + npc.Center.Y / 16f); j <= (int)(50 + npc.Center.Y / 16f); j++) + { + if (i >= 0 && i <= Main.maxTilesX && j >= 0 && j <= Main.maxTilesY) + { + if (Main.tile[i, j].type == ModContent.TileType() || (Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType()) || Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType()) + validBlockCount++; + } + } + } + if (validBlockCount < 15) + tooFarFromShrine = true; + else + tooFarFromShrine = false; + } + else + { + return npc.ai[2] == 1; + } + + return tooFarFromShrine; + } + + private void CheckEnraged() + { + npc.ai[2] = !Main.player[npc.target].ZoneUnderworldHeight || !Collision.CanHit(npc.Center, 0, 0, Main.player[npc.target].Center, 0, 0) || CheckForShrine() ? 1 : 0; + } + + public override void AI() + { + if (CheckDispawn()) + { + npc.velocity = new Vector2(0, 10f); + npc.noTileCollide = true; + if (npc.timeLeft > 10) + { + npc.timeLeft = 10; + } + } + + npc.TargetClosest(true); + + CheckEnraged(); + + // Normal ai + if (npc.ai[0] == 0) + { + float mouthX = (float)(((npc.height) / 2) * Math.Cos(npc.rotation - Math.PI * 0.5f)) + npc.Center.X; + float mouthY = (float)(((npc.height) / 2) * Math.Sin(npc.rotation - Math.PI * 0.5f)) + npc.Center.Y; + + //Counter + if (npc.life <= npc.lifeMax / 2) counterMax = 1500; + if (counter >= counterMax && Main.netMode != 1) + { + counter = 0; + npc.netUpdate = true; + } + + // Fireballs + if (counter <= 600) npc.ai[1] = 0; + else if (counter > 600 && counter < 800) npc.ai[1] = 98; + // Blast of Heat + else if (counter >= 800 && counter <= 1100) + { + npc.ai[1] = 1; + } + // Increase speed + else if (counter > 1320 && counter <= 1500 || (Main.expertMode && counter > 600 && counter < 800 && npc.life <= npc.lifeMax / 4)) + { + if (counter == 1321) + { + Main.PlaySound(SoundID.Roar, (int)npc.position.X, (int)npc.position.Y, 0); + if (Main.netMode == 2) + GetPacket(ArachnusMessageType.RoarSound).Send(); + } + npc.ai[1] = 2; + } + else npc.ai[1] = 99; + + if (counter % 40 == 0 && npc.ai[1] == 0 && Main.netMode != 1) + { + float speedX = (float)(6 * Math.Cos(npc.rotation - Math.PI * 0.5f)) * 2; + float speedY = (float)(6 * Math.Sin(npc.rotation - Math.PI * 0.5f)) * 2; + Projectile.NewProjectile(new Vector2(mouthX, mouthY), new Vector2(speedX, speedY), ModContent.ProjectileType(), 30, 0f); + } + else if (counter % 5 == 0 && npc.ai[1] == 1) + { + if (Main.netMode != 1) + { + float speedX = (float)(7 * Math.Cos(npc.rotation - Math.PI * 0.5f)); + float speedY = (float)(7 * Math.Sin(npc.rotation - Math.PI * 0.5f)); + Projectile.NewProjectile(new Vector2(mouthX, mouthY), new Vector2(speedX, speedY), npc.ai[2] == 1 ? ModContent.ProjectileType() : ModContent.ProjectileType(), 30, 0f, 255); + } + Main.PlaySound(SoundID.Item34, npc.position); + if (Main.netMode == 2) + GetPacket(ArachnusMessageType.FlamesSound).Send(); + } + else if (npc.ai[1] == 2) + { + speed = 20f; + if (Main.expertMode) + { + speed = (npc.lifeMax - npc.life) / 500; + if (npc.ai[2] == 1) + speed += 20; + } + else if (npc.ai[2] == 1) + speed = 40f; + } + + if (npc.ai[1] != 2) + { + speed = 2f; + } + + // Enraged + if (npc.ai[2] == 1) + { + npc.noTileCollide = true; + Dust.NewDust(npc.position, npc.width, npc.height, DustID.Shadowflame); + + if (npc.ai[1] != 2) + { + speed = 6f; + npc.defense = 300; + } + } + + counter++; + } + + Move(); + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(counter); + writer.Write(counterMax); + writer.Write(speed); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + counter = reader.ReadInt32(); + counterMax = reader.ReadInt32(); + speed = reader.ReadSingle(); + } + + private ModPacket GetPacket(ArachnusMessageType type) + { + ModPacket packet = mod.GetPacket(); + packet.Write((byte)DecimationModMessageType.Arachnus); + packet.Write(npc.whoAmI); + packet.Write((byte)type); + return packet; + } + public void HandlePacket(BinaryReader reader) + { + ArachnusMessageType type = (ArachnusMessageType)reader.ReadByte(); + switch (type) + { + case ArachnusMessageType.RoarSound: + Main.PlaySound(SoundID.Roar, (int)npc.position.X, (int)npc.position.Y, 0); + break; + case ArachnusMessageType.FlamesSound: + Main.PlaySound(SoundID.Item34, npc.position); + break; + } + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (npc.ai[1] == 2 && Main.expertMode) + { + target.AddBuff(ModContent.BuffType(), 900); + } + base.OnHitPlayer(target, damage, crit); + } + + public override void FindFrame(int frameHeight) + { + npc.frameCounter += 3f; + if (npc.frameCounter >= 40) + npc.frameCounter = 0; + npc.frame.Y = ((int)npc.frameCounter / 10) * frameHeight; + } + + public override void NPCLoot() + { + Item.NewItem(npc.Center, ModContent.ItemType(), Main.rand.Next(15, 31)); + + if (!Main.expertMode) + { + int rand = Main.rand.Next(3); + if (rand == 0) + Item.NewItem(npc.Center, ModContent.ItemType()); + else if (rand == 1) + Item.NewItem(npc.Center, ModContent.ItemType()); + else if (rand == 2) + Item.NewItem(npc.Center, ModContent.ItemType()); + } + else + { + npc.DropBossBags(); + } + } + + public override void BossLoot(ref string name, ref int potionType) + { + name = "Arachnus"; + // Maybe better + potionType = ItemID.SuperHealingPotion; + + DecimationWorld.downedArachnus = true; + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 1.5f; + return null; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + Vector2 frameSize = new Vector2(298, 318); + Texture2D texture = mod.GetTexture("NPCs/Arachnus/Arachnus"); + + spriteBatch.Draw + ( + texture, + new Vector2 + ( + npc.position.X - Main.screenPosition.X + frameSize.X * 0.34f, + npc.position.Y - Main.screenPosition.Y + frameSize.Y * 0.31f + ), + npc.frame, + drawColor, + npc.rotation, + frameSize * 0.5f, + npc.scale, + SpriteEffects.None, + 0f + ); + return false; + } + + public enum ArachnusMessageType + { + RoarSound, + FlamesSound + } + } +} diff --git a/NPCs/Arachnus/Arachnus.png b/Content/NPCs/Arachnus/Arachnus.png similarity index 100% rename from NPCs/Arachnus/Arachnus.png rename to Content/NPCs/Arachnus/Arachnus.png diff --git a/NPCs/Arachnus/Arachnus_Head_Boss.png b/Content/NPCs/Arachnus/Arachnus_Head_Boss.png similarity index 100% rename from NPCs/Arachnus/Arachnus_Head_Boss.png rename to Content/NPCs/Arachnus/Arachnus_Head_Boss.png diff --git a/NPCs/Bloodshot/BloodshotEye.cs b/Content/NPCs/Bloodshot/BloodshotEye.cs similarity index 99% rename from NPCs/Bloodshot/BloodshotEye.cs rename to Content/NPCs/Bloodshot/BloodshotEye.cs index f38c981..8197585 100644 --- a/NPCs/Bloodshot/BloodshotEye.cs +++ b/Content/NPCs/Bloodshot/BloodshotEye.cs @@ -1,16 +1,16 @@ using System; using System.IO; -using Decimation.Items.Boss.Bloodshot; -using Decimation.Items.Misc; -using Decimation.Items.Weapons.Bloodshot; -using Decimation.Projectiles; +using Decimation.Content.Items.Boss.Bloodshot; +using Decimation.Content.Items.Misc; +using Decimation.Content.Items.Weapons.Bloodshot; +using Decimation.Content.Projectiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs.Bloodshot +namespace Decimation.Content.NPCs.Bloodshot { [AutoloadBossHead] internal class BloodshotEye : ModNPC diff --git a/NPCs/Bloodshot/BloodshotEye.png b/Content/NPCs/Bloodshot/BloodshotEye.png similarity index 100% rename from NPCs/Bloodshot/BloodshotEye.png rename to Content/NPCs/Bloodshot/BloodshotEye.png diff --git a/NPCs/Bloodshot/BloodshotEye_Head_Boss.png b/Content/NPCs/Bloodshot/BloodshotEye_Head_Boss.png similarity index 100% rename from NPCs/Bloodshot/BloodshotEye_Head_Boss.png rename to Content/NPCs/Bloodshot/BloodshotEye_Head_Boss.png diff --git a/NPCs/Bloodshot/MangledServant.cs b/Content/NPCs/Bloodshot/MangledServant.cs similarity index 99% rename from NPCs/Bloodshot/MangledServant.cs rename to Content/NPCs/Bloodshot/MangledServant.cs index 133e332..ca784c3 100644 --- a/NPCs/Bloodshot/MangledServant.cs +++ b/Content/NPCs/Bloodshot/MangledServant.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs.Bloodshot +namespace Decimation.Content.NPCs.Bloodshot { class MangledServant : ModNPC { diff --git a/NPCs/Bloodshot/MangledServant.png b/Content/NPCs/Bloodshot/MangledServant.png similarity index 100% rename from NPCs/Bloodshot/MangledServant.png rename to Content/NPCs/Bloodshot/MangledServant.png diff --git a/NPCs/CoreSpider.cs b/Content/NPCs/CoreSpider.cs similarity index 97% rename from NPCs/CoreSpider.cs rename to Content/NPCs/CoreSpider.cs index f9efcee..e583f6c 100644 --- a/NPCs/CoreSpider.cs +++ b/Content/NPCs/CoreSpider.cs @@ -1,11 +1,11 @@ using System; -using Decimation.Tiles.ShrineoftheMoltenOne; +using Decimation.Content.Tiles.ShrineoftheMoltenOne; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs +namespace Decimation.Content.NPCs { // Check line 43861 of NPC.cs internal class CoreSpider : ModNPC diff --git a/NPCs/CoreSpider.png b/Content/NPCs/CoreSpider.png similarity index 100% rename from NPCs/CoreSpider.png rename to Content/NPCs/CoreSpider.png diff --git a/NPCs/CoreSpiderWall.cs b/Content/NPCs/CoreSpiderWall.cs similarity index 97% rename from NPCs/CoreSpiderWall.cs rename to Content/NPCs/CoreSpiderWall.cs index 18fd5b3..2afc8e1 100644 --- a/NPCs/CoreSpiderWall.cs +++ b/Content/NPCs/CoreSpiderWall.cs @@ -2,10 +2,10 @@ using Terraria.ID; using Terraria.ModLoader; using System; -using Decimation.Tiles.ShrineoftheMoltenOne; +using Decimation.Content.Tiles.ShrineoftheMoltenOne; using Microsoft.Xna.Framework; -namespace Decimation.NPCs +namespace Decimation.Content.NPCs { // Check line 43861 of NPC.cs class CoreSpiderWall : ModNPC diff --git a/NPCs/CoreSpiderWall.png b/Content/NPCs/CoreSpiderWall.png similarity index 100% rename from NPCs/CoreSpiderWall.png rename to Content/NPCs/CoreSpiderWall.png diff --git a/NPCs/CursedNPC.cs b/Content/NPCs/CursedNPC.cs similarity index 97% rename from NPCs/CursedNPC.cs rename to Content/NPCs/CursedNPC.cs index 66cbdd2..27128df 100644 --- a/NPCs/CursedNPC.cs +++ b/Content/NPCs/CursedNPC.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Terraria; using Terraria.ModLoader; -namespace Decimation.NPCs +namespace Decimation.Content.NPCs { internal class CursedNPC : GlobalNPC { diff --git a/NPCs/LivingMagma.cs b/Content/NPCs/LivingMagma.cs similarity index 95% rename from NPCs/LivingMagma.cs rename to Content/NPCs/LivingMagma.cs index a1e226d..601d5fc 100644 --- a/NPCs/LivingMagma.cs +++ b/Content/NPCs/LivingMagma.cs @@ -1,10 +1,10 @@ -using Decimation.Buffs.Debuffs; -using Decimation.Tiles.ShrineoftheMoltenOne; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Content.Tiles.ShrineoftheMoltenOne; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs +namespace Decimation.Content.NPCs { class LivingMagma : ModNPC { diff --git a/NPCs/LivingMagma.png b/Content/NPCs/LivingMagma.png similarity index 100% rename from NPCs/LivingMagma.png rename to Content/NPCs/LivingMagma.png diff --git a/NPCs/NecroCaster.cs b/Content/NPCs/NecroCaster.cs similarity index 99% rename from NPCs/NecroCaster.cs rename to Content/NPCs/NecroCaster.cs index 1710b6a..66a9f19 100644 --- a/NPCs/NecroCaster.cs +++ b/Content/NPCs/NecroCaster.cs @@ -1,11 +1,11 @@ -using Decimation.Items.Misc; +using Decimation.Content.Items.Misc; using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.NPCs +namespace Decimation.Content.NPCs { class NecroCaster : ModNPC { diff --git a/NPCs/NecroCaster.png b/Content/NPCs/NecroCaster.png similarity index 100% rename from NPCs/NecroCaster.png rename to Content/NPCs/NecroCaster.png diff --git a/NPCs/TownNPCs/Skeleton.cs b/Content/NPCs/TownNPCs/Skeleton.cs similarity index 97% rename from NPCs/TownNPCs/Skeleton.cs rename to Content/NPCs/TownNPCs/Skeleton.cs index 4ccf50e..51dedcf 100644 --- a/NPCs/TownNPCs/Skeleton.cs +++ b/Content/NPCs/TownNPCs/Skeleton.cs @@ -1,16 +1,16 @@ using System.Collections.Generic; -using Decimation.Items.Boss.DuneWorm; -using Decimation.Items.Misc; -using Decimation.Items.Misc.Souls; -using Decimation.Projectiles; -using Decimation.UI; +using Decimation.Content.Items.Boss.DuneWorm; +using Decimation.Content.Items.Misc; +using Decimation.Content.Items.Misc.Souls; +using Decimation.Content.Projectiles; +using Decimation.Content.UI; using Terraria; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using Terraria.Utilities; -namespace Decimation.NPCs.TownNPCs +namespace Decimation.Content.NPCs.TownNPCs { [AutoloadHead] public class Skeleton : ModNPC diff --git a/NPCs/TownNPCs/Skeleton.png b/Content/NPCs/TownNPCs/Skeleton.png similarity index 100% rename from NPCs/TownNPCs/Skeleton.png rename to Content/NPCs/TownNPCs/Skeleton.png diff --git a/NPCs/TownNPCs/Skeleton_Head.png b/Content/NPCs/TownNPCs/Skeleton_Head.png similarity index 100% rename from NPCs/TownNPCs/Skeleton_Head.png rename to Content/NPCs/TownNPCs/Skeleton_Head.png diff --git a/Projectiles/Ammonite.cs b/Content/Projectiles/Ammonite.cs similarity index 83% rename from Projectiles/Ammonite.cs rename to Content/Projectiles/Ammonite.cs index 0533d02..a1a42cd 100644 --- a/Projectiles/Ammonite.cs +++ b/Content/Projectiles/Ammonite.cs @@ -1,11 +1,9 @@ using Terraria.ID; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class Ammonite : DecimationProjectile { - protected override bool IsClone => true; - protected override void Init() { this.projectile.CloneDefaults(ProjectileID.SpikyBall); diff --git a/Projectiles/Ammonite.png b/Content/Projectiles/Ammonite.png similarity index 100% rename from Projectiles/Ammonite.png rename to Content/Projectiles/Ammonite.png diff --git a/Projectiles/ArachnusFireball.cs b/Content/Projectiles/ArachnusFireball.cs similarity index 86% rename from Projectiles/ArachnusFireball.cs rename to Content/Projectiles/ArachnusFireball.cs index 363b927..c7fd61b 100644 --- a/Projectiles/ArachnusFireball.cs +++ b/Content/Projectiles/ArachnusFireball.cs @@ -1,14 +1,13 @@ -using Decimation.Buffs.Debuffs; +using Decimation.Content.Buffs.Debuffs; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class ArachnusFireball : DecimationProjectile { public override string Texture => "Terraria/Projectile_" + ProjectileID.Fireball; - protected override bool IsClone => true; protected override void Init() { diff --git a/Content/Projectiles/ArchingSolarBlade.cs b/Content/Projectiles/ArchingSolarBlade.cs new file mode 100644 index 0000000..d34a379 --- /dev/null +++ b/Content/Projectiles/ArchingSolarBlade.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Projectiles +{ + internal class ArchingSolarBlade : DecimationProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arching Solar Blade"); + } + + protected override void Init() + { + projectile.width = 42; + projectile.height = 46; + projectile.tileCollide = false; + projectile.penetrate = 30; + projectile.ignoreWater = true; + projectile.height = 3; + aiType = ProjectileID.BloodyMachete; + projectile.light = 1f; + projectile.aiStyle = 3; + + projectile.extraUpdates = 1; + } + } +} \ No newline at end of file diff --git a/Projectiles/ArchingSolarBlade.png b/Content/Projectiles/ArchingSolarBlade.png similarity index 100% rename from Projectiles/ArchingSolarBlade.png rename to Content/Projectiles/ArchingSolarBlade.png diff --git a/Projectiles/BlastofHeat.cs b/Content/Projectiles/BlastofHeat.cs similarity index 81% rename from Projectiles/BlastofHeat.cs rename to Content/Projectiles/BlastofHeat.cs index fde6b82..e5dc29d 100644 --- a/Projectiles/BlastofHeat.cs +++ b/Content/Projectiles/BlastofHeat.cs @@ -1,42 +1,42 @@ -using System; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Projectiles -{ - internal class BlastofHeat : DecimationProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Blast of Heat"); - } - - protected override void Init() - { - width = 6; - height = 6; - aiStyle = 23; - hostile = true; - projectile.alpha = 255; - penetrate = -1; - projectile.extraUpdates = 3; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - if (Main.rand.Next(2) == 0) - target.AddBuff(BuffID.OnFire, 600); - base.OnHitNPC(target, damage, knockback, crit); - } - - public override void OnHitPlayer(Player target, int damage, bool crit) - { - if (Main.rand.Next(2) == 0) - target.AddBuff(BuffID.OnFire, 600); - base.OnHitPlayer(target, damage, crit); - } - } -} +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Projectiles +{ + internal class BlastofHeat : DecimationProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blast of Heat"); + } + + protected override void Init() + { + projectile.width = 6; + projectile.height = 6; + projectile.aiStyle = 23; + projectile.hostile = true; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.extraUpdates = 3; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.Next(2) == 0) + target.AddBuff(BuffID.OnFire, 600); + base.OnHitNPC(target, damage, knockback, crit); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (Main.rand.Next(2) == 0) + target.AddBuff(BuffID.OnFire, 600); + base.OnHitPlayer(target, damage, crit); + } + } +} diff --git a/Projectiles/BlastofHeat.png b/Content/Projectiles/BlastofHeat.png similarity index 100% rename from Projectiles/BlastofHeat.png rename to Content/Projectiles/BlastofHeat.png diff --git a/Projectiles/BlastofShadowFlame.cs b/Content/Projectiles/BlastofShadowFlame.cs similarity index 86% rename from Projectiles/BlastofShadowFlame.cs rename to Content/Projectiles/BlastofShadowFlame.cs index f434ede..c96488e 100644 --- a/Projectiles/BlastofShadowFlame.cs +++ b/Content/Projectiles/BlastofShadowFlame.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.ID; using Microsoft.Xna.Framework; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class BlastofShadowFlame : DecimationProjectile { @@ -15,23 +15,23 @@ namespace Decimation.Projectiles protected override void Init() { - width = 6; - height = 6; - aiStyle = -1; - hostile = true; + projectile.width = 6; + projectile.height = 6; + projectile.aiStyle = -1; + projectile.hostile = true; projectile.alpha = 255; - penetrate = -1; + projectile.penetrate = -1; projectile.extraUpdates = 3; - light = 0.8f; + projectile.light = 0.8f; } public override void AI() { int num4; - if (timeLeft > 60) + if (projectile.timeLeft > 60) { - timeLeft = 60; + projectile.timeLeft = 60; } if (projectile.ai[0] > 7f) { @@ -59,7 +59,7 @@ namespace Decimation.Projectiles float speedX = projectile.velocity.X * 0.2f; float speedY = projectile.velocity.Y * 0.2f; Color newColor = default(Color); - int dustID = Dust.NewDust(position, width, height, dustType, speedX, speedY, 100, newColor, 1f); + int dustID = Dust.NewDust(position, projectile.width, projectile.height, dustType, speedX, speedY, 100, newColor, 1f); Dust dust = Main.dust[dustID]; if (Main.rand.Next(3) != 0 || (dustType == 75 && Main.rand.Next(3) == 0)) { diff --git a/Projectiles/BlastofShadowFlame.png b/Content/Projectiles/BlastofShadowFlame.png similarity index 100% rename from Projectiles/BlastofShadowFlame.png rename to Content/Projectiles/BlastofShadowFlame.png diff --git a/Projectiles/BloodBeam.cs b/Content/Projectiles/BloodBeam.cs similarity index 67% rename from Projectiles/BloodBeam.cs rename to Content/Projectiles/BloodBeam.cs index f6433ec..c536e9e 100644 --- a/Projectiles/BloodBeam.cs +++ b/Content/Projectiles/BloodBeam.cs @@ -1,5 +1,5 @@ -using Decimation.Buffs.Debuffs; -using Decimation.Dusts; +using Decimation.Content.Buffs.Debuffs; +using Decimation.Content.Dusts; using System; using System.Collections.Generic; using System.Linq; @@ -10,7 +10,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class BloodBeam : DecimationProjectile { @@ -18,21 +18,21 @@ namespace Decimation.Projectiles protected override void Init() { - width = 26; - height = 26; - aiStyle = -1; - penetrate = -1; + projectile.width = 26; + projectile.height = 26; + projectile.aiStyle = -1; + projectile.penetrate = -1; projectile.alpha = 255; - timeLeft = 40; - tileCollide = false; - ignoreWater = true; - damages = 25; - hostile = true; + projectile.timeLeft = 40; + projectile.tileCollide = false; + projectile.ignoreWater = true; + Damages = 25; + projectile.hostile = true; } public override void AI() { - projectile.velocity.Y += (60 - timeLeft) * 0.005f; + projectile.velocity.Y += (60 - projectile.timeLeft) * 0.005f; Dust.NewDust(projectile.position, 26, 26, ModContent.DustType()); } diff --git a/Content/Projectiles/BloodBeamFriendly.cs b/Content/Projectiles/BloodBeamFriendly.cs new file mode 100644 index 0000000..682c92d --- /dev/null +++ b/Content/Projectiles/BloodBeamFriendly.cs @@ -0,0 +1,33 @@ +using Decimation.Content.Dusts; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Projectiles +{ + internal class BloodBeamFriendly : DecimationProjectile + { + public override string Texture =>"Terraria/Projectile_" + ProjectileID.CursedFlameFriendly; + + protected override void Init() + { + projectile.width = 26; + projectile.height = 26; + projectile.aiStyle = -1; + projectile.penetrate = -1; + projectile.alpha = 255; + projectile.timeLeft = 40; + projectile.tileCollide = true; + projectile.ignoreWater = true; + Damages = 15; + projectile.hostile = false; + } + + public override void AI() + { + projectile.velocity.Y += (60 - projectile.timeLeft) * 0.005f; + + Dust.NewDust(projectile.position, 26, 26, ModContent.DustType()); + } + } +} diff --git a/Projectiles/BloodClot.cs b/Content/Projectiles/BloodClot.cs similarity index 50% rename from Projectiles/BloodClot.cs rename to Content/Projectiles/BloodClot.cs index 8a1fbbe..7d11080 100644 --- a/Projectiles/BloodClot.cs +++ b/Content/Projectiles/BloodClot.cs @@ -1,44 +1,44 @@ using System; -using Decimation.Items.Weapons; -using Decimation.Core.Items; +using Decimation.Content.Items.Weapons; +using Decimation.Lib.Items; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class BloodClot : DecimationProjectile { protected override void Init() { - width = 24; - height = 24; - damages = 22; - damageType = DecimationWeapon.DamageType.RANGED; - tileCollide = true; + projectile.width = 24; + projectile.height = 24; + Damages = 22; + DamageType = DecimationWeapon.DamageType.Ranged; + projectile.tileCollide = true; projectile.knockBack = 7f; - aiStyle = -1; - penetrate = 1; - timeLeft = 600; - hostile = true; + projectile.aiStyle = -1; + projectile.penetrate = 1; + projectile.timeLeft = 600; + projectile.hostile = true; } public override void AI() { - projectile.velocity.Y += (600 - timeLeft) * 0.002f; + projectile.velocity.Y += (600 - projectile.timeLeft) * 0.002f; Dust.NewDust(projectile.position, 26, 26, DustID.SomethingRed); } public override bool OnTileCollide(Vector2 oldVelocity) { - for (int i = 0; i < width; i++) + for (int i = 0; i < projectile.width; i++) { - for (int j = 0; j < height; j++) + for (int j = 0; j < projectile.height; j++) { - Dust.NewDust(new Vector2(projectile.position.X + i, projectile.position.Y + j), width, height, DustID.Blood); + Dust.NewDust(new Vector2(projectile.position.X + i, projectile.position.Y + j), projectile.width, projectile.height, DustID.Blood); } } diff --git a/Projectiles/BloodClot.png b/Content/Projectiles/BloodClot.png similarity index 100% rename from Projectiles/BloodClot.png rename to Content/Projectiles/BloodClot.png diff --git a/Projectiles/BloodClotSmall.cs b/Content/Projectiles/BloodClotSmall.cs similarity index 56% rename from Projectiles/BloodClotSmall.cs rename to Content/Projectiles/BloodClotSmall.cs index bbfd707..8100715 100644 --- a/Projectiles/BloodClotSmall.cs +++ b/Content/Projectiles/BloodClotSmall.cs @@ -5,38 +5,38 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class BloodClotSmall : DecimationProjectile { protected override void Init() { - width = 18; - height = 18; - damages = 16; + projectile.width = 18; + projectile.height = 18; + Damages = 16; projectile.ranged = true; - tileCollide = true; + projectile.tileCollide = true; projectile.knockBack = 5f; - aiStyle = -1; - penetrate = 1; - timeLeft = 600; - hostile = true; + projectile.aiStyle = -1; + projectile.penetrate = 1; + projectile.timeLeft = 600; + projectile.hostile = true; } public override void AI() { - projectile.velocity.Y += (600 - timeLeft) * 0.002f; + projectile.velocity.Y += (600 - projectile.timeLeft) * 0.002f; Dust.NewDust(projectile.position, 26, 26, DustID.SomethingRed); } public override bool OnTileCollide(Vector2 oldVelocity) { - for (int i = 0; i < width; i++) + for (int i = 0; i < projectile.width; i++) { - for (int j = 0; j < height; j++) + for (int j = 0; j < projectile.height; j++) { - Dust.NewDust(new Vector2(projectile.position.X + i, projectile.position.Y + j), width, height, DustID.Blood); + Dust.NewDust(new Vector2(projectile.position.X + i, projectile.position.Y + j), projectile.width, projectile.height, DustID.Blood); } } diff --git a/Projectiles/BloodClotSmall.png b/Content/Projectiles/BloodClotSmall.png similarity index 100% rename from Projectiles/BloodClotSmall.png rename to Content/Projectiles/BloodClotSmall.png diff --git a/Projectiles/Bone.cs b/Content/Projectiles/Bone.cs similarity index 77% rename from Projectiles/Bone.cs rename to Content/Projectiles/Bone.cs index fa0da91..ad337cb 100644 --- a/Projectiles/Bone.cs +++ b/Content/Projectiles/Bone.cs @@ -1,13 +1,13 @@ using Microsoft.Xna.Framework; using System; using System.IO; -using Decimation.Items.Weapons; -using Decimation.Core.Items; +using Decimation.Content.Items.Weapons; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class Bone : DecimationProjectile { @@ -15,17 +15,17 @@ namespace Decimation.Projectiles protected override void Init() { - width = 14; - height = 34; - aiStyle = -1; - ignoreWater = true; - tileCollide = false; - damageType = DecimationWeapon.DamageType.RANGED; - hostile = true; - penetrate = 2; - timeLeft = 60; + projectile.width = 14; + projectile.height = 34; + projectile.aiStyle = -1; + projectile.ignoreWater = true; + projectile.tileCollide = false; + DamageType = DecimationWeapon.DamageType.Ranged; + projectile.hostile = true; + projectile.penetrate = 2; + projectile.timeLeft = 60; - damages = Main.expertMode ? 57 : 20; + Damages = Main.expertMode ? 57 : 20; projectile.localAI[0] = 15; } @@ -39,10 +39,10 @@ namespace Decimation.Projectiles { projectile.localAI[0] = 15; - if (timeLeft < 10) + if (projectile.timeLeft < 10) { projectile.ai[1]++; - timeLeft = 600; + projectile.timeLeft = 600; projectile.velocity *= 0; } } diff --git a/Projectiles/Bone.png b/Content/Projectiles/Bone.png similarity index 100% rename from Projectiles/Bone.png rename to Content/Projectiles/Bone.png diff --git a/Content/Projectiles/DecimationProjectile.cs b/Content/Projectiles/DecimationProjectile.cs new file mode 100644 index 0000000..df1427f --- /dev/null +++ b/Content/Projectiles/DecimationProjectile.cs @@ -0,0 +1,57 @@ +using Decimation.Lib.Items; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Content.Projectiles +{ + public abstract class DecimationProjectile : ModProjectile + { + protected virtual int Damages { get; set; } = 0; + protected virtual DecimationWeapon.DamageType DamageType { get; set; } = DecimationWeapon.DamageType.Melee; + protected virtual int AnimationFrames { get; } = -1; + + protected abstract void Init(); + + // public override void SetStaticDefaults() + // { + // if (AnimationFrames >= 0) Main.projFrames[projectile.type] = AnimationFrames; + // } + + public sealed override void SetDefaults() + { + this.projectile.aiStyle = 1; + this.projectile.height = 16; + this.projectile.width = 16; + this.projectile.hostile = false; + this.projectile.friendly = !this.projectile.hostile; + this.projectile.ignoreWater = false; + this.projectile.light = 0f; + this.projectile.penetrate = 0; + this.projectile.tileCollide = true; + this.projectile.timeLeft = 180; + + Init(); + + this.projectile.damage = Damages; + + switch (DamageType) + { + case DecimationWeapon.DamageType.Melee: + this.projectile.melee = true; + break; + case DecimationWeapon.DamageType.Magic: + this.projectile.magic = true; + break; + case DecimationWeapon.DamageType.Ranged: + this.projectile.ranged = true; + break; + case DecimationWeapon.DamageType.Throw: + this.projectile.thrown = true; + break; + default: + this.projectile.melee = true; + break; + } + } + } +} \ No newline at end of file diff --git a/Projectiles/Ember.cs b/Content/Projectiles/Ember.cs similarity index 61% rename from Projectiles/Ember.cs rename to Content/Projectiles/Ember.cs index ec23040..d6b243f 100644 --- a/Projectiles/Ember.cs +++ b/Content/Projectiles/Ember.cs @@ -2,10 +2,10 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; -using Decimation.Buffs.Debuffs; +using Decimation.Content.Buffs.Debuffs; using Microsoft.Xna.Framework; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class Ember : DecimationProjectile { @@ -13,21 +13,21 @@ namespace Decimation.Projectiles protected override void Init() { - width = 20; - height = 20; - aiStyle = -1; + projectile.width = 20; + projectile.height = 20; + projectile.aiStyle = -1; projectile.alpha = 255; - penetrate = 1; - light = 0.8f; - damages = 25; - timeLeft = 60; - tileCollide = false; - ignoreWater = true; + projectile.penetrate = 1; + projectile.light = 0.8f; + Damages = 25; + projectile.timeLeft = 60; + projectile.tileCollide = false; + projectile.ignoreWater = true; } public override void AI() { - Dust.NewDust(projectile.position, width, 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 Microsoft.Xna.Framework.Color(240, 94, 27)); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Content/Projectiles/HourHandProjectile.cs b/Content/Projectiles/HourHandProjectile.cs new file mode 100644 index 0000000..157b3bc --- /dev/null +++ b/Content/Projectiles/HourHandProjectile.cs @@ -0,0 +1,45 @@ +using Decimation.Lib.Items; +using Terraria; + +namespace Decimation.Content.Projectiles +{ + public class HourHandProjectile : DecimationProjectile + { + protected override int AnimationFrames => 4; + protected override DecimationWeapon.DamageType DamageType => DecimationWeapon.DamageType.Ranged; + protected override int Damages => 45; + + public override void SetStaticDefaults() + { + Main.projFrames[projectile.type] = 4; + } + + protected override void Init() + { + projectile.width = 10; + projectile.height = 10; + projectile.timeLeft = 600; + projectile.penetrate = 1; + projectile.aiStyle = 8; + aiType = 253; + } + + public override bool PreAI() + { + if (++projectile.frameCounter >= 5) + { + projectile.frameCounter = 0; + + if (++projectile.frame >= 4) + { + projectile.frame = 0; + } + } + + Lighting.AddLight(projectile.Center, 0f, 0f, 1f); + projectile.rotation = projectile.velocity.ToRotation(); + + return true; + } + } +} \ No newline at end of file diff --git a/Content/Projectiles/HourHandProjectile.png b/Content/Projectiles/HourHandProjectile.png new file mode 100644 index 0000000..dd8df3b Binary files /dev/null and b/Content/Projectiles/HourHandProjectile.png differ diff --git a/Projectiles/LightningSphere.cs b/Content/Projectiles/LightningSphere.cs similarity index 85% rename from Projectiles/LightningSphere.cs rename to Content/Projectiles/LightningSphere.cs index d4aeeba..343189f 100644 --- a/Projectiles/LightningSphere.cs +++ b/Content/Projectiles/LightningSphere.cs @@ -7,7 +7,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class LightningSphere : DecimationProjectile { @@ -19,7 +19,7 @@ namespace Decimation.Projectiles protected override void Init() { this.projectile.CloneDefaults(ProjectileID.MagnetSphereBall); - this.timeLeft = 600; + this.projectile.timeLeft = 600; } } } diff --git a/Projectiles/LightningSphere.png b/Content/Projectiles/LightningSphere.png similarity index 100% rename from Projectiles/LightningSphere.png rename to Content/Projectiles/LightningSphere.png diff --git a/Projectiles/MoltenStyngerBolt.cs b/Content/Projectiles/MoltenStyngerBolt.cs similarity index 69% rename from Projectiles/MoltenStyngerBolt.cs rename to Content/Projectiles/MoltenStyngerBolt.cs index 4e74a92..53f95e8 100644 --- a/Projectiles/MoltenStyngerBolt.cs +++ b/Content/Projectiles/MoltenStyngerBolt.cs @@ -1,13 +1,13 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; -using Decimation.Items.Weapons; -using Decimation.Core.Items; +using Decimation.Content.Items.Weapons; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class MoltenStyngerBolt : DecimationProjectile { @@ -20,52 +20,52 @@ namespace Decimation.Projectiles protected override void Init() { - width = 10; - height = 10; - aiStyle = 1; - damageType = DecimationWeapon.DamageType.RANGED; - penetrate = 1; - timeLeft = 600; + projectile.width = 10; + projectile.height = 10; + projectile.aiStyle = 1; + DamageType = DecimationWeapon.DamageType.Ranged; + projectile.penetrate = 1; + projectile.timeLeft = 600; projectile.alpha = 255; - light = 0.5f; - ignoreWater = false; - tileCollide = true; + projectile.light = 0.5f; + projectile.ignoreWater = false; + projectile.tileCollide = true; projectile.extraUpdates = 1; aiType = ProjectileID.Bullet; } public override bool OnTileCollide(Vector2 oldVelocity) { - if (timeLeft > 3) - timeLeft = 3; + if (projectile.timeLeft > 3) + projectile.timeLeft = 3; return false; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (timeLeft > 3) - timeLeft = 3; + if (projectile.timeLeft > 3) + projectile.timeLeft = 3; } public override void OnHitPvp(Player target, int damage, bool crit) { - if (timeLeft > 3) - timeLeft = 3; + if (projectile.timeLeft > 3) + projectile.timeLeft = 3; } public override void Kill(int timeLeft) { - penetrate = -1; - tileCollide = false; + projectile.penetrate = -1; + projectile.tileCollide = false; projectile.alpha = 255; - projectile.position.X = projectile.position.X + (float)(width / 2); - projectile.position.Y = projectile.position.Y + (float)(height / 2); - width = 100; - height = 100; - projectile.position.X = projectile.position.X - (float)(width / 2); - projectile.position.Y = projectile.position.Y - (float)(height / 2); - damages = 250; + projectile.position.X = projectile.position.X + (float)(projectile.width / 2f); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2f); + projectile.width = 100; + projectile.height = 100; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2f); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2f); + Damages = 250; projectile.knockBack = 10f; SpawnDust(); @@ -80,7 +80,7 @@ namespace Decimation.Projectiles sqrt = 8f / sqrt; velocityX *= sqrt; velocityY *= sqrt; - Projectile.NewProjectile(projectile.Center.X - projectile.oldVelocity.X, projectile.Center.Y - projectile.oldVelocity.Y, velocityX, velocityY, ProjectileID.StyngerShrapnel, damages, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X - projectile.oldVelocity.X, projectile.Center.Y - projectile.oldVelocity.Y, velocityX, velocityY, ProjectileID.StyngerShrapnel, Damages, projectile.knockBack, projectile.owner, 0f, 0f); } } @@ -92,34 +92,34 @@ namespace Decimation.Projectiles // Smoke Dust spawn for (int i = 0; i < 50; i++) { - int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), width, height, 31, 0f, 0f, 100, default(Color), 2f); + int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default(Color), 2f); Main.dust[dustIndex].velocity *= 1.4f; } // Fire Dust spawn for (int i = 0; i < 80; i++) { - int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), width, height, 6, 0f, 0f, 100, default(Color), 3f); + int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 3f); Main.dust[dustIndex].noGravity = true; Main.dust[dustIndex].velocity *= 5f; - dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2f); + dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 2f); Main.dust[dustIndex].velocity *= 3f; } // Large Smoke Gore spawn for (int g = 0; g < 2; g++) { - int goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(width / 2) - 24f, projectile.position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); + int goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2f) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[goreIndex].scale = 1.5f; Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X + 1.5f; Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y + 1.5f; - goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(width / 2) - 24f, projectile.position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); + goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2f) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[goreIndex].scale = 1.5f; Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X - 1.5f; Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y + 1.5f; - goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(width / 2) - 24f, projectile.position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); + goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2f) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[goreIndex].scale = 1.5f; Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X + 1.5f; Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y - 1.5f; - goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(width / 2) - 24f, projectile.position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); + goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2f) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[goreIndex].scale = 1.5f; Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X - 1.5f; Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y - 1.5f; @@ -128,7 +128,7 @@ namespace Decimation.Projectiles public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, height * 0.5f); + Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, projectile.height * 0.5f); for (int k = 0; k < projectile.oldPos.Length; k++) { Vector2 drawPos = projectile.oldPos[k] - Main.screenPosition + drawOrigin + new Vector2(0f, projectile.gfxOffY); diff --git a/Projectiles/MoltenStyngerBolt.png b/Content/Projectiles/MoltenStyngerBolt.png similarity index 100% rename from Projectiles/MoltenStyngerBolt.png rename to Content/Projectiles/MoltenStyngerBolt.png diff --git a/Projectiles/Pebble.cs b/Content/Projectiles/Pebble.cs similarity index 55% rename from Projectiles/Pebble.cs rename to Content/Projectiles/Pebble.cs index f17b9fe..0edf70c 100644 --- a/Projectiles/Pebble.cs +++ b/Content/Projectiles/Pebble.cs @@ -1,36 +1,36 @@ -using Decimation.Items.Weapons; -using Decimation.Core.Items; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Projectiles -{ - internal class Pebble : DecimationProjectile - { - public override string Texture => "Decimation/Items/Ammo/Pebble"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Pebble"); //The English name of the projectile - } - protected override void Init() - { - width = 10; - height = 10; - projectile.scale = 0.625f; - aiStyle = 1; - damageType = DecimationWeapon.DamageType.RANGED; - penetrate = 5; - timeLeft = 600; - projectile.alpha = 0; - light = 0.5f; - projectile.extraUpdates = 1; - ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - aiType = ProjectileID.WoodenArrowFriendly; - } - } +using Decimation.Content.Items.Weapons; +using Decimation.Lib.Items; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Projectiles +{ + internal class Pebble : DecimationProjectile + { + public override string Texture => "Decimation/Content/Items/Ammo/Pebble"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pebble"); + } + protected override void Init() + { + projectile.width = 10; + projectile.height = 10; + projectile.scale = 0.625f; + projectile.aiStyle = 1; + DamageType = DecimationWeapon.DamageType.Ranged; + projectile.penetrate = 5; + projectile.timeLeft = 600; + projectile.alpha = 0; + projectile.light = 0.5f; + projectile.extraUpdates = 1; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + aiType = ProjectileID.WoodenArrowFriendly; + } + } } \ No newline at end of file diff --git a/Projectiles/Scarab.cs b/Content/Projectiles/Scarab.cs similarity index 85% rename from Projectiles/Scarab.cs rename to Content/Projectiles/Scarab.cs index e5357a4..5f1d1f9 100644 --- a/Projectiles/Scarab.cs +++ b/Content/Projectiles/Scarab.cs @@ -1,4 +1,4 @@ -using Decimation.Buffs.Buffs; +using Decimation.Content.Buffs.Buffs; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -9,7 +9,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class Scarab : DecimationProjectile { @@ -20,14 +20,14 @@ namespace Decimation.Projectiles protected override void Init() { - damages = 0; - width = 22; - height = 22; - aiStyle = -1; - ignoreWater = true; - tileCollide = false; - penetrate = -1; - timeLeft = int.MaxValue; + Damages = 0; + projectile.width = 22; + projectile.height = 22; + projectile.aiStyle = -1; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.penetrate = -1; + projectile.timeLeft = int.MaxValue; } public override void AI() diff --git a/Projectiles/Scarab.png b/Content/Projectiles/Scarab.png similarity index 100% rename from Projectiles/Scarab.png rename to Content/Projectiles/Scarab.png diff --git a/Projectiles/SiphonArrow.cs b/Content/Projectiles/SiphonArrow.cs similarity index 74% rename from Projectiles/SiphonArrow.cs rename to Content/Projectiles/SiphonArrow.cs index fa65ebe..b71c77f 100644 --- a/Projectiles/SiphonArrow.cs +++ b/Content/Projectiles/SiphonArrow.cs @@ -1,25 +1,25 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; -using Decimation.Items.Weapons; -using Decimation.Core.Items; +using Decimation.Content.Items.Weapons; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class SiphonArrow : DecimationProjectile { protected override void Init() { - width = 14; - height = 32; - aiStyle = 1; - damageType = DecimationWeapon.DamageType.RANGED; - penetrate = 1; - timeLeft = 600; - tileCollide = true; + projectile.width = 14; + projectile.height = 32; + projectile.aiStyle = 1; + DamageType = DecimationWeapon.DamageType.Ranged; + projectile.penetrate = 1; + projectile.timeLeft = 600; + projectile.tileCollide = true; projectile.arrow = true; aiType = ProjectileID.WoodenArrowFriendly; } diff --git a/Projectiles/SiphonArrow.png b/Content/Projectiles/SiphonArrow.png similarity index 100% rename from Projectiles/SiphonArrow.png rename to Content/Projectiles/SiphonArrow.png diff --git a/Projectiles/SkeletonBone.cs b/Content/Projectiles/SkeletonBone.cs similarity index 81% rename from Projectiles/SkeletonBone.cs rename to Content/Projectiles/SkeletonBone.cs index 7dbc66a..6cc1873 100644 --- a/Projectiles/SkeletonBone.cs +++ b/Content/Projectiles/SkeletonBone.cs @@ -1,12 +1,12 @@ using System; using System.IO; -using Decimation.Items.Weapons; -using Decimation.Core.Items; +using Decimation.Content.Items.Weapons; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class SkeletonBone : DecimationProjectile { @@ -14,16 +14,16 @@ namespace Decimation.Projectiles protected override void Init() { - width = 14; - height = 34; - aiStyle = -1; - ignoreWater = true; - tileCollide = false; - damageType = DecimationWeapon.DamageType.RANGED; - penetrate = 2; - timeLeft = 60; + projectile.width = 14; + projectile.height = 34; + projectile.aiStyle = -1; + projectile.ignoreWater = true; + projectile.tileCollide = false; + DamageType = DecimationWeapon.DamageType.Ranged; + projectile.penetrate = 2; + projectile.timeLeft = 60; - damages = Main.expertMode ? 57 : 20; + Damages = Main.expertMode ? 57 : 20; projectile.localAI[0] = 15; } diff --git a/Projectiles/SkeletonBone.png b/Content/Projectiles/SkeletonBone.png similarity index 100% rename from Projectiles/SkeletonBone.png rename to Content/Projectiles/SkeletonBone.png diff --git a/Projectiles/Stinger.cs b/Content/Projectiles/Stinger.cs similarity index 75% rename from Projectiles/Stinger.cs rename to Content/Projectiles/Stinger.cs index 5bb5f3c..a1c4bb3 100644 --- a/Projectiles/Stinger.cs +++ b/Content/Projectiles/Stinger.cs @@ -5,20 +5,20 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class Stinger : DecimationProjectile { protected override void Init() { - width = 10; - height = 18; - tileCollide = true; - penetrate = 2; - timeLeft = 200; + projectile.width = 10; + projectile.height = 18; + projectile.tileCollide = true; + projectile.penetrate = 2; + projectile.timeLeft = 200; projectile.extraUpdates = 1; - ignoreWater = false; + projectile.ignoreWater = false; } public override void AI() //this make that the projectile will face the corect way { // | diff --git a/Projectiles/Stinger.png b/Content/Projectiles/Stinger.png similarity index 100% rename from Projectiles/Stinger.png rename to Content/Projectiles/Stinger.png diff --git a/Projectiles/TitanicPikeProjectile.cs b/Content/Projectiles/TitanicPikeProjectile.cs similarity index 91% rename from Projectiles/TitanicPikeProjectile.cs rename to Content/Projectiles/TitanicPikeProjectile.cs index 6ca43a2..69c72ed 100644 --- a/Projectiles/TitanicPikeProjectile.cs +++ b/Content/Projectiles/TitanicPikeProjectile.cs @@ -4,22 +4,22 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class TitanicPikeProjectile : DecimationProjectile { protected override void Init() { - width = 18; - height = 18; - aiStyle = 19; - penetrate = -1; + projectile.width = 18; + projectile.height = 18; + projectile.aiStyle = 19; + projectile.penetrate = -1; projectile.scale = 1.3f; projectile.alpha = 0; projectile.hide = true; projectile.ownerHitCheck = true; - tileCollide = false; + projectile.tileCollide = false; } public float movementFactor // Change this value to alter how fast the spear moves @@ -38,8 +38,8 @@ namespace Decimation.Projectiles projectile.direction = projOwner.direction; projOwner.heldProj = projectile.whoAmI; projOwner.itemTime = projOwner.itemAnimation; - projectile.position.X = ownerMountedCenter.X - (float)(width / 2); - projectile.position.Y = ownerMountedCenter.Y - (float)(height / 2); + projectile.position.X = ownerMountedCenter.X - (float)(projectile.width / 2); + projectile.position.Y = ownerMountedCenter.Y - (float)(projectile.height / 2); // As long as the player isn't frozen, the spear can move if (!projOwner.frozen) { diff --git a/Projectiles/TitanicPikeProjectile.png b/Content/Projectiles/TitanicPikeProjectile.png similarity index 100% rename from Projectiles/TitanicPikeProjectile.png rename to Content/Projectiles/TitanicPikeProjectile.png diff --git a/Projectiles/TitanicStyngerBolt.cs b/Content/Projectiles/TitanicStyngerBolt.cs similarity index 78% rename from Projectiles/TitanicStyngerBolt.cs rename to Content/Projectiles/TitanicStyngerBolt.cs index e2b2306..c6a5ffe 100644 --- a/Projectiles/TitanicStyngerBolt.cs +++ b/Content/Projectiles/TitanicStyngerBolt.cs @@ -1,13 +1,13 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; -using Decimation.Items.Weapons; -using Decimation.Core.Items; +using Decimation.Content.Items.Weapons; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class TitanicStyngerBolt : DecimationProjectile { @@ -20,16 +20,16 @@ namespace Decimation.Projectiles protected override void Init() { - width = 40; - height = 10; - aiStyle = 1; - damageType = DecimationWeapon.DamageType.RANGED; - penetrate = 5; - timeLeft = 600; + projectile.width = 40; + projectile.height = 10; + projectile.aiStyle = 1; + DamageType = DecimationWeapon.DamageType.Ranged; + projectile.penetrate = 5; + projectile.timeLeft = 600; projectile.alpha = 255; - light = 0.1f; - ignoreWater = true; - tileCollide = true; + projectile.light = 0.1f; + projectile.ignoreWater = true; + projectile.tileCollide = true; projectile.extraUpdates = 1; aiType = ProjectileID.Bullet; } @@ -47,13 +47,13 @@ namespace Decimation.Projectiles sqrt = 8f / sqrt; velocityX *= sqrt; velocityY *= sqrt; - Projectile.NewProjectile(projectile.Center.X - projectile.oldVelocity.X, projectile.Center.Y - projectile.oldVelocity.Y, velocityX, velocityY, ProjectileID.StyngerShrapnel, damages, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X - projectile.oldVelocity.X, projectile.Center.Y - projectile.oldVelocity.Y, velocityX, velocityY, ProjectileID.StyngerShrapnel, Damages, projectile.knockBack, projectile.owner, 0f, 0f); } } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, height * 0.5f); + Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, projectile.height * 0.5f); for (int k = 0; k < projectile.oldPos.Length; k++) { Vector2 drawPos = projectile.oldPos[k] - Main.screenPosition + drawOrigin + new Vector2(0f, projectile.gfxOffY); diff --git a/Projectiles/TitanicStyngerBolt.png b/Content/Projectiles/TitanicStyngerBolt.png similarity index 100% rename from Projectiles/TitanicStyngerBolt.png rename to Content/Projectiles/TitanicStyngerBolt.png diff --git a/Projectiles/Tooth.cs b/Content/Projectiles/Tooth.cs similarity index 69% rename from Projectiles/Tooth.cs rename to Content/Projectiles/Tooth.cs index dccf22f..7f7d605 100644 --- a/Projectiles/Tooth.cs +++ b/Content/Projectiles/Tooth.cs @@ -1,26 +1,26 @@ using System; -using Decimation.Items.Weapons; -using Decimation.Core.Items; +using Decimation.Content.Items.Weapons; +using Decimation.Lib.Items; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Projectiles +namespace Decimation.Content.Projectiles { internal class Tooth : DecimationProjectile { protected override void Init() { - width = 10; - height = 18; - aiStyle = 1; - damages = 20; - tileCollide = true; - ignoreWater = false; - penetrate = 1; - timeLeft = 600; + projectile.width = 10; + projectile.height = 18; + projectile.aiStyle = 1; + Damages = 20; + projectile.tileCollide = true; + projectile.ignoreWater = false; + projectile.penetrate = 1; + projectile.timeLeft = 600; - damageType = DecimationWeapon.DamageType.RANGED; + DamageType = DecimationWeapon.DamageType.Ranged; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Tooth.png b/Content/Projectiles/Tooth.png similarity index 100% rename from Projectiles/Tooth.png rename to Content/Projectiles/Tooth.png diff --git a/Structures/ShrineoftheMoltenOne.cs b/Content/Structures/ShrineoftheMoltenOne.cs similarity index 99% rename from Structures/ShrineoftheMoltenOne.cs rename to Content/Structures/ShrineoftheMoltenOne.cs index 24257ac..efe23ae 100644 --- a/Structures/ShrineoftheMoltenOne.cs +++ b/Content/Structures/ShrineoftheMoltenOne.cs @@ -1,13 +1,13 @@ using Microsoft.Xna.Framework; using System; using System.Collections.Generic; -using Decimation.Tiles; -using Decimation.Tiles.ShrineoftheMoltenOne; +using Decimation.Content.Tiles; +using Decimation.Content.Tiles.ShrineoftheMoltenOne; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Structures +namespace Decimation.Content.Structures { class ShrineoftheMoltenOne { diff --git a/Structures/shrine.piskel b/Content/Structures/shrine.piskel similarity index 100% rename from Structures/shrine.piskel rename to Content/Structures/shrine.piskel diff --git a/Synergies/FireAmuletSynergy.cs b/Content/Synergies/FireAmuletSynergy.cs similarity index 74% rename from Synergies/FireAmuletSynergy.cs rename to Content/Synergies/FireAmuletSynergy.cs index dd5eb73..3071b97 100644 --- a/Synergies/FireAmuletSynergy.cs +++ b/Content/Synergies/FireAmuletSynergy.cs @@ -1,7 +1,7 @@ -using Decimation.Core; -using Decimation.Core.Amulets.Synergy; +using Decimation.Lib; +using Decimation.Lib.Amulets.Synergy; -namespace Decimation.Synergies +namespace Decimation.Content.Synergies { internal class FireAmuletSynergy : AmuletSynergyAdapter { diff --git a/Synergies/GraniteAmuletSynergy.cs b/Content/Synergies/GraniteAmuletSynergy.cs similarity index 81% rename from Synergies/GraniteAmuletSynergy.cs rename to Content/Synergies/GraniteAmuletSynergy.cs index a5dc805..c9ff2d0 100644 --- a/Synergies/GraniteAmuletSynergy.cs +++ b/Content/Synergies/GraniteAmuletSynergy.cs @@ -1,9 +1,9 @@ -using Decimation.Core; -using Decimation.Core.Amulets.Synergy; +using Decimation.Lib; +using Decimation.Lib.Amulets.Synergy; using Microsoft.Xna.Framework; using Terraria; -namespace Decimation.Synergies +namespace Decimation.Content.Synergies { internal class GraniteAmuletSynergy : AmuletSynergyAdapter { diff --git a/Synergies/MarbleAmuletSynergy.cs b/Content/Synergies/MarbleAmuletSynergy.cs similarity index 92% rename from Synergies/MarbleAmuletSynergy.cs rename to Content/Synergies/MarbleAmuletSynergy.cs index 1c2bbfd..6352301 100644 --- a/Synergies/MarbleAmuletSynergy.cs +++ b/Content/Synergies/MarbleAmuletSynergy.cs @@ -1,11 +1,11 @@ using System; -using Decimation.Core; -using Decimation.Core.Amulets.Synergy; +using Decimation.Lib; +using Decimation.Lib.Amulets.Synergy; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; -namespace Decimation.Synergies +namespace Decimation.Content.Synergies { internal class MarbleAmuletSynergy : AmuletSynergyAdapter { diff --git a/Tiles/Basalt.cs b/Content/Tiles/Basalt.cs similarity index 94% rename from Tiles/Basalt.cs rename to Content/Tiles/Basalt.cs index 31cf1f8..84216cf 100644 --- a/Tiles/Basalt.cs +++ b/Content/Tiles/Basalt.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; using Terraria.ID; using Microsoft.Xna.Framework; -namespace Decimation.Tiles +namespace Decimation.Content.Tiles { class Basalt : ModTile { diff --git a/Tiles/Basalt.png b/Content/Tiles/Basalt.png similarity index 100% rename from Tiles/Basalt.png rename to Content/Tiles/Basalt.png diff --git a/Tiles/ChlorophyteAnvil.cs b/Content/Tiles/ChlorophyteAnvil.cs similarity index 93% rename from Tiles/ChlorophyteAnvil.cs rename to Content/Tiles/ChlorophyteAnvil.cs index f7fc21a..bf0009c 100644 --- a/Tiles/ChlorophyteAnvil.cs +++ b/Content/Tiles/ChlorophyteAnvil.cs @@ -1,46 +1,46 @@ -using Decimation.Buffs.Buffs; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.ObjectData; - -namespace Decimation.Tiles -{ - class ChlorophyteAnvil : ModTile - { - public override void SetDefaults() - { - Main.tileSolidTop[Type] = true; - Main.tileFrameImportant[Type] = true; - Main.tileNoAttach[Type] = false; - TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); - TileObjectData.newTile.CoordinateHeights = new int[] { 16 }; - TileObjectData.addTile(Type); - ModTranslation name = CreateMapEntryName(); - name.SetDefault("Chlorophyte Anvil"); - AddMapEntry(new Color(108, 239, 64), name); - dustType = DustID.Iron; - disableSmartCursor = true; - adjTiles = new int[] { TileID.Anvils, TileID.MythrilAnvil, ModContent.TileType() }; - } - - public override void NumDust(int i, int j, bool fail, ref int num) - { - num = fail ? 1 : 3; - } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Item.NewItem(i * 16, j * 16, 32, 16, ModContent.ItemType()); - } - - public override void NearbyEffects(int i, int j, bool closer) - { - if (closer) - { - Main.LocalPlayer.AddBuff(ModContent.BuffType(), 5); - } - } - } -} +using Decimation.Content.Buffs.Buffs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Content.Tiles +{ + class ChlorophyteAnvil : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.CoordinateHeights = new int[] { 16 }; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Chlorophyte Anvil"); + AddMapEntry(new Color(108, 239, 64), name); + dustType = DustID.Iron; + disableSmartCursor = true; + adjTiles = new int[] { TileID.Anvils, TileID.MythrilAnvil, ModContent.TileType() }; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 16, ModContent.ItemType()); + } + + public override void NearbyEffects(int i, int j, bool closer) + { + if (closer) + { + Main.LocalPlayer.AddBuff(ModContent.BuffType(), 5); + } + } + } +} diff --git a/Tiles/ChlorophyteAnvil.png b/Content/Tiles/ChlorophyteAnvil.png similarity index 100% rename from Tiles/ChlorophyteAnvil.png rename to Content/Tiles/ChlorophyteAnvil.png diff --git a/Tiles/DenziumOre.cs b/Content/Tiles/DenziumOre.cs similarity index 94% rename from Tiles/DenziumOre.cs rename to Content/Tiles/DenziumOre.cs index 6979286..cdaacae 100644 --- a/Tiles/DenziumOre.cs +++ b/Content/Tiles/DenziumOre.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; using Terraria.ID; using Microsoft.Xna.Framework; -namespace Decimation.Tiles +namespace Decimation.Content.Tiles { class DenziumOre : ModTile { diff --git a/Tiles/DenziumOre.png b/Content/Tiles/DenziumOre.png similarity index 100% rename from Tiles/DenziumOre.png rename to Content/Tiles/DenziumOre.png diff --git a/Tiles/DuneWormTrophy.cs b/Content/Tiles/DuneWormTrophy.cs similarity index 96% rename from Tiles/DuneWormTrophy.cs rename to Content/Tiles/DuneWormTrophy.cs index 27201bf..51b8653 100644 --- a/Tiles/DuneWormTrophy.cs +++ b/Content/Tiles/DuneWormTrophy.cs @@ -5,7 +5,7 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; -namespace Decimation.Tiles +namespace Decimation.Content.Tiles { class DuneWormTrophy : ModTile { diff --git a/Tiles/DuneWormTrophy.png b/Content/Tiles/DuneWormTrophy.png similarity index 100% rename from Tiles/DuneWormTrophy.png rename to Content/Tiles/DuneWormTrophy.png diff --git a/Tiles/EnchantedAnvil.cs b/Content/Tiles/EnchantedAnvil.cs similarity index 96% rename from Tiles/EnchantedAnvil.cs rename to Content/Tiles/EnchantedAnvil.cs index 50bf305..380112c 100644 --- a/Tiles/EnchantedAnvil.cs +++ b/Content/Tiles/EnchantedAnvil.cs @@ -1,176 +1,176 @@ -using Decimation.Buffs.Buffs; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.ObjectData; - -namespace Decimation.Tiles -{ - public class EnchantedAnvil : ModTile - { - - public override void SetDefaults() - { - Main.tileSolidTop[Type] = true; - Main.tileFrameImportant[Type] = true; - Main.tileNoAttach[Type] = false; - TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); - TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; - TileObjectData.addTile(Type); - ModTranslation name = CreateMapEntryName(); - name.SetDefault("Enchanted Anvil"); - AddMapEntry(new Color(108, 239, 64), name); - dustType = DustID.Iron; - disableSmartCursor = true; - adjTiles = new int[] { TileID.Anvils, TileID.MythrilAnvil }; - } - - public override void NumDust(int i, int j, bool fail, ref int num) - { - num = fail ? 1 : 3; - } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Item.NewItem(i * 16, j * 16, 48, 32, ModContent.ItemType()); - } - - public override void NearbyEffects(int i, int j, bool closer) - { - if (closer) - { - Main.LocalPlayer.AddBuff(ModContent.BuffType(), 60); - Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil = true; - } - else - { - Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil = false; - } - } - - public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) - { - r = 1f; - g = 1f; - b = 1f; - } - - public class EnchantedAnvilGlobalItem : GlobalItem - { - public override void OnCraft(Item item, Recipe recipe) - { - //Work only on prefix, not on effects - if (Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil) - { - // Damages - if (item.melee && item.useStyle != 1 && item.pick == 0 && item.axe == 0 && item.hammer == 0) - { - if (Main.rand.Next(0, 21) == 5) - { - item.Prefix(PrefixID.Godly); - return; - } - } - else if (item.melee && (item.pick != 0 || item.axe != 0 || item.hammer != 0)) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Light); - return; - } - } - else if (item.melee) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Legendary); - return; - } - } - else if (item.summon) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Ruthless); - return; - } - } - else if ((item.magic || item.ranged) && item.knockBack == 0) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Demonic); - return; - } - } - else if (item.ranged) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Unreal); - return; - } - } - else if (item.summon) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Mythical); - return; - } - // Accessories - } - else if (item.accessory && item.defense != 0) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Warding); - return; - } - } - else if (item.accessory && item.mana != 0) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Arcane); - return; - } - } - else if (item.accessory && item.crit != 0) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Lucky); - return; - } - } - else if (item.accessory && item.damage != 0) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Menacing); - return; - } - } - else if (item.accessory && (item.velocity.X != 0 || item.velocity.Y != 0)) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Quick2); - return; - } - } - else if (item.accessory && item.shootSpeed != 0) - { - if (Main.rand.Next(0, 11) == 5) - { - item.Prefix(PrefixID.Violent); - return; - } - } - } - } - } - } -} +using Decimation.Content.Buffs.Buffs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Content.Tiles +{ + public class EnchantedAnvil : ModTile + { + + public override void SetDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Enchanted Anvil"); + AddMapEntry(new Color(108, 239, 64), name); + dustType = DustID.Iron; + disableSmartCursor = true; + adjTiles = new int[] { TileID.Anvils, TileID.MythrilAnvil }; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 48, 32, ModContent.ItemType()); + } + + public override void NearbyEffects(int i, int j, bool closer) + { + if (closer) + { + Main.LocalPlayer.AddBuff(ModContent.BuffType(), 60); + Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil = true; + } + else + { + Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil = false; + } + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + r = 1f; + g = 1f; + b = 1f; + } + + public class EnchantedAnvilGlobalItem : GlobalItem + { + public override void OnCraft(Item item, Recipe recipe) + { + //Work only on prefix, not on effects + if (Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil) + { + // Damages + if (item.melee && item.useStyle != 1 && item.pick == 0 && item.axe == 0 && item.hammer == 0) + { + if (Main.rand.Next(0, 21) == 5) + { + item.Prefix(PrefixID.Godly); + return; + } + } + else if (item.melee && (item.pick != 0 || item.axe != 0 || item.hammer != 0)) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Light); + return; + } + } + else if (item.melee) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Legendary); + return; + } + } + else if (item.summon) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Ruthless); + return; + } + } + else if ((item.magic || item.ranged) && item.knockBack == 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Demonic); + return; + } + } + else if (item.ranged) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Unreal); + return; + } + } + else if (item.summon) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Mythical); + return; + } + // Accessories + } + else if (item.accessory && item.defense != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Warding); + return; + } + } + else if (item.accessory && item.mana != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Arcane); + return; + } + } + else if (item.accessory && item.crit != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Lucky); + return; + } + } + else if (item.accessory && item.damage != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Menacing); + return; + } + } + else if (item.accessory && (item.velocity.X != 0 || item.velocity.Y != 0)) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Quick2); + return; + } + } + else if (item.accessory && item.shootSpeed != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Violent); + return; + } + } + } + } + } + } +} diff --git a/Tiles/EnchantedAnvil.png b/Content/Tiles/EnchantedAnvil.png similarity index 100% rename from Tiles/EnchantedAnvil.png rename to Content/Tiles/EnchantedAnvil.png diff --git a/Tiles/ShrineoftheMoltenOne/DeadEarth.cs b/Content/Tiles/ShrineoftheMoltenOne/DeadEarth.cs similarity index 93% rename from Tiles/ShrineoftheMoltenOne/DeadEarth.cs rename to Content/Tiles/ShrineoftheMoltenOne/DeadEarth.cs index f2694dc..1863699 100644 --- a/Tiles/ShrineoftheMoltenOne/DeadEarth.cs +++ b/Content/Tiles/ShrineoftheMoltenOne/DeadEarth.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Tiles.ShrineoftheMoltenOne +namespace Decimation.Content.Tiles.ShrineoftheMoltenOne { class DeadEarth : ModTile { diff --git a/Tiles/ShrineoftheMoltenOne/DeadEarth.png b/Content/Tiles/ShrineoftheMoltenOne/DeadEarth.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/DeadEarth.png rename to Content/Tiles/ShrineoftheMoltenOne/DeadEarth.png diff --git a/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs b/Content/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs similarity index 94% rename from Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs rename to Content/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs index 961be64..85f0b44 100644 --- a/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs +++ b/Content/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs @@ -1,8 +1,8 @@ -using Decimation.Items; -using Decimation.Items.Boss.Arachnus; +using Decimation.Content.Items; +using Decimation.Content.Items.Boss.Arachnus; using Microsoft.Xna.Framework; using System; -using Decimation.Items.Placeable.ShrineoftheMoltenOne; +using Decimation.Content.Items.Placeable.ShrineoftheMoltenOne; using Terraria; using Terraria.DataStructures; using Terraria.Enums; @@ -10,7 +10,7 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; -namespace Decimation.Tiles.ShrineoftheMoltenOne +namespace Decimation.Content.Tiles.ShrineoftheMoltenOne { class LockedShrineDoor : ModTile { diff --git a/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.png b/Content/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/LockedShrineDoor.png rename to Content/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.png diff --git a/Tiles/ShrineoftheMoltenOne/LockedShrineDoor_Highlight.png b/Content/Tiles/ShrineoftheMoltenOne/LockedShrineDoor_Highlight.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/LockedShrineDoor_Highlight.png rename to Content/Tiles/ShrineoftheMoltenOne/LockedShrineDoor_Highlight.png diff --git a/Tiles/ShrineoftheMoltenOne/RedHotSpike.cs b/Content/Tiles/ShrineoftheMoltenOne/RedHotSpike.cs similarity index 94% rename from Tiles/ShrineoftheMoltenOne/RedHotSpike.cs rename to Content/Tiles/ShrineoftheMoltenOne/RedHotSpike.cs index 95f6e6d..fccf9b9 100644 --- a/Tiles/ShrineoftheMoltenOne/RedHotSpike.cs +++ b/Content/Tiles/ShrineoftheMoltenOne/RedHotSpike.cs @@ -1,11 +1,11 @@ -using Decimation.Buffs.Debuffs; +using Decimation.Content.Buffs.Debuffs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.DataStructures; -namespace Decimation.Tiles.ShrineoftheMoltenOne +namespace Decimation.Content.Tiles.ShrineoftheMoltenOne { class RedHotSpike : ModTile { diff --git a/Tiles/ShrineoftheMoltenOne/RedHotSpike.png b/Content/Tiles/ShrineoftheMoltenOne/RedHotSpike.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/RedHotSpike.png rename to Content/Tiles/ShrineoftheMoltenOne/RedHotSpike.png diff --git a/Tiles/ShrineoftheMoltenOne/ShrineAltar.cs b/Content/Tiles/ShrineoftheMoltenOne/ShrineAltar.cs similarity index 94% rename from Tiles/ShrineoftheMoltenOne/ShrineAltar.cs rename to Content/Tiles/ShrineoftheMoltenOne/ShrineAltar.cs index f5f0fdc..806fc09 100644 --- a/Tiles/ShrineoftheMoltenOne/ShrineAltar.cs +++ b/Content/Tiles/ShrineoftheMoltenOne/ShrineAltar.cs @@ -1,6 +1,6 @@ -using Decimation.Items; -using Decimation.Items.Boss.Arachnus; -using Decimation.NPCs.Arachnus; +using Decimation.Content.Items; +using Decimation.Content.Items.Boss.Arachnus; +using Decimation.Content.NPCs.Arachnus; using Microsoft.Xna.Framework; using System; using Terraria; @@ -10,7 +10,7 @@ using Terraria.ModLoader; using Terraria.ObjectData; using Terraria.World.Generation; -namespace Decimation.Tiles.ShrineoftheMoltenOne +namespace Decimation.Content.Tiles.ShrineoftheMoltenOne { class ShrineAltar : ModTile { diff --git a/Tiles/ShrineoftheMoltenOne/ShrineAltar.png b/Content/Tiles/ShrineoftheMoltenOne/ShrineAltar.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/ShrineAltar.png rename to Content/Tiles/ShrineoftheMoltenOne/ShrineAltar.png diff --git a/Tiles/ShrineoftheMoltenOne/ShrineBrick.cs b/Content/Tiles/ShrineoftheMoltenOne/ShrineBrick.cs similarity index 93% rename from Tiles/ShrineoftheMoltenOne/ShrineBrick.cs rename to Content/Tiles/ShrineoftheMoltenOne/ShrineBrick.cs index 7fad26d..7a73634 100644 --- a/Tiles/ShrineoftheMoltenOne/ShrineBrick.cs +++ b/Content/Tiles/ShrineoftheMoltenOne/ShrineBrick.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Tiles.ShrineoftheMoltenOne +namespace Decimation.Content.Tiles.ShrineoftheMoltenOne { class ShrineBrick : ModTile { diff --git a/Tiles/ShrineoftheMoltenOne/ShrineBrick.png b/Content/Tiles/ShrineoftheMoltenOne/ShrineBrick.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/ShrineBrick.png rename to Content/Tiles/ShrineoftheMoltenOne/ShrineBrick.png diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs b/Content/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs similarity index 96% rename from Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs rename to Content/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs index 5361c42..7dc7553 100644 --- a/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs +++ b/Content/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs @@ -1,6 +1,6 @@ using Microsoft.Xna.Framework; using System; -using Decimation.Items.Placeable.ShrineoftheMoltenOne; +using Decimation.Content.Items.Placeable.ShrineoftheMoltenOne; using Terraria; using Terraria.DataStructures; using Terraria.Enums; @@ -8,7 +8,7 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; -namespace Decimation.Tiles.ShrineoftheMoltenOne +namespace Decimation.Content.Tiles.ShrineoftheMoltenOne { class ShrineDoorClosed : ModTile { diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.png b/Content/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.png rename to Content/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.png diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed_Highlight.png b/Content/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed_Highlight.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/ShrineDoorClosed_Highlight.png rename to Content/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed_Highlight.png diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs b/Content/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs similarity index 97% rename from Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs rename to Content/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs index 892a7e0..546eff2 100644 --- a/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs +++ b/Content/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs @@ -1,6 +1,6 @@ using Microsoft.Xna.Framework; using System; -using Decimation.Items.Placeable.ShrineoftheMoltenOne; +using Decimation.Content.Items.Placeable.ShrineoftheMoltenOne; using Terraria; using Terraria.DataStructures; using Terraria.Enums; @@ -8,7 +8,7 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; -namespace Decimation.Tiles.ShrineoftheMoltenOne +namespace Decimation.Content.Tiles.ShrineoftheMoltenOne { class ShrineDoorOpened : ModTile { diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.png b/Content/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.png rename to Content/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.png diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened_Highlight.png b/Content/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened_Highlight.png similarity index 100% rename from Tiles/ShrineoftheMoltenOne/ShrineDoorOpened_Highlight.png rename to Content/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened_Highlight.png diff --git a/Tiles/TalonianPillar.cs b/Content/Tiles/TalonianPillar.cs similarity index 94% rename from Tiles/TalonianPillar.cs rename to Content/Tiles/TalonianPillar.cs index 8d4a83d..8299fb7 100644 --- a/Tiles/TalonianPillar.cs +++ b/Content/Tiles/TalonianPillar.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; using Terraria.ID; using Microsoft.Xna.Framework; -namespace Decimation.Tiles +namespace Decimation.Content.Tiles { class TalonianPillar : ModTile { diff --git a/Tiles/TalonianPillar.png b/Content/Tiles/TalonianPillar.png similarity index 100% rename from Tiles/TalonianPillar.png rename to Content/Tiles/TalonianPillar.png diff --git a/Tiles/TitanForge.cs b/Content/Tiles/TitanForge.cs similarity index 95% rename from Tiles/TitanForge.cs rename to Content/Tiles/TitanForge.cs index 4b88cb6..e1468ec 100644 --- a/Tiles/TitanForge.cs +++ b/Content/Tiles/TitanForge.cs @@ -1,51 +1,51 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.ObjectData; - -namespace Decimation.Tiles -{ - class TitanForge : ModTile - { - public override void SetDefaults() - { - Main.tileSolidTop[Type] = false; - Main.tileFrameImportant[Type] = true; - Main.tileNoAttach[Type] = true; - TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); - TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; - TileObjectData.addTile(Type); - ModTranslation name = CreateMapEntryName(); - name.SetDefault("Titan Forge"); - AddMapEntry(new Color(104, 140, 183), name); - dustType = DustID.Iron; - disableSmartCursor = true; - animationFrameHeight = 54; - } - - public override void NumDust(int i, int j, bool fail, ref int num) - { - num = fail ? 1 : 3; - } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Item.NewItem(i * 16, j * 16, 48, 48, ModContent.ItemType()); - } - - public override void AnimateTile(ref int frame, ref int frameCounter) - { - frameCounter++; - if (frameCounter > 5) - { - frameCounter = 0; - frame++; - if (frame > 4) - { - frame = 0; - } - } - } - } -} +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Content.Tiles +{ + class TitanForge : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = false; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Titan Forge"); + AddMapEntry(new Color(104, 140, 183), name); + dustType = DustID.Iron; + disableSmartCursor = true; + animationFrameHeight = 54; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 48, 48, ModContent.ItemType()); + } + + public override void AnimateTile(ref int frame, ref int frameCounter) + { + frameCounter++; + if (frameCounter > 5) + { + frameCounter = 0; + frame++; + if (frame > 4) + { + frame = 0; + } + } + } + } +} diff --git a/Tiles/TitanForge.png b/Content/Tiles/TitanForge.png similarity index 100% rename from Tiles/TitanForge.png rename to Content/Tiles/TitanForge.png diff --git a/UI/AmuletSlot.cs b/Content/UI/AmuletSlot.cs similarity index 97% rename from UI/AmuletSlot.cs rename to Content/UI/AmuletSlot.cs index 2619d6a..01641ca 100644 --- a/UI/AmuletSlot.cs +++ b/Content/UI/AmuletSlot.cs @@ -1,12 +1,12 @@ using System; -using Decimation.Core.Collections; +using Decimation.Lib.Collections; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.GameInput; using Terraria.UI; -namespace Decimation.UI +namespace Decimation.Content.UI { public class AmuletSlot : UIElement { diff --git a/UI/AmuletSlot.png b/Content/UI/AmuletSlot.png similarity index 100% rename from UI/AmuletSlot.png rename to Content/UI/AmuletSlot.png diff --git a/UI/AmuletSlotState.cs b/Content/UI/AmuletSlotState.cs similarity index 97% rename from UI/AmuletSlotState.cs rename to Content/UI/AmuletSlotState.cs index 1bb237d..9414737 100644 --- a/UI/AmuletSlotState.cs +++ b/Content/UI/AmuletSlotState.cs @@ -7,7 +7,7 @@ using Terraria.UI; using Terraria; using Microsoft.Xna.Framework; -namespace Decimation.UI +namespace Decimation.Content.UI { public class AmuletSlotState : UIState { diff --git a/UI/SkeletonUI.cs b/Content/UI/SkeletonUI.cs similarity index 98% rename from UI/SkeletonUI.cs rename to Content/UI/SkeletonUI.cs index a3cd74a..005cf9c 100644 --- a/UI/SkeletonUI.cs +++ b/Content/UI/SkeletonUI.cs @@ -1,5 +1,5 @@ -using Decimation.Items; -using Decimation.NPCs.TownNPCs; +using Decimation.Content.Items; +using Decimation.Content.NPCs.TownNPCs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -10,7 +10,7 @@ using Terraria.ModLoader; using Terraria.UI; using Terraria.UI.Chat; -namespace Decimation.UI +namespace Decimation.Content.UI { class SkeletonUI : UIState { diff --git a/UI/VanillaItemSlotWrapper.cs b/Content/UI/VanillaItemSlotWrapper.cs similarity index 98% rename from UI/VanillaItemSlotWrapper.cs rename to Content/UI/VanillaItemSlotWrapper.cs index 3e4409e..71d5083 100644 --- a/UI/VanillaItemSlotWrapper.cs +++ b/Content/UI/VanillaItemSlotWrapper.cs @@ -6,7 +6,7 @@ using Terraria.GameInput; using Terraria.UI; // This class is from Example Mod -namespace Decimation.UI +namespace Decimation.Content.UI { // This class wraps the vanilla ItemSlot class into a UIElement. The ItemSlot class was made before the UI system was made, so it can't be used normally with UIState. // By wrapping the vanilla ItemSlot class, we can easily use ItemSlot. diff --git a/Walls/DenziumWall.cs b/Content/Walls/DenziumWall.cs similarity index 92% rename from Walls/DenziumWall.cs rename to Content/Walls/DenziumWall.cs index 35784a7..9848f6d 100644 --- a/Walls/DenziumWall.cs +++ b/Content/Walls/DenziumWall.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Walls +namespace Decimation.Content.Walls { internal class DenziumWall : ModWall { diff --git a/Walls/DenziumWall.png b/Content/Walls/DenziumWall.png similarity index 100% rename from Walls/DenziumWall.png rename to Content/Walls/DenziumWall.png diff --git a/Items/Weapons/Arachnus/GlaiveWeaver.cs b/Items/Weapons/Arachnus/GlaiveWeaver.cs deleted file mode 100644 index cee26fc..0000000 --- a/Items/Weapons/Arachnus/GlaiveWeaver.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Decimation.Core.Items; -using Decimation.Core.Util; -using Terraria; - -namespace Decimation.Items.Weapons.Arachnus -{ - internal class GlaiveWeaver : DecimationWeapon - { - protected override string ItemName => "Glaive Weaver"; - protected override string ItemTooltip => "Your palm burns as you wield this godly weapon."; - protected override int Damages => 850; - protected override string Projectile => "ArchingSolarBlade"; - - protected override void InitWeapon() - { - width = 42; - height = 46; - value = Item.buyPrice(0, 45); - rarity = Rarity.Red; - useTime = 15; - useAnimation = 15; - shootSpeed = 15; - criticalStrikeChance = 10; - autoReuse = true; - knockBack = 4; - } - } -} \ No newline at end of file diff --git a/Core/Amulets/Amulet.cs b/Lib/Amulets/Amulet.cs similarity index 82% rename from Core/Amulets/Amulet.cs rename to Lib/Amulets/Amulet.cs index 3b37ed1..aeabec7 100644 --- a/Core/Amulets/Amulet.cs +++ b/Lib/Amulets/Amulet.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; -using Decimation.Core.Amulets.Synergy; -using Decimation.Core.Collections; -using Decimation.Core.Items; -using Decimation.Core.Util; +using Decimation.Lib.Amulets.Synergy; +using Decimation.Lib.Collections; +using Decimation.Lib.Items; +using Decimation.Lib.Util; using Terraria; using Terraria.ModLoader; -namespace Decimation.Core.Amulets +namespace Decimation.Lib.Amulets { public abstract class Amulet : DecimationItem { @@ -22,9 +22,9 @@ namespace Decimation.Core.Amulets protected sealed override void Init() { - width = 28; - height = 30; - rarity = Rarity.Green; + item.width = 28; + item.height = 30; + item.rare = Rarity.Green.GetRarityValue(); this.item.maxStack = 1; InitAmulet(); diff --git a/Core/Amulets/AmuletTooltip.cs b/Lib/Amulets/AmuletTooltip.cs similarity index 98% rename from Core/Amulets/AmuletTooltip.cs rename to Lib/Amulets/AmuletTooltip.cs index 06617b5..1ed4654 100644 --- a/Core/Amulets/AmuletTooltip.cs +++ b/Lib/Amulets/AmuletTooltip.cs @@ -4,7 +4,7 @@ using Microsoft.Xna.Framework; using Terraria.ModLoader; using Terraria.UI.Chat; -namespace Decimation.Core.Amulets +namespace Decimation.Lib.Amulets { public class AmuletTooltip { diff --git a/Core/Amulets/Synergy/AmuletSynergyAdapter.cs b/Lib/Amulets/Synergy/AmuletSynergyAdapter.cs similarity index 94% rename from Core/Amulets/Synergy/AmuletSynergyAdapter.cs rename to Lib/Amulets/Synergy/AmuletSynergyAdapter.cs index f7a6ed7..41c87b6 100644 --- a/Core/Amulets/Synergy/AmuletSynergyAdapter.cs +++ b/Lib/Amulets/Synergy/AmuletSynergyAdapter.cs @@ -7,7 +7,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; -namespace Decimation.Core.Amulets.Synergy +namespace Decimation.Lib.Amulets.Synergy { public class AmuletSynergyAdapter : IAmuletsSynergy { diff --git a/Core/Amulets/Synergy/IAmuletsSynergy.cs b/Lib/Amulets/Synergy/IAmuletsSynergy.cs similarity index 90% rename from Core/Amulets/Synergy/IAmuletsSynergy.cs rename to Lib/Amulets/Synergy/IAmuletsSynergy.cs index 80bf291..27b5328 100644 --- a/Core/Amulets/Synergy/IAmuletsSynergy.cs +++ b/Lib/Amulets/Synergy/IAmuletsSynergy.cs @@ -1,7 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; -namespace Decimation.Core.Amulets.Synergy +namespace Decimation.Lib.Amulets.Synergy { public interface IAmuletsSynergy { diff --git a/Core/Collections/AmuletList.cs b/Lib/Collections/AmuletList.cs similarity index 89% rename from Core/Collections/AmuletList.cs rename to Lib/Collections/AmuletList.cs index d64d44e..ea45b13 100644 --- a/Core/Collections/AmuletList.cs +++ b/Lib/Collections/AmuletList.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Decimation.Core.Amulets; +using Decimation.Lib.Amulets; using Terraria; -namespace Decimation.Core.Collections +namespace Decimation.Lib.Collections { public class AmuletList : List { diff --git a/Core/DecimationModPlayer.cs b/Lib/DecimationPlayer.cs similarity index 56% rename from Core/DecimationModPlayer.cs rename to Lib/DecimationPlayer.cs index e80ac82..a339fd0 100644 --- a/Core/DecimationModPlayer.cs +++ b/Lib/DecimationPlayer.cs @@ -1,12 +1,14 @@ -using Terraria.ModLoader; +using System.Collections.Generic; +using Decimation.Lib.Items; +using Decimation.Lib.Util; +using Terraria.ModLoader; -namespace Decimation.Core +namespace Decimation.Lib { public abstract class DecimationModPlayer : ModPlayer, IDecimationPlayer { - public abstract bool HasLavaCharm { get; set; } public abstract bool HasShield { get; set; } - + } -} +} \ No newline at end of file diff --git a/Core/IDecimationPlayer.cs b/Lib/IDecimationPlayer.cs similarity index 85% rename from Core/IDecimationPlayer.cs rename to Lib/IDecimationPlayer.cs index 28abda7..ac5bcba 100644 --- a/Core/IDecimationPlayer.cs +++ b/Lib/IDecimationPlayer.cs @@ -1,6 +1,6 @@ using Terraria.ModLoader; -namespace Decimation.Core +namespace Decimation.Lib { public interface IDecimationPlayer { diff --git a/Core/Items/DecimationAccessory.cs b/Lib/Items/DecimationAccessory.cs similarity index 89% rename from Core/Items/DecimationAccessory.cs rename to Lib/Items/DecimationAccessory.cs index 0d0dedc..fb6c153 100644 --- a/Core/Items/DecimationAccessory.cs +++ b/Lib/Items/DecimationAccessory.cs @@ -1,4 +1,4 @@ -namespace Decimation.Core.Items +namespace Decimation.Lib.Items { public abstract class DecimationAccessory : DecimationItem { diff --git a/Core/Items/DecimationAmmo.cs b/Lib/Items/DecimationAmmo.cs similarity index 74% rename from Core/Items/DecimationAmmo.cs rename to Lib/Items/DecimationAmmo.cs index 1a9a2bd..6a146a1 100644 --- a/Core/Items/DecimationAmmo.cs +++ b/Lib/Items/DecimationAmmo.cs @@ -1,15 +1,13 @@ -using Decimation.Core.Util; +using Decimation.Lib.Util; using Terraria; -namespace Decimation.Core.Items +namespace Decimation.Lib.Items { public abstract class DecimationAmmo : DecimationItem { - protected int damages = 0; - protected float projKnockBack = 0; - protected abstract string Projectile { get; } protected abstract int Ammo { get; } + protected virtual int Damages { get; set; } = 0; protected virtual bool VanillaProjectile { get; } = false; protected abstract void InitAmmo(); @@ -20,8 +18,7 @@ namespace Decimation.Core.Items InitAmmo(); - this.item.damage = damages; - this.item.knockBack = projKnockBack; + this.item.damage = Damages; this.item.shoot = ItemUtils.GetIdFromName(this.Projectile, typeof(Projectile), this.VanillaProjectile); this.item.ammo = this.Ammo; diff --git a/Core/Items/DecimationItem.cs b/Lib/Items/DecimationItem.cs similarity index 65% rename from Core/Items/DecimationItem.cs rename to Lib/Items/DecimationItem.cs index 0a35b9c..008c522 100644 --- a/Core/Items/DecimationItem.cs +++ b/Lib/Items/DecimationItem.cs @@ -1,30 +1,18 @@ using System.Collections.Generic; -using Decimation.Core.Util; +using Decimation.Lib.Util; using Terraria; using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Core.Items +namespace Decimation.Lib.Items { public abstract class DecimationItem : ModItem { - protected bool autoReuse = false; - protected bool consumable = false; - protected int height = 16; - protected Rarity rarity = Rarity.White; - protected int useAnimation = 20; - protected LegacySoundStyle useSound = SoundID.Item1; - protected int useStyle = 1; - protected int useTime = 20; - protected int value = 1; - - protected int width = 16; protected abstract string ItemName { get; } protected virtual string ItemTooltip { get; } = ""; protected virtual DrawAnimation Animation { get; } = null; - protected virtual bool IsClone { get; } = false; public sealed override void SetStaticDefaults() { @@ -36,24 +24,16 @@ namespace Decimation.Core.Items public sealed override void SetDefaults() { + this.item.height = 16; + this.item.width = 16; + this.item.useAnimation = 20; + this.item.useTime = 20; + this.item.useStyle = 1; this.item.maxStack = 999; this.item.noMelee = true; + this.item.UseSound = SoundID.Item1; Init(); - - if (!this.IsClone) - { - this.item.width = width; - this.item.height = height; - this.item.rare = (int) rarity; - this.item.consumable = consumable; - this.item.autoReuse = autoReuse; - this.item.useStyle = useStyle; - this.item.useTime = useTime; - this.item.useAnimation = useAnimation; - this.item.UseSound = useSound; - this.item.value = value; - } } public sealed override void AddRecipes() diff --git a/Core/Items/DecimationPlaceableItem.cs b/Lib/Items/DecimationPlaceableItem.cs similarity index 57% rename from Core/Items/DecimationPlaceableItem.cs rename to Lib/Items/DecimationPlaceableItem.cs index 54ebc80..4e0b0ea 100644 --- a/Core/Items/DecimationPlaceableItem.cs +++ b/Lib/Items/DecimationPlaceableItem.cs @@ -1,4 +1,4 @@ -namespace Decimation.Core.Items +namespace Decimation.Lib.Items { public abstract class DecimationPlaceableItem : DecimationItem { @@ -8,13 +8,13 @@ protected sealed override void Init() { - width = 12; - height = 12; - autoReuse = true; - useTime = 15; - useAnimation = 15; - useStyle = 1; - consumable = true; + item.width = 12; + item.height = 12; + item.consumable = true; + item.useTime = 15; + item.useAnimation = 15; + item.useStyle = 1; + item.consumable = true; this.item.useTurn = true; diff --git a/Core/Items/DecimationPotion.cs b/Lib/Items/DecimationPotion.cs similarity index 79% rename from Core/Items/DecimationPotion.cs rename to Lib/Items/DecimationPotion.cs index 9bcc544..af95050 100644 --- a/Core/Items/DecimationPotion.cs +++ b/Lib/Items/DecimationPotion.cs @@ -1,4 +1,4 @@ -namespace Decimation.Core.Items +namespace Decimation.Lib.Items { public abstract class DecimationPotion : DecimationItem { @@ -11,11 +11,11 @@ protected sealed override void Init() { - width = 20; - height = 20; - consumable = true; - useTime = 20; - useAnimation = 20; + item.width = 20; + item.height = 20; + item.consumable = true; + item.useTime = 20; + item.useAnimation = 20; item.maxStack = 30; item.useTurn = true; diff --git a/Core/Items/DecimationTool.cs b/Lib/Items/DecimationTool.cs similarity index 64% rename from Core/Items/DecimationTool.cs rename to Lib/Items/DecimationTool.cs index c9c1966..2fbe11d 100644 --- a/Core/Items/DecimationTool.cs +++ b/Lib/Items/DecimationTool.cs @@ -1,17 +1,17 @@ -namespace Decimation.Core.Items +namespace Decimation.Lib.Items { public abstract class DecimationTool : DecimationItem { - protected virtual int MeleeDamages { get; } - protected virtual int PickaxePower { get; } - protected virtual int AxePower { get; } - protected virtual int HammerPower { get; } + protected virtual int MeleeDamages { get; } = 0; + protected virtual int PickaxePower { get; } = 0; + protected virtual int AxePower { get; } = 0; + protected virtual int HammerPower { get; } = 0; protected abstract void InitTool(); protected override void Init() { - autoReuse = true; + item.autoReuse = true; this.item.useTurn = true; this.item.maxStack = 1; diff --git a/Core/Items/DecimationWeapon.cs b/Lib/Items/DecimationWeapon.cs similarity index 61% rename from Core/Items/DecimationWeapon.cs rename to Lib/Items/DecimationWeapon.cs index fa4d71e..12da818 100644 --- a/Core/Items/DecimationWeapon.cs +++ b/Lib/Items/DecimationWeapon.cs @@ -1,17 +1,13 @@ -using Decimation.Core.Util; +using Decimation.Lib.Util; using Terraria; -namespace Decimation.Core.Items +namespace Decimation.Lib.Items { public abstract class DecimationWeapon : DecimationItem { - protected int criticalStrikeChance = 0; // Percents - protected float knockBack = 0; // https://terraria.gamepedia.com/Knockback - protected float shootSpeed = 0; - - protected virtual DamageType DamagesType { get; } = DamageType.MELEE; - protected virtual string Projectile { get; } - protected virtual string Ammo { get; } + protected virtual DamageType DamagesType { get; } = DamageType.Melee; + protected virtual string Projectile { get; } = null; + protected virtual string Ammo { get; } = null; protected virtual bool VanillaProjectile { get; } = false; protected virtual bool VanillaAmmo { get; } = false; @@ -20,21 +16,20 @@ namespace Decimation.Core.Items protected override void Init() { - useStyle = 1; - - autoReuse = false; + this.item.useStyle = 1; + this.item.autoReuse = false; this.item.useTurn = true; this.item.maxStack = 1; switch (this.DamagesType) { - case DamageType.MAGIC: + case DamageType.Magic: this.item.magic = true; break; - case DamageType.RANGED: + case DamageType.Ranged: this.item.ranged = true; break; - case DamageType.THROW: + case DamageType.Throw: this.item.thrown = true; break; default: @@ -45,9 +40,6 @@ namespace Decimation.Core.Items InitWeapon(); this.item.damage = this.Damages; - this.item.crit = criticalStrikeChance; - this.item.knockBack = knockBack; - this.item.shootSpeed = shootSpeed; if (this.Projectile != null) this.item.shoot = ItemUtils.GetIdFromName(this.Projectile, typeof(Projectile), this.VanillaProjectile); @@ -55,15 +47,15 @@ namespace Decimation.Core.Items if (this.Ammo != null) this.item.useAmmo = ItemUtils.GetIdFromName(this.Ammo, typeof(Item), this.VanillaAmmo); - if (!this.item.melee) this.item.noMelee = true; + if (this.item.melee) this.item.noMelee = false; } public enum DamageType { - MELEE, - MAGIC, - THROW, - RANGED + Melee, + Magic, + Throw, + Ranged } } } \ No newline at end of file diff --git a/Core/NPCs/Worm.cs b/Lib/NPCs/Worm.cs similarity index 99% rename from Core/NPCs/Worm.cs rename to Lib/NPCs/Worm.cs index a2ec853..9771049 100644 --- a/Core/NPCs/Worm.cs +++ b/Lib/NPCs/Worm.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Core.NPCs +namespace Decimation.Lib.NPCs { public abstract class Worm : ModNPC { diff --git a/Core/Util/Builder/RecipeBuilder.cs b/Lib/Util/Builder/RecipeBuilder.cs similarity index 97% rename from Core/Util/Builder/RecipeBuilder.cs rename to Lib/Util/Builder/RecipeBuilder.cs index a749882..a13c29d 100644 --- a/Core/Util/Builder/RecipeBuilder.cs +++ b/Lib/Util/Builder/RecipeBuilder.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Terraria.ModLoader; -namespace Decimation.Core.Util.Builder +namespace Decimation.Lib.Util.Builder { internal class RecipeBuilder { diff --git a/Core/Util/ItemUtils.cs b/Lib/Util/ItemUtils.cs similarity index 88% rename from Core/Util/ItemUtils.cs rename to Lib/Util/ItemUtils.cs index cb16bdd..556f5b6 100644 --- a/Core/Util/ItemUtils.cs +++ b/Lib/Util/ItemUtils.cs @@ -4,12 +4,12 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -/** - * Class ItemUtils provides several static methods to simplify items - */ -namespace Decimation.Core.Util +namespace Decimation.Lib.Util { - public class ItemUtils + /** + * Class ItemUtils provides several static methods to simplify items + */ + public static class ItemUtils { private static readonly Mod Mod = References.mod; @@ -64,5 +64,10 @@ namespace Decimation.Core.Util return (short) correspondingItemField.GetValue(null); } + + public static int GetRarityValue(this Rarity rarity) + { + return (int) rarity; + } } } \ No newline at end of file diff --git a/Core/Util/References.cs b/Lib/Util/References.cs similarity index 97% rename from Core/Util/References.cs rename to Lib/Util/References.cs index 236b04b..ea0e819 100644 --- a/Core/Util/References.cs +++ b/Lib/Util/References.cs @@ -2,7 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; -namespace Decimation.Core.Util +namespace Decimation.Lib.Util { public class References { diff --git a/Projectiles/ArchingSolarBlade.cs b/Projectiles/ArchingSolarBlade.cs deleted file mode 100644 index 1d52f26..0000000 --- a/Projectiles/ArchingSolarBlade.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Projectiles -{ - internal class ArchingSolarBlade : DecimationProjectile - { - //public override void SetStaticDefaults() - //{ - // DisplayName.SetDefault("Arching Solar Blade"); - //} - - protected override void Init() - { - width = 42; - height = 46; - tileCollide = false; - penetrate = 30; - ignoreWater = true; - aiStyle = 3; - aiType = ProjectileID.BloodyMachete; - light = 1f; - - projectile.extraUpdates = 1; - } - } -} diff --git a/Projectiles/BloodBeamFriendly.cs b/Projectiles/BloodBeamFriendly.cs deleted file mode 100644 index 6dd04b2..0000000 --- a/Projectiles/BloodBeamFriendly.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Decimation.Dusts; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace Decimation.Projectiles -{ - internal class BloodBeamFriendly : DecimationProjectile - { - public override string Texture =>"Terraria/Projectile_" + ProjectileID.CursedFlameFriendly; - - protected override void Init() - { - width = 26; - height = 26; - aiStyle = -1; - penetrate = -1; - projectile.alpha = 255; - timeLeft = 40; - tileCollide = true; - ignoreWater = true; - damages = 15; - hostile = false; - } - - public override void AI() - { - projectile.velocity.Y += (60 - timeLeft) * 0.005f; - - Dust.NewDust(projectile.position, 26, 26, ModContent.DustType()); - } - } -} diff --git a/Projectiles/DecimationProjectile.cs b/Projectiles/DecimationProjectile.cs deleted file mode 100644 index 34efebf..0000000 --- a/Projectiles/DecimationProjectile.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Decimation.Core.Items; -using Terraria.ModLoader; - -namespace Decimation.Projectiles -{ - internal abstract class DecimationProjectile : ModProjectile - { - protected int aiStyle = -1; - protected int damages = 0; - protected DecimationWeapon.DamageType damageType = DecimationWeapon.DamageType.MELEE; - protected int height = 16; - protected bool hostile = false; - protected bool ignoreWater = false; - protected float light = 0f; - protected int penetrate = 0; - protected bool tileCollide = true; - protected int timeLeft = 180; - protected int width = 16; - - protected virtual bool IsClone { get; } = false; - - protected abstract void Init(); - - public sealed override void SetDefaults() - { - Init(); - - if (this.IsClone) return; - - this.projectile.width = width; - this.projectile.height = height; - this.projectile.damage = damages; - this.projectile.penetrate = penetrate; - this.projectile.timeLeft = timeLeft; - this.projectile.hostile = hostile; - this.projectile.friendly = !hostile; - this.projectile.tileCollide = tileCollide; - this.projectile.ignoreWater = ignoreWater; - this.projectile.aiStyle = aiStyle; - this.projectile.light = light; - - switch (damageType) - { - case DecimationWeapon.DamageType.MELEE: - this.projectile.melee = true; - break; - case DecimationWeapon.DamageType.MAGIC: - this.projectile.magic = true; - break; - case DecimationWeapon.DamageType.RANGED: - this.projectile.ranged = true; - break; - case DecimationWeapon.DamageType.THROW: - this.projectile.thrown = true; - break; - default: - this.projectile.melee = true; - break; - } - } - } -} \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs deleted file mode 100644 index fa021fc..0000000 --- a/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Decimation")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Decimation")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0827514F-8B33-478D-82E2-67F4D4E07F3B")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file