diff --git a/Buffs/BuffTemplate.png b/Buffs/BuffTemplate.png new file mode 100644 index 0000000..af9d614 Binary files /dev/null and b/Buffs/BuffTemplate.png differ diff --git a/Buffs/FoxPetBuff.cs b/Buffs/FoxPetBuff.cs new file mode 100644 index 0000000..16373ae --- /dev/null +++ b/Buffs/FoxPetBuff.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace FabusMod.Buffs; + +public class FoxPetBuff : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Pet"); + Description.SetDefault("Does it want your apple?"); + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.GetModPlayer().foxPet = true; + if (player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(new EntitySource_Misc(""), player.position.X + player.width / 2, player.position.Y + player.height / 2, 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI); + } + } +} diff --git a/Buffs/FoxPetBuff.png b/Buffs/FoxPetBuff.png new file mode 100644 index 0000000..7abd0ca Binary files /dev/null and b/Buffs/FoxPetBuff.png differ diff --git a/Buffs/FoxPistol/FoxBreak.cs b/Buffs/FoxPistol/FoxBreak.cs new file mode 100644 index 0000000..1915ae1 --- /dev/null +++ b/Buffs/FoxPistol/FoxBreak.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.FoxPistol; + +public class FoxBreak : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Break"); + Description.SetDefault(" - Lowered Movement Speed"); + Main.buffNoTimeDisplay[Type] = false; + Main.debuff[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.moveSpeed -= 0.7f; + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.4f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } +} diff --git a/Buffs/FoxPistol/FoxBreak.png b/Buffs/FoxPistol/FoxBreak.png new file mode 100644 index 0000000..e4aa488 Binary files /dev/null and b/Buffs/FoxPistol/FoxBreak.png differ diff --git a/Buffs/FoxPistol/FoxMending.cs b/Buffs/FoxPistol/FoxMending.cs new file mode 100644 index 0000000..819a3c7 --- /dev/null +++ b/Buffs/FoxPistol/FoxMending.cs @@ -0,0 +1,30 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.FoxPistol; + +public class FoxMending : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Mending"); + Description.SetDefault(" - Regenerating HP\n - Increased Movement Speed\n - -12% Damage"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetDamage(DamageClass.Generic) += 0.88f; + player.moveSpeed += 0.8f; + if (!player.HasBuff(ModContent.BuffType())) + { + player.lifeRegen = 16; + } + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } +} diff --git a/Buffs/FoxPistol/FoxMending.png b/Buffs/FoxPistol/FoxMending.png new file mode 100644 index 0000000..fc8b1f4 Binary files /dev/null and b/Buffs/FoxPistol/FoxMending.png differ diff --git a/Buffs/FoxPistol/FoxMendingBlue.cs b/Buffs/FoxPistol/FoxMendingBlue.cs new file mode 100644 index 0000000..3b92baf --- /dev/null +++ b/Buffs/FoxPistol/FoxMendingBlue.cs @@ -0,0 +1,30 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.FoxPistol; + +public class FoxMendingBlue : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Mending - Blue"); + Description.SetDefault(" - Regenerating HP\n - Increased Movement Speed\n - -12% Damage"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetDamage(DamageClass.Generic) += 0.88f; + player.moveSpeed += 0.8f; + if (!player.HasBuff(ModContent.BuffType())) + { + player.lifeRegen = 16; + } + int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num1].scale = 2f; + Dust obj = Main.dust[num1]; + obj.velocity *= 0.1f; + Main.dust[num1].noGravity = true; + } +} diff --git a/Buffs/FoxPistol/FoxMendingBlue.png b/Buffs/FoxPistol/FoxMendingBlue.png new file mode 100644 index 0000000..2ce0381 Binary files /dev/null and b/Buffs/FoxPistol/FoxMendingBlue.png differ diff --git a/Buffs/FoxPistol/FoxWither.cs b/Buffs/FoxPistol/FoxWither.cs new file mode 100644 index 0000000..338df3f --- /dev/null +++ b/Buffs/FoxPistol/FoxWither.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.FoxPistol; + +public class FoxWither : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Wither"); + Description.SetDefault(" - Losing life!"); + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.lifeRegen -= 22; + int dust = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + Main.dust[dust].scale = 1.6f; + Dust obj = Main.dust[dust]; + obj.velocity *= 1f; + Main.dust[dust].noGravity = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen -= 22; + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.6f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } +} diff --git a/Buffs/FoxPistol/FoxWither.png b/Buffs/FoxPistol/FoxWither.png new file mode 100644 index 0000000..00f4a55 Binary files /dev/null and b/Buffs/FoxPistol/FoxWither.png differ diff --git a/Buffs/FoxPistol/SpectralMending.cs b/Buffs/FoxPistol/SpectralMending.cs new file mode 100644 index 0000000..3e7ef4e --- /dev/null +++ b/Buffs/FoxPistol/SpectralMending.cs @@ -0,0 +1,41 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.FoxPistol; + +public class SpectralMending : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Mending"); + Description.SetDefault(" - HP +200\n - Regenerating HP\n - Increased Movement Speed\n - -7% Damage"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetDamage(DamageClass.Generic) += 0.93f; + player.moveSpeed += 0.8f; + player.statLifeMax2 += 200; + if (!player.HasBuff(ModContent.BuffType())) + { + player.lifeRegen = 32; + } + int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int num2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int num3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num1].scale = 0.6f; + Dust obj = Main.dust[num1]; + obj.velocity *= 0.1f; + Main.dust[num1].noGravity = true; + Main.dust[num2].scale = 0.6f; + Dust obj2 = Main.dust[num2]; + obj2.velocity *= 0.1f; + Main.dust[num2].noGravity = true; + Main.dust[num3].scale = 0.6f; + Dust obj3 = Main.dust[num3]; + obj3.velocity *= 0.1f; + Main.dust[num3].noGravity = true; + } +} diff --git a/Buffs/FoxPistol/SpectralMending.png b/Buffs/FoxPistol/SpectralMending.png new file mode 100644 index 0000000..b6399d1 Binary files /dev/null and b/Buffs/FoxPistol/SpectralMending.png differ diff --git a/Buffs/FoxPistol/SpectralWither.cs b/Buffs/FoxPistol/SpectralWither.cs new file mode 100644 index 0000000..724035e --- /dev/null +++ b/Buffs/FoxPistol/SpectralWither.cs @@ -0,0 +1,64 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.FoxPistol; + +public class SpectralWither : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Wither"); + Description.SetDefault(" - Losing life!"); + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.lifeRegen -= 20; + int dust1 = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + int dust2 = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + int dust3 = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + int dust4 = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.6f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.6f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + Main.dust[dust4].scale = 0.6f; + Dust obj4 = Main.dust[dust4]; + obj4.velocity *= 0.1f; + Main.dust[dust4].noGravity = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen -= 20; + int dust1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int dust2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int dust3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int dust4 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.6f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.6f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + Main.dust[dust4].scale = 0.6f; + Dust obj4 = Main.dust[dust4]; + obj4.velocity *= 0.1f; + Main.dust[dust4].noGravity = true; + } +} diff --git a/Buffs/FoxPistol/SpectralWither.png b/Buffs/FoxPistol/SpectralWither.png new file mode 100644 index 0000000..40383e4 Binary files /dev/null and b/Buffs/FoxPistol/SpectralWither.png differ diff --git a/Buffs/GoddessMinionBuff.cs b/Buffs/GoddessMinionBuff.cs new file mode 100644 index 0000000..bc8ffa6 --- /dev/null +++ b/Buffs/GoddessMinionBuff.cs @@ -0,0 +1,33 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs; + +public class GoddessMinionBuff : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Servant"); + Description.SetDefault("A Golden Servant, at your service!"); + Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + FabuPlayer modPlayer = player.GetModPlayer(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.goddessMinion = true; + } + if (!modPlayer.goddessMinion) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } +} diff --git a/Buffs/GoddessMinionBuff.png b/Buffs/GoddessMinionBuff.png new file mode 100644 index 0000000..b8e21fb Binary files /dev/null and b/Buffs/GoddessMinionBuff.png differ diff --git a/Buffs/HolySmite.cs b/Buffs/HolySmite.cs new file mode 100644 index 0000000..6c88224 --- /dev/null +++ b/Buffs/HolySmite.cs @@ -0,0 +1,35 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs; + +public class HolySmite : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Holy Smite"); + Description.SetDefault(" - Losing life!\n - Lowered Movement Speed"); + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.lifeRegen -= 26; + int num1 = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + Main.dust[num1].scale = 0.9f; + Dust obj = Main.dust[num1]; + obj.velocity *= 1f; + Main.dust[num1].noGravity = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen -= 20; + player.moveSpeed -= 0.7f; + int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num1].scale = 0.9f; + Dust obj = Main.dust[num1]; + obj.velocity *= 1f; + Main.dust[num1].noGravity = true; + } +} diff --git a/Buffs/HolySmite.png b/Buffs/HolySmite.png new file mode 100644 index 0000000..8539e27 Binary files /dev/null and b/Buffs/HolySmite.png differ diff --git a/Buffs/IllusoryMirror/All-in-one-rainbow.png b/Buffs/IllusoryMirror/All-in-one-rainbow.png new file mode 100644 index 0000000..a0b25b5 Binary files /dev/null and b/Buffs/IllusoryMirror/All-in-one-rainbow.png differ diff --git a/Buffs/IllusoryMirror/All-in-one.png b/Buffs/IllusoryMirror/All-in-one.png new file mode 100644 index 0000000..1aa439a Binary files /dev/null and b/Buffs/IllusoryMirror/All-in-one.png differ diff --git a/Buffs/IllusoryMirror/BlossomActive.cs b/Buffs/IllusoryMirror/BlossomActive.cs new file mode 100644 index 0000000..4fe588a --- /dev/null +++ b/Buffs/IllusoryMirror/BlossomActive.cs @@ -0,0 +1,15 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.IllusoryMirror; + +public class BlossomActive : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blossom Active"); + Description.SetDefault("Stand near it to receive buffs!"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } +} diff --git a/Buffs/IllusoryMirror/BlossomActive.png b/Buffs/IllusoryMirror/BlossomActive.png new file mode 100644 index 0000000..68974f4 Binary files /dev/null and b/Buffs/IllusoryMirror/BlossomActive.png differ diff --git a/Buffs/IllusoryMirror/BlossomInactive.cs b/Buffs/IllusoryMirror/BlossomInactive.cs new file mode 100644 index 0000000..8017281 --- /dev/null +++ b/Buffs/IllusoryMirror/BlossomInactive.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.IllusoryMirror; + +public class BlossomInactive : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blossom Inactive"); + Description.SetDefault("Unable to produce a Blossom!"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Main.rand.NextBool(3)) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/IllusoryMirror/BlossomInactive.png b/Buffs/IllusoryMirror/BlossomInactive.png new file mode 100644 index 0000000..c4fa511 Binary files /dev/null and b/Buffs/IllusoryMirror/BlossomInactive.png differ diff --git a/Buffs/IllusoryMirror/SpectralBloom.cs b/Buffs/IllusoryMirror/SpectralBloom.cs new file mode 100644 index 0000000..6b8074f --- /dev/null +++ b/Buffs/IllusoryMirror/SpectralBloom.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.IllusoryMirror; + +public class SpectralBloom : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("SpectralBloom"); + Description.SetDefault(" - Buffed HP Regeneration!\n - +18% magic damage\n - Increased Attack Speed for Spectral Illusion\n - Longer Invincibility after being hit"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen = 35; + player.GetDamage(DamageClass.Magic) += 0.18f; + player.longInvince = true; + if (Main.rand.NextBool(5)) + { + int dust1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust1].scale = 2f; + Main.dust[dust1].velocity.Y -= 0.5f; + Main.dust[dust1].velocity.X = 0f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust2].scale = 1.5f; + Main.dust[dust2].velocity.Y -= 0.1f; + Main.dust[dust2].velocity.X *= 0.2f; + Main.dust[dust2].noGravity = true; + int dust3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust3].scale = 1.5f; + Main.dust[dust3].velocity.Y -= 0.1f; + Main.dust[dust3].velocity.X *= 0.2f; + Main.dust[dust3].noGravity = true; + int dust4 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust4].scale = 1.5f; + Main.dust[dust4].velocity.Y -= 0.1f; + Main.dust[dust4].velocity.X *= 0.2f; + Main.dust[dust4].noGravity = true; + } + } +} diff --git a/Buffs/IllusoryMirror/SpectralBloom.png b/Buffs/IllusoryMirror/SpectralBloom.png new file mode 100644 index 0000000..d8f88c6 Binary files /dev/null and b/Buffs/IllusoryMirror/SpectralBloom.png differ diff --git a/Buffs/IllusoryMirror/SpectralBlossomActive.cs b/Buffs/IllusoryMirror/SpectralBlossomActive.cs new file mode 100644 index 0000000..52a4d02 --- /dev/null +++ b/Buffs/IllusoryMirror/SpectralBlossomActive.cs @@ -0,0 +1,15 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.IllusoryMirror; + +public class SpectralBlossomActive : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Blossom Active"); + Description.SetDefault("Stand near it to receive buffs!"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } +} diff --git a/Buffs/IllusoryMirror/SpectralBlossomActive.png b/Buffs/IllusoryMirror/SpectralBlossomActive.png new file mode 100644 index 0000000..b54e3b9 Binary files /dev/null and b/Buffs/IllusoryMirror/SpectralBlossomActive.png differ diff --git a/Buffs/IllusoryMirror/SpectralBlossomInactive.cs b/Buffs/IllusoryMirror/SpectralBlossomInactive.cs new file mode 100644 index 0000000..4ea44db --- /dev/null +++ b/Buffs/IllusoryMirror/SpectralBlossomInactive.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.IllusoryMirror; + +public class SpectralBlossomInactive : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Blossom Inactive"); + Description.SetDefault("Unable to produce a Spectral Blossom!"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Main.rand.NextBool(3)) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/IllusoryMirror/SpectralBlossomInactive.png b/Buffs/IllusoryMirror/SpectralBlossomInactive.png new file mode 100644 index 0000000..32044d8 Binary files /dev/null and b/Buffs/IllusoryMirror/SpectralBlossomInactive.png differ diff --git a/Buffs/IllusoryMirror/StrongerTogether.cs b/Buffs/IllusoryMirror/StrongerTogether.cs new file mode 100644 index 0000000..61069f8 --- /dev/null +++ b/Buffs/IllusoryMirror/StrongerTogether.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.IllusoryMirror; + +public class StrongerTogether : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Stronger Together"); + Description.SetDefault(" - Buffed HP Regeneration!\n - +15% magic damage\n - Increased Attack Speed for Illusory Mirror"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen = 30; + player.GetDamage(DamageClass.Magic) += 0.15f; + if (Main.rand.NextBool(5)) + { + int dust1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust1].scale = 2f; + Main.dust[dust1].velocity.Y -= 0.5f; + Main.dust[dust1].velocity.X = 0f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust2].scale = 1.5f; + Main.dust[dust2].velocity.Y -= 0.1f; + Main.dust[dust2].velocity.X *= 0.2f; + Main.dust[dust2].noGravity = true; + } + } +} diff --git a/Buffs/IllusoryMirror/StrongerTogether.png b/Buffs/IllusoryMirror/StrongerTogether.png new file mode 100644 index 0000000..27313e2 Binary files /dev/null and b/Buffs/IllusoryMirror/StrongerTogether.png differ diff --git a/Buffs/LunarBow/All-in-one-rainbow.png b/Buffs/LunarBow/All-in-one-rainbow.png new file mode 100644 index 0000000..5325b2f Binary files /dev/null and b/Buffs/LunarBow/All-in-one-rainbow.png differ diff --git a/Buffs/LunarBow/All-in-one.png b/Buffs/LunarBow/All-in-one.png new file mode 100644 index 0000000..fa2a9d5 Binary files /dev/null and b/Buffs/LunarBow/All-in-one.png differ diff --git a/Buffs/LunarBow/ShatteredMoon.png b/Buffs/LunarBow/ShatteredMoon.png new file mode 100644 index 0000000..dc87196 Binary files /dev/null and b/Buffs/LunarBow/ShatteredMoon.png differ diff --git a/Buffs/LunarBow/ShatteredMoonsBlessing.cs b/Buffs/LunarBow/ShatteredMoonsBlessing.cs new file mode 100644 index 0000000..214570b --- /dev/null +++ b/Buffs/LunarBow/ShatteredMoonsBlessing.cs @@ -0,0 +1,33 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.LunarBow; + +public class ShatteredMoonsBlessing : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shattered Moon's Blessing"); + Description.SetDefault(" - Recovering HP rapidly!\n - Can't use items"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (!player.HasBuff(ModContent.BuffType()) && player.statLife < player.statLifeMax2) + { + player.noItems = true; + player.statLife += 2; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(2, true); + } + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/LunarBow/ShatteredMoonsBlessing.png b/Buffs/LunarBow/ShatteredMoonsBlessing.png new file mode 100644 index 0000000..5be7b72 Binary files /dev/null and b/Buffs/LunarBow/ShatteredMoonsBlessing.png differ diff --git a/Buffs/LunarBow/ShatteredMoonsCurse.cs b/Buffs/LunarBow/ShatteredMoonsCurse.cs new file mode 100644 index 0000000..e48226b --- /dev/null +++ b/Buffs/LunarBow/ShatteredMoonsCurse.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.LunarBow; + +public class ShatteredMoonsCurse : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shattered Moon's Curse"); + Description.SetDefault("Unable to receive the Shattered Moon's Blessing!"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Main.rand.NextBool(3)) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/LunarBow/ShatteredMoonsCurse.png b/Buffs/LunarBow/ShatteredMoonsCurse.png new file mode 100644 index 0000000..adc4837 Binary files /dev/null and b/Buffs/LunarBow/ShatteredMoonsCurse.png differ diff --git a/Buffs/LunarBow/ShatteredMoonsGrace.cs b/Buffs/LunarBow/ShatteredMoonsGrace.cs new file mode 100644 index 0000000..5328e04 --- /dev/null +++ b/Buffs/LunarBow/ShatteredMoonsGrace.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.LunarBow; + +public class ShatteredMoonsGrace : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shattered Moon's Grace"); + Description.SetDefault(" - Falling slowly!"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.slowFall = true; + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } +} diff --git a/Buffs/LunarBow/ShatteredMoonsGrace.png b/Buffs/LunarBow/ShatteredMoonsGrace.png new file mode 100644 index 0000000..1cef7fb Binary files /dev/null and b/Buffs/LunarBow/ShatteredMoonsGrace.png differ diff --git a/Buffs/LunarBow/ShatteredMoonsRejuvenation.cs b/Buffs/LunarBow/ShatteredMoonsRejuvenation.cs new file mode 100644 index 0000000..6c1f097 --- /dev/null +++ b/Buffs/LunarBow/ShatteredMoonsRejuvenation.cs @@ -0,0 +1,28 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.LunarBow; + +public class ShatteredMoonsRejuvenation : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shattered Moon's Rejuvenation"); + Description.SetDefault(" - Recovering 100 HP over 10 seconds"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen = 18; + if (Main.rand.NextBool(3)) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/LunarBow/ShatteredMoonsRejuvenation.png b/Buffs/LunarBow/ShatteredMoonsRejuvenation.png new file mode 100644 index 0000000..edca03a Binary files /dev/null and b/Buffs/LunarBow/ShatteredMoonsRejuvenation.png differ diff --git a/Buffs/LunarBow/SpectralMoonlight.cs b/Buffs/LunarBow/SpectralMoonlight.cs new file mode 100644 index 0000000..262b2bd --- /dev/null +++ b/Buffs/LunarBow/SpectralMoonlight.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.LunarBow; + +public class SpectralMoonlight : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Moonlight"); + Description.SetDefault(" - Recovering HP rapidly!\n - Immune to all damage\n - Can't use items"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (!player.HasBuff(ModContent.BuffType()) && player.statLife < player.statLifeMax2) + { + player.noItems = true; + player.statLife += 2; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(2, true); + } + player.immune = true; + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/LunarBow/SpectralMoonlight.png b/Buffs/LunarBow/SpectralMoonlight.png new file mode 100644 index 0000000..d550bd2 Binary files /dev/null and b/Buffs/LunarBow/SpectralMoonlight.png differ diff --git a/Buffs/LunarBow/SpectralMoonsCurse.cs b/Buffs/LunarBow/SpectralMoonsCurse.cs new file mode 100644 index 0000000..e8a60c3 --- /dev/null +++ b/Buffs/LunarBow/SpectralMoonsCurse.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.LunarBow; + +public class SpectralMoonsCurse : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Moon's Curse"); + Description.SetDefault("Unable to receive Spectral Moonlight!"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Main.rand.NextBool(3)) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/LunarBow/SpectralMoonsCurse.png b/Buffs/LunarBow/SpectralMoonsCurse.png new file mode 100644 index 0000000..9d7b52e Binary files /dev/null and b/Buffs/LunarBow/SpectralMoonsCurse.png differ diff --git a/Buffs/LunarBow/SpectralMoonsGrace.cs b/Buffs/LunarBow/SpectralMoonsGrace.cs new file mode 100644 index 0000000..96e01ce --- /dev/null +++ b/Buffs/LunarBow/SpectralMoonsGrace.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.LunarBow; + +public class SpectralMoonsGrace : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Moon's Grace"); + Description.SetDefault(" - Falling slowly!\n - Immune to knockback"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.slowFall = true; + player.noKnockback = true; + int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Dust obj = Main.dust[num1]; + obj.velocity *= 0.1f; + Main.dust[num1].noGravity = true; + } +} diff --git a/Buffs/LunarBow/SpectralMoonsGrace.png b/Buffs/LunarBow/SpectralMoonsGrace.png new file mode 100644 index 0000000..28b1dd2 Binary files /dev/null and b/Buffs/LunarBow/SpectralMoonsGrace.png differ diff --git a/Buffs/LunarBow/SpectralMoonsRejuvenation.cs b/Buffs/LunarBow/SpectralMoonsRejuvenation.cs new file mode 100644 index 0000000..0838c41 --- /dev/null +++ b/Buffs/LunarBow/SpectralMoonsRejuvenation.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.LunarBow; + +public class SpectralMoonsRejuvenation : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Moon's Rejuvenation"); + Description.SetDefault(" - Recovering 150 HP over 10 seconds\n - Increased ranged crit rate"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen = 27; + player.GetCritChance(DamageClass.Ranged) += 60; + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num1].scale = 2f; + Dust obj = Main.dust[num1]; + obj.velocity *= 0.1f; + Main.dust[num1].noGravity = true; + } + } +} diff --git a/Buffs/LunarBow/SpectralMoonsRejuvenation.png b/Buffs/LunarBow/SpectralMoonsRejuvenation.png new file mode 100644 index 0000000..c66438f Binary files /dev/null and b/Buffs/LunarBow/SpectralMoonsRejuvenation.png differ diff --git a/Buffs/MechanicalTooth.cs b/Buffs/MechanicalTooth.cs new file mode 100644 index 0000000..d918fbb --- /dev/null +++ b/Buffs/MechanicalTooth.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace FabusMod.Buffs; + +public class MechanicalTooth : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mechanical Tooth"); + Description.SetDefault("Chomping away at your bits!"); + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.GetModPlayer().kregPet = true; + if (player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(new EntitySource_Misc(""), player.position.X + player.width / 2, player.position.Y + player.height / 2, 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI); + } + } +} diff --git a/Buffs/MechanicalTooth.png b/Buffs/MechanicalTooth.png new file mode 100644 index 0000000..4a8faf2 Binary files /dev/null and b/Buffs/MechanicalTooth.png differ diff --git a/Buffs/PinkFoxPetBuff.cs b/Buffs/PinkFoxPetBuff.cs new file mode 100644 index 0000000..7dee1e5 --- /dev/null +++ b/Buffs/PinkFoxPetBuff.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace FabusMod.Buffs; + +public class PinkFoxPetBuff : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pink Fox Pet"); + Description.SetDefault("A pink apple for a pink fox!"); + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.GetModPlayer().foxPet = true; + if (player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(new EntitySource_Misc(""), player.position.X + player.width / 2, player.position.Y + player.height / 2, 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI); + } + } +} diff --git a/Buffs/PinkFoxPetBuff.png b/Buffs/PinkFoxPetBuff.png new file mode 100644 index 0000000..06ed3bf Binary files /dev/null and b/Buffs/PinkFoxPetBuff.png differ diff --git a/Buffs/RainbowsWrath.cs b/Buffs/RainbowsWrath.cs new file mode 100644 index 0000000..0efc296 --- /dev/null +++ b/Buffs/RainbowsWrath.cs @@ -0,0 +1,55 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs; + +public class RainbowsWrath : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow's Wrath"); + Description.SetDefault(" - Losing life\n - Lowered Movement Speed"); + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.lifeRegen -= 30; + int num1 = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + int num2 = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + int num3 = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + Main.dust[num1].scale = 0.6f; + Dust obj = Main.dust[num1]; + obj.velocity *= 1f; + Main.dust[num1].noGravity = true; + Main.dust[num2].scale = 0.6f; + Dust obj2 = Main.dust[num2]; + obj2.velocity *= 1f; + Main.dust[num2].noGravity = true; + Main.dust[num3].scale = 0.6f; + Dust obj3 = Main.dust[num3]; + obj3.velocity *= 1f; + Main.dust[num3].noGravity = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen -= 25; + player.moveSpeed -= 0.8f; + int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int num2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int num3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num1].scale = 0.6f; + Dust obj = Main.dust[num1]; + obj.velocity *= 1f; + Main.dust[num1].noGravity = true; + Main.dust[num2].scale = 0.6f; + Dust obj2 = Main.dust[num2]; + obj2.velocity *= 1f; + Main.dust[num2].noGravity = true; + Main.dust[num3].scale = 0.6f; + Dust obj3 = Main.dust[num3]; + obj3.velocity *= 1f; + Main.dust[num3].noGravity = true; + } +} diff --git a/Buffs/RainbowsWrath.png b/Buffs/RainbowsWrath.png new file mode 100644 index 0000000..0f82d7d Binary files /dev/null and b/Buffs/RainbowsWrath.png differ diff --git a/Buffs/ShimadaSword/AdvancedBloodLoss.cs b/Buffs/ShimadaSword/AdvancedBloodLoss.cs new file mode 100644 index 0000000..1996d26 --- /dev/null +++ b/Buffs/ShimadaSword/AdvancedBloodLoss.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword; + +public class AdvancedBloodLoss : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Advanced Blood Loss"); + Description.SetDefault(" - Losing life!"); + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.lifeRegen -= 15; + int dust = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen -= 15; + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = false; + } +} diff --git a/Buffs/ShimadaSword/AdvancedBloodLoss.png b/Buffs/ShimadaSword/AdvancedBloodLoss.png new file mode 100644 index 0000000..6da37e4 Binary files /dev/null and b/Buffs/ShimadaSword/AdvancedBloodLoss.png differ diff --git a/Buffs/ShimadaSword/BadDream.cs b/Buffs/ShimadaSword/BadDream.cs new file mode 100644 index 0000000..4213e8e --- /dev/null +++ b/Buffs/ShimadaSword/BadDream.cs @@ -0,0 +1,26 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword; + +public class BadDream : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bad Dream"); + Description.SetDefault(" - Losing life!\n - Sweating!"); + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.lifeRegen -= 20; + npc.color = Color.Gainsboro; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen -= 20; + } +} diff --git a/Buffs/ShimadaSword/BadDream.png b/Buffs/ShimadaSword/BadDream.png new file mode 100644 index 0000000..aa13ce0 Binary files /dev/null and b/Buffs/ShimadaSword/BadDream.png differ diff --git a/Buffs/ShimadaSword/BloodLoss.cs b/Buffs/ShimadaSword/BloodLoss.cs new file mode 100644 index 0000000..38c3432 --- /dev/null +++ b/Buffs/ShimadaSword/BloodLoss.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword; + +public class BloodLoss : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blood Loss"); + Description.SetDefault(" - Losing life!"); + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.lifeRegen -= 5; + int dust = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0f; + Main.dust[dust].noGravity = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen -= 5; + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0f; + Main.dust[dust].noGravity = false; + } +} diff --git a/Buffs/ShimadaSword/BloodLoss.png b/Buffs/ShimadaSword/BloodLoss.png new file mode 100644 index 0000000..e9bd787 Binary files /dev/null and b/Buffs/ShimadaSword/BloodLoss.png differ diff --git a/Buffs/ShimadaSword/SpectralRage.cs b/Buffs/ShimadaSword/SpectralRage.cs new file mode 100644 index 0000000..81ca6c8 --- /dev/null +++ b/Buffs/ShimadaSword/SpectralRage.cs @@ -0,0 +1,35 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword; + +public class SpectralRage : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Rage"); + Description.SetDefault(" - +10% damage!"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetDamage(DamageClass.Melee) += 1.1f; + int dust1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int dust2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + int dust3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust1].scale = 0.6f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.6f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.6f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 1f; + Main.dust[dust3].noGravity = true; + } +} diff --git a/Buffs/ShimadaSword/SpectralRage.png b/Buffs/ShimadaSword/SpectralRage.png new file mode 100644 index 0000000..dcc8567 Binary files /dev/null and b/Buffs/ShimadaSword/SpectralRage.png differ diff --git a/Buffs/ShimadaSword/Stacks/All-In-One.png b/Buffs/ShimadaSword/Stacks/All-In-One.png new file mode 100644 index 0000000..72be593 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/All-In-One.png differ diff --git a/Buffs/ShimadaSword/Stacks/BuffTemplatePDN.pdn b/Buffs/ShimadaSword/Stacks/BuffTemplatePDN.pdn new file mode 100644 index 0000000..17ced39 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/BuffTemplatePDN.pdn differ diff --git a/Buffs/ShimadaSword/Stacks/DreamFive.cs b/Buffs/ShimadaSword/Stacks/DreamFive.cs new file mode 100644 index 0000000..d1d66c2 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/DreamFive.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class DreamFive : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dream Sap - Five"); + Description.SetDefault(" - Accumulating dreams!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + int dust1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust1].scale = 2f; + Main.dust[dust1].velocity.X *= 1.5f; + Main.dust[dust1].velocity.Y -= 1.4f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust2].scale = 2f; + Main.dust[dust2].velocity.X *= 1.5f; + Main.dust[dust2].velocity.Y -= 1.4f; + Main.dust[dust2].noGravity = true; + int dust3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust3].scale = 2f; + Main.dust[dust3].velocity.X *= 1.5f; + Main.dust[dust3].velocity.Y -= 1.4f; + Main.dust[dust3].noGravity = true; + } +} diff --git a/Buffs/ShimadaSword/Stacks/DreamFive.png b/Buffs/ShimadaSword/Stacks/DreamFive.png new file mode 100644 index 0000000..8611612 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/DreamFive.png differ diff --git a/Buffs/ShimadaSword/Stacks/DreamFour.cs b/Buffs/ShimadaSword/Stacks/DreamFour.cs new file mode 100644 index 0000000..ddec1ff --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/DreamFour.cs @@ -0,0 +1,37 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class DreamFour : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dream Sap - Four"); + Description.SetDefault(" - Accumulating dreams!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.8f) + { + int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num1].scale = 1.8f; + Main.dust[num1].velocity.X *= 1f; + Main.dust[num1].velocity.Y -= 1f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num2].scale = 1.8f; + Main.dust[num2].velocity.X *= 1f; + Main.dust[num2].velocity.Y -= 1f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num3].scale = 1.8f; + Main.dust[num3].velocity.X *= 1f; + Main.dust[num3].velocity.Y -= 1f; + Main.dust[num3].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/DreamFour.png b/Buffs/ShimadaSword/Stacks/DreamFour.png new file mode 100644 index 0000000..a3cceb1 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/DreamFour.png differ diff --git a/Buffs/ShimadaSword/Stacks/DreamOne.cs b/Buffs/ShimadaSword/Stacks/DreamOne.cs new file mode 100644 index 0000000..48428d1 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/DreamOne.cs @@ -0,0 +1,37 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class DreamOne : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dream Sap - One"); + Description.SetDefault(" - Accumulating dreams!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.2f) + { + int dust1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust1].scale = 1.2f; + Main.dust[dust1].velocity.X = 0f; + Main.dust[dust1].velocity.Y -= 0.4f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust2].scale = 1.2f; + Main.dust[dust2].velocity.X = 0f; + Main.dust[dust2].velocity.Y -= 0.4f; + Main.dust[dust2].noGravity = true; + int dust3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust3].scale = 1.2f; + Main.dust[dust3].velocity.X = 0f; + Main.dust[dust3].velocity.Y -= 0.4f; + Main.dust[dust3].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/DreamOne.png b/Buffs/ShimadaSword/Stacks/DreamOne.png new file mode 100644 index 0000000..988c00d Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/DreamOne.png differ diff --git a/Buffs/ShimadaSword/Stacks/DreamThree.cs b/Buffs/ShimadaSword/Stacks/DreamThree.cs new file mode 100644 index 0000000..aa8d988 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/DreamThree.cs @@ -0,0 +1,37 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class DreamThree : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dream Sap - Three"); + Description.SetDefault(" - Accumulating dreams!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.6f) + { + int num1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num1].scale = 1.6f; + Main.dust[num1].velocity.X *= 0.5f; + Main.dust[num1].velocity.Y -= 0.8f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num2].scale = 1.6f; + Main.dust[num2].velocity.X *= 0.5f; + Main.dust[num2].velocity.Y -= 0.8f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[num3].scale = 1.6f; + Main.dust[num3].velocity.X *= 0.5f; + Main.dust[num3].velocity.Y -= 0.8f; + Main.dust[num3].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/DreamThree.png b/Buffs/ShimadaSword/Stacks/DreamThree.png new file mode 100644 index 0000000..cb01195 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/DreamThree.png differ diff --git a/Buffs/ShimadaSword/Stacks/DreamTwo.cs b/Buffs/ShimadaSword/Stacks/DreamTwo.cs new file mode 100644 index 0000000..9e16984 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/DreamTwo.cs @@ -0,0 +1,37 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class DreamTwo : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dream Sap - Two"); + Description.SetDefault(" - Accumulating dreams!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.4f) + { + int dust1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust1].scale = 1.4f; + Main.dust[dust1].velocity.X = 0f; + Main.dust[dust1].velocity.Y -= 0.6f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust2].scale = 1.4f; + Main.dust[dust2].velocity.X = 0f; + Main.dust[dust2].velocity.Y -= 0.6f; + Main.dust[dust2].noGravity = true; + int dust3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust3].scale = 1.4f; + Main.dust[dust3].velocity.X = 0f; + Main.dust[dust3].velocity.Y -= 0.6f; + Main.dust[dust3].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/DreamTwo.png b/Buffs/ShimadaSword/Stacks/DreamTwo.png new file mode 100644 index 0000000..e5340cf Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/DreamTwo.png differ diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentFive.cs b/Buffs/ShimadaSword/Stacks/EnrichmentFive.cs new file mode 100644 index 0000000..443822d --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/EnrichmentFive.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class EnrichmentFive : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Enrichment - Five"); + Description.SetDefault(" - Accumulating riches!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Main.dust[dust].velocity.X *= 1.5f; + Main.dust[dust].velocity.Y -= 1.4f; + Main.dust[dust].noGravity = true; + } +} diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentFive.png b/Buffs/ShimadaSword/Stacks/EnrichmentFive.png new file mode 100644 index 0000000..e362e81 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/EnrichmentFive.png differ diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentFour.cs b/Buffs/ShimadaSword/Stacks/EnrichmentFour.cs new file mode 100644 index 0000000..b39ba36 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/EnrichmentFour.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class EnrichmentFour : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Enrichment - Four"); + Description.SetDefault(" - Accumulating riches!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.8f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.8f; + Main.dust[dust].velocity.X *= 1f; + Main.dust[dust].velocity.Y -= 1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentFour.png b/Buffs/ShimadaSword/Stacks/EnrichmentFour.png new file mode 100644 index 0000000..c7c6898 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/EnrichmentFour.png differ diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentOne.cs b/Buffs/ShimadaSword/Stacks/EnrichmentOne.cs new file mode 100644 index 0000000..5b18bd5 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/EnrichmentOne.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class EnrichmentOne : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Enrichment - One"); + Description.SetDefault(" - Accumulating riches!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.2f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.2f; + Main.dust[dust].velocity.X = 0f; + Main.dust[dust].velocity.Y -= 0.4f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentOne.png b/Buffs/ShimadaSword/Stacks/EnrichmentOne.png new file mode 100644 index 0000000..89f58aa Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/EnrichmentOne.png differ diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentThree.cs b/Buffs/ShimadaSword/Stacks/EnrichmentThree.cs new file mode 100644 index 0000000..335c3fa --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/EnrichmentThree.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class EnrichmentThree : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Enrichment - Three"); + Description.SetDefault(" - Accumulating riches!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.6f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.6f; + Main.dust[dust].velocity.X *= 0.5f; + Main.dust[dust].velocity.Y -= 0.8f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentThree.png b/Buffs/ShimadaSword/Stacks/EnrichmentThree.png new file mode 100644 index 0000000..71e9cc6 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/EnrichmentThree.png differ diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentTwo.cs b/Buffs/ShimadaSword/Stacks/EnrichmentTwo.cs new file mode 100644 index 0000000..d87ed39 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/EnrichmentTwo.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class EnrichmentTwo : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Enrichment - Two"); + Description.SetDefault(" - Accumulating riches!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.4f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.4f; + Main.dust[dust].velocity.X = 0f; + Main.dust[dust].velocity.Y -= 0.6f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/EnrichmentTwo.png b/Buffs/ShimadaSword/Stacks/EnrichmentTwo.png new file mode 100644 index 0000000..fd52ba8 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/EnrichmentTwo.png differ diff --git a/Buffs/ShimadaSword/Stacks/SouleaterFive.cs b/Buffs/ShimadaSword/Stacks/SouleaterFive.cs new file mode 100644 index 0000000..b01a9ed --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/SouleaterFive.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class SouleaterFive : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Souleater - Five"); + Description.SetDefault(" - Accumulating souls!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Main.dust[dust].velocity.X *= 1.5f; + Main.dust[dust].velocity.Y -= 1.4f; + Main.dust[dust].noGravity = true; + } +} diff --git a/Buffs/ShimadaSword/Stacks/SouleaterFive.png b/Buffs/ShimadaSword/Stacks/SouleaterFive.png new file mode 100644 index 0000000..4a05559 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/SouleaterFive.png differ diff --git a/Buffs/ShimadaSword/Stacks/SouleaterFour.cs b/Buffs/ShimadaSword/Stacks/SouleaterFour.cs new file mode 100644 index 0000000..39ab152 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/SouleaterFour.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class SouleaterFour : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Souleater - Four"); + Description.SetDefault(" - Accumulating souls!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.8f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.8f; + Main.dust[dust].velocity.X *= 1f; + Main.dust[dust].velocity.Y -= 1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/SouleaterFour.png b/Buffs/ShimadaSword/Stacks/SouleaterFour.png new file mode 100644 index 0000000..4621096 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/SouleaterFour.png differ diff --git a/Buffs/ShimadaSword/Stacks/SouleaterOne.cs b/Buffs/ShimadaSword/Stacks/SouleaterOne.cs new file mode 100644 index 0000000..90f0db4 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/SouleaterOne.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class SouleaterOne : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Souleater - One"); + Description.SetDefault(" - Accumulating souls!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.2f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.2f; + Main.dust[dust].velocity.X = 0f; + Main.dust[dust].velocity.Y -= 0.4f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/SouleaterOne.png b/Buffs/ShimadaSword/Stacks/SouleaterOne.png new file mode 100644 index 0000000..0768f4d Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/SouleaterOne.png differ diff --git a/Buffs/ShimadaSword/Stacks/SouleaterThree.cs b/Buffs/ShimadaSword/Stacks/SouleaterThree.cs new file mode 100644 index 0000000..e758e2f --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/SouleaterThree.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class SouleaterThree : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Souleater - Three"); + Description.SetDefault(" - Accumulating souls!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.6f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.6f; + Main.dust[dust].velocity.X *= 0.5f; + Main.dust[dust].velocity.Y -= 0.8f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/SouleaterThree.png b/Buffs/ShimadaSword/Stacks/SouleaterThree.png new file mode 100644 index 0000000..c45b776 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/SouleaterThree.png differ diff --git a/Buffs/ShimadaSword/Stacks/SouleaterTwo.cs b/Buffs/ShimadaSword/Stacks/SouleaterTwo.cs new file mode 100644 index 0000000..33544b7 --- /dev/null +++ b/Buffs/ShimadaSword/Stacks/SouleaterTwo.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.ShimadaSword.Stacks; + +public class SouleaterTwo : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Souleater - Two"); + Description.SetDefault(" - Accumulating souls!\n - A stack of 6 will heal your HP and Mana"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.4f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.4f; + Main.dust[dust].velocity.X = 0f; + Main.dust[dust].velocity.Y -= 0.6f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/ShimadaSword/Stacks/SouleaterTwo.png b/Buffs/ShimadaSword/Stacks/SouleaterTwo.png new file mode 100644 index 0000000..8c87373 Binary files /dev/null and b/Buffs/ShimadaSword/Stacks/SouleaterTwo.png differ diff --git a/Buffs/Shotgun/Hypercharge.cs b/Buffs/Shotgun/Hypercharge.cs new file mode 100644 index 0000000..5206738 --- /dev/null +++ b/Buffs/Shotgun/Hypercharge.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.Shotgun; + +public class Hypercharge : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hypercharge"); + Description.SetDefault(" - +12% damage for Hellraiser & Golden Shotgun!\n - +12% faster use time for Hellraiser & Golden Shotgun!"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Utils.NextFloat(Main.rand) < 0.8f) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1.8f; + Main.dust[dust].velocity.X *= 1f; + Main.dust[dust].velocity.Y -= 1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/Shotgun/Hypercharge.png b/Buffs/Shotgun/Hypercharge.png new file mode 100644 index 0000000..fe15ec1 Binary files /dev/null and b/Buffs/Shotgun/Hypercharge.png differ diff --git a/Buffs/Shotgun/HyperchargeCooldown.cs b/Buffs/Shotgun/HyperchargeCooldown.cs new file mode 100644 index 0000000..00b3a10 --- /dev/null +++ b/Buffs/Shotgun/HyperchargeCooldown.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.Shotgun; + +public class HyperchargeCooldown : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hypercharge Cooldown"); + Description.SetDefault("Unable to Hypercharge!"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Main.rand.NextBool(3)) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/Shotgun/HyperchargeCooldown.png b/Buffs/Shotgun/HyperchargeCooldown.png new file mode 100644 index 0000000..775b1f1 Binary files /dev/null and b/Buffs/Shotgun/HyperchargeCooldown.png differ diff --git a/Buffs/Shotgun/Hypercharging.cs b/Buffs/Shotgun/Hypercharging.cs new file mode 100644 index 0000000..2288015 --- /dev/null +++ b/Buffs/Shotgun/Hypercharging.cs @@ -0,0 +1,28 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.Shotgun; + +public class Hypercharging : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hypercharging..."); + Description.SetDefault("- Charging your weapon!\n - Can't use items!"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (!player.HasBuff(ModContent.BuffType())) + { + player.noItems = true; + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Main.dust[dust].velocity.Y = -1f; + Main.dust[dust].velocity.X = 0f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/Shotgun/Hypercharging.png b/Buffs/Shotgun/Hypercharging.png new file mode 100644 index 0000000..640c0f3 Binary files /dev/null and b/Buffs/Shotgun/Hypercharging.png differ diff --git a/Buffs/Shotgun/Ultracharge.cs b/Buffs/Shotgun/Ultracharge.cs new file mode 100644 index 0000000..c340198 --- /dev/null +++ b/Buffs/Shotgun/Ultracharge.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.Shotgun; + +public class Ultracharge : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ultracharge"); + Description.SetDefault(" - +12% damage for Color Splasher!\n - +12% faster use time for Color Splasher!"); + Main.debuff[Type] = false; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + int dust1 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust1].scale = 1.8f; + Main.dust[dust1].velocity.X *= 1f; + Main.dust[dust1].velocity.Y -= 1f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust2].scale = 1.8f; + Main.dust[dust2].velocity.X *= 1f; + Main.dust[dust2].velocity.Y -= 1f; + Main.dust[dust2].noGravity = true; + int dust3 = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust3].scale = 1.8f; + Main.dust[dust3].velocity.X *= 1f; + Main.dust[dust3].velocity.Y -= 1f; + Main.dust[dust3].noGravity = true; + } +} diff --git a/Buffs/Shotgun/Ultracharge.png b/Buffs/Shotgun/Ultracharge.png new file mode 100644 index 0000000..93cc92f Binary files /dev/null and b/Buffs/Shotgun/Ultracharge.png differ diff --git a/Buffs/Shotgun/UltrachargeCooldown.cs b/Buffs/Shotgun/UltrachargeCooldown.cs new file mode 100644 index 0000000..694946a --- /dev/null +++ b/Buffs/Shotgun/UltrachargeCooldown.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.Shotgun; + +public class UltrachargeCooldown : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ultracharge Cooldown"); + Description.SetDefault("Unable to Ultracharge!"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (Main.rand.NextBool(3)) + { + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 1f; + Dust obj = Main.dust[dust]; + obj.velocity *= 0.1f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/Shotgun/UltrachargeCooldown.png b/Buffs/Shotgun/UltrachargeCooldown.png new file mode 100644 index 0000000..97c361f Binary files /dev/null and b/Buffs/Shotgun/UltrachargeCooldown.png differ diff --git a/Buffs/Shotgun/Ultracharging.cs b/Buffs/Shotgun/Ultracharging.cs new file mode 100644 index 0000000..f0d3bcb --- /dev/null +++ b/Buffs/Shotgun/Ultracharging.cs @@ -0,0 +1,28 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Buffs.Shotgun; + +public class Ultracharging : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ultracharging..."); + Description.SetDefault("- Charging your weapon!\n - Can't use items!"); + Main.debuff[Type] = true; + Main.buffNoTimeDisplay[Type] = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (!player.HasBuff(ModContent.BuffType())) + { + player.noItems = true; + int dust = Dust.NewDust(player.position, player.width, player.height, ModContent.DustType()); + Main.dust[dust].scale = 2f; + Main.dust[dust].velocity.Y = -2f; + Main.dust[dust].velocity.X = 0f; + Main.dust[dust].noGravity = true; + } + } +} diff --git a/Buffs/Shotgun/Ultracharging.png b/Buffs/Shotgun/Ultracharging.png new file mode 100644 index 0000000..640c0f3 Binary files /dev/null and b/Buffs/Shotgun/Ultracharging.png differ diff --git a/Buffs/StackBuffTemplate.png b/Buffs/StackBuffTemplate.png new file mode 100644 index 0000000..cb01b4c Binary files /dev/null and b/Buffs/StackBuffTemplate.png differ diff --git a/Buffs/WindUpFabu.cs b/Buffs/WindUpFabu.cs new file mode 100644 index 0000000..8804afa --- /dev/null +++ b/Buffs/WindUpFabu.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace FabusMod.Buffs; + +public class WindUpFabu : ModBuff +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Wind-Up Fabu"); + Description.SetDefault("She wants to accompany you on your adventure!"); + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.GetModPlayer().fabu = true; + if (player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(new EntitySource_Misc(""), player.position.X + player.width / 2, player.position.Y + player.height / 2, 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0f, 0f); + } + } +} diff --git a/Buffs/WindUpFabu.png b/Buffs/WindUpFabu.png new file mode 100644 index 0000000..0295042 Binary files /dev/null and b/Buffs/WindUpFabu.png differ diff --git a/Dusts/AxeOfGrassDust.cs b/Dusts/AxeOfGrassDust.cs new file mode 100644 index 0000000..98c5ce7 --- /dev/null +++ b/Dusts/AxeOfGrassDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class AxeOfGrassDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/AxeOfGrassDust.png b/Dusts/AxeOfGrassDust.png new file mode 100644 index 0000000..9a663eb Binary files /dev/null and b/Dusts/AxeOfGrassDust.png differ diff --git a/Dusts/AxecaliburDust.cs b/Dusts/AxecaliburDust.cs new file mode 100644 index 0000000..c53b604 --- /dev/null +++ b/Dusts/AxecaliburDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class AxecaliburDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/AxecaliburDust.png b/Dusts/AxecaliburDust.png new file mode 100644 index 0000000..1159b2a Binary files /dev/null and b/Dusts/AxecaliburDust.png differ diff --git a/Dusts/BloodCutterDust.cs b/Dusts/BloodCutterDust.cs new file mode 100644 index 0000000..2f21b94 --- /dev/null +++ b/Dusts/BloodCutterDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class BloodCutterDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/BloodCutterDust.png b/Dusts/BloodCutterDust.png new file mode 100644 index 0000000..81f82b2 Binary files /dev/null and b/Dusts/BloodCutterDust.png differ diff --git a/Dusts/BloodDust.cs b/Dusts/BloodDust.cs new file mode 100644 index 0000000..5d9034e --- /dev/null +++ b/Dusts/BloodDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class BloodDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/BloodDust.png b/Dusts/BloodDust.png new file mode 100644 index 0000000..bb01697 Binary files /dev/null and b/Dusts/BloodDust.png differ diff --git a/Dusts/CadeceusDust.cs b/Dusts/CadeceusDust.cs new file mode 100644 index 0000000..554b97a --- /dev/null +++ b/Dusts/CadeceusDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class CadeceusDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/CadeceusDust.png b/Dusts/CadeceusDust.png new file mode 100644 index 0000000..3e8676d Binary files /dev/null and b/Dusts/CadeceusDust.png differ diff --git a/Dusts/CrystalDust.cs b/Dusts/CrystalDust.cs new file mode 100644 index 0000000..279dddc --- /dev/null +++ b/Dusts/CrystalDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class CrystalDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/CrystalDust.png b/Dusts/CrystalDust.png new file mode 100644 index 0000000..c930be8 Binary files /dev/null and b/Dusts/CrystalDust.png differ diff --git a/Dusts/CrystalDust2.cs b/Dusts/CrystalDust2.cs new file mode 100644 index 0000000..0682787 --- /dev/null +++ b/Dusts/CrystalDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class CrystalDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/CrystalDust2.png b/Dusts/CrystalDust2.png new file mode 100644 index 0000000..f9d4005 Binary files /dev/null and b/Dusts/CrystalDust2.png differ diff --git a/Dusts/CurseDust.cs b/Dusts/CurseDust.cs new file mode 100644 index 0000000..d5132e2 --- /dev/null +++ b/Dusts/CurseDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class CurseDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 0.8f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/CurseDust.png b/Dusts/CurseDust.png new file mode 100644 index 0000000..a435a98 Binary files /dev/null and b/Dusts/CurseDust.png differ diff --git a/Dusts/DustTemplate.png b/Dusts/DustTemplate.png new file mode 100644 index 0000000..9d7ff2c Binary files /dev/null and b/Dusts/DustTemplate.png differ diff --git a/Dusts/EnragedOniDust.cs b/Dusts/EnragedOniDust.cs new file mode 100644 index 0000000..7dcddc3 --- /dev/null +++ b/Dusts/EnragedOniDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class EnragedOniDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/EnragedOniDust.png b/Dusts/EnragedOniDust.png new file mode 100644 index 0000000..6783949 Binary files /dev/null and b/Dusts/EnragedOniDust.png differ diff --git a/Dusts/FoxBreakDust.cs b/Dusts/FoxBreakDust.cs new file mode 100644 index 0000000..9aab688 --- /dev/null +++ b/Dusts/FoxBreakDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class FoxBreakDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/FoxBreakDust.png b/Dusts/FoxBreakDust.png new file mode 100644 index 0000000..a3e01b2 Binary files /dev/null and b/Dusts/FoxBreakDust.png differ diff --git a/Dusts/FoxDust.cs b/Dusts/FoxDust.cs new file mode 100644 index 0000000..d7e1035 --- /dev/null +++ b/Dusts/FoxDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class FoxDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/FoxDust.png b/Dusts/FoxDust.png new file mode 100644 index 0000000..9fa1748 Binary files /dev/null and b/Dusts/FoxDust.png differ diff --git a/Dusts/FoxDustBlue.cs b/Dusts/FoxDustBlue.cs new file mode 100644 index 0000000..7a5a1b0 --- /dev/null +++ b/Dusts/FoxDustBlue.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class FoxDustBlue : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/FoxDustBlue.png b/Dusts/FoxDustBlue.png new file mode 100644 index 0000000..d0fc8c9 Binary files /dev/null and b/Dusts/FoxDustBlue.png differ diff --git a/Dusts/FoxMendingDust.cs b/Dusts/FoxMendingDust.cs new file mode 100644 index 0000000..f706a81 --- /dev/null +++ b/Dusts/FoxMendingDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class FoxMendingDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/FoxMendingDust.png b/Dusts/FoxMendingDust.png new file mode 100644 index 0000000..38319af Binary files /dev/null and b/Dusts/FoxMendingDust.png differ diff --git a/Dusts/FoxMendingDustBlue.cs b/Dusts/FoxMendingDustBlue.cs new file mode 100644 index 0000000..638ee31 --- /dev/null +++ b/Dusts/FoxMendingDustBlue.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class FoxMendingDustBlue : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/FoxMendingDustBlue.png b/Dusts/FoxMendingDustBlue.png new file mode 100644 index 0000000..fb84271 Binary files /dev/null and b/Dusts/FoxMendingDustBlue.png differ diff --git a/Dusts/FoxWitherDust.cs b/Dusts/FoxWitherDust.cs new file mode 100644 index 0000000..e9b29d1 --- /dev/null +++ b/Dusts/FoxWitherDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class FoxWitherDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/FoxWitherDust.png b/Dusts/FoxWitherDust.png new file mode 100644 index 0000000..337ab0f Binary files /dev/null and b/Dusts/FoxWitherDust.png differ diff --git a/Dusts/GoldenDust.cs b/Dusts/GoldenDust.cs new file mode 100644 index 0000000..1047a19 --- /dev/null +++ b/Dusts/GoldenDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class GoldenDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/GoldenDust.png b/Dusts/GoldenDust.png new file mode 100644 index 0000000..55b3cb6 Binary files /dev/null and b/Dusts/GoldenDust.png differ diff --git a/Dusts/HealingDust.cs b/Dusts/HealingDust.cs new file mode 100644 index 0000000..aea491b --- /dev/null +++ b/Dusts/HealingDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class HealingDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/HealingDust.png b/Dusts/HealingDust.png new file mode 100644 index 0000000..c85d39f Binary files /dev/null and b/Dusts/HealingDust.png differ diff --git a/Dusts/HeartDust.cs b/Dusts/HeartDust.cs new file mode 100644 index 0000000..0b572ed --- /dev/null +++ b/Dusts/HeartDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class HeartDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/HeartDust.png b/Dusts/HeartDust.png new file mode 100644 index 0000000..cda8128 Binary files /dev/null and b/Dusts/HeartDust.png differ diff --git a/Dusts/HolyDust.cs b/Dusts/HolyDust.cs new file mode 100644 index 0000000..ce5733e --- /dev/null +++ b/Dusts/HolyDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class HolyDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/HolyDust.png b/Dusts/HolyDust.png new file mode 100644 index 0000000..1e529a4 Binary files /dev/null and b/Dusts/HolyDust.png differ diff --git a/Dusts/IllusoryMirrorDust.cs b/Dusts/IllusoryMirrorDust.cs new file mode 100644 index 0000000..3dd8e88 --- /dev/null +++ b/Dusts/IllusoryMirrorDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class IllusoryMirrorDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 1f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/IllusoryMirrorDust.png b/Dusts/IllusoryMirrorDust.png new file mode 100644 index 0000000..afa3fa8 Binary files /dev/null and b/Dusts/IllusoryMirrorDust.png differ diff --git a/Dusts/IllusoryMirrorRMBDust.cs b/Dusts/IllusoryMirrorRMBDust.cs new file mode 100644 index 0000000..51d0a55 --- /dev/null +++ b/Dusts/IllusoryMirrorRMBDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class IllusoryMirrorRMBDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/IllusoryMirrorRMBDust.png b/Dusts/IllusoryMirrorRMBDust.png new file mode 100644 index 0000000..409d1bd Binary files /dev/null and b/Dusts/IllusoryMirrorRMBDust.png differ diff --git a/Dusts/LegendaryDust.cs b/Dusts/LegendaryDust.cs new file mode 100644 index 0000000..11cfcd9 --- /dev/null +++ b/Dusts/LegendaryDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class LegendaryDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/LegendaryDust.png b/Dusts/LegendaryDust.png new file mode 100644 index 0000000..34bc719 Binary files /dev/null and b/Dusts/LegendaryDust.png differ diff --git a/Dusts/LegendarySparkle.cs b/Dusts/LegendarySparkle.cs new file mode 100644 index 0000000..aaffe6e --- /dev/null +++ b/Dusts/LegendarySparkle.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class LegendarySparkle : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/LegendarySparkle.png b/Dusts/LegendarySparkle.png new file mode 100644 index 0000000..6130a11 Binary files /dev/null and b/Dusts/LegendarySparkle.png differ diff --git a/Dusts/MeatDust.cs b/Dusts/MeatDust.cs new file mode 100644 index 0000000..d404d8e --- /dev/null +++ b/Dusts/MeatDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class MeatDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/MeatDust.png b/Dusts/MeatDust.png new file mode 100644 index 0000000..cc2ea94 Binary files /dev/null and b/Dusts/MeatDust.png differ diff --git a/Dusts/MoltenWaraxeDust.cs b/Dusts/MoltenWaraxeDust.cs new file mode 100644 index 0000000..a1c8d83 --- /dev/null +++ b/Dusts/MoltenWaraxeDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class MoltenWaraxeDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/MoltenWaraxeDust.png b/Dusts/MoltenWaraxeDust.png new file mode 100644 index 0000000..7e98ef0 Binary files /dev/null and b/Dusts/MoltenWaraxeDust.png differ diff --git a/Dusts/MuramasasWaraxeDust.cs b/Dusts/MuramasasWaraxeDust.cs new file mode 100644 index 0000000..c09551f --- /dev/null +++ b/Dusts/MuramasasWaraxeDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class MuramasasWaraxeDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/MuramasasWaraxeDust.png b/Dusts/MuramasasWaraxeDust.png new file mode 100644 index 0000000..bd21daf Binary files /dev/null and b/Dusts/MuramasasWaraxeDust.png differ diff --git a/Dusts/NatureStaffDust.cs b/Dusts/NatureStaffDust.cs new file mode 100644 index 0000000..15c14c1 --- /dev/null +++ b/Dusts/NatureStaffDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class NatureStaffDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/NatureStaffDust.png b/Dusts/NatureStaffDust.png new file mode 100644 index 0000000..75b43d6 Binary files /dev/null and b/Dusts/NatureStaffDust.png differ diff --git a/Dusts/NatureStaffDust2.cs b/Dusts/NatureStaffDust2.cs new file mode 100644 index 0000000..901e58e --- /dev/null +++ b/Dusts/NatureStaffDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class NatureStaffDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/NatureStaffDust2.png b/Dusts/NatureStaffDust2.png new file mode 100644 index 0000000..e264fba Binary files /dev/null and b/Dusts/NatureStaffDust2.png differ diff --git a/Dusts/NightsAxeDust.cs b/Dusts/NightsAxeDust.cs new file mode 100644 index 0000000..6710130 --- /dev/null +++ b/Dusts/NightsAxeDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class NightsAxeDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/NightsAxeDust.png b/Dusts/NightsAxeDust.png new file mode 100644 index 0000000..b5bcc77 Binary files /dev/null and b/Dusts/NightsAxeDust.png differ diff --git a/Dusts/NightsAxeSparkle.cs b/Dusts/NightsAxeSparkle.cs new file mode 100644 index 0000000..a73a126 --- /dev/null +++ b/Dusts/NightsAxeSparkle.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class NightsAxeSparkle : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/NightsAxeSparkle.png b/Dusts/NightsAxeSparkle.png new file mode 100644 index 0000000..d4dc307 Binary files /dev/null and b/Dusts/NightsAxeSparkle.png differ diff --git a/Dusts/OniDust.cs b/Dusts/OniDust.cs new file mode 100644 index 0000000..f27a015 --- /dev/null +++ b/Dusts/OniDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class OniDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/OniDust.png b/Dusts/OniDust.png new file mode 100644 index 0000000..1475647 Binary files /dev/null and b/Dusts/OniDust.png differ diff --git a/Dusts/RainbowCurseDust.cs b/Dusts/RainbowCurseDust.cs new file mode 100644 index 0000000..a4aa018 --- /dev/null +++ b/Dusts/RainbowCurseDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RainbowCurseDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 0.8f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RainbowCurseDust.png b/Dusts/RainbowCurseDust.png new file mode 100644 index 0000000..00ac71a Binary files /dev/null and b/Dusts/RainbowCurseDust.png differ diff --git a/Dusts/RainbowDust.cs b/Dusts/RainbowDust.cs new file mode 100644 index 0000000..6cef2ec --- /dev/null +++ b/Dusts/RainbowDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RainbowDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RainbowDust.png b/Dusts/RainbowDust.png new file mode 100644 index 0000000..825503b Binary files /dev/null and b/Dusts/RainbowDust.png differ diff --git a/Dusts/RainbowDust2.cs b/Dusts/RainbowDust2.cs new file mode 100644 index 0000000..b05e0bd --- /dev/null +++ b/Dusts/RainbowDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RainbowDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RainbowDust2.png b/Dusts/RainbowDust2.png new file mode 100644 index 0000000..8ac8e51 Binary files /dev/null and b/Dusts/RainbowDust2.png differ diff --git a/Dusts/RainbowDust3.cs b/Dusts/RainbowDust3.cs new file mode 100644 index 0000000..880c750 --- /dev/null +++ b/Dusts/RainbowDust3.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RainbowDust3 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RainbowDust3.png b/Dusts/RainbowDust3.png new file mode 100644 index 0000000..56fc894 Binary files /dev/null and b/Dusts/RainbowDust3.png differ diff --git a/Dusts/RainbowHealingDust.cs b/Dusts/RainbowHealingDust.cs new file mode 100644 index 0000000..477d10b --- /dev/null +++ b/Dusts/RainbowHealingDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RainbowHealingDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RainbowHealingDust.png b/Dusts/RainbowHealingDust.png new file mode 100644 index 0000000..c0a3199 Binary files /dev/null and b/Dusts/RainbowHealingDust.png differ diff --git a/Dusts/RainbowWrathDust.cs b/Dusts/RainbowWrathDust.cs new file mode 100644 index 0000000..9f9b9e0 --- /dev/null +++ b/Dusts/RainbowWrathDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RainbowWrathDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RainbowWrathDust.png b/Dusts/RainbowWrathDust.png new file mode 100644 index 0000000..fd26fd7 Binary files /dev/null and b/Dusts/RainbowWrathDust.png differ diff --git a/Dusts/RainbowWrathDust2.cs b/Dusts/RainbowWrathDust2.cs new file mode 100644 index 0000000..d61f980 --- /dev/null +++ b/Dusts/RainbowWrathDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RainbowWrathDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RainbowWrathDust2.png b/Dusts/RainbowWrathDust2.png new file mode 100644 index 0000000..3d99140 Binary files /dev/null and b/Dusts/RainbowWrathDust2.png differ diff --git a/Dusts/RainbowWrathDust3.cs b/Dusts/RainbowWrathDust3.cs new file mode 100644 index 0000000..710fcd7 --- /dev/null +++ b/Dusts/RainbowWrathDust3.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RainbowWrathDust3 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RainbowWrathDust3.png b/Dusts/RainbowWrathDust3.png new file mode 100644 index 0000000..1d8e203 Binary files /dev/null and b/Dusts/RainbowWrathDust3.png differ diff --git a/Dusts/RyuuDust.cs b/Dusts/RyuuDust.cs new file mode 100644 index 0000000..0d45625 --- /dev/null +++ b/Dusts/RyuuDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RyuuDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RyuuDust.png b/Dusts/RyuuDust.png new file mode 100644 index 0000000..260d67a Binary files /dev/null and b/Dusts/RyuuDust.png differ diff --git a/Dusts/RyuuDust2.cs b/Dusts/RyuuDust2.cs new file mode 100644 index 0000000..011d85a --- /dev/null +++ b/Dusts/RyuuDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RyuuDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RyuuDust2.png b/Dusts/RyuuDust2.png new file mode 100644 index 0000000..f88337f Binary files /dev/null and b/Dusts/RyuuDust2.png differ diff --git a/Dusts/RyuuDust3.cs b/Dusts/RyuuDust3.cs new file mode 100644 index 0000000..80d4226 --- /dev/null +++ b/Dusts/RyuuDust3.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RyuuDust3 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RyuuDust3.png b/Dusts/RyuuDust3.png new file mode 100644 index 0000000..1ee0f0e Binary files /dev/null and b/Dusts/RyuuDust3.png differ diff --git a/Dusts/RyuuDust4.cs b/Dusts/RyuuDust4.cs new file mode 100644 index 0000000..320dedf --- /dev/null +++ b/Dusts/RyuuDust4.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class RyuuDust4 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/RyuuDust4.png b/Dusts/RyuuDust4.png new file mode 100644 index 0000000..9cf9611 Binary files /dev/null and b/Dusts/RyuuDust4.png differ diff --git a/Dusts/ShimadaSword/ShimadaDust.cs b/Dusts/ShimadaSword/ShimadaDust.cs new file mode 100644 index 0000000..c617271 --- /dev/null +++ b/Dusts/ShimadaSword/ShimadaDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts.ShimadaSword; + +public class ShimadaDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = false; + dust.scale *= 1f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.15f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/ShimadaSword/ShimadaDust.png b/Dusts/ShimadaSword/ShimadaDust.png new file mode 100644 index 0000000..260d67a Binary files /dev/null and b/Dusts/ShimadaSword/ShimadaDust.png differ diff --git a/Dusts/Shuriken/StarDust.cs b/Dusts/Shuriken/StarDust.cs new file mode 100644 index 0000000..dd07f37 --- /dev/null +++ b/Dusts/Shuriken/StarDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts.Shuriken; + +public class StarDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = false; + dust.scale *= 1f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.15f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/Shuriken/StarDust.png b/Dusts/Shuriken/StarDust.png new file mode 100644 index 0000000..83798a0 Binary files /dev/null and b/Dusts/Shuriken/StarDust.png differ diff --git a/Dusts/SorcerousDust.cs b/Dusts/SorcerousDust.cs new file mode 100644 index 0000000..0e7fcf8 --- /dev/null +++ b/Dusts/SorcerousDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousDust.png b/Dusts/SorcerousDust.png new file mode 100644 index 0000000..dd2c1c9 Binary files /dev/null and b/Dusts/SorcerousDust.png differ diff --git a/Dusts/SorcerousDust2.cs b/Dusts/SorcerousDust2.cs new file mode 100644 index 0000000..d395ac7 --- /dev/null +++ b/Dusts/SorcerousDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousDust2.png b/Dusts/SorcerousDust2.png new file mode 100644 index 0000000..db77577 Binary files /dev/null and b/Dusts/SorcerousDust2.png differ diff --git a/Dusts/SorcerousDustBlue.cs b/Dusts/SorcerousDustBlue.cs new file mode 100644 index 0000000..4b46efa --- /dev/null +++ b/Dusts/SorcerousDustBlue.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousDustBlue : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousDustBlue.png b/Dusts/SorcerousDustBlue.png new file mode 100644 index 0000000..83eae06 Binary files /dev/null and b/Dusts/SorcerousDustBlue.png differ diff --git a/Dusts/SorcerousDustRed.cs b/Dusts/SorcerousDustRed.cs new file mode 100644 index 0000000..1810de0 --- /dev/null +++ b/Dusts/SorcerousDustRed.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousDustRed : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousDustRed.png b/Dusts/SorcerousDustRed.png new file mode 100644 index 0000000..ad1fbdf Binary files /dev/null and b/Dusts/SorcerousDustRed.png differ diff --git a/Dusts/SorcerousDustYellow.cs b/Dusts/SorcerousDustYellow.cs new file mode 100644 index 0000000..dd471f6 --- /dev/null +++ b/Dusts/SorcerousDustYellow.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousDustYellow : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousDustYellow.png b/Dusts/SorcerousDustYellow.png new file mode 100644 index 0000000..dd6ce59 Binary files /dev/null and b/Dusts/SorcerousDustYellow.png differ diff --git a/Dusts/SorcerousHellDust.cs b/Dusts/SorcerousHellDust.cs new file mode 100644 index 0000000..3a301b0 --- /dev/null +++ b/Dusts/SorcerousHellDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousHellDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousHellDust.png b/Dusts/SorcerousHellDust.png new file mode 100644 index 0000000..0b37cf6 Binary files /dev/null and b/Dusts/SorcerousHellDust.png differ diff --git a/Dusts/SorcerousHellDust2.cs b/Dusts/SorcerousHellDust2.cs new file mode 100644 index 0000000..8eddf43 --- /dev/null +++ b/Dusts/SorcerousHellDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousHellDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousHellDust2.png b/Dusts/SorcerousHellDust2.png new file mode 100644 index 0000000..3420f19 Binary files /dev/null and b/Dusts/SorcerousHellDust2.png differ diff --git a/Dusts/SorcerousHellDustPurple.cs b/Dusts/SorcerousHellDustPurple.cs new file mode 100644 index 0000000..af90dbb --- /dev/null +++ b/Dusts/SorcerousHellDustPurple.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousHellDustPurple : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousHellDustPurple.png b/Dusts/SorcerousHellDustPurple.png new file mode 100644 index 0000000..cb704c1 Binary files /dev/null and b/Dusts/SorcerousHellDustPurple.png differ diff --git a/Dusts/SorcerousHellDustWhite.cs b/Dusts/SorcerousHellDustWhite.cs new file mode 100644 index 0000000..27e5fff --- /dev/null +++ b/Dusts/SorcerousHellDustWhite.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SorcerousHellDustWhite : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SorcerousHellDustWhite.png b/Dusts/SorcerousHellDustWhite.png new file mode 100644 index 0000000..6783949 Binary files /dev/null and b/Dusts/SorcerousHellDustWhite.png differ diff --git a/Dusts/SpectralIllusionDust.cs b/Dusts/SpectralIllusionDust.cs new file mode 100644 index 0000000..ef7554f --- /dev/null +++ b/Dusts/SpectralIllusionDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SpectralIllusionDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 1f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SpectralIllusionDust.png b/Dusts/SpectralIllusionDust.png new file mode 100644 index 0000000..2760174 Binary files /dev/null and b/Dusts/SpectralIllusionDust.png differ diff --git a/Dusts/SpectralIllusionDust2.cs b/Dusts/SpectralIllusionDust2.cs new file mode 100644 index 0000000..b435594 --- /dev/null +++ b/Dusts/SpectralIllusionDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SpectralIllusionDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 1f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SpectralIllusionDust2.png b/Dusts/SpectralIllusionDust2.png new file mode 100644 index 0000000..b0a745c Binary files /dev/null and b/Dusts/SpectralIllusionDust2.png differ diff --git a/Dusts/SpectralIllusionDust3.cs b/Dusts/SpectralIllusionDust3.cs new file mode 100644 index 0000000..5e66b59 --- /dev/null +++ b/Dusts/SpectralIllusionDust3.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SpectralIllusionDust3 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 1f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SpectralIllusionDust3.png b/Dusts/SpectralIllusionDust3.png new file mode 100644 index 0000000..b6c1b9f Binary files /dev/null and b/Dusts/SpectralIllusionDust3.png differ diff --git a/Dusts/SpectralIllusionDust4.cs b/Dusts/SpectralIllusionDust4.cs new file mode 100644 index 0000000..59b8e33 --- /dev/null +++ b/Dusts/SpectralIllusionDust4.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SpectralIllusionDust4 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.1f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 1f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SpectralIllusionDust4.png b/Dusts/SpectralIllusionDust4.png new file mode 100644 index 0000000..45ea177 Binary files /dev/null and b/Dusts/SpectralIllusionDust4.png differ diff --git a/Dusts/SpectralWitherDust.cs b/Dusts/SpectralWitherDust.cs new file mode 100644 index 0000000..e4b6d7e --- /dev/null +++ b/Dusts/SpectralWitherDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class SpectralWitherDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/SpectralWitherDust.png b/Dusts/SpectralWitherDust.png new file mode 100644 index 0000000..32e12ef Binary files /dev/null and b/Dusts/SpectralWitherDust.png differ diff --git a/Dusts/TerraDust.cs b/Dusts/TerraDust.cs new file mode 100644 index 0000000..08751d8 --- /dev/null +++ b/Dusts/TerraDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class TerraDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/TerraDust.png b/Dusts/TerraDust.png new file mode 100644 index 0000000..34c3b72 Binary files /dev/null and b/Dusts/TerraDust.png differ diff --git a/Dusts/TerraDust2.cs b/Dusts/TerraDust2.cs new file mode 100644 index 0000000..ab01482 --- /dev/null +++ b/Dusts/TerraDust2.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class TerraDust2 : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/TerraDust2.png b/Dusts/TerraDust2.png new file mode 100644 index 0000000..cd24027 Binary files /dev/null and b/Dusts/TerraDust2.png differ diff --git a/Dusts/TrueDust.cs b/Dusts/TrueDust.cs new file mode 100644 index 0000000..1b618df --- /dev/null +++ b/Dusts/TrueDust.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Dusts; + +public class TrueDust : ModDust +{ + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 1.5f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + float light = 0.35f * dust.scale; + Lighting.AddLight(dust.position, light, light, light); + if (dust.scale < 0.5f) + { + dust.active = false; + } + return false; + } +} diff --git a/Dusts/TrueDust.png b/Dusts/TrueDust.png new file mode 100644 index 0000000..9b783b9 Binary files /dev/null and b/Dusts/TrueDust.png differ diff --git a/ExtraAction.cs b/ExtraAction.cs new file mode 100644 index 0000000..cd01de5 --- /dev/null +++ b/ExtraAction.cs @@ -0,0 +1,3 @@ +namespace FabusMod; + +public delegate void ExtraAction(); diff --git a/FabuPlayer.cs b/FabuPlayer.cs new file mode 100644 index 0000000..1a686ca --- /dev/null +++ b/FabuPlayer.cs @@ -0,0 +1,525 @@ +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod; + +public class FabuPlayer : ModPlayer +{ + public class WeaponAbilityPlayerEffects : ModPlayer + { + public bool activated; + + public bool activated2; + + public bool activated3; + + public bool activated4; + + public bool activated5; + + public bool activated6; + + public bool activated7; + + public bool activated8; + + public bool activated9; + + public bool activated10; + + public bool activated11; + + public bool activated12; + + public bool activated13; + + public bool activated14; + + public bool activated15; + + public bool activated16; + + public bool activated17; + + public bool activated18; + + public bool activated19; + + public bool activated20; + + public bool activated21; + + public bool activated22; + + public bool activated23; + + public bool activated24; + + public bool activated25; + + public bool activated26; + + public bool activated27; + + public bool activated28; + + public bool activated29; + + public bool activated30; + + public bool activated31; + + public bool activated32; + + public bool activated33; + + public bool activated34; + + public bool activated35; + + public bool activated36; + + public bool soundPlayed; + + public override void PreUpdate() + { + if (Player.HasBuff(ModContent.BuffType())) + { + activated = true; + } + else if (activated) + { + Player.AddBuff(ModContent.BuffType(), 3000, true); + activated = false; + } + + if (Player.HasBuff(ModContent.BuffType())) + { + activated2 = true; + } + else if (activated2) + { + SoundEngine.PlaySound(SoundID.Unlock); + CombatText.NewText(Player.Hitbox, new Color(0, 255, 0), "Shattered Moon's Blessing ready!", false, false); + activated2 = false; + } + + if (Player.HasBuff(ModContent.BuffType()) && !soundPlayed) + { + if (Main.rand.NextBool(5)) + { + SoundEngine.PlaySound(SoundID.Item13); + } + soundPlayed = true; + } + + if (!Player.HasBuff(ModContent.BuffType())) + { + soundPlayed = false; + } + + if (Player.HasBuff(ModContent.BuffType())) + { + activated3 = true; + } + else if (activated3) + { + Player.AddBuff(ModContent.BuffType(), 600, true); + activated3 = false; + } + + if (Player.HasBuff(ModContent.BuffType())) + { + activated4 = true; + } + else if (activated4) + { + Player.AddBuff(ModContent.BuffType(), 3000, true); + activated4 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated5 = true; + } + else if (activated5) + { + SoundEngine.PlaySound(SoundID.Unlock); + CombatText.NewText(Player.Hitbox, new Color(0, 255, 0), "Spectral Moonlight ready!", false, false); + activated5 = false; + } + if (Player.HasBuff(ModContent.BuffType()) && !soundPlayed) + { + if (Main.rand.NextBool(5)) + { + SoundEngine.PlaySound(SoundID.Item13); + } + soundPlayed = true; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + soundPlayed = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated6 = true; + } + else if (activated6) + { + Player.AddBuff(ModContent.BuffType(), 600, true); + activated6 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated7 = true; + } + else if (activated7) + { + Player.AddBuff(ModContent.BuffType(), 3000, true); + activated7 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated8 = true; + } + else if (activated8) + { + SoundEngine.PlaySound(SoundID.Unlock); + CombatText.NewText(Player.Hitbox, new Color(0, 255, 0), "Blossom ready!", false, false); + activated8 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated9 = true; + } + else if (activated9) + { + Player.AddBuff(ModContent.BuffType(), 3000, true); + activated9 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated10 = true; + } + else if (activated10) + { + SoundEngine.PlaySound(SoundID.Unlock); + CombatText.NewText(Player.Hitbox, new Color(0, 255, 0), "Spectral Blossom ready!", false, false); + activated10 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated11 = true; + } + else if (activated11) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(190, 60, 60), "Absorbed a soul!", false, false); + activated11 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated12 = true; + } + else if (activated12) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(190, 60, 60), "Absorbed two souls!", false, false); + activated12 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated13 = true; + } + else if (activated13) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(190, 60, 60), "Absorbed three souls!", false, false); + activated13 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated14 = true; + } + else if (activated14) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(190, 60, 60), "Absorbed four souls!", false, false); + activated14 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated15 = true; + } + else if (activated15) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(92, 229, 237), "Absorbed five souls!", false, false); + activated15 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated16 = true; + } + else if (activated16) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(210, 210, 90), "Absorbed a soul!", false, false); + activated16 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated17 = true; + } + else if (activated17) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(210, 210, 90), "Absorbed two souls!", false, false); + activated17 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated18 = true; + } + else if (activated18) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(210, 210, 90), "Absorbed three souls!", false, false); + activated18 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated19 = true; + } + else if (activated19) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(210, 210, 90), "Absorbed four souls!", false, false); + activated19 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated20 = true; + } + else if (activated20) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(92, 229, 237), "Absorbed five souls!", false, false); + activated20 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated21 = true; + } + else if (activated21) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(255, 82, 220), "Sapped a dream!", false, false); + activated21 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated22 = true; + } + else if (activated22) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(255, 82, 220), "Sapped two dreams!", false, false); + activated22 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated23 = true; + } + else if (activated23) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(255, 82, 220), "Sapped three dreams!", false, false); + activated23 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated24 = true; + } + else if (activated24) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(255, 82, 220), "Sapped four dreams!", false, false); + activated24 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated25 = true; + } + else if (activated25) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(255, 82, 220), "Sapped five dreams!", false, false); + activated25 = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated26 = true; + } + else if (activated26) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(255, 61, 0), "Enraged!", false, false); + activated26 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated27 = true; + } + else if (activated27) + { + Player.AddBuff(ModContent.BuffType(), 480, true); + activated27 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated28 = true; + } + else if (activated28) + { + Player.AddBuff(ModContent.BuffType(), 2400, true); + activated28 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated29 = true; + } + else if (activated29) + { + SoundEngine.PlaySound(SoundID.Unlock); + CombatText.NewText(Player.Hitbox, new Color(0, 255, 0), "Ready to Hypercharge!", false, false); + activated29 = false; + } + if (Player.HasBuff(ModContent.BuffType()) && !soundPlayed) + { + if (Main.rand.NextBool(5)) + { + SoundEngine.PlaySound(SoundID.Item13); + } + soundPlayed = true; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + soundPlayed = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated30 = true; + } + else if (activated30) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(255, 61, 0), "Hypercharged!", false, false); + activated30 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated31 = true; + } + else if (activated31) + { + CombatText.NewText(Player.Hitbox, new Color(138, 138, 138), "No longer Hypercharged!", false, false); + activated31 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated32 = true; + } + else if (activated32) + { + Player.AddBuff(ModContent.BuffType(), 480, true); + activated32 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated33 = true; + } + else if (activated33) + { + Player.AddBuff(ModContent.BuffType(), 2400, true); + activated33 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated34 = true; + } + else if (activated34) + { + SoundEngine.PlaySound(SoundID.Unlock); + CombatText.NewText(Player.Hitbox, new Color(0, 255, 0), "Ready to Ultracharge!", false, false); + activated34 = false; + } + if (Player.HasBuff(ModContent.BuffType()) && !soundPlayed) + { + if (Main.rand.NextBool(5)) + { + SoundEngine.PlaySound(SoundID.Item13); + } + soundPlayed = true; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + soundPlayed = false; + } + if (!Player.HasBuff(ModContent.BuffType())) + { + activated35 = true; + } + else if (activated35) + { + SoundEngine.PlaySound(SoundID.Item4); + CombatText.NewText(Player.Hitbox, new Color(255, 61, 0), "Ultracharged!", false, false); + activated35 = false; + } + if (Player.HasBuff(ModContent.BuffType())) + { + activated36 = true; + } + else if (activated36) + { + CombatText.NewText(Player.Hitbox, new Color(138, 138, 138), "No longer Ultracharged!", false, false); + activated36 = false; + } + } + } + + private const int saveVersion = 0; + + public bool foxPet; + + public bool pinkFoxPet; + + public bool kregPet; + + public bool fabuLightPet; + + public bool fabu; + + public bool goddessMinion; + + public override void ResetEffects() + { + foxPet = false; + pinkFoxPet = false; + kregPet = false; + fabuLightPet = false; + fabu = false; + goddessMinion = false; + } + + public override IEnumerable AddStartingItems(bool mediumCoreDeath) + { + return new[] + { + new Item(ModContent.ItemType(), 1) + }; + } +} diff --git a/FabuWorld.cs b/FabuWorld.cs new file mode 100644 index 0000000..cd756ac --- /dev/null +++ b/FabuWorld.cs @@ -0,0 +1,8 @@ +using Terraria.ModLoader; + +namespace FabusMod; + +public class FabuWorld : ModSystem +{ + public static bool spawnOre; +} diff --git a/FabusMod.cs b/FabusMod.cs new file mode 100644 index 0000000..5fb1fe0 --- /dev/null +++ b/FabusMod.cs @@ -0,0 +1,157 @@ +using Terraria; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod; + +public class FabusMod : Mod +{ + public override void AddRecipeGroups() + { + RecipeGroup group = new(() => Language.GetTextValue("LegacyMisc.37") + " Fox Ears", new int[3] { + Find("FoxEars").Type, + Find("PinkFoxEars").Type, + Find("BlueFoxEars").Type + }); + RecipeGroup.RegisterGroup("FabusMod:FoxEars", group); + + RecipeGroup group2 = new(() => Language.GetTextValue("LegacyMisc.37") + " Punk's Pulse", new int[2] { + Find("PunksPulse").Type, + Find("PunksPulseUltraviolet").Type + }); + RecipeGroup.RegisterGroup("FabusMod:PunksPulse", group2); + + RecipeGroup group3 = new(() => Language.GetTextValue("LegacyMisc.37") + " Pulse Sprayer", new int[2] { + Find("PulseSprayer").Type, + Find("PulseSprayerCadet").Type + }); + RecipeGroup.RegisterGroup("FabusMod:PulseSprayer", group3); + + RecipeGroup group4 = new(() => Language.GetTextValue("LegacyMisc.37") + " Rainbow Demon", new int[6] { + Find("TheRainbowDemon").Type, + Find("TheRainbowDemonClaymore").Type, + Find("TheRainbowDemonRanged").Type, + Find("TheRainbowDemonThrowing").Type, + Find("TheRainbowDemonMagic").Type, + Find("TheRainbowDemonShredder").Type + }); + RecipeGroup.RegisterGroup("FabusMod:TheRainbowDemon", group4); + + RecipeGroup group5 = new(() => Language.GetTextValue("LegacyMisc.37") + " The Stinger", new int[2] { + Find("TheStinger").Type, + Find("TheStingerBlackCat").Type + }); + RecipeGroup.RegisterGroup("FabusMod:TheStinger", group5); + + RecipeGroup group6 = new(() => Language.GetTextValue("LegacyMisc.37") + " Shivering Shotgun", new int[2] { + Find("HellshiverGun").Type, + Find("HellshiverGunHellfire").Type + }); + RecipeGroup.RegisterGroup("FabusMod:HellshiverGun", group6); + + RecipeGroup group7 = new(() => Language.GetTextValue("LegacyMisc.37") + " Hellraiser", new int[2] { + Find("HellkinShotgun").Type, + Find("HellkinShotgunDracula").Type + }); + RecipeGroup.RegisterGroup("FabusMod:HellkinShotgun", group7); + + RecipeGroup group8 = new(() => Language.GetTextValue("LegacyMisc.37") + " Carbon Shuriken", new int[2] { + Find("CarbonShuriken").Type, + Find("CarbonShurikenNihon").Type + }); + RecipeGroup.RegisterGroup("FabusMod:CarbonShuriken", group8); + + RecipeGroup group9 = new(() => Language.GetTextValue("LegacyMisc.37") + " Solitude", new int[2] { + Find("Peacegunner").Type, + Find("PeacegunnerAmerican").Type + }); + RecipeGroup.RegisterGroup("FabusMod:Peacegunner", group9); + + RecipeGroup group10 = new(() => Language.GetTextValue("LegacyMisc.37") + " Silencer", new int[2] { + Find("Peaceforcer").Type, + Find("PeaceforcerVanHelsing").Type + }); + RecipeGroup.RegisterGroup("FabusMod:Peaceforcer", group10); + + RecipeGroup group11 = new(() => Language.GetTextValue("LegacyMisc.37") + " Carbon Sword", new int[2] { + Find("CarbonSword").Type, + Find("CarbonSwordNihon").Type + }); + RecipeGroup.RegisterGroup("FabusMod:CarbonSword", group11); + + RecipeGroup group12 = new(() => Language.GetTextValue("LegacyMisc.37") + " Light's Bane", new int[2] { 46, 795 }); + RecipeGroup.RegisterGroup("FabusMod:LightsBane", group12); + + RecipeGroup group13 = new(() => Language.GetTextValue("LegacyMisc.37") + " Carbon Dagger", new int[2] { + Find("CarbonDagger").Type, + Find("CarbonDaggerNihon").Type + }); + RecipeGroup.RegisterGroup("FabusMod:CarbonDagger", group13); + + RecipeGroup group14 = new(() => Language.GetTextValue("LegacyMisc.37") + " Sorcerer's Hellstaff", new int[2] { + Find("SorcerousHellstaff").Type, + Find("SorcerousHellstaffWhite").Type + }); + RecipeGroup.RegisterGroup("FabusMod:SorcerousHellstaff", group14); + + RecipeGroup group15 = new(() => Language.GetTextValue("LegacyMisc.37") + " Fox Pistol", new int[2] { + Find("FoxPistol").Type, + Find("FoxPistolBlue").Type + }); + RecipeGroup.RegisterGroup("FabusMod:FoxPistol", group15); + + RecipeGroup group16 = new(() => Language.GetTextValue("LegacyMisc.37") + " Demonite Bar", new int[2] { 57, 1257 }); + RecipeGroup.RegisterGroup("FabusMod:DemoniteBar", group16); + + /*RecipeGroup group17 = new(() => Language.GetTextValue("LegacyMisc.37") + " Elemental Water Staff", new int[4] { + Find("ElementalWaterStaff").Type, + Find("ElementalWaterStaffRed").Type, + Find("ElementalWaterStaffGreen").Type, + Find("ElementalWaterStaffYellow").Type + }); + RecipeGroup.RegisterGroup("FabusMod:ElementalWaterStaff", group17);*/ + + RecipeGroup group18 = new(() => Language.GetTextValue("LegacyMisc.37") + " Gold Bar", new int[2] { 19, 706 }); + RecipeGroup.RegisterGroup("FabusMod:GoldBar", group18); + + RecipeGroup group19 = new(() => Language.GetTextValue("LegacyMisc.37") + " Adamantite Bar", new int[2] { 391, 1198 }); + RecipeGroup.RegisterGroup("FabusMod:AdamantiteBar", group19); + + RecipeGroup group20 = new(() => Language.GetTextValue("LegacyMisc.37") + " Protective Fusion", new int[2] { + Find("ProtectionFuser").Type, + Find("ProtectionFuserCarbonFiber").Type + }); + RecipeGroup.RegisterGroup("FabusMod:ProtectionFuser", group20); + + RecipeGroup group21 = new(() => Language.GetTextValue("LegacyMisc.37") + " Orichalcum Bar", new int[2] { 1191, 382 }); + RecipeGroup.RegisterGroup("FabusMod:OrichalcumBar", group21); + + RecipeGroup group22 = new(() => Language.GetTextValue("LegacyMisc.37") + " Verano", new int[2] { + Find("Verano").Type, + Find("VeranoRime").Type + }); + RecipeGroup.RegisterGroup("FabusMod:Verano", group22); + } + + public override void AddRecipes() + { + Recipe val = Recipe.Create(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:FoxEars", 1); + val.AddIngredient(ItemID.OrangeDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + + Recipe val2 = Recipe.Create(ModContent.ItemType()); + val2.AddRecipeGroup("FabusMod:FoxEars", 1); + val2.AddIngredient(ItemID.PinkDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + + Recipe val3 = Recipe.Create(ModContent.ItemType()); + val3.AddRecipeGroup("FabusMod:FoxEars", 1); + val3.AddIngredient(ItemID.SkyBlueDye, 1); + val3.AddTile(TileID.DyeVat); + val3.Register(); + } +} diff --git a/FabusMod.csproj b/FabusMod.csproj new file mode 100644 index 0000000..e2f4ac6 --- /dev/null +++ b/FabusMod.csproj @@ -0,0 +1,13 @@ + + + + + FabusMod + net6.0 + AnyCPU + latest + + + + + \ No newline at end of file diff --git a/FabusMod.sln b/FabusMod.sln new file mode 100644 index 0000000..480460c --- /dev/null +++ b/FabusMod.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32526.322 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FabusMod", "FabusMod.csproj", "{FCB780C4-4903-4455-BA97-0C98E9E864D5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FCB780C4-4903-4455-BA97-0C98E9E864D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCB780C4-4903-4455-BA97-0C98E9E864D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCB780C4-4903-4455-BA97-0C98E9E864D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCB780C4-4903-4455-BA97-0C98E9E864D5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E55533E2-FFB4-45CD-AD66-D00C15F8C278} + EndGlobalSection +EndGlobal diff --git a/Helper.cs b/Helper.cs new file mode 100644 index 0000000..ca3e8a3 --- /dev/null +++ b/Helper.cs @@ -0,0 +1,122 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; + +namespace FabusMod; + +public static class Helper +{ + public static Vector2 RandomPosition(Vector2 pos1, Vector2 pos2) + { + return new Vector2(Main.rand.Next((int)pos1.X, (int)pos2.X) + 1, Main.rand.Next((int)pos1.Y, (int)pos2.Y) + 1); + } + + public static int GetNearestAlivePlayer(NPC npc) + { + float NearestPlayerDist = 4.8151624E+09f; + int NearestPlayer = -1; + Player[] player2 = Main.player; + foreach (Player player in player2) + { + if (player.Distance(npc.Center) < NearestPlayerDist && player.active) + { + NearestPlayerDist = player.Distance(npc.Center); + NearestPlayer = player.whoAmI; + } + } + return NearestPlayer; + } + + public static Vector2 VelocityFPTP(Vector2 pos1, Vector2 pos2, float speed) + { + Vector2 move = pos2 - pos1; + return move * (speed / (float)Math.Sqrt(move.X * move.X + move.Y * move.Y)); + } + + public static int GetNearestNPC(Vector2 Point, bool Friendly = false, bool NoBoss = false) + { + float NearestNPCDist = -1f; + int NearestNPC = -1; + NPC[] npc2 = Main.npc; + foreach (NPC npc in npc2) + { + if (npc.active && (!NoBoss || !npc.boss) && (Friendly || (!npc.friendly && npc.lifeMax > 5)) && (NearestNPCDist == -1f || npc.Distance(Point) < NearestNPCDist)) + { + NearestNPCDist = npc.Distance(Point); + NearestNPC = npc.whoAmI; + } + } + return NearestNPC; + } + + public static int GetNearestPlayer(Vector2 Point, bool Alive = false) + { + float NearestPlayerDist = -1f; + int NearestPlayer = -1; + Player[] player2 = Main.player; + foreach (Player player in player2) + { + if ((!Alive || (player.active && !player.dead)) && (NearestPlayerDist == -1f || player.Distance(Point) < NearestPlayerDist)) + { + NearestPlayerDist = player.Distance(Point); + NearestPlayer = player.whoAmI; + } + } + return NearestPlayer; + } + + public static int GetNearestPlayer(this NPC npc) + { + float NearestPlayerDist = 4.8151624E+09f; + int NearestPlayer = -1; + Player[] player2 = Main.player; + foreach (Player player in player2) + { + if (player.Distance(npc.Center) < NearestPlayerDist) + { + NearestPlayerDist = player.Distance(npc.Center); + NearestPlayer = player.whoAmI; + } + } + return NearestPlayer; + } + + public static Vector2 VelocityToPoint(Vector2 A, Vector2 B, float Speed) + { + Vector2 Move = B - A; + return Move * (Speed / (float)Math.Sqrt(Move.X * Move.X + Move.Y * Move.Y)); + } + + public static Vector2 RandomPointInArea(Vector2 A, Vector2 B) + { + return new Vector2(Main.rand.Next((int)A.X, (int)B.X) + 1, Main.rand.Next((int)A.Y, (int)B.Y) + 1); + } + + public static Vector2 RandomPointInArea(Rectangle Area) + { + return new Vector2(Main.rand.Next(Area.X, Area.X + Area.Width), Main.rand.Next(Area.Y, Area.Y + Area.Height)); + } + + public static float rotateBetween2Points(Vector2 A, Vector2 B) + { + return (float)Math.Atan2(A.Y - B.Y, A.X - B.X); + } + + public static Vector2 CenterPoint(Vector2 A, Vector2 B) + { + return new Vector2((A.X + B.X) / 2f, (A.Y + B.Y) / 2f); + } + + public static Vector2 PolarPos(Vector2 Point, float Distance, float Angle, int XOffset = 0, int YOffset = 0) + { + Vector2 result = default; + result.X = Distance * (float)Math.Sin(MathHelper.ToDegrees(Angle)) + Point.X + XOffset; + result.Y = Distance * (float)Math.Cos(MathHelper.ToDegrees(Angle)) + Point.Y + YOffset; + return result; + } + + public static Vector2 SmoothFromTo(Vector2 From, Vector2 To, float Smooth = 60f) + { + return From + (To - From) / Smooth; + } +} diff --git a/Items/Accessories/HallowedBand.cs b/Items/Accessories/HallowedBand.cs new file mode 100644 index 0000000..9eeb775 --- /dev/null +++ b/Items/Accessories/HallowedBand.cs @@ -0,0 +1,40 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class HallowedBand : ModItem +{ + public override void SetStaticDefaults() + { + Tooltip.SetDefault("8% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!] debuff"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 30; + Item.value = Item.sellPrice(0, 2, 0, 0); + Item.rare = ItemRarityID.Pink; + Item.accessory = true; + Item.defense = 6; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetDamage(DamageClass.Generic) += 0.08f; + player.buffImmune[24] = true; + } + + public override void AddRecipes() + { + Recipe recipe = CreateRecipe(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.HallowedBar, 3); + recipe.AddIngredient(ItemID.Ruby, 2); + recipe.AddTile(TileID.Anvils); + recipe.Register(); + } +} diff --git a/Items/Accessories/HallowedBand.png b/Items/Accessories/HallowedBand.png new file mode 100644 index 0000000..4a3cb0a Binary files /dev/null and b/Items/Accessories/HallowedBand.png differ diff --git a/Items/Accessories/HallowedBand_Front.png b/Items/Accessories/HallowedBand_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/HallowedBand_Front.png differ diff --git a/Items/Accessories/HarmonyScarf.cs b/Items/Accessories/HarmonyScarf.cs new file mode 100644 index 0000000..59e9476 --- /dev/null +++ b/Items/Accessories/HarmonyScarf.cs @@ -0,0 +1,53 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class HarmonyScarf : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Harmony Scarf"); + Tooltip.SetDefault("Increases Max HP and Mana by 60\n20% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs \n'This would be a nice gift for a partner!'"); + } + + public override void SetDefaults() + { + Item.width = 42; + Item.height = 38; + Item.value = Item.sellPrice(5, 0, 0, 0); + Item.expert = true; + Item.accessory = true; + Item.defense = 16; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.statManaMax2 += 60; + player.statLifeMax2 += 60; + player.GetDamage(DamageClass.Generic) += 0.2f; + player.buffImmune[24] = true; + player.buffImmune[164] = true; + player.buffImmune[163] = true; + } + + public override void AddRecipes() + { + Recipe recipe = CreateRecipe(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.LeafWand, 1); + recipe.AddIngredient(ItemID.Emerald, 8); + recipe.AddIngredient(ItemID.SoulofLight, 15); + recipe.AddIngredient(ItemID.SoulofNight, 15); + recipe.AddIngredient(ItemID.SoulofSight, 15); + recipe.AddIngredient(ItemID.SoulofFright, 15); + recipe.AddIngredient(ItemID.SoulofMight, 15); + recipe.AddIngredient(ItemID.LunarBar, 8); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddTile(ModContent.TileType()); + recipe.Register(); + } +} diff --git a/Items/Accessories/HarmonyScarf.png b/Items/Accessories/HarmonyScarf.png new file mode 100644 index 0000000..c778107 Binary files /dev/null and b/Items/Accessories/HarmonyScarf.png differ diff --git a/Items/Accessories/HarmonyScarfUpgraded.cs b/Items/Accessories/HarmonyScarfUpgraded.cs new file mode 100644 index 0000000..b075d9e --- /dev/null +++ b/Items/Accessories/HarmonyScarfUpgraded.cs @@ -0,0 +1,54 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class HarmonyScarfUpgraded : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ultimate Scarf of Hope"); + Tooltip.SetDefault("Increases Max HP and Mana by 120\n30% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs \n'What else is left...?'"); + } + + public override void SetDefaults() + { + Item.width = 42; + Item.height = 36; + Item.value = Item.sellPrice(20, 0, 0, 0); + Item.expert = true; + Item.accessory = true; + Item.defense = 26; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.statManaMax2 += 120; + player.statLifeMax2 += 120; + player.GetDamage(DamageClass.Generic) += 0.3f; + player.buffImmune[24] = true; + player.buffImmune[164] = true; + player.buffImmune[163] = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.Sapphire, 15); + val.AddIngredient(ItemID.Ruby, 15); + val.AddIngredient(ItemID.Amethyst, 15); + val.AddIngredient(ItemID.SoulofLight, 30); + val.AddIngredient(ItemID.SoulofNight, 30); + val.AddIngredient(ItemID.SoulofSight, 30); + val.AddIngredient(ItemID.SoulofFright, 30); + val.AddIngredient(ItemID.SoulofMight, 30); + val.AddIngredient(ItemID.LunarBar, 20); + val.AddIngredient(ModContent.ItemType(), 20); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Accessories/HarmonyScarfUpgraded.png b/Items/Accessories/HarmonyScarfUpgraded.png new file mode 100644 index 0000000..dd5e54d Binary files /dev/null and b/Items/Accessories/HarmonyScarfUpgraded.png differ diff --git a/Items/Accessories/HarmonyScarfUpgraded_Front.png b/Items/Accessories/HarmonyScarfUpgraded_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/HarmonyScarfUpgraded_Front.png differ diff --git a/Items/Accessories/HarmonyScarf_Front.png b/Items/Accessories/HarmonyScarf_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/HarmonyScarf_Front.png differ diff --git a/Items/Accessories/HellfireBand.cs b/Items/Accessories/HellfireBand.cs new file mode 100644 index 0000000..b299995 --- /dev/null +++ b/Items/Accessories/HellfireBand.cs @@ -0,0 +1,40 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class HellfireBand : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hellfire Band"); + Tooltip.SetDefault("4% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!] debuff"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 36; + Item.value = Item.sellPrice(0, 1, 0, 0); + Item.rare = ItemRarityID.Orange; + Item.accessory = true; + Item.defense = 4; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetDamage(DamageClass.Generic) += 0.04f; + player.buffImmune[24] = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HellstoneBar, 3); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Accessories/HellfireBand.png b/Items/Accessories/HellfireBand.png new file mode 100644 index 0000000..98801ba Binary files /dev/null and b/Items/Accessories/HellfireBand.png differ diff --git a/Items/Accessories/HellfireBand_Front.png b/Items/Accessories/HellfireBand_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/HellfireBand_Front.png differ diff --git a/Items/Accessories/IronBand.cs b/Items/Accessories/IronBand.cs new file mode 100644 index 0000000..3c90f68 --- /dev/null +++ b/Items/Accessories/IronBand.cs @@ -0,0 +1,33 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class IronBand : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Iron Band"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 30; + Item.value = Item.sellPrice(0, 0, 6, 0); + Item.rare = ItemRarityID.Blue; + Item.accessory = true; + Item.defense = 2; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("IronBar", 3); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Accessories/IronBand.png b/Items/Accessories/IronBand.png new file mode 100644 index 0000000..460941b Binary files /dev/null and b/Items/Accessories/IronBand.png differ diff --git a/Items/Accessories/IronBand_Front.png b/Items/Accessories/IronBand_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/IronBand_Front.png differ diff --git a/Items/Accessories/LunaticBand.cs b/Items/Accessories/LunaticBand.cs new file mode 100644 index 0000000..54ed558 --- /dev/null +++ b/Items/Accessories/LunaticBand.cs @@ -0,0 +1,60 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class LunaticBand : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lunatic Charm"); + Tooltip.SetDefault("14% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); + } + + public override void SetDefaults() + { + Item.width = 40; + Item.height = 42; + Item.value = Item.sellPrice(0, 20, 0, 0); + Item.rare = 12; + Item.accessory = true; + Item.defense = 12; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetDamage(DamageClass.Generic) += 0.14f; + player.buffImmune[24] = true; + player.buffImmune[164] = true; + player.buffImmune[163] = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.LunarBar, 8); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.LunarBar, 8); + val2.AddTile(TileID.LunarCraftingStation); + val2.Register(); + + Recipe val3 = CreateRecipe(); + val3.AddIngredient(ModContent.ItemType()); + val3.AddIngredient(ItemID.LunarBar, 8); + val3.AddTile(TileID.LunarCraftingStation); + val3.Register(); + + Recipe val4 = CreateRecipe(); + val4.AddIngredient(ModContent.ItemType()); + val4.AddIngredient(ItemID.LunarBar, 8); + val4.AddTile(TileID.LunarCraftingStation); + val4.Register(); + } +} diff --git a/Items/Accessories/LunaticBand.png b/Items/Accessories/LunaticBand.png new file mode 100644 index 0000000..cb93818 Binary files /dev/null and b/Items/Accessories/LunaticBand.png differ diff --git a/Items/Accessories/LunaticBand_Front.png b/Items/Accessories/LunaticBand_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/LunaticBand_Front.png differ diff --git a/Items/Accessories/NebulaBand.cs b/Items/Accessories/NebulaBand.cs new file mode 100644 index 0000000..f2a3e66 --- /dev/null +++ b/Items/Accessories/NebulaBand.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class NebulaBand : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Nebula Band"); + Tooltip.SetDefault("12% increased magic damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 36; + Item.value = Item.sellPrice(0, 4, 0, 0); + Item.rare = ItemRarityID.Red; + Item.accessory = true; + Item.defense = 8; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetDamage(DamageClass.Magic) += 0.12f; + player.buffImmune[24] = true; + player.buffImmune[164] = true; + player.buffImmune[163] = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.FragmentNebula, 6); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Accessories/NebulaBand.png b/Items/Accessories/NebulaBand.png new file mode 100644 index 0000000..ee9e289 Binary files /dev/null and b/Items/Accessories/NebulaBand.png differ diff --git a/Items/Accessories/NebulaBand_Front.png b/Items/Accessories/NebulaBand_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/NebulaBand_Front.png differ diff --git a/Items/Accessories/SolarBand.cs b/Items/Accessories/SolarBand.cs new file mode 100644 index 0000000..1f112ff --- /dev/null +++ b/Items/Accessories/SolarBand.cs @@ -0,0 +1,43 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class SolarBand : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Solar Band"); + Tooltip.SetDefault("12% increased melee and throwing damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 36; + Item.value = Item.sellPrice(0, 4, 0, 0); + Item.rare = ItemRarityID.Red; + Item.accessory = true; + Item.defense = 8; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetDamage(DamageClass.Melee) += 0.12f; + player.GetDamage(DamageClass.Throwing) += 0.12f; + player.buffImmune[24] = true; + player.buffImmune[164] = true; + player.buffImmune[163] = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.FragmentSolar, 6); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Accessories/SolarBand.png b/Items/Accessories/SolarBand.png new file mode 100644 index 0000000..c609a7b Binary files /dev/null and b/Items/Accessories/SolarBand.png differ diff --git a/Items/Accessories/SolarBand_Front.png b/Items/Accessories/SolarBand_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/SolarBand_Front.png differ diff --git a/Items/Accessories/StardustBand.cs b/Items/Accessories/StardustBand.cs new file mode 100644 index 0000000..785a5f9 --- /dev/null +++ b/Items/Accessories/StardustBand.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class StardustBand : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Stardust Band"); + Tooltip.SetDefault("12% increased minion damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 36; + Item.value = Item.sellPrice(0, 4, 0, 0); + Item.rare = ItemRarityID.Red; + Item.accessory = true; + Item.defense = 8; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetDamage(DamageClass.Summon) += 0.12f; + player.buffImmune[24] = true; + player.buffImmune[164] = true; + player.buffImmune[163] = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.FragmentStardust, 6); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Accessories/StardustBand.png b/Items/Accessories/StardustBand.png new file mode 100644 index 0000000..dd6d21b Binary files /dev/null and b/Items/Accessories/StardustBand.png differ diff --git a/Items/Accessories/StardustBand_Front.png b/Items/Accessories/StardustBand_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/StardustBand_Front.png differ diff --git a/Items/Accessories/ValkyrieWings.cs b/Items/Accessories/ValkyrieWings.cs new file mode 100644 index 0000000..e0d9389 --- /dev/null +++ b/Items/Accessories/ValkyrieWings.cs @@ -0,0 +1,52 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Wings)] +public class ValkyrieWings : ModItem +{ + public override void SetStaticDefaults() + { + Tooltip.SetDefault("Heroes always fly!"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 38; + Item.value = Item.sellPrice(0, 8, 0, 0); + Item.rare = ItemRarityID.Pink; + Item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.wingTimeMax = 180; + } + + public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) + { + ascentWhenFalling = 0.75f; + ascentWhenRising = 0.2f; + maxCanAscendMultiplier = 1f; + maxAscentMultiplier = 2f; + constantAscend = 0.11f; + } + + public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) + { + speed = 6f; + acceleration *= 1f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.HallowedBar, 10); + val.AddIngredient(ItemID.SoulofFlight, 20); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Accessories/ValkyrieWings.png b/Items/Accessories/ValkyrieWings.png new file mode 100644 index 0000000..94fa906 Binary files /dev/null and b/Items/Accessories/ValkyrieWings.png differ diff --git a/Items/Accessories/ValkyrieWings_Wings.png b/Items/Accessories/ValkyrieWings_Wings.png new file mode 100644 index 0000000..e7c44b5 Binary files /dev/null and b/Items/Accessories/ValkyrieWings_Wings.png differ diff --git a/Items/Accessories/VortexBand.cs b/Items/Accessories/VortexBand.cs new file mode 100644 index 0000000..6fcdf3d --- /dev/null +++ b/Items/Accessories/VortexBand.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Accessories; + +[AutoloadEquip(EquipType.Front)] +public class VortexBand : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Vortex Band"); + Tooltip.SetDefault("12% increased ranged damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 36; + Item.value = Item.sellPrice(0, 4, 0, 0); + Item.rare = ItemRarityID.Red; + Item.accessory = true; + Item.defense = 8; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetDamage(DamageClass.Ranged) += 0.12f; + player.buffImmune[24] = true; + player.buffImmune[164] = true; + player.buffImmune[163] = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.FragmentVortex, 6); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Accessories/VortexBand.png b/Items/Accessories/VortexBand.png new file mode 100644 index 0000000..53fe68b Binary files /dev/null and b/Items/Accessories/VortexBand.png differ diff --git a/Items/Accessories/VortexBand_Front.png b/Items/Accessories/VortexBand_Front.png new file mode 100644 index 0000000..67ee1a2 Binary files /dev/null and b/Items/Accessories/VortexBand_Front.png differ diff --git a/Items/Bars/RainbowChunk.cs b/Items/Bars/RainbowChunk.cs new file mode 100644 index 0000000..ff96594 --- /dev/null +++ b/Items/Bars/RainbowChunk.cs @@ -0,0 +1,36 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Bars; + +public class RainbowChunk : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow Chunk"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\nFull of colors!"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 24; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 21, 0, 0); + Item.expert = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddIngredient(ItemID.LunarBar); + val.AddIngredient(ItemID.FragmentNebula); + val.AddIngredient(ItemID.FragmentSolar); + val.AddIngredient(ItemID.FragmentVortex); + val.AddIngredient(ItemID.FragmentStardust); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Bars/RainbowChunk.png b/Items/Bars/RainbowChunk.png new file mode 100644 index 0000000..51a05ab Binary files /dev/null and b/Items/Bars/RainbowChunk.png differ diff --git a/Items/BossBags.cs b/Items/BossBags.cs new file mode 100644 index 0000000..a275b94 --- /dev/null +++ b/Items/BossBags.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items; + +public class BossBags : GlobalItem +{ + public override void OpenVanillaBag(string context, Player player, int arg) + { + if (context == "bossBag" && arg == ItemID.KingSlimeBossBag && Utils.NextFloat(Main.rand) < 0.5f && Main.expertMode) + { + player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); + } + + if (context == "bossBag" && arg == ItemID.QueenBeeBossBag && Utils.NextFloat(Main.rand) < 0.4f) + { + player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); + } + + if (context == "bossBag" && arg == ItemID.SkeletronBossBag && Utils.NextFloat(Main.rand) < 0.4f) + { + player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); + } + + if (context == "bossBag" && arg == ItemID.QueenBeeBossBag && Utils.NextFloat(Main.rand) < 0.2f) + { + player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); + player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); + player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); + } + } +} diff --git a/Items/Items/CraftingIngredients/BrokenBand.cs b/Items/Items/CraftingIngredients/BrokenBand.cs new file mode 100644 index 0000000..6135ac8 --- /dev/null +++ b/Items/Items/CraftingIngredients/BrokenBand.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class BrokenBand : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Broken Band"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\n'This broken band feels oddly important to you...' \nIt would be wise to keep it."); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 30; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 0, 0, 10); + Item.rare = ItemRarityID.White; + } +} diff --git a/Items/Items/CraftingIngredients/BrokenBand.png b/Items/Items/CraftingIngredients/BrokenBand.png new file mode 100644 index 0000000..dc2ed4b Binary files /dev/null and b/Items/Items/CraftingIngredients/BrokenBand.png differ diff --git a/Items/Items/CraftingIngredients/GoddessGold.cs b/Items/Items/CraftingIngredients/GoddessGold.cs new file mode 100644 index 0000000..f94026a --- /dev/null +++ b/Items/Items/CraftingIngredients/GoddessGold.cs @@ -0,0 +1,40 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class GoddessGold : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Goddess Gold"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\nGold to fit a goddess!"); + } + + public override void SetDefaults() + { + Item.width = 28; + Item.height = 26; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 2, 75, 25); + Item.rare = ItemRarityID.Yellow; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.Ectoplasm); + val.AddIngredient(ItemID.GoldBar, 2); + val.AddIngredient(ModContent.ItemType()); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ItemID.Ectoplasm); + val2.AddIngredient(ItemID.PlatinumBar, 2); + val2.AddIngredient(ModContent.ItemType()); + val2.AddTile(TileID.AdamantiteForge); + val2.Register(); + } +} diff --git a/Items/Items/CraftingIngredients/GoddessGold.png b/Items/Items/CraftingIngredients/GoddessGold.png new file mode 100644 index 0000000..e743bbf Binary files /dev/null and b/Items/Items/CraftingIngredients/GoddessGold.png differ diff --git a/Items/Items/CraftingIngredients/NatureToken.cs b/Items/Items/CraftingIngredients/NatureToken.cs new file mode 100644 index 0000000..9a18c0b --- /dev/null +++ b/Items/Items/CraftingIngredients/NatureToken.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class NatureToken : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Nature Token"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\nUsed to convert the raw power of nature into weapons"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 30; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 2, 0, 0); + Item.expert = true; + } +} diff --git a/Items/Items/CraftingIngredients/NatureToken.png b/Items/Items/CraftingIngredients/NatureToken.png new file mode 100644 index 0000000..91bcfeb Binary files /dev/null and b/Items/Items/CraftingIngredients/NatureToken.png differ diff --git a/Items/Items/CraftingIngredients/OminousBook.cs b/Items/Items/CraftingIngredients/OminousBook.cs new file mode 100644 index 0000000..5199111 --- /dev/null +++ b/Items/Items/CraftingIngredients/OminousBook.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class OminousBook : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ominous Book"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\nAn ominous presence emits from this book. Maybe pack some gems and bring it to an altar?"); + } + + public override void SetDefaults() + { + Item.width = 28; + Item.height = 30; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 2, 0, 0); + Item.expert = true; + } +} diff --git a/Items/Items/CraftingIngredients/OminousBook.png b/Items/Items/CraftingIngredients/OminousBook.png new file mode 100644 index 0000000..8b25b66 Binary files /dev/null and b/Items/Items/CraftingIngredients/OminousBook.png differ diff --git a/Items/Items/CraftingIngredients/RainbowDust.cs b/Items/Items/CraftingIngredients/RainbowDust.cs new file mode 100644 index 0000000..fa5c86e --- /dev/null +++ b/Items/Items/CraftingIngredients/RainbowDust.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class RainbowDust : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow Dust"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\nDon't inhale it!"); + } + + public override void SetDefaults() + { + Item.width = 24; + Item.height = 24; + Item.maxStack = 999; + Item.expert = true; + Item.value = Item.sellPrice(0, 0, 4, 50); + } +} diff --git a/Items/Items/CraftingIngredients/RainbowDust.png b/Items/Items/CraftingIngredients/RainbowDust.png new file mode 100644 index 0000000..3650d34 Binary files /dev/null and b/Items/Items/CraftingIngredients/RainbowDust.png differ diff --git a/Items/Items/CraftingIngredients/RainbowHandle.cs b/Items/Items/CraftingIngredients/RainbowHandle.cs new file mode 100644 index 0000000..51901f1 --- /dev/null +++ b/Items/Items/CraftingIngredients/RainbowHandle.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class RainbowHandle : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow Handle"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\nUsed to craft The Rainbow Demon \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.width = 35; + Item.height = 37; + Item.maxStack = 99; + Item.value = Item.sellPrice(18, 0, 0, 0); + Item.expert = true; + } +} diff --git a/Items/Items/CraftingIngredients/RainbowHandle.png b/Items/Items/CraftingIngredients/RainbowHandle.png new file mode 100644 index 0000000..b0a65ee Binary files /dev/null and b/Items/Items/CraftingIngredients/RainbowHandle.png differ diff --git a/Items/Items/CraftingIngredients/RainbowMuzzle.cs b/Items/Items/CraftingIngredients/RainbowMuzzle.cs new file mode 100644 index 0000000..cea0170 --- /dev/null +++ b/Items/Items/CraftingIngredients/RainbowMuzzle.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class RainbowMuzzle : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow Muzzle"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\nUsed to craft The Rainbow Demon \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.width = 48; + Item.height = 33; + Item.maxStack = 99; + Item.value = Item.sellPrice(21, 0, 0, 0); + Item.expert = true; + } +} diff --git a/Items/Items/CraftingIngredients/RainbowMuzzle.png b/Items/Items/CraftingIngredients/RainbowMuzzle.png new file mode 100644 index 0000000..43300d7 Binary files /dev/null and b/Items/Items/CraftingIngredients/RainbowMuzzle.png differ diff --git a/Items/Items/CraftingIngredients/RainbowToken.cs b/Items/Items/CraftingIngredients/RainbowToken.cs new file mode 100644 index 0000000..5b7cfc7 --- /dev/null +++ b/Items/Items/CraftingIngredients/RainbowToken.cs @@ -0,0 +1,31 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class RainbowToken : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow Token"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\nUsed to convert the raw power of rainbows into weapons"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 30; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 9, 80, 0); + Item.expert = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddIngredient(ModContent.ItemType(), 40); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Items/CraftingIngredients/RainbowToken.png b/Items/Items/CraftingIngredients/RainbowToken.png new file mode 100644 index 0000000..597f196 Binary files /dev/null and b/Items/Items/CraftingIngredients/RainbowToken.png differ diff --git a/Items/Items/CraftingIngredients/SoulofWisdom.cs b/Items/Items/CraftingIngredients/SoulofWisdom.cs new file mode 100644 index 0000000..58c2bd0 --- /dev/null +++ b/Items/Items/CraftingIngredients/SoulofWisdom.cs @@ -0,0 +1,36 @@ +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Items.CraftingIngredients; + +public class SoulofWisdom : ModItem +{ + public override void SetStaticDefaults() + { + Main.RegisterItemAnimation(Type, new DrawAnimationVertical(5, 4)); + DisplayName.SetDefault("Soul of Wisdom"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]\n'The essence of everlasting knowledge'"); + } + + public override void SetDefaults() + { + Item.width = 22; + Item.height = 28; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 2, 40, 0); + Item.rare = ItemRarityID.Pink; + //Sets.ItemNoGravity[Item.type] = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.SoulofFright, 1); + val.AddIngredient(ItemID.SoulofMight, 1); + val.AddIngredient(ItemID.SoulofSight, 1); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Items/CraftingIngredients/SoulofWisdom.png b/Items/Items/CraftingIngredients/SoulofWisdom.png new file mode 100644 index 0000000..6ffa1a3 Binary files /dev/null and b/Items/Items/CraftingIngredients/SoulofWisdom.png differ diff --git a/Items/Items/DamageDebugItem.cs b/Items/Items/DamageDebugItem.cs new file mode 100644 index 0000000..7aedd79 --- /dev/null +++ b/Items/Items/DamageDebugItem.cs @@ -0,0 +1,47 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items; + +public class DamageDebugItem : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Damage Debug Item"); + Tooltip.SetDefault("Use to damage yourself by 100 HP\nUse to heal by 100 HP\n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.width = 22; + Item.height = 32; + Item.useTime = 1; + Item.useAnimation = 1; + Item.maxStack = 1; + Item.useStyle = ItemUseStyleID.Shoot; + Item.value = Item.sellPrice(0, 0, 0, 0); + Item.expert = false; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override void UseStyle(Player player, Rectangle heldItemFrame) + { + if (player.altFunctionUse == 2) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.statLife += 100; + } + } + else if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.statLife -= 100; + } + } +} diff --git a/Items/Items/DamageDebugItem.png b/Items/Items/DamageDebugItem.png new file mode 100644 index 0000000..58f6a4b Binary files /dev/null and b/Items/Items/DamageDebugItem.png differ diff --git a/Items/Items/PetSummons/Apple.cs b/Items/Items/PetSummons/Apple.cs new file mode 100644 index 0000000..27b4983 --- /dev/null +++ b/Items/Items/PetSummons/Apple.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.PetSummons; + +public class Apple : ModItem +{ + public override void SetDefaults() + { + Item.CloneDefaults(ItemID.Carrot); + Item.useTime = 25; + Item.useAnimation = 25; + Item.value = Item.buyPrice(0, 10, 0, 0); + Item.value = Item.sellPrice(0, 5, 0, 0); + Item.shoot = ModContent.ProjectileType(); + Item.buffType = ModContent.BuffType(); + } + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Apple"); + Tooltip.SetDefault("[c/B6FF00:Dyeable]\n[c/FFAF4F:Pet Summoning Item]\nSummons a fox to follow you around \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void UseStyle(Player player, Rectangle heldItemFrame) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(Item.buffType, 3600, true); + } + } + + public override void AddRecipes() + { + Recipe recipe = CreateRecipe(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.RedDye); + recipe.AddTile(TileID.DyeVat); + recipe.Register(); + } +} diff --git a/Items/Items/PetSummons/Apple.png b/Items/Items/PetSummons/Apple.png new file mode 100644 index 0000000..2d35c53 Binary files /dev/null and b/Items/Items/PetSummons/Apple.png differ diff --git a/Items/Items/PetSummons/PinkApple.cs b/Items/Items/PetSummons/PinkApple.cs new file mode 100644 index 0000000..5527b9d --- /dev/null +++ b/Items/Items/PetSummons/PinkApple.cs @@ -0,0 +1,42 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.PetSummons; + +public class PinkApple : ModItem +{ + public override void SetDefaults() + { + Item.CloneDefaults(ItemID.Carrot); + Item.useTime = 25; + Item.useAnimation = 25; + Item.value = Item.sellPrice(0, 5, 20, 0); + Item.shoot = ModContent.ProjectileType(); + Item.buffType = ModContent.BuffType(); + } + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pink Apple"); + Tooltip.SetDefault("[c/B6FF00:Dyeable]\n[c/FFAF4F:Pet Summoning Item]\nSummons a pink fox to follow you around \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void UseStyle(Player player, Rectangle heldItemFrame) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(Item.buffType, 3600, true); + } + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.PinkDye); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Items/PetSummons/PinkApple.png b/Items/Items/PetSummons/PinkApple.png new file mode 100644 index 0000000..d1b5720 Binary files /dev/null and b/Items/Items/PetSummons/PinkApple.png differ diff --git a/Items/Items/PetSummons/SuspiciousFlower.cs b/Items/Items/PetSummons/SuspiciousFlower.cs new file mode 100644 index 0000000..dd9e867 --- /dev/null +++ b/Items/Items/PetSummons/SuspiciousFlower.cs @@ -0,0 +1,32 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Items.PetSummons; + +public class SuspiciousFlower : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Suspicious Flower"); + Tooltip.SetDefault("[c/FFAF4F:Pet Summoning Item]\nI wonder who this flower belongs to? \n[c/46FFFF:~~ Developer Pet ~~]"); + } + + public override void SetDefaults() + { + Item.value = Item.buyPrice(0, 20, 0, 0); + Item.rare = ItemRarityID.Red; + Item.UseSound = SoundID.Item44; + Item.shoot = ModContent.ProjectileType(); + Item.buffType = ModContent.BuffType(); + } + + public override void UseStyle(Player player, Rectangle heldItemFrame) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(Item.buffType, 3600, true); + } + } +} diff --git a/Items/Items/PetSummons/SuspiciousFlower.png b/Items/Items/PetSummons/SuspiciousFlower.png new file mode 100644 index 0000000..c284435 Binary files /dev/null and b/Items/Items/PetSummons/SuspiciousFlower.png differ diff --git a/Items/Items/PetSummons/SuspiciousLookingScrew.cs b/Items/Items/PetSummons/SuspiciousLookingScrew.cs new file mode 100644 index 0000000..5b9e9f9 --- /dev/null +++ b/Items/Items/PetSummons/SuspiciousLookingScrew.cs @@ -0,0 +1,30 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.PetSummons; + +public class SuspiciousLookingScrew : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Suspicious Looking Screw"); + Tooltip.SetDefault("[c/FFAF4F:Pet Summoning Item]\nSummons Mechanical Teeth to follow you around \n[c/46FFFF:~~ Developer Pet ~~]"); + } + + public override void SetDefaults() + { + Item.CloneDefaults(ItemID.ZephyrFish); + Item.shoot = ModContent.ProjectileType(); + Item.buffType = ModContent.BuffType(); + } + + public override void UseStyle(Player player, Rectangle heldItemFrame) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(Item.buffType, 3600, true); + } + } +} diff --git a/Items/Items/PetSummons/SuspiciousLookingScrew.png b/Items/Items/PetSummons/SuspiciousLookingScrew.png new file mode 100644 index 0000000..44e1e95 Binary files /dev/null and b/Items/Items/PetSummons/SuspiciousLookingScrew.png differ diff --git a/Items/Items/WeaponParts/UntreatedBowPart.cs b/Items/Items/WeaponParts/UntreatedBowPart.cs new file mode 100644 index 0000000..24d5c34 --- /dev/null +++ b/Items/Items/WeaponParts/UntreatedBowPart.cs @@ -0,0 +1,31 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.WeaponParts; + +public class UntreatedBowPart : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Untreated Bow Part"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]"); + } + + public override void SetDefaults() + { + Item.width = 14; + Item.height = 20; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 0, 0, 20); + Item.rare = ItemRarityID.White; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("Wood", 2); + val.AddTile(TileID.WorkBenches); + val.Register(); + } +} diff --git a/Items/Items/WeaponParts/UntreatedBowPart.png b/Items/Items/WeaponParts/UntreatedBowPart.png new file mode 100644 index 0000000..8ca7024 Binary files /dev/null and b/Items/Items/WeaponParts/UntreatedBowPart.png differ diff --git a/Items/Items/WeaponParts/UntreatedShortswordPart.cs b/Items/Items/WeaponParts/UntreatedShortswordPart.cs new file mode 100644 index 0000000..bb41c94 --- /dev/null +++ b/Items/Items/WeaponParts/UntreatedShortswordPart.cs @@ -0,0 +1,31 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.WeaponParts; + +public class UntreatedShortswordPart : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Untreated Shortsword Part"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]"); + } + + public override void SetDefaults() + { + Item.width = 28; + Item.height = 26; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 0, 0, 20); + Item.rare = ItemRarityID.White; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("Wood", 6); + val.AddTile(TileID.WorkBenches); + val.Register(); + } +} diff --git a/Items/Items/WeaponParts/UntreatedShortswordPart.png b/Items/Items/WeaponParts/UntreatedShortswordPart.png new file mode 100644 index 0000000..adc7286 Binary files /dev/null and b/Items/Items/WeaponParts/UntreatedShortswordPart.png differ diff --git a/Items/Items/WeaponParts/UntreatedShurikenPart.cs b/Items/Items/WeaponParts/UntreatedShurikenPart.cs new file mode 100644 index 0000000..9b91ad7 --- /dev/null +++ b/Items/Items/WeaponParts/UntreatedShurikenPart.cs @@ -0,0 +1,31 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.WeaponParts; + +public class UntreatedShurikenPart : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Untreated Shuriken Part"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]"); + } + + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 0, 0, 20); + Item.rare = ItemRarityID.White; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("Wood", 3); + val.AddTile(TileID.WorkBenches); + val.Register(); + } +} diff --git a/Items/Items/WeaponParts/UntreatedShurikenPart.png b/Items/Items/WeaponParts/UntreatedShurikenPart.png new file mode 100644 index 0000000..e795e4e Binary files /dev/null and b/Items/Items/WeaponParts/UntreatedShurikenPart.png differ diff --git a/Items/Items/WeaponParts/UntreatedSwordParts.cs b/Items/Items/WeaponParts/UntreatedSwordParts.cs new file mode 100644 index 0000000..0ff12bc --- /dev/null +++ b/Items/Items/WeaponParts/UntreatedSwordParts.cs @@ -0,0 +1,31 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Items.WeaponParts; + +public class UntreatedSwordParts : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Untreated Sword Parts"); + Tooltip.SetDefault("[c/C9FF4C:Crafting Ingredient]"); + } + + public override void SetDefaults() + { + Item.width = 42; + Item.height = 26; + Item.maxStack = 99; + Item.value = Item.sellPrice(0, 0, 0, 20); + Item.rare = ItemRarityID.White; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("Wood", 12); + val.AddTile(TileID.WorkBenches); + val.Register(); + } +} diff --git a/Items/Items/WeaponParts/UntreatedSwordParts.png b/Items/Items/WeaponParts/UntreatedSwordParts.png new file mode 100644 index 0000000..af9416c Binary files /dev/null and b/Items/Items/WeaponParts/UntreatedSwordParts.png differ diff --git a/Items/Tiles/RainbowStation.cs b/Items/Tiles/RainbowStation.cs new file mode 100644 index 0000000..a22845e --- /dev/null +++ b/Items/Tiles/RainbowStation.cs @@ -0,0 +1,38 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Tiles; + +public class RainbowStation : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow Station"); + Tooltip.SetDefault("Used to craft rainbow weapons"); + } + + public override void SetDefaults() + { + Item.width = 40; + Item.height = 24; + Item.maxStack = 99; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.expert = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.LunarCraftingStation, 1); + val.AddIngredient(ModContent.ItemType(), 12); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Tiles/RainbowStation.png b/Items/Tiles/RainbowStation.png new file mode 100644 index 0000000..51002ab Binary files /dev/null and b/Items/Tiles/RainbowStation.png differ diff --git a/Items/Tiles/ReinforcedWorkBench.cs b/Items/Tiles/ReinforcedWorkBench.cs new file mode 100644 index 0000000..3c79440 --- /dev/null +++ b/Items/Tiles/ReinforcedWorkBench.cs @@ -0,0 +1,36 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Tiles; + +public class ReinforcedWorkBench : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Reinforced Work Bench"); + Tooltip.SetDefault("Used to craft stone-plated weapons"); + } + + public override void SetDefaults() + { + Item.width = 36; + Item.height = 20; + Item.maxStack = 99; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 15; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.WorkBench, 1); + val.AddIngredient(ItemID.StoneBlock, 12); + val.Register(); + } +} diff --git a/Items/Tiles/ReinforcedWorkBench.png b/Items/Tiles/ReinforcedWorkBench.png new file mode 100644 index 0000000..1b3d6a8 Binary files /dev/null and b/Items/Tiles/ReinforcedWorkBench.png differ diff --git a/Items/Tools/GoddessPick.cs b/Items/Tools/GoddessPick.cs new file mode 100644 index 0000000..ab404be --- /dev/null +++ b/Items/Tools/GoddessPick.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Tools; + +public class GoddessPick : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Goddess' Pick"); + } + + public override void SetDefaults() + { + Item.damage = 22; + Item.width = 50; + Item.height = 50; + Item.useTime = 10; + Item.useAnimation = 10; + Item.pick = 210; + Item.tileBoost = 3; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 6f; + Item.value = Item.sellPrice(0, 6, 0, 0); + Item.rare = ItemRarityID.Yellow; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.Picksaw, 1); + val.AddIngredient(ModContent.ItemType(), 12); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Tools/GoddessPick.png b/Items/Tools/GoddessPick.png new file mode 100644 index 0000000..a461103 Binary files /dev/null and b/Items/Tools/GoddessPick.png differ diff --git a/Items/Tools/GoldenDiggingClaw.cs b/Items/Tools/GoldenDiggingClaw.cs new file mode 100644 index 0000000..be7b6bd --- /dev/null +++ b/Items/Tools/GoldenDiggingClaw.cs @@ -0,0 +1,59 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Tools; + +public class GoldenDiggingClaw : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Digging Claw"); + Tooltip.SetDefault("[c/FF3C2B:Mining speed too high may result in no funcionality]"); + } + + public override void SetDefaults() + { + Item.damage = 60; + Item.width = 38; + Item.height = 38; + Item.useTime = 3; + Item.useAnimation = 9; + Item.pick = 210; + Item.axe = 28; + Item.tileBoost = 6; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 6f; + Item.value = Item.sellPrice(0, 18, 0, 0); + Item.rare = ItemRarityID.Red; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.ShroomiteDiggingClaw); + val.AddIngredient(ModContent.ItemType(), 18); + val.AddIngredient(ItemID.LunarBar, 22); + val.AddIngredient(ItemID.FragmentSolar, 8); + val.AddIngredient(ItemID.FragmentNebula, 8); + val.AddIngredient(ItemID.FragmentStardust, 8); + val.AddIngredient(ItemID.FragmentVortex, 8); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } +} diff --git a/Items/Tools/GoldenDiggingClaw.png b/Items/Tools/GoldenDiggingClaw.png new file mode 100644 index 0000000..8f4076e Binary files /dev/null and b/Items/Tools/GoldenDiggingClaw.png differ diff --git a/Items/Tools/GoldenHamaxe.cs b/Items/Tools/GoldenHamaxe.cs new file mode 100644 index 0000000..fe215c0 --- /dev/null +++ b/Items/Tools/GoldenHamaxe.cs @@ -0,0 +1,53 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Tools; + +public class GoldenHamaxe : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Hamaxe"); + } + + public override void SetDefaults() + { + Item.damage = 68; + Item.width = 70; + Item.height = 60; + Item.useTime = 10; + Item.useAnimation = 10; + Item.axe = 23; + Item.hammer = 95; + Item.tileBoost = 2; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 6f; + Item.value = Item.sellPrice(0, 6, 0, 0); + Item.rare = ItemRarityID.Yellow; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.Picksaw, 1); + val.AddIngredient(ModContent.ItemType(), 12); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } +} diff --git a/Items/Tools/GoldenHamaxe.png b/Items/Tools/GoldenHamaxe.png new file mode 100644 index 0000000..1bb243a Binary files /dev/null and b/Items/Tools/GoldenHamaxe.png differ diff --git a/Items/Vanity/FoxEars/BlueFoxEars.cs b/Items/Vanity/FoxEars/BlueFoxEars.cs new file mode 100644 index 0000000..c8370bb --- /dev/null +++ b/Items/Vanity/FoxEars/BlueFoxEars.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Vanity.FoxEars; + +[AutoloadEquip(EquipType.Head)] +public class BlueFoxEars : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blue Fox Ears"); + Tooltip.SetDefault("Now in blue!"); + + ArmorIDs.Head.Sets.DrawFullHair[Item.headSlot] = true; + } + + public override void SetDefaults() + { + Item.width = 26; + Item.height = 22; + Item.rare = ItemRarityID.Blue; + Item.vanity = true; + Item.value = Item.sellPrice(0, 0, 12, 0); + } +} diff --git a/Items/Vanity/FoxEars/BlueFoxEars.png b/Items/Vanity/FoxEars/BlueFoxEars.png new file mode 100644 index 0000000..122e19b Binary files /dev/null and b/Items/Vanity/FoxEars/BlueFoxEars.png differ diff --git a/Items/Vanity/FoxEars/BlueFoxEars_Head.png b/Items/Vanity/FoxEars/BlueFoxEars_Head.png new file mode 100644 index 0000000..72269d5 Binary files /dev/null and b/Items/Vanity/FoxEars/BlueFoxEars_Head.png differ diff --git a/Items/Vanity/FoxEars/FoxEars.cs b/Items/Vanity/FoxEars/FoxEars.cs new file mode 100644 index 0000000..2b2d62d --- /dev/null +++ b/Items/Vanity/FoxEars/FoxEars.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Vanity.FoxEars; + +[AutoloadEquip(EquipType.Head)] +public class FoxEars : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Ears"); + Tooltip.SetDefault("[c/B6FF00:Dyeable]"); + + ArmorIDs.Head.Sets.DrawFullHair[Item.headSlot] = true; + } + + public override void SetDefaults() + { + Item.width = 26; + Item.height = 22; + Item.rare = ItemRarityID.Blue; + Item.vanity = true; + Item.value = Item.sellPrice(0, 0, 10, 0); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.Leather, 2); + val.AddTile(TileID.WorkBenches); + val.Register(); + } +} diff --git a/Items/Vanity/FoxEars/FoxEars.png b/Items/Vanity/FoxEars/FoxEars.png new file mode 100644 index 0000000..de3fb85 Binary files /dev/null and b/Items/Vanity/FoxEars/FoxEars.png differ diff --git a/Items/Vanity/FoxEars/FoxEars_Head.png b/Items/Vanity/FoxEars/FoxEars_Head.png new file mode 100644 index 0000000..e600d03 Binary files /dev/null and b/Items/Vanity/FoxEars/FoxEars_Head.png differ diff --git a/Items/Vanity/FoxEars/PinkFoxEars.cs b/Items/Vanity/FoxEars/PinkFoxEars.cs new file mode 100644 index 0000000..ff610c3 --- /dev/null +++ b/Items/Vanity/FoxEars/PinkFoxEars.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Vanity.FoxEars; + +[AutoloadEquip(EquipType.Head)] +public class PinkFoxEars : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pink Fox Ears"); + Tooltip.SetDefault("Now in pink!"); + + ArmorIDs.Head.Sets.DrawFullHair[Item.headSlot] = true; + } + + public override void SetDefaults() + { + Item.width = 26; + Item.height = 22; + Item.rare = ItemRarityID.Blue; + Item.vanity = true; + Item.value = Item.sellPrice(0, 0, 12, 0); + } +} diff --git a/Items/Vanity/FoxEars/PinkFoxEars.png b/Items/Vanity/FoxEars/PinkFoxEars.png new file mode 100644 index 0000000..2689114 Binary files /dev/null and b/Items/Vanity/FoxEars/PinkFoxEars.png differ diff --git a/Items/Vanity/FoxEars/PinkFoxEars_Head.png b/Items/Vanity/FoxEars/PinkFoxEars_Head.png new file mode 100644 index 0000000..854ee96 Binary files /dev/null and b/Items/Vanity/FoxEars/PinkFoxEars_Head.png differ diff --git a/Items/Vanity/Leafy/LeafyChest.cs b/Items/Vanity/Leafy/LeafyChest.cs new file mode 100644 index 0000000..7822dc8 --- /dev/null +++ b/Items/Vanity/Leafy/LeafyChest.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Vanity.Leafy; + +[AutoloadEquip(EquipType.Body)] +public class LeafyChest : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Leafia Chest"); + Tooltip.SetDefault("~~ Donator Item ~~"); + } + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 22; + Item.rare = ItemRarityID.Blue; + Item.vanity = true; + Item.value = Item.sellPrice(0, 0, 20, 0); + } +} diff --git a/Items/Vanity/Leafy/LeafyChest.png b/Items/Vanity/Leafy/LeafyChest.png new file mode 100644 index 0000000..617a878 Binary files /dev/null and b/Items/Vanity/Leafy/LeafyChest.png differ diff --git a/Items/Vanity/Leafy/LeafyChest_Arms.png b/Items/Vanity/Leafy/LeafyChest_Arms.png new file mode 100644 index 0000000..2f0bc3b Binary files /dev/null and b/Items/Vanity/Leafy/LeafyChest_Arms.png differ diff --git a/Items/Vanity/Leafy/LeafyChest_Body.png b/Items/Vanity/Leafy/LeafyChest_Body.png new file mode 100644 index 0000000..87142f4 Binary files /dev/null and b/Items/Vanity/Leafy/LeafyChest_Body.png differ diff --git a/Items/Vanity/Leafy/LeafyChest_FemaleBody.png b/Items/Vanity/Leafy/LeafyChest_FemaleBody.png new file mode 100644 index 0000000..87142f4 Binary files /dev/null and b/Items/Vanity/Leafy/LeafyChest_FemaleBody.png differ diff --git a/Items/Vanity/Leafy/LeafyFullBody.png b/Items/Vanity/Leafy/LeafyFullBody.png new file mode 100644 index 0000000..3247291 Binary files /dev/null and b/Items/Vanity/Leafy/LeafyFullBody.png differ diff --git a/Items/Vanity/Leafy/LeafyHat.cs b/Items/Vanity/Leafy/LeafyHat.cs new file mode 100644 index 0000000..5bc5096 --- /dev/null +++ b/Items/Vanity/Leafy/LeafyHat.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Vanity.Leafy; + +[AutoloadEquip(EquipType.Head)] +public class LeafyHat : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Leafia Hat"); + Tooltip.SetDefault("~~ Donator Item ~~"); + } + + public override void SetDefaults() + { + Item.width = 22; + Item.height = 10; + Item.rare = ItemRarityID.Blue; + Item.vanity = true; + Item.value = Item.sellPrice(0, 0, 20, 0); + } +} diff --git a/Items/Vanity/Leafy/LeafyHat.png b/Items/Vanity/Leafy/LeafyHat.png new file mode 100644 index 0000000..1378104 Binary files /dev/null and b/Items/Vanity/Leafy/LeafyHat.png differ diff --git a/Items/Vanity/Leafy/LeafyHat_Head.png b/Items/Vanity/Leafy/LeafyHat_Head.png new file mode 100644 index 0000000..ba85f22 Binary files /dev/null and b/Items/Vanity/Leafy/LeafyHat_Head.png differ diff --git a/Items/Vanity/Leafy/LeafyLegs.cs b/Items/Vanity/Leafy/LeafyLegs.cs new file mode 100644 index 0000000..ff35613 --- /dev/null +++ b/Items/Vanity/Leafy/LeafyLegs.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Items.Vanity.Leafy; + +[AutoloadEquip(EquipType.Legs)] +public class LeafyLegs : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Leafia Legs"); + Tooltip.SetDefault("~~ Donator Item ~~"); + } + + public override void SetDefaults() + { + Item.width = 22; + Item.height = 18; + Item.rare = ItemRarityID.Blue; + Item.vanity = true; + Item.value = Item.sellPrice(0, 0, 20, 0); + } +} diff --git a/Items/Vanity/Leafy/LeafyLegs.png b/Items/Vanity/Leafy/LeafyLegs.png new file mode 100644 index 0000000..46db7ac Binary files /dev/null and b/Items/Vanity/Leafy/LeafyLegs.png differ diff --git a/Items/Vanity/Leafy/LeafyLegs_Legs.png b/Items/Vanity/Leafy/LeafyLegs_Legs.png new file mode 100644 index 0000000..dae0248 Binary files /dev/null and b/Items/Vanity/Leafy/LeafyLegs_Legs.png differ diff --git a/Items/Vanity/PlayerSpriteSheetTemplate.png b/Items/Vanity/PlayerSpriteSheetTemplate.png new file mode 100644 index 0000000..0ecb469 Binary files /dev/null and b/Items/Vanity/PlayerSpriteSheetTemplate.png differ diff --git a/Items/Weapons/Magic/Coalescence/Coalescence.cs b/Items/Weapons/Magic/Coalescence/Coalescence.cs new file mode 100644 index 0000000..780fc49 --- /dev/null +++ b/Items/Weapons/Magic/Coalescence/Coalescence.cs @@ -0,0 +1,47 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Coalescence; + +public class Coalescence : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Coalescence"); + Tooltip.SetDefault("Enemies are invulnerable for 8 frames after getting hit \nBeam your foes out of existence with a powerful laser beam!"); + } + + public override void SetDefaults() + { + Item.damage = 6; + Item.noMelee = true; + Item.channel = true; + Item.mana = 5; + Item.expert = true; + Item.width = 28; + Item.height = 30; + Item.useTime = 20; + Item.UseSound = SoundID.Item13; + Item.useStyle = ItemUseStyleID.Shoot; + Item.shootSpeed = 14f; + Item.useAnimation = 20; + Item.shoot = ModContent.ProjectileType(); + Item.value = Item.sellPrice(0, 8, 50, 0); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.Diamond, 5); + val.AddIngredient(ItemID.Emerald, 5); + val.AddIngredient(ItemID.Sapphire, 5); + val.AddIngredient(ItemID.Ruby, 5); + val.AddIngredient(ItemID.Topaz, 5); + val.AddIngredient(ItemID.Amethyst, 5); + val.AddRecipeGroup("FabusMod:DemoniteBar", 10); + val.AddTile(TileID.Books); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Coalescence/Coalescence.png b/Items/Weapons/Magic/Coalescence/Coalescence.png new file mode 100644 index 0000000..655c615 Binary files /dev/null and b/Items/Weapons/Magic/Coalescence/Coalescence.png differ diff --git a/Items/Weapons/Magic/Coalescence/DelightfulDevastation.cs b/Items/Weapons/Magic/Coalescence/DelightfulDevastation.cs new file mode 100644 index 0000000..b01f010 --- /dev/null +++ b/Items/Weapons/Magic/Coalescence/DelightfulDevastation.cs @@ -0,0 +1,41 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Coalescence; + +public class DelightfulDevastation : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Delightful Devastation"); + Tooltip.SetDefault("Enemies are invulnerable for 3 frames after getting hit \nVaporize your foes out of existence with the power of rainbows! \nInflicts the [c/AB2C2C:R][c/F3821B:a][c/E6AF31:i][c/63B465:n][c/82E8E8:b][c/9EF3EF:o][c/2BA0B5:w][c/734679:'s ][c/AB2C2C:W][c/F3821B:r][c/E6AF31:a][c/63B465:t][c/82E8E8:h] debuff for 2 seconds, and the [c/DAD45E:Midas] debuff for 3 seconds on hit\n[c/AB2C2C:R][c/F3821B:a][c/E6AF31:i][c/63B465:n][c/82E8E8:b][c/9EF3EF:o][c/2BA0B5:w][c/734679:'s ][c/AB2C2C:W][c/F3821B:r][c/E6AF31:a][c/63B465:t][c/82E8E8:h] causes enemies to lose life rapidly \n[c/DAD45E:Midas] causes enemies to drop more money on death "); + } + + public override void SetDefaults() + { + Item.damage = 160; + Item.noMelee = true; + Item.channel = true; + Item.mana = 15; + Item.expert = true; + Item.width = 30; + Item.height = 32; + Item.useTime = 20; + Item.UseSound = SoundID.Item13; + Item.useStyle = ItemUseStyleID.Shoot; + Item.shootSpeed = 14f; + Item.useAnimation = 10; + Item.shoot = ModContent.ProjectileType(); + Item.value = Item.sellPrice(2, 40, 0, 0); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 10); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Coalescence/DelightfulDevastation.png b/Items/Weapons/Magic/Coalescence/DelightfulDevastation.png new file mode 100644 index 0000000..1917521 Binary files /dev/null and b/Items/Weapons/Magic/Coalescence/DelightfulDevastation.png differ diff --git a/Items/Weapons/Magic/Coalescence/GoldenVengeance.cs b/Items/Weapons/Magic/Coalescence/GoldenVengeance.cs new file mode 100644 index 0000000..90773b0 --- /dev/null +++ b/Items/Weapons/Magic/Coalescence/GoldenVengeance.cs @@ -0,0 +1,41 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Coalescence; + +public class GoldenVengeance : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Vengeance"); + Tooltip.SetDefault("Enemies are invulnerable for 4 frames after getting hit \nPurify your foes out of existence with a powerful laser beam! \nInflicts the [c/FFFB62:Holy Smite] debuff for 4 seconds, and the [c/DAD45E:Midas] debuff for 3 seconds on hit\n[c/FFFB62:Holy Smite] causes enemies to lose life quickly \n[c/DAD45E:Midas] causes enemies to drop more money on death"); + } + + public override void SetDefaults() + { + Item.damage = 48; + Item.noMelee = true; + Item.channel = true; + Item.mana = 10; + Item.expert = true; + Item.width = 28; + Item.height = 30; + Item.useTime = 20; + Item.UseSound = SoundID.Item13; + Item.useStyle = ItemUseStyleID.Shoot; + Item.shootSpeed = 14f; + Item.useAnimation = 20; + Item.shoot = ModContent.ProjectileType(); + Item.value = Item.sellPrice(0, 27, 50, 0); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 12); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Coalescence/GoldenVengeance.png b/Items/Weapons/Magic/Coalescence/GoldenVengeance.png new file mode 100644 index 0000000..79a1486 Binary files /dev/null and b/Items/Weapons/Magic/Coalescence/GoldenVengeance.png differ diff --git a/Items/Weapons/Magic/Coalescence/HeavensVengeance.cs b/Items/Weapons/Magic/Coalescence/HeavensVengeance.cs new file mode 100644 index 0000000..087b850 --- /dev/null +++ b/Items/Weapons/Magic/Coalescence/HeavensVengeance.cs @@ -0,0 +1,41 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Coalescence; + +public class HeavensVengeance : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Heaven's Vengeance"); + Tooltip.SetDefault("Enemies are invulnerable for 4 frames after getting hit \nPurify your foes out of existence with a powerful laser beam! \nInflicts the [c/FFFB62:Holy Smite] debuff for 3 seconds on hit \n[c/FFFB62:Holy Smite] causes enemies to lose life quickly"); + } + + public override void SetDefaults() + { + Item.damage = 28; + Item.noMelee = true; + Item.channel = true; + Item.mana = 8; + Item.expert = true; + Item.width = 28; + Item.height = 30; + Item.useTime = 20; + Item.UseSound = SoundID.Item13; + Item.useStyle = ItemUseStyleID.Shoot; + Item.shootSpeed = 14f; + Item.useAnimation = 20; + Item.shoot = ModContent.ProjectileType(); + Item.value = Item.sellPrice(0, 16, 50, 0); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType(), 1); + val.AddIngredient(ItemID.HallowedBar, 14); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Coalescence/HeavensVengeance.png b/Items/Weapons/Magic/Coalescence/HeavensVengeance.png new file mode 100644 index 0000000..e616889 Binary files /dev/null and b/Items/Weapons/Magic/Coalescence/HeavensVengeance.png differ diff --git a/Items/Weapons/Magic/Coalescence/HellfireBeam.cs b/Items/Weapons/Magic/Coalescence/HellfireBeam.cs new file mode 100644 index 0000000..f97f279 --- /dev/null +++ b/Items/Weapons/Magic/Coalescence/HellfireBeam.cs @@ -0,0 +1,41 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Coalescence; + +public class HellfireBeam : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hellfire Beam"); + Tooltip.SetDefault("Enemies are invulnerable for 5 frames after getting hit \nBurn your foes out of existence with a powerful laser beam! \nInflicts the [c/DA0205:On Fire!] debuff for 2 seconds on hit"); + } + + public override void SetDefaults() + { + Item.damage = 17; + Item.noMelee = true; + Item.channel = true; + Item.mana = 7; + Item.expert = true; + Item.width = 28; + Item.height = 30; + Item.useTime = 20; + Item.UseSound = SoundID.Item13; + Item.useStyle = ItemUseStyleID.Shoot; + Item.shootSpeed = 14f; + Item.useAnimation = 20; + Item.shoot = ModContent.ProjectileType(); + Item.value = Item.sellPrice(0, 12, 50, 0); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HellstoneBar, 16); + val.AddTile(TileID.Hellforge); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Coalescence/HellfireBeam.png b/Items/Weapons/Magic/Coalescence/HellfireBeam.png new file mode 100644 index 0000000..97f0e92 Binary files /dev/null and b/Items/Weapons/Magic/Coalescence/HellfireBeam.png differ diff --git a/Items/Weapons/Magic/FusionNeedlers/FusedWish.cs b/Items/Weapons/Magic/FusionNeedlers/FusedWish.cs new file mode 100644 index 0000000..51185b1 --- /dev/null +++ b/Items/Weapons/Magic/FusionNeedlers/FusedWish.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.FusionNeedlers; + +public class FusedWish : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fused Wish"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots homing rainbow needles\n[c/FF0000:Watch your mana!]"); + } + + public override void SetDefaults() + { + Item.damage = 160; + Item.mana = 3; + Item.width = 80; + Item.height = 54; + Item.useTime = 3; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 2f; + Item.value = Item.sellPrice(2, 60, 0, 0); + Item.UseSound = SoundID.Item39; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 16f; + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, 2f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 12); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/FusionNeedlers/FusedWish.png b/Items/Weapons/Magic/FusionNeedlers/FusedWish.png new file mode 100644 index 0000000..645bb85 Binary files /dev/null and b/Items/Weapons/Magic/FusionNeedlers/FusedWish.png differ diff --git a/Items/Weapons/Magic/FusionNeedlers/FusedXmas.cs b/Items/Weapons/Magic/FusionNeedlers/FusedXmas.cs new file mode 100644 index 0000000..e4539fa --- /dev/null +++ b/Items/Weapons/Magic/FusionNeedlers/FusedXmas.cs @@ -0,0 +1,49 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.FusionNeedlers; + +public class FusedXmas : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fused Xmas"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]\n[c/FF0000:Watch your mana!]"); + } + + public override void SetDefaults() + { + Item.damage = 140; + Item.mana = 3; + Item.width = 80; + Item.height = 52; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 8, 40, 0); + Item.rare = ItemRarityID.Red; + Item.UseSound = SoundID.Item39; + Item.autoReuse = true; + Item.shoot = ProjectileID.PineNeedleFriendly; + Item.shootSpeed = 18f; + } + + public override Vector2? HoldoutOffset() + { + //IL_000a: Unknown result type (might be due to invalid IL or missing references) + return new Vector2(-2f, 2f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.FragmentVortex, 12); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/FusionNeedlers/FusedXmas.png b/Items/Weapons/Magic/FusionNeedlers/FusedXmas.png new file mode 100644 index 0000000..bb1ab5c Binary files /dev/null and b/Items/Weapons/Magic/FusionNeedlers/FusedXmas.png differ diff --git a/Items/Weapons/Magic/FusionNeedlers/FusionNeedler.cs b/Items/Weapons/Magic/FusionNeedlers/FusionNeedler.cs new file mode 100644 index 0000000..dbd74a6 --- /dev/null +++ b/Items/Weapons/Magic/FusionNeedlers/FusionNeedler.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.FusionNeedlers; + +public class FusionNeedler : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fusion Needler"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]\n[c/FF0000:Watch your mana!]"); + } + + public override void SetDefaults() + { + Item.damage = 120; + Item.mana = 3; + Item.width = 76; + Item.height = 44; + Item.useTime = 6; + Item.useAnimation = 6; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 6, 0, 0); + Item.rare = ItemRarityID.Yellow; + Item.UseSound = SoundID.Item39; + Item.autoReuse = true; + Item.shoot = ProjectileID.PineNeedleFriendly; + Item.shootSpeed = 26f; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, 2f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.Razorpine); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/FusionNeedlers/FusionNeedler.png b/Items/Weapons/Magic/FusionNeedlers/FusionNeedler.png new file mode 100644 index 0000000..1ac21cc Binary files /dev/null and b/Items/Weapons/Magic/FusionNeedlers/FusionNeedler.png differ diff --git a/Items/Weapons/Magic/IllusoryMirror.cs b/Items/Weapons/Magic/IllusoryMirror.cs new file mode 100644 index 0000000..b5ade3b --- /dev/null +++ b/Items/Weapons/Magic/IllusoryMirror.cs @@ -0,0 +1,93 @@ +using FabusMod.Projectiles.IllusoryMirror; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic; + +public class IllusoryMirror : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Illusory Mirror"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nShoots 5 instant beams in quick succession\nUsing uses 50 Mana to summon a [c/E6A6CF:Blossom] at the player's position for 20 seconds:\n - Being around the [c/E6A6CF:Blossom] buffs HP regeneration, increases attack speed, and increases magic damage by 15%\n - [c/E6A6CF:Blossom] has a cooldown of [c/CA4646:50 seconds] once it disappears\nBest used on 'High' video quality!"); + } + + public override void SetDefaults() + { + Item.CloneDefaults(ItemID.ShadowbeamStaff); + Item.damage = 175; + Item.noMelee = true; + Item.mana = 7; + Item.width = 29; + Item.height = 21; + Item.useTime = 5; + Item.useAnimation = 25; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.value = Item.sellPrice(0, 11, 60, 0); + Item.autoReuse = true; + Item.shootSpeed = 7f; + Item.expert = true; + Item.reuseDelay = 20; + Item.UseSound = SoundID.Item72; + Item.shoot = ModContent.ProjectileType(); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(4f, 0f); + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + Item.useTime = 25; + Item.useAnimation = 25; + Item.shootSpeed = 0f; + Item.mana = 50; + player.AddBuff(ModContent.BuffType(), 1200, true); + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item76; + } + } + else if (player.HasBuff(ModContent.BuffType())) + { + Item.useTime = 4; + Item.useAnimation = 20; + Item.shootSpeed = 7f; + Item.mana = 7; + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item72; + } + else + { + Item.useAnimation = 25; + Item.useTime = 5; + Item.shootSpeed = 7f; + Item.mana = 7; + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item72; + } + return this.CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.LifeFruit, 5); + val.AddIngredient(ItemID.LifeCrystal, 5); + val.AddIngredient(ItemID.FragmentNebula, 14); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/IllusoryMirror.png b/Items/Weapons/Magic/IllusoryMirror.png new file mode 100644 index 0000000..a0b13e3 Binary files /dev/null and b/Items/Weapons/Magic/IllusoryMirror.png differ diff --git a/Items/Weapons/Magic/SpectralIllusion.cs b/Items/Weapons/Magic/SpectralIllusion.cs new file mode 100644 index 0000000..9c1673b --- /dev/null +++ b/Items/Weapons/Magic/SpectralIllusion.cs @@ -0,0 +1,95 @@ +using FabusMod.Projectiles.IllusoryMirror; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic; + +public class SpectralIllusion : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Illusion"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nShoots 6 instant beams in quick succession\nUsing uses 50 Mana to summon a [c/82E8E8:Spectral Blossom] at the player's position for 20 seconds:\n - Being around the [c/82E8E8:Spectral Blossom] buffs HP regeneration, increases attack speed, and increases magic damage by 18%\n - Being around the [c/82E8E8:Spectral Blossom] also increases invincibility time after being hit, and has a cooldown of [c/BF5E3B:50 seconds] once it disappears\nBest used on 'High' video quality!"); + } + + public override void SetDefaults() + { + Item.CloneDefaults(ItemID.ShadowbeamStaff); + Item.damage = 325; + Item.noMelee = true; + Item.mana = 6; + Item.width = 33; + Item.height = 25; + Item.useTime = 4; + Item.useAnimation = 24; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.value = Item.sellPrice(2, 50, 0, 0); + Item.autoReuse = true; + Item.shootSpeed = 7f; + Item.expert = true; + Item.reuseDelay = 20; + Item.UseSound = SoundID.Item72; + Item.shoot = ModContent.ProjectileType(); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(4f, 0f); + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + Item.useTime = 25; + Item.useAnimation = 25; + Item.shootSpeed = 0f; + Item.mana = 50; + player.AddBuff(ModContent.BuffType(), 1200, true); + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item76; + Item.reuseDelay = 20; + } + } + else if (player.HasBuff(ModContent.BuffType())) + { + Item.useTime = 3; + Item.useAnimation = 16; + Item.shootSpeed = 7f; + Item.mana = 6; + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item72; + Item.reuseDelay = 18; + } + else + { + Item.useAnimation = 24; + Item.useTime = 4; + Item.shootSpeed = 7f; + Item.mana = 6; + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item72; + Item.reuseDelay = 20; + } + return this.CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 14); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/SpectralIllusion.png b/Items/Weapons/Magic/SpectralIllusion.png new file mode 100644 index 0000000..ef4dca5 Binary files /dev/null and b/Items/Weapons/Magic/SpectralIllusion.png differ diff --git a/Items/Weapons/Magic/Staffs/GoldenStaff.cs b/Items/Weapons/Magic/Staffs/GoldenStaff.cs new file mode 100644 index 0000000..d1035a0 --- /dev/null +++ b/Items/Weapons/Magic/Staffs/GoldenStaff.cs @@ -0,0 +1,59 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Staffs; + +public class GoldenStaff : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Staff"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots four oval-shaped magic projectiles twice in quick succession \nHas a high critical hit chance"); + Item.staff[Item.type] = true; + } + + public override void SetDefaults() + { + Item.damage = 46; + Item.noMelee = true; + Item.mana = 6; + Item.crit = 52; + Item.width = 58; + Item.height = 58; + Item.useTime = 8; + Item.useAnimation = 16; + Item.reuseDelay = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 5f; + Item.value = Item.sellPrice(0, 25, 30, 0); + Item.expert = true; + Item.UseSound = SoundID.Item20; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 40f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 4; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f)); + Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Staffs/GoldenStaff.png b/Items/Weapons/Magic/Staffs/GoldenStaff.png new file mode 100644 index 0000000..ed3614e Binary files /dev/null and b/Items/Weapons/Magic/Staffs/GoldenStaff.png differ diff --git a/Items/Weapons/Magic/Staffs/NatureStaff.cs b/Items/Weapons/Magic/Staffs/NatureStaff.cs new file mode 100644 index 0000000..8aaab8b --- /dev/null +++ b/Items/Weapons/Magic/Staffs/NatureStaff.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Staffs; + +public class NatureStaff : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Nature Staff"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots three oval-shaped magic projectiles twice in quick succession \nHas a 25% chance of inflicting the [c/0E3517:Poisoned] debuff for 3 seconds \nHas a high critical hit chance"); + Item.staff[Item.type] = true; + } + + public override void SetDefaults() + { + Item.damage = 36; + Item.noMelee = true; + Item.mana = 6; + Item.crit = 42; + Item.width = 58; + Item.height = 58; + Item.useTime = 9; + Item.useAnimation = 18; + Item.reuseDelay = 16; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 5f; + Item.value = Item.sellPrice(0, 8, 80, 0); + Item.expert = true; + Item.UseSound = SoundID.Item20; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 40f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 3; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:SorcerousHellstaff"); + val.AddIngredient(ItemID.HallowedBar, 6); + val.AddIngredient(ModContent.ItemType()); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Staffs/NatureStaff.png b/Items/Weapons/Magic/Staffs/NatureStaff.png new file mode 100644 index 0000000..734d91c Binary files /dev/null and b/Items/Weapons/Magic/Staffs/NatureStaff.png differ diff --git a/Items/Weapons/Magic/Staffs/PiercingStaff.cs b/Items/Weapons/Magic/Staffs/PiercingStaff.cs new file mode 100644 index 0000000..574ce02 --- /dev/null +++ b/Items/Weapons/Magic/Staffs/PiercingStaff.cs @@ -0,0 +1,44 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Staffs; + +public class PiercingStaff : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Piercing Staff"); + Tooltip.SetDefault("Fires gravity-affected, piercing iron stingers"); + Item.staff[Item.type] = true; + } + + public override void SetDefaults() + { + Item.damage = 16; + Item.noMelee = true; + Item.mana = 3; + Item.width = 40; + Item.height = 40; + Item.useTime = 25; + Item.useAnimation = 25; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 0, 16, 0); + Item.rare = ItemRarityID.White; + Item.UseSound = SoundID.Item20; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.WandofSparking, 1); + val.AddRecipeGroup("IronBar", 3); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Staffs/PiercingStaff.png b/Items/Weapons/Magic/Staffs/PiercingStaff.png new file mode 100644 index 0000000..04cae54 Binary files /dev/null and b/Items/Weapons/Magic/Staffs/PiercingStaff.png differ diff --git a/Items/Weapons/Magic/Staffs/SorcerousHellstaff.cs b/Items/Weapons/Magic/Staffs/SorcerousHellstaff.cs new file mode 100644 index 0000000..3d0f113 --- /dev/null +++ b/Items/Weapons/Magic/Staffs/SorcerousHellstaff.cs @@ -0,0 +1,54 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Staffs; + +public class SorcerousHellstaff : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sorcerer's Hellstaff"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \nShoots two oval-shaped magic projectiles in quick succession \nHas a 16% chance of inflicting the [c/DA0205:On Fire!] debuff for 3 seconds \nHas a high critical hit chance"); + Item.staff[Item.type] = true; + } + + public override void SetDefaults() + { + Item.damage = 26; + Item.noMelee = true; + Item.mana = 6; + Item.crit = 32; + Item.width = 54; + Item.height = 54; + Item.useTime = 12; + Item.useAnimation = 24; + Item.reuseDelay = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 5f; + Item.value = Item.sellPrice(0, 4, 40, 0); + Item.rare = ItemRarityID.Orange; + Item.UseSound = SoundID.Item20; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 26f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HellstoneBar, 6); + val.AddIngredient(ItemID.Obsidian, 4); + val.AddTile(TileID.Anvils); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.BlueDye); + val2.AddIngredient(ItemID.RedDye); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Magic/Staffs/SorcerousHellstaff.png b/Items/Weapons/Magic/Staffs/SorcerousHellstaff.png new file mode 100644 index 0000000..f3bba0b Binary files /dev/null and b/Items/Weapons/Magic/Staffs/SorcerousHellstaff.png differ diff --git a/Items/Weapons/Magic/Staffs/SorcerousHellstaffWhite.cs b/Items/Weapons/Magic/Staffs/SorcerousHellstaffWhite.cs new file mode 100644 index 0000000..2f5946f --- /dev/null +++ b/Items/Weapons/Magic/Staffs/SorcerousHellstaffWhite.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Staffs; + +public class SorcerousHellstaffWhite : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sorcerer's Hellstaff - White"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots two oval-shaped magic projectiles in quick succession \nHas a 16% chance of inflicting the [c/DA0205:On Fire!] debuff for 3 seconds \nHas a high critical hit chance"); + Item.staff[Item.type] = true; + } + + public override void SetDefaults() + { + Item.damage = 26; + Item.noMelee = true; + Item.mana = 6; + Item.crit = 32; + Item.width = 54; + Item.height = 54; + Item.useTime = 12; + Item.useAnimation = 24; + Item.reuseDelay = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 5f; + Item.value = Item.sellPrice(0, 4, 40, 0); + Item.rare = ItemRarityID.Orange; + Item.UseSound = SoundID.Item20; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 26f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.PinkandSilverDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Staffs/SorcerousHellstaffWhite.png b/Items/Weapons/Magic/Staffs/SorcerousHellstaffWhite.png new file mode 100644 index 0000000..cd3212a Binary files /dev/null and b/Items/Weapons/Magic/Staffs/SorcerousHellstaffWhite.png differ diff --git a/Items/Weapons/Magic/Staffs/SorcerousStaff.cs b/Items/Weapons/Magic/Staffs/SorcerousStaff.cs new file mode 100644 index 0000000..11de168 --- /dev/null +++ b/Items/Weapons/Magic/Staffs/SorcerousStaff.cs @@ -0,0 +1,47 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Staffs; + +public class SorcerousStaff : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sorcerer's Staff"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots two oval-shaped magic projectiles in quick succession \nHas a high critical hit chance"); + Item.staff[Item.type] = true; + } + + public override void SetDefaults() + { + Item.damage = 13; + Item.noMelee = true; + Item.mana = 6; + Item.crit = 26; + Item.width = 54; + Item.height = 54; + Item.useTime = 13; + Item.useAnimation = 26; + Item.reuseDelay = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 5f; + Item.value = Item.sellPrice(0, 3, 0, 0); + Item.rare = ItemRarityID.Green; + Item.UseSound = SoundID.Item20; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 26f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:GoldBar", 8); + val.AddIngredient(ItemID.Sapphire, 6); + val.AddIngredient(ItemID.Emerald, 4); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Staffs/SorcerousStaff.png b/Items/Weapons/Magic/Staffs/SorcerousStaff.png new file mode 100644 index 0000000..97ece83 Binary files /dev/null and b/Items/Weapons/Magic/Staffs/SorcerousStaff.png differ diff --git a/Items/Weapons/Magic/Staffs/TheWhisperingIceDonator.cs b/Items/Weapons/Magic/Staffs/TheWhisperingIceDonator.cs new file mode 100644 index 0000000..a01447f --- /dev/null +++ b/Items/Weapons/Magic/Staffs/TheWhisperingIceDonator.cs @@ -0,0 +1,57 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Staffs; + +public class TheWhisperingIceDonator : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Whispering Ice"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots three icicles that inflict Frostburn for 3 seconds \n'Guard your darkest thoughts well, for they are the cracks through which the Nightmare crawls.' \n~~ Donator Item ~~"); + Item.staff[Item.type] = true; + } + + public override void SetDefaults() + { + Item.damage = 70; + Item.noMelee = true; + Item.mana = 8; + Item.width = 54; + Item.height = 56; + Item.useTime = 13; + Item.useAnimation = 13; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 5f; + Item.value = Item.sellPrice(0, 6, 50, 0); + Item.rare = ItemRarityID.Pink; + Item.UseSound = SoundID.Item28; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 16f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 3; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.FrostCore, 2); + val.AddRecipeGroup("FabusMod:AdamantiteBar", 6); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Staffs/TheWhisperingIceDonator.png b/Items/Weapons/Magic/Staffs/TheWhisperingIceDonator.png new file mode 100644 index 0000000..6daeaab Binary files /dev/null and b/Items/Weapons/Magic/Staffs/TheWhisperingIceDonator.png differ diff --git a/Items/Weapons/Magic/Staffs/Tranquility.cs b/Items/Weapons/Magic/Staffs/Tranquility.cs new file mode 100644 index 0000000..15296f7 --- /dev/null +++ b/Items/Weapons/Magic/Staffs/Tranquility.cs @@ -0,0 +1,59 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Magic.Staffs; + +public class Tranquility : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Tranquility"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots six oval-shaped rainbow projectiles three times in quick succession \nHas a high critical hit chance"); + Item.staff[Item.type] = true; + } + + public override void SetDefaults() + { + Item.damage = 58; + Item.noMelee = true; + Item.mana = 7; + Item.crit = 52; + Item.width = 62; + Item.height = 62; + Item.useTime = 4; + Item.useAnimation = 12; + Item.reuseDelay = 8; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 5f; + Item.value = Item.sellPrice(1, 50, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item20; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 40f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 6; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Magic/Staffs/Tranquility.png b/Items/Weapons/Magic/Staffs/Tranquility.png new file mode 100644 index 0000000..eff6efe Binary files /dev/null and b/Items/Weapons/Magic/Staffs/Tranquility.png differ diff --git a/Items/Weapons/Melee/Shortswords/CarbonDagger.cs b/Items/Weapons/Melee/Shortswords/CarbonDagger.cs new file mode 100644 index 0000000..8f3aed2 --- /dev/null +++ b/Items/Weapons/Melee/Shortswords/CarbonDagger.cs @@ -0,0 +1,81 @@ +using FabusMod.Projectiles.Shortsword; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Shortswords; + +public class CarbonDagger : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Carbon Dagger"); + Tooltip.SetDefault("[c/B6FF00:Autoswings, dyeable]\nThrows a medium-ranged Carbon Knife that deals more damage the closer you are to the target \nShortsword hits inflict [c/007700:Poison] debuff for 8 seconds\n[c/FF0000:Shortsword hits steal a small amount of life] \nShortsword hits grant the [c/FC3A3A:Rage] buff for 8 seconds"); + } + + public override void SetDefaults() + { + Item.damage = 62; + Item.width = 30; + Item.height = 30; + Item.useTime = 11; + Item.useAnimation = 11; + Item.useStyle = ItemUseStyleID.Thrust; + Item.knockBack = 6f; + Item.value = Item.sellPrice(0, 5, 22, 0); + Item.rare = ItemRarityID.LightRed; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + int healingAmount = damage / 18; + player.statLife += healingAmount; + player.HealEffect(healingAmount, true); + target.AddBuff(20, 480, false); + player.AddBuff(115, 480, true); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 45f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:OrichalcumBar", 6); + val.AddIngredient(ItemID.Sapphire, 2); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.BlueDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Melee/Shortswords/CarbonDagger.png b/Items/Weapons/Melee/Shortswords/CarbonDagger.png new file mode 100644 index 0000000..d4e6f23 Binary files /dev/null and b/Items/Weapons/Melee/Shortswords/CarbonDagger.png differ diff --git a/Items/Weapons/Melee/Shortswords/CarbonDaggerNihon.cs b/Items/Weapons/Melee/Shortswords/CarbonDaggerNihon.cs new file mode 100644 index 0000000..6e02b1a --- /dev/null +++ b/Items/Weapons/Melee/Shortswords/CarbonDaggerNihon.cs @@ -0,0 +1,73 @@ +using FabusMod.Projectiles.Shortsword; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Shortswords; + +public class CarbonDaggerNihon : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Carbon Dagger - Nihon"); + Tooltip.SetDefault("[c/B6FF00:Autoswings]\nThrows a medium-ranged Carbon Knife that deals more damage the closer you are to the target \nShortsword hits inflict [c/007700:Poison] debuff for 8 seconds\n[c/FF0000:Shortsword hits steal a small amount of life] \nShortsword hits grant the [c/FC3A3A:Rage] buff for 8 seconds"); + } + + public override void SetDefaults() + { + Item.damage = 62; + Item.width = 30; + Item.height = 30; + Item.useTime = 11; + Item.useAnimation = 11; + Item.useStyle = ItemUseStyleID.Thrust; + Item.knockBack = 6f; + Item.value = Item.sellPrice(0, 5, 22, 0); + Item.rare = ItemRarityID.LightRed; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + int healingAmount = damage / 16; + player.statLife += healingAmount; + player.HealEffect(healingAmount, true); + target.AddBuff(20, 480, false); + player.AddBuff(115, 480, true); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 45f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe recipe = Recipe.Create(Type); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.BlueDye, 1); + recipe.AddTile(TileID.DyeVat); + recipe.Register(); + } +} diff --git a/Items/Weapons/Melee/Shortswords/CarbonDaggerNihon.png b/Items/Weapons/Melee/Shortswords/CarbonDaggerNihon.png new file mode 100644 index 0000000..631cb18 Binary files /dev/null and b/Items/Weapons/Melee/Shortswords/CarbonDaggerNihon.png differ diff --git a/Items/Weapons/Melee/Shortswords/GoldenDagger.cs b/Items/Weapons/Melee/Shortswords/GoldenDagger.cs new file mode 100644 index 0000000..ee8914c --- /dev/null +++ b/Items/Weapons/Melee/Shortswords/GoldenDagger.cs @@ -0,0 +1,84 @@ +using FabusMod.Projectiles.Shortsword; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Shortswords; + +public class GoldenDagger : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Dagger"); + Tooltip.SetDefault("[c/B6FF00:Autoswings]\nThrows two short-ranged golden knives in any direction, as well as one very fast dagger \nShortsword hits steal a small amount of life, and inflict the [c/007700:Poison] debuff for 10 seconds \nGolden knives do not steal life \nGrants the [c/FC3A3A:Rage] buff for 8 seconds upon hitting an enemy with the Shortsword \nGrants the [c/FC8719:Inferno] buff for 6 seconds upon hitting an enemy with the Shortsword"); + } + + public override void SetDefaults() + { + Item.damage = 95; + Item.width = 40; + Item.height = 40; + Item.useTime = 12; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Thrust; + Item.knockBack = 6f; + Item.value = Item.sellPrice(0, 54, 96, 0); + Item.rare = ItemRarityID.Yellow; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 50f; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + float numberProjectiles = 2f; + float rotation = MathHelper.ToRadians(4f); + position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 6f; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f; + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 55f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + } + return true; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + int healingAmount = damage / 17; + player.statLife += healingAmount; + player.HealEffect(healingAmount, true); + target.AddBuff(20, 600, false); + player.AddBuff(115, 480, true); + player.AddBuff(116, 360, true); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Shortswords/GoldenDagger.png b/Items/Weapons/Melee/Shortswords/GoldenDagger.png new file mode 100644 index 0000000..8803b9a Binary files /dev/null and b/Items/Weapons/Melee/Shortswords/GoldenDagger.png differ diff --git a/Items/Weapons/Melee/Shortswords/OniDagger.cs b/Items/Weapons/Melee/Shortswords/OniDagger.cs new file mode 100644 index 0000000..5c0b83d --- /dev/null +++ b/Items/Weapons/Melee/Shortswords/OniDagger.cs @@ -0,0 +1,76 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Shortswords; + +public class OniDagger : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Demon's Dagger"); + Tooltip.SetDefault("[c/B6FF00:Autoswings]\nThrows a vampire knife that deals more damage the closer you are to the target \nInflicts the [c/007700:Poison] debuff for 10 seconds on hit \n[c/FF0000:Steals a small amount of life] \nGrants the [c/FC3A3A:Rage] buff for 8 seconds upon hitting an enemy \nGrants the [c/FC8719:Inferno] buff for 6 seconds upon hitting an enemy"); + } + + public override void SetDefaults() + { + Item.damage = 92; + Item.width = 40; + Item.height = 40; + Item.useTime = 11; + Item.useAnimation = 11; + Item.useStyle = ItemUseStyleID.Thrust; + Item.knockBack = 6f; + Item.value = Item.sellPrice(0, 18, 54, 0); + Item.rare = ItemRarityID.Pink; + Item.shoot = ProjectileID.VampireKnife; + Item.shootSpeed = 16f; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + int healingAmount = damage / 18; + player.statLife += healingAmount; + player.HealEffect(healingAmount, true); + target.AddBuff(20, 600, false); + player.AddBuff(115, 480, true); + player.AddBuff(116, 360, true); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 55f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:CarbonDagger", 1); + val.AddRecipeGroup("FabusMod:AdamantiteBar", 6); + val.AddIngredient(ItemID.SoulofNight, 4); + val.AddIngredient(ModContent.ItemType(), 2); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Shortswords/OniDagger.png b/Items/Weapons/Melee/Shortswords/OniDagger.png new file mode 100644 index 0000000..1e25a68 Binary files /dev/null and b/Items/Weapons/Melee/Shortswords/OniDagger.png differ diff --git a/Items/Weapons/Melee/Shortswords/StonePlatedShortsword.cs b/Items/Weapons/Melee/Shortswords/StonePlatedShortsword.cs new file mode 100644 index 0000000..1236aa0 --- /dev/null +++ b/Items/Weapons/Melee/Shortswords/StonePlatedShortsword.cs @@ -0,0 +1,37 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Shortswords; + +public class StonePlatedShortsword : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Stone-Plated Shortsword"); + } + + public override void SetDefaults() + { + Item.damage = 9; + Item.width = 30; + Item.height = 30; + Item.useTime = 13; + Item.useAnimation = 13; + Item.useStyle = ItemUseStyleID.Thrust; + Item.knockBack = 5f; + Item.value = Item.sellPrice(0, 0, 0, 40); + Item.rare = ItemRarityID.White; + Item.UseSound = SoundID.Item1; + Item.autoReuse = false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.StoneBlock, 6); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Shortswords/StonePlatedShortsword.png b/Items/Weapons/Melee/Shortswords/StonePlatedShortsword.png new file mode 100644 index 0000000..90de6af Binary files /dev/null and b/Items/Weapons/Melee/Shortswords/StonePlatedShortsword.png differ diff --git a/Items/Weapons/Melee/Shortswords/TheRainbowsCurse.cs b/Items/Weapons/Melee/Shortswords/TheRainbowsCurse.cs new file mode 100644 index 0000000..1433889 --- /dev/null +++ b/Items/Weapons/Melee/Shortswords/TheRainbowsCurse.cs @@ -0,0 +1,92 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Shortswords; + +public class TheRainbowsCurse : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Rainbow's Curse"); + Tooltip.SetDefault("[c/B6FF00:Autoswings]\nThrows three medium-ranged rainbow knives in any direction, as well as one very fast dagger \nShortsword hits steal a small amount of life, and inflict the [c/007700:Poison] debuff for 12 seconds\nRainbow knives do not steal life \nGrants the [c/FC3A3A:Rage] buff for 10 seconds, and the [c/FC8719:Inferno] buff for 8 seconds upon hitting an enemy with the Shortsword"); + } + + public override void SetDefaults() + { + Item.damage = 154; + Item.width = 48; + Item.height = 48; + Item.useTime = 8; + Item.useAnimation = 8; + Item.useStyle = ItemUseStyleID.Thrust; + Item.knockBack = 6f; + Item.value = Item.sellPrice(2, 20, 0, 0); + Item.expert = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 65f; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + int num2 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + int num3 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + Main.dust[num2].scale = 1f; + Main.dust[num2].velocity.Y = 0f; + Main.dust[num2].velocity.X = 0.5f; + Main.dust[num2].noGravity = true; + Main.dust[num3].scale = 1f; + Main.dust[num3].velocity.Y = 0f; + Main.dust[num3].velocity.X = 0.5f; + Main.dust[num3].noGravity = true; + } + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + float numberProjectiles = 3f; + float rotation = MathHelper.ToRadians(6f); + position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 6f; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f; + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 60f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + } + return true; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + int healingAmount = damage / 16; + player.statLife += healingAmount; + player.HealEffect(healingAmount, true); + target.AddBuff(20, 720, false); + player.AddBuff(115, 600, true); + player.AddBuff(116, 480, true); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Shortswords/TheRainbowsCurse.png b/Items/Weapons/Melee/Shortswords/TheRainbowsCurse.png new file mode 100644 index 0000000..e41138e Binary files /dev/null and b/Items/Weapons/Melee/Shortswords/TheRainbowsCurse.png differ diff --git a/Items/Weapons/Melee/Shortswords/Wakizashi.cs b/Items/Weapons/Melee/Shortswords/Wakizashi.cs new file mode 100644 index 0000000..01006b0 --- /dev/null +++ b/Items/Weapons/Melee/Shortswords/Wakizashi.cs @@ -0,0 +1,57 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Shortswords; + +public class Wakizashi : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Wakizashi"); + Tooltip.SetDefault("Inflicts [c/007700:Poison] debuff for 5 seconds on hit"); + } + + public override void SetDefaults() + { + Item.damage = 15; + Item.width = 30; + Item.height = 30; + Item.useTime = 13; + Item.useAnimation = 13; + Item.useStyle = ItemUseStyleID.Thrust; + Item.knockBack = 5f; + Item.value = Item.sellPrice(0, 0, 50, 0); + Item.rare = ItemRarityID.Blue; + Item.UseSound = SoundID.Item1; + Item.autoReuse = false; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(20, 300, false); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("IronBar", 6); + val.AddIngredient(ItemID.Emerald, 2); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Shortswords/Wakizashi.png b/Items/Weapons/Melee/Shortswords/Wakizashi.png new file mode 100644 index 0000000..1607432 Binary files /dev/null and b/Items/Weapons/Melee/Shortswords/Wakizashi.png differ diff --git a/Items/Weapons/Melee/Swords/GoldenSlasher.cs b/Items/Weapons/Melee/Swords/GoldenSlasher.cs new file mode 100644 index 0000000..52dfebb --- /dev/null +++ b/Items/Weapons/Melee/Swords/GoldenSlasher.cs @@ -0,0 +1,63 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords; + +public class GoldenSlasher : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Slasher"); + Tooltip.SetDefault("[c/B6FF00:Autoswings] \nShoots two homing golden orbs in a medium-sized spread on swing"); + } + + public override void SetDefaults() + { + Item.damage = 110; + Item.width = 64; + Item.height = 72; + Item.useTime = 15; + Item.useAnimation = 15; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 3f; + Item.value = Item.sellPrice(0, 40, 0, 0); + Item.rare = ItemRarityID.Yellow; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 15f; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(4)) + { + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + } + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType(), 14); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + float numberProjectiles = 2f; + float rotation = MathHelper.ToRadians(25f); + position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 45f; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f; + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } +} diff --git a/Items/Weapons/Melee/Swords/GoldenSlasher.png b/Items/Weapons/Melee/Swords/GoldenSlasher.png new file mode 100644 index 0000000..2062aa1 Binary files /dev/null and b/Items/Weapons/Melee/Swords/GoldenSlasher.png differ diff --git a/Items/Weapons/Melee/Swords/RainbowClaymore.cs b/Items/Weapons/Melee/Swords/RainbowClaymore.cs new file mode 100644 index 0000000..1c93d27 --- /dev/null +++ b/Items/Weapons/Melee/Swords/RainbowClaymore.cs @@ -0,0 +1,65 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords; + +public class RainbowClaymore : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Spectrum"); + Tooltip.SetDefault("[c/B6FF00:Autoswings] \nShoots three homing rainbow orbs in a large spread on swing"); + } + + public override void SetDefaults() + { + Item.damage = 185; + Item.width = 60; + Item.height = 68; + Item.useTime = 12; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 3f; + Item.value = Item.sellPrice(3, 20, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 20f; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + } + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 14); + val.AddTile(ModContent.TileType()); + val.Register(); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + float numberProjectiles = 3f; + float rotation = MathHelper.ToRadians(45f); + position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 45f; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f; + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + } + return false; + } +} diff --git a/Items/Weapons/Melee/Swords/RainbowClaymore.png b/Items/Weapons/Melee/Swords/RainbowClaymore.png new file mode 100644 index 0000000..5a5fa65 Binary files /dev/null and b/Items/Weapons/Melee/Swords/RainbowClaymore.png differ diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSword.cs b/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSword.cs new file mode 100644 index 0000000..16a551a --- /dev/null +++ b/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSword.cs @@ -0,0 +1,78 @@ +using FabusMod.Projectiles.Shimada; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords; + +public class CarbonSword : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Carbon Sword"); + Tooltip.SetDefault("[c/B6FF00:Autoswings, dyeable]\nFires a stream of particles that deals damage three times\nInflicts [c/7B2D2F:Advanced Blood Loss] for 10 seconds when hit with the blade, dealing damage over time"); + } + + public override void SetDefaults() + { + Item.damage = 74; + Item.crit = 8; + Item.width = 54; + Item.height = 68; + Item.useTime = 22; + Item.useAnimation = 22; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 6, 0, 0); + Item.rare = ItemRarityID.LightRed; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 3; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(0f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + } + return false; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 600, false); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:OrichalcumBar", 10); + val.AddTile(TileID.DemonAltar); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.BlueDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSword.png b/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSword.png new file mode 100644 index 0000000..c4f310d Binary files /dev/null and b/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSword.png differ diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSwordNihon.cs b/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSwordNihon.cs new file mode 100644 index 0000000..7f4b164 --- /dev/null +++ b/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSwordNihon.cs @@ -0,0 +1,72 @@ +using FabusMod.Projectiles.Shimada; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords; + +public class CarbonSwordNihon : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Carbon Sword - Nihon"); + Tooltip.SetDefault("[c/B6FF00:Autoswings, dyeable]\nFires a stream of particles that deals damage three times\nInflicts [c/7B2D2F:Advanced Blood Loss] for 10 seconds when hit with the blade, dealing damage over time"); + } + + public override void SetDefaults() + { + Item.damage = 74; + Item.crit = 8; + Item.width = 54; + Item.height = 68; + Item.useTime = 22; + Item.useAnimation = 22; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 6, 0, 0); + Item.rare = ItemRarityID.LightRed; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 3; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(0f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + } + return false; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 600, false); + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.SilverDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSwordNihon.png b/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSwordNihon.png new file mode 100644 index 0000000..28b9a35 Binary files /dev/null and b/Items/Weapons/Melee/Swords/ShimadaSwords/CarbonSwordNihon.png differ diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/DemonsFury.cs b/Items/Weapons/Melee/Swords/ShimadaSwords/DemonsFury.cs new file mode 100644 index 0000000..c7c82ee --- /dev/null +++ b/Items/Weapons/Melee/Swords/ShimadaSwords/DemonsFury.cs @@ -0,0 +1,99 @@ +using FabusMod.Projectiles.Shimada; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords; + +public class DemonsFury : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Demon's Fury"); + Tooltip.SetDefault("[c/B6FF00:Autoswings]\nFires a beam of particles that ignores immunity frames, pierces 5 times, and regenerates 1 Mana with every hit\nInflicts [c/7B2D2F:Advanced Blood Loss] for 14 seconds when hit with the blade, dealing damage over time\n uses 40 Mana to bring up spikes from the ground, dealing damage with a 2% chance of granting a [c/EC566E:Souleater] stack\nHas an 8% chance to fire soul-absorbing shards, granting a stack of [c/EC566E:Souleater] when hit\nHaving 6 stacks of [c/EC566E:Souleater] restores 75 HP and Mana"); + } + + public override void SetDefaults() + { + Item.damage = 80; + Item.crit = 8; + Item.width = 63; + Item.height = 76; + Item.useTime = 22; + Item.useAnimation = 22; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 23, 25, 0); + Item.rare = ItemRarityID.Pink; + Item.mana = 0; + Item.shootSpeed = 10f; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 840, false); + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2 && player.velocity.Y == 0f && player.statMana >= 40) + { + Item.damage = 50; + Item.useTime = 60; + Item.useAnimation = 60; + Item.shootSpeed = 0f; + Item.mana = 40; + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item88; + } + else + { + Item.damage = 80; + Item.useAnimation = 22; + Item.useTime = 22; + Item.shootSpeed = 10f; + Item.mana = 0; + if (Utils.NextFloat(Main.rand) < 0.08f) + { + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.shoot = ModContent.ProjectileType(); + } + Item.UseSound = SoundID.Item1; + } + return CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:CarbonSword", 1); + val.AddRecipeGroup("FabusMod:AdamantiteBar", 10); + val.AddIngredient(ItemID.SoulofNight, 8); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddTile(TileID.DemonAltar); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/DemonsFury.png b/Items/Weapons/Melee/Swords/ShimadaSwords/DemonsFury.png new file mode 100644 index 0000000..343fc8e Binary files /dev/null and b/Items/Weapons/Melee/Swords/ShimadaSwords/DemonsFury.png differ diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/GoldenFury.cs b/Items/Weapons/Melee/Swords/ShimadaSwords/GoldenFury.cs new file mode 100644 index 0000000..36547f3 --- /dev/null +++ b/Items/Weapons/Melee/Swords/ShimadaSwords/GoldenFury.cs @@ -0,0 +1,98 @@ +using FabusMod.Projectiles.Shimada; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords; + +public class GoldenFury : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Fury"); + Tooltip.SetDefault("[c/B6FF00:Autoswings]\nFires a beam of particles that ignores immunity frames, pierces 6 times, and regenerates 1 Mana with every hit\nInflicts [c/7B2D2F:Advanced Blood Loss] for 14 seconds when hit with the blade, dealing damage over time\n uses 40 Mana to bring up [c/C4AB37:Midas]-inducing spikes from the ground, dealing damage with a 2% chance of granting an [c/D2D25A:Enrichment] stack\nHas a 10% chance to fire soul-absorbing shards, granting a stack of [c/D2D25A:Enrichment] when hit\nHaving 6 stacks of [c/D2D25A:Enrichment] restores 75 HP and Mana"); + } + + public override void SetDefaults() + { + Item.damage = 100; + Item.crit = 8; + Item.width = 63; + Item.height = 76; + Item.useTime = 20; + Item.useAnimation = 20; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 23, 25, 0); + Item.rare = ItemRarityID.Pink; + Item.mana = 0; + Item.shootSpeed = 10f; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 840, false); + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType(), 0f, 0f, 0, default(Color), 1f); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2 && player.velocity.Y == 0f && player.statMana >= 40) + { + Item.damage = 70; + Item.useTime = 60; + Item.useAnimation = 60; + Item.shootSpeed = 0f; + Item.mana = 40; + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item88; + } + else + { + Item.damage = 100; + Item.useAnimation = 20; + Item.useTime = 20; + Item.shootSpeed = 10f; + Item.mana = 0; + if (Utils.NextFloat(Main.rand) < 0.1f) + { + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.shoot = ModContent.ProjectileType(); + } + Item.UseSound = SoundID.Item1; + } + return this.CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 10); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddTile(TileID.DemonAltar); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/GoldenFury.png b/Items/Weapons/Melee/Swords/ShimadaSwords/GoldenFury.png new file mode 100644 index 0000000..2930e09 Binary files /dev/null and b/Items/Weapons/Melee/Swords/ShimadaSwords/GoldenFury.png differ diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/ShimadaSword.cs b/Items/Weapons/Melee/Swords/ShimadaSwords/ShimadaSword.cs new file mode 100644 index 0000000..6fc4684 --- /dev/null +++ b/Items/Weapons/Melee/Swords/ShimadaSwords/ShimadaSword.cs @@ -0,0 +1,58 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords; + +public class ShimadaSword : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shimada Sword"); + Tooltip.SetDefault("Inflicts [c/7B2D2F:Blood Loss] for 3 seconds on hit, dealing damage over time"); + } + + public override void SetDefaults() + { + Item.damage = 18; + Item.crit = 8; + Item.width = 54; + Item.height = 68; + Item.useTime = 22; + Item.useAnimation = 22; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 1, 80, 0); + Item.rare = ItemRarityID.Blue; + Item.UseSound = SoundID.Item1; + Item.autoReuse = false; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + } + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180, false); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:LightsBane"); + val.AddIngredient(ItemID.Emerald, 10); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/ShimadaSword.png b/Items/Weapons/Melee/Swords/ShimadaSwords/ShimadaSword.png new file mode 100644 index 0000000..5b53515 Binary files /dev/null and b/Items/Weapons/Melee/Swords/ShimadaSwords/ShimadaSword.png differ diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/StonePlatedKatana.cs b/Items/Weapons/Melee/Swords/ShimadaSwords/StonePlatedKatana.cs new file mode 100644 index 0000000..ccf62c7 --- /dev/null +++ b/Items/Weapons/Melee/Swords/ShimadaSwords/StonePlatedKatana.cs @@ -0,0 +1,38 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords; + +public class StonePlatedKatana : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Stone-Plated Katana"); + } + + public override void SetDefaults() + { + Item.damage = 8; + Item.crit = 8; + Item.width = 56; + Item.height = 66; + Item.useTime = 22; + Item.useAnimation = 22; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 0, 0, 40); + Item.rare = ItemRarityID.White; + Item.UseSound = SoundID.Item1; + Item.autoReuse = false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.StoneBlock, 12); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/StonePlatedKatana.png b/Items/Weapons/Melee/Swords/ShimadaSwords/StonePlatedKatana.png new file mode 100644 index 0000000..6c4bba3 Binary files /dev/null and b/Items/Weapons/Melee/Swords/ShimadaSwords/StonePlatedKatana.png differ diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/TheRainbowsHonor.cs b/Items/Weapons/Melee/Swords/ShimadaSwords/TheRainbowsHonor.cs new file mode 100644 index 0000000..a1a5311 --- /dev/null +++ b/Items/Weapons/Melee/Swords/ShimadaSwords/TheRainbowsHonor.cs @@ -0,0 +1,107 @@ +using FabusMod.Projectiles.Shimada; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Swords.ShimadaSwords; + +public class TheRainbowsHonor : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dream Catcher"); + Tooltip.SetDefault("[c/B6FF00:Autoswings]\nFires a beam of particles that ignores immunity frames, pierces 8 times, and regenerates 1 Mana with every hit\nInflicts [c/806580:Bad Dream] for 16 seconds when hit with the blade, dealing damage over time\n uses 40 Mana to bring up [c/C4AB37:Midas]-inducing spikes from the ground, dealing damage with a 2% chance of granting a [c/FF52DC:Dream] stack\nHas a 10% chance to fire homing, soul-absorbing shards, healing for 20 HP and granting a stack of [c/FF52DC:Dream] when hit\nHaving 6 stacks of [c/FF52DC:Dream] restores 85 HP and Mana and puts you into an enraged state for 8 seconds, increasing melee damage dealt"); + } + + public override void SetDefaults() + { + Item.damage = 195; + Item.crit = 8; + Item.width = 56; + Item.height = 76; + Item.useTime = 10; + Item.useAnimation = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 2f; + Item.value = Item.sellPrice(2, 75, 0, 0); + Item.expert = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 60f; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 960, false); + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType(), 0f, 0f, 0, default(Color), 1f); + Main.dust[num1].scale = 1f; + Main.dust[num1].velocity.Y = 0f; + Main.dust[num1].velocity.X = 0.5f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType(), 0f, 0f, 0, default(Color), 1f); + Main.dust[num2].scale = 1f; + Main.dust[num2].velocity.Y = 0f; + Main.dust[num2].velocity.X = 0.5f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType(), 0f, 0f, 0, default(Color), 1f); + Main.dust[num3].scale = 1f; + Main.dust[num3].velocity.Y = 0f; + Main.dust[num3].velocity.X = 0.5f; + Main.dust[num3].noGravity = true; + } + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2 && player.velocity.Y == 0f) + { + Item.damage = 135; + Item.useTime = 60; + Item.useAnimation = 60; + Item.shootSpeed = 0f; + Item.mana = 40; + Item.shoot = ModContent.ProjectileType(); + Item.UseSound = SoundID.Item88; + } + else + { + Item.damage = 195; + Item.useAnimation = 18; + Item.useTime = 18; + Item.shootSpeed = 10f; + Item.mana = 0; + if (Utils.NextFloat(Main.rand) < 0.1f) + { + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.shoot = ModContent.ProjectileType(); + } + Item.UseSound = SoundID.Item1; + } + return this.CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 10); + val.AddTile(null, "RainbowStation"); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Swords/ShimadaSwords/TheRainbowsHonor.png b/Items/Weapons/Melee/Swords/ShimadaSwords/TheRainbowsHonor.png new file mode 100644 index 0000000..98e2535 Binary files /dev/null and b/Items/Weapons/Melee/Swords/ShimadaSwords/TheRainbowsHonor.png differ diff --git a/Items/Weapons/Melee/Waraxes/RainbowAxe.cs b/Items/Weapons/Melee/Waraxes/RainbowAxe.cs new file mode 100644 index 0000000..4cc4e91 --- /dev/null +++ b/Items/Weapons/Melee/Waraxes/RainbowAxe.cs @@ -0,0 +1,100 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Melee.Waraxes; + +public class RainbowAxe : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Shredder"); + Tooltip.SetDefault("[c/B6FF00:Autoswings] \nPressing fires a long-ranged Rainbow-Axe wall"); + } + + public override void SetDefaults() + { + Item.damage = 280; + Item.width = 54; + Item.height = 58; + Item.useTime = 20; + Item.useAnimation = 20; + Item.useStyle = ItemUseStyleID.Swing; + Item.axe = 40; + Item.tileBoost = 6; + Item.knockBack = 8f; + Item.value = Item.sellPrice(3, 20, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.shootSpeed = 80f; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + { + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType()); + } + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Swing; + Item.useTime = 20; + Item.useAnimation = 20; + Item.damage = 280; + Item.axe = 38; + Item.tileBoost = 6; + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.useStyle = ItemUseStyleID.Swing; + Item.useTime = 20; + Item.useAnimation = 20; + Item.damage = 280; + Item.axe = 38; + Item.tileBoost = 6; + Item.shoot = ProjectileID.None; + } + return this.CanUseItem(player); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + float numberProjectiles = 16f; + float rotation = MathHelper.ToRadians(35f); + position += Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 80f; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedBy(new Vector2(velocity.X, velocity.Y), (double)MathHelper.Lerp(0f - rotation, rotation, i / (numberProjectiles - 1f)), default) * 0.2f; + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.LunarHamaxeSolar); + val.AddIngredient(ItemID.LunarHamaxeVortex); + val.AddIngredient(ItemID.LunarHamaxeNebula); + val.AddIngredient(ItemID.LunarHamaxeStardust); + val.AddIngredient(ModContent.ItemType(), 14); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Melee/Waraxes/RainbowAxe.png b/Items/Weapons/Melee/Waraxes/RainbowAxe.png new file mode 100644 index 0000000..c0995ce Binary files /dev/null and b/Items/Weapons/Melee/Waraxes/RainbowAxe.png differ diff --git a/Items/Weapons/RainbowDemon/All-In-One.png b/Items/Weapons/RainbowDemon/All-In-One.png new file mode 100644 index 0000000..a167f89 Binary files /dev/null and b/Items/Weapons/RainbowDemon/All-In-One.png differ diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemon.cs b/Items/Weapons/RainbowDemon/TheRainbowDemon.cs new file mode 100644 index 0000000..e6e543b --- /dev/null +++ b/Items/Weapons/RainbowDemon/TheRainbowDemon.cs @@ -0,0 +1,65 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.RainbowDemon; + +public class TheRainbowDemon : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Rainbow Demon"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nUnleashes a barrage of rainbow waves \nDoes not require ammo \nClass and projectiles fired can be changed via crafting \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.damage = 82; + Item.width = 82; + Item.height = 39; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(40, 0, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.shoot = ModContent.ProjectileType(); + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(7f, -5f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 10; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(30f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType ()); + val.AddIngredient(ModContent.ItemType()); + val.AddTile(ModContent.TileType()); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddRecipeGroup("FabusMod:TheRainbowDemon", 1); + val2.AddTile(ModContent.TileType()); + val2.Register(); + } +} diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemon.png b/Items/Weapons/RainbowDemon/TheRainbowDemon.png new file mode 100644 index 0000000..09871f7 Binary files /dev/null and b/Items/Weapons/RainbowDemon/TheRainbowDemon.png differ diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonClaymore.cs b/Items/Weapons/RainbowDemon/TheRainbowDemonClaymore.cs new file mode 100644 index 0000000..9a60570 --- /dev/null +++ b/Items/Weapons/RainbowDemon/TheRainbowDemonClaymore.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.RainbowDemon; + +public class TheRainbowDemonClaymore : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Rainbow Demon - Claymore"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nUnleashes a slow-moving barrage of homing rainbow balls \nDoes not require ammo \nClass and projectiles fired can be changed via crafting \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.damage = 82; + Item.width = 82; + Item.height = 39; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(40, 0, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.shoot = ModContent.ProjectileType(); + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(7f, -5f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 5; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(30f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:TheRainbowDemon", 1); + val.AddIngredient(ModContent.ItemType(), 2); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonClaymore.png b/Items/Weapons/RainbowDemon/TheRainbowDemonClaymore.png new file mode 100644 index 0000000..88c08e2 Binary files /dev/null and b/Items/Weapons/RainbowDemon/TheRainbowDemonClaymore.png differ diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonMagic.cs b/Items/Weapons/RainbowDemon/TheRainbowDemonMagic.cs new file mode 100644 index 0000000..1fe4501 --- /dev/null +++ b/Items/Weapons/RainbowDemon/TheRainbowDemonMagic.cs @@ -0,0 +1,61 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.RainbowDemon; + +public class TheRainbowDemonMagic : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Rainbow Demon - Magic"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nUnleashes a barrage of oval-shaped rainbow projectiles \nDoes not require mana \nClass and projectiles fired can be changed via crafting \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.damage = 82; + Item.noMelee = true; + Item.width = 82; + Item.height = 39; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(40, 0, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.shoot = ModContent.ProjectileType(); + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(7f, -5f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 10; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(30f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:TheRainbowDemon", 1); + val.AddIngredient(ItemID.FragmentNebula, 2); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonMagic.png b/Items/Weapons/RainbowDemon/TheRainbowDemonMagic.png new file mode 100644 index 0000000..0b41caf Binary files /dev/null and b/Items/Weapons/RainbowDemon/TheRainbowDemonMagic.png differ diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonRanged.cs b/Items/Weapons/RainbowDemon/TheRainbowDemonRanged.cs new file mode 100644 index 0000000..e7525fb --- /dev/null +++ b/Items/Weapons/RainbowDemon/TheRainbowDemonRanged.cs @@ -0,0 +1,61 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.RainbowDemon; + +public class TheRainbowDemonRanged : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Rainbow Demon - Ranged"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nUnleashes a barrage of rainbow arrows \nDoes not require ammo \nClass and projectiles fired can be changed via crafting \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.damage = 82; + Item.noMelee = true; + Item.width = 82; + Item.height = 39; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(40, 0, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.shoot = ModContent.ProjectileType(); + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(7f, -5f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 10; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(30f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:TheRainbowDemon", 1); + val.AddIngredient(ItemID.FragmentVortex, 2); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonRanged.png b/Items/Weapons/RainbowDemon/TheRainbowDemonRanged.png new file mode 100644 index 0000000..7eb4966 Binary files /dev/null and b/Items/Weapons/RainbowDemon/TheRainbowDemonRanged.png differ diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonShredder.cs b/Items/Weapons/RainbowDemon/TheRainbowDemonShredder.cs new file mode 100644 index 0000000..226b719 --- /dev/null +++ b/Items/Weapons/RainbowDemon/TheRainbowDemonShredder.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.RainbowDemon; + +public class TheRainbowDemonShredder : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Rainbow Demon - Shredder"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nUnleashes a barrage of rainbow axes \nClass and projectiles fired can be changed via crafting \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.damage = 82; + Item.width = 82; + Item.height = 39; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(40, 0, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.shoot = ModContent.ProjectileType(); + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(7f, -5f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 10; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(30f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:TheRainbowDemon", 1); + val.AddIngredient(ModContent.ItemType(), 2); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonShredder.png b/Items/Weapons/RainbowDemon/TheRainbowDemonShredder.png new file mode 100644 index 0000000..651d8ca Binary files /dev/null and b/Items/Weapons/RainbowDemon/TheRainbowDemonShredder.png differ diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonThrowing.cs b/Items/Weapons/RainbowDemon/TheRainbowDemonThrowing.cs new file mode 100644 index 0000000..9bfde1e --- /dev/null +++ b/Items/Weapons/RainbowDemon/TheRainbowDemonThrowing.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.RainbowDemon; + +public class TheRainbowDemonThrowing : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Rainbow Demon - Throwing"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nUnleashes a barrage of rainbow daggers \nDoes not require ammo \nClass and projectiles fired can be changed via crafting \n[c/FF2B6E:Currently Unobtainable]"); + } + + public override void SetDefaults() + { + Item.damage = 82; + Item.noMelee = true; + Item.width = 82; + Item.height = 39; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(40, 0, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.shoot = ModContent.ProjectileType(); + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(7f, -5f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 10; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(30f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:TheRainbowDemon", 1); + val.AddIngredient(ItemID.FragmentSolar, 1); + val.AddIngredient(ItemID.FragmentVortex, 1); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/RainbowDemon/TheRainbowDemonThrowing.png b/Items/Weapons/RainbowDemon/TheRainbowDemonThrowing.png new file mode 100644 index 0000000..5fb58fa Binary files /dev/null and b/Items/Weapons/RainbowDemon/TheRainbowDemonThrowing.png differ diff --git a/Items/Weapons/Ranged/Bows/LunarBow.cs b/Items/Weapons/Ranged/Bows/LunarBow.cs new file mode 100644 index 0000000..1fbc049 --- /dev/null +++ b/Items/Weapons/Ranged/Bows/LunarBow.cs @@ -0,0 +1,72 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows; + +public class LunarBow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lunar Bow"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo]\nGrants the [c/13A2DA:Shattered Moon's Grace] buff when shooting, reducing fall speed\nUsing while under max HP grants the [c/5EDF85:Shattered Moon's Blessing] buff, which has the following effects:\n - Heals the player rapidly for 2 seconds, but disables the use of items\n - Grants [c/9CE53B:Shattered Moon's Rejuvenation] after 2 seconds, healing 100 HP over 10 seconds\n[c/5EDF85:Shattered Moon's Blessing] has a cooldown of [c/CA4646:50 seconds] once the effect ends"); + } + + public override void SetDefaults() + { + Item.damage = 240; + Item.width = 27; + Item.height = 69; + Item.useTime = 9; + Item.useAnimation = 9; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 15, 60, 0); + Item.expert = true; + Item.UseSound = SoundID.Item5; + Item.autoReuse = true; + Item.shootSpeed = 50f; + Item.shoot = ModContent.ProjectileType(); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + if (player.altFunctionUse == 2) + { + if (!player.HasBuff(ModContent.BuffType()) && player.statLife < player.statLifeMax2) + { + player.AddBuff(ModContent.BuffType(), 140, true); + } + player.AddBuff(ModContent.BuffType(), 10, true); + } + else + { + player.AddBuff(ModContent.BuffType(), 10, true); + } + return true; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(4f, 0f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.LifeFruit, 5); + val.AddIngredient(ItemID.LifeCrystal, 5); + val.AddIngredient(ItemID.FragmentVortex, 14); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Bows/LunarBow.png b/Items/Weapons/Ranged/Bows/LunarBow.png new file mode 100644 index 0000000..1a871c0 Binary files /dev/null and b/Items/Weapons/Ranged/Bows/LunarBow.png differ diff --git a/Items/Weapons/Ranged/Bows/LunarRainBow.cs b/Items/Weapons/Ranged/Bows/LunarRainBow.cs new file mode 100644 index 0000000..6bf11df --- /dev/null +++ b/Items/Weapons/Ranged/Bows/LunarRainBow.cs @@ -0,0 +1,71 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows; + +public class LunarRainBow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lunar Rain-Bow"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo]\nGrants the [c/E6A6CF:Spectral Moon's Grace] buff when shooting, reducing fall speed and nullifying knockback \nUsing while under max HP grants the [c/82E8E8:Spectral Moonlight] buff, which has the following effects:\n - Heals the player rapidly for 2 seconds and grants immunity, but disables the use of items\n - Grants [c/6DE5D8:Spectral Moon's Rejuvenation] after 2 seconds, healing 200 HP over 10 seconds and increasing ranged crit rate by 60\n[c/82E8E8:Spectral Moonlight] has a cooldown of [c/BF5E3B:50 seconds] once the effect ends"); + } + + public override void SetDefaults() + { + Item.damage = 320; + Item.width = 27; + Item.height = 69; + Item.useTime = 7; + Item.useAnimation = 7; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(2, 70, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item5; + Item.autoReuse = true; + Item.shootSpeed = 50f; + Item.shoot = ModContent.ProjectileType(); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + if (player.altFunctionUse == 2) + { + if (!player.HasBuff(ModContent.BuffType()) && player.statLife < player.statLifeMax2) + { + player.AddBuff(ModContent.BuffType(), 140, true); + } + player.AddBuff(ModContent.BuffType(), 10, true); + } + else + { + player.AddBuff(ModContent.BuffType(), 10, true); + } + return true; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(4f, 0f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 14); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Bows/LunarRainBow.png b/Items/Weapons/Ranged/Bows/LunarRainBow.png new file mode 100644 index 0000000..1bb7507 Binary files /dev/null and b/Items/Weapons/Ranged/Bows/LunarRainBow.png differ diff --git a/Items/Weapons/Ranged/Bows/PiercingBow.cs b/Items/Weapons/Ranged/Bows/PiercingBow.cs new file mode 100644 index 0000000..984da0e --- /dev/null +++ b/Items/Weapons/Ranged/Bows/PiercingBow.cs @@ -0,0 +1,60 @@ +using FabusMod.Projectiles.Arrows; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows; + +public class PiercingBow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Piercing Bow"); + Tooltip.SetDefault("Converts Wooden Arrows into Piercing Arrows"); + } + + public override void SetDefaults() + { + Item.damage = 10; + Item.width = 18; + Item.height = 32; + Item.useTime = 27; + Item.useAnimation = 27; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 0, 15, 0); + Item.rare = ItemRarityID.White; + Item.UseSound = SoundID.Item5; + Item.autoReuse = false; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 7f; + Item.useAmmo = AmmoID.Arrow; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + if (type == 1) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.WoodenBow, 1); + val.AddIngredient(ItemID.IronBow, 1); + val.AddTile(TileID.Anvils); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ItemID.WoodenBow, 1); + val2.AddIngredient(ItemID.LeadBow, 1); + val2.AddTile(TileID.Anvils); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/Bows/PiercingBow.png b/Items/Weapons/Ranged/Bows/PiercingBow.png new file mode 100644 index 0000000..91103e0 Binary files /dev/null and b/Items/Weapons/Ranged/Bows/PiercingBow.png differ diff --git a/Items/Weapons/Ranged/Bows/StormBows/DemonsBow.cs b/Items/Weapons/Ranged/Bows/StormBows/DemonsBow.cs new file mode 100644 index 0000000..1d15673 --- /dev/null +++ b/Items/Weapons/Ranged/Bows/StormBows/DemonsBow.cs @@ -0,0 +1,70 @@ +using FabusMod.Projectiles.Arrows; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows; + +public class DemonsBow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Demon's Bow"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Hellfire Arrows (except with ) \nPressing fires 6 demonic arrows in quick succession, but it has lower damage and a 2 second cooldown"); + } + + public override void SetDefaults() + { + Item.damage = 34; + Item.width = 18; + Item.height = 38; + Item.useTime = 16; + Item.useAnimation = 16; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 3f; + Item.value = Item.sellPrice(0, 3, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item5; + Item.autoReuse = true; + Item.shootSpeed = 16f; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 4; + Item.useAnimation = 24; + Item.damage = 30; + Item.reuseDelay = 60; + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.reuseDelay = 0; + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 16; + Item.useAnimation = 16; + Item.damage = 34; + Item.shoot = ProjectileID.HellfireArrow; + } + return CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HellstoneBar, 6); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Bows/StormBows/DemonsBow.png b/Items/Weapons/Ranged/Bows/StormBows/DemonsBow.png new file mode 100644 index 0000000..06d1db0 Binary files /dev/null and b/Items/Weapons/Ranged/Bows/StormBows/DemonsBow.png differ diff --git a/Items/Weapons/Ranged/Bows/StormBows/GoldenKabuki.cs b/Items/Weapons/Ranged/Bows/StormBows/GoldenKabuki.cs new file mode 100644 index 0000000..a514f6b --- /dev/null +++ b/Items/Weapons/Ranged/Bows/StormBows/GoldenKabuki.cs @@ -0,0 +1,69 @@ +using FabusMod.Projectiles.Arrows; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows; + +public class GoldenKabuki : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Kabuki"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Holy Arrows (except with ) \nPressing fires 16 spiritual, golden arrows in quick succession, but it has lower damage and a 1 second cooldown"); + } + + public override void SetDefaults() + { + Item.damage = 58; + Item.width = 18; + Item.height = 38; + Item.useTime = 12; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 3f; + Item.value = Item.sellPrice(0, 22, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item5; + Item.autoReuse = true; + Item.shootSpeed = 18f; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 2; + Item.useAnimation = 32; + Item.damage = 54; + Item.reuseDelay = 30; + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.reuseDelay = 0; + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 12; + Item.useAnimation = 12; + Item.damage = 58; + Item.shoot = ProjectileID.HolyArrow; + } + return CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Bows/StormBows/GoldenKabuki.png b/Items/Weapons/Ranged/Bows/StormBows/GoldenKabuki.png new file mode 100644 index 0000000..85638c2 Binary files /dev/null and b/Items/Weapons/Ranged/Bows/StormBows/GoldenKabuki.png differ diff --git a/Items/Weapons/Ranged/Bows/StormBows/Kabuki.cs b/Items/Weapons/Ranged/Bows/StormBows/Kabuki.cs new file mode 100644 index 0000000..36314ef --- /dev/null +++ b/Items/Weapons/Ranged/Bows/StormBows/Kabuki.cs @@ -0,0 +1,69 @@ +using FabusMod.Projectiles.Arrows; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows; + +public class Kabuki : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Kabuki"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Hellfire Arrows (except with ) \nPressing fires 8 demonic arrows in quick succession, but it has lower damage and a 1.2 second cooldown"); + } + + public override void SetDefaults() + { + Item.damage = 42; + Item.width = 18; + Item.height = 38; + Item.useTime = 14; + Item.useAnimation = 14; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 3f; + Item.value = Item.sellPrice(0, 5, 40, 0); + Item.expert = true; + Item.UseSound = SoundID.Item5; + Item.autoReuse = true; + Item.shootSpeed = 18f; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 3; + Item.useAnimation = 24; + Item.damage = 38; + Item.reuseDelay = 36; + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.reuseDelay = 0; + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 14; + Item.useAnimation = 14; + Item.damage = 42; + Item.shoot = ProjectileID.HellfireArrow; + } + return CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HallowedBar, 6); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Bows/StormBows/Kabuki.png b/Items/Weapons/Ranged/Bows/StormBows/Kabuki.png new file mode 100644 index 0000000..f8c4415 Binary files /dev/null and b/Items/Weapons/Ranged/Bows/StormBows/Kabuki.png differ diff --git a/Items/Weapons/Ranged/Bows/StormBows/RainBow.cs b/Items/Weapons/Ranged/Bows/StormBows/RainBow.cs new file mode 100644 index 0000000..b572e4d --- /dev/null +++ b/Items/Weapons/Ranged/Bows/StormBows/RainBow.cs @@ -0,0 +1,69 @@ +using FabusMod.Projectiles.Arrows; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows; + +public class RainBow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rain-Bow"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots two Rainbow Arrows in quick succession (except with ) \nPressing fires 18 Holy Arrows in quick succession, but it has lower damage and a 1 second cooldown"); + } + + public override void SetDefaults() + { + Item.damage = 90; + Item.width = 30; + Item.height = 50; + Item.useTime = 3; + Item.useAnimation = 6; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 3f; + Item.value = Item.sellPrice(1, 50, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item5; + Item.autoReuse = true; + Item.shootSpeed = 20f; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 2; + Item.useAnimation = 40; + Item.damage = 84; + Item.reuseDelay = 30; + Item.shoot = ProjectileID.HolyArrow; + } + else + { + Item.reuseDelay = 0; + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 3; + Item.useAnimation = 6; + Item.damage = 90; + Item.shoot = ModContent.ProjectileType(); + } + return CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Bows/StormBows/RainBow.png b/Items/Weapons/Ranged/Bows/StormBows/RainBow.png new file mode 100644 index 0000000..8e186a9 Binary files /dev/null and b/Items/Weapons/Ranged/Bows/StormBows/RainBow.png differ diff --git a/Items/Weapons/Ranged/Bows/StormBows/StonePlatedBow.cs b/Items/Weapons/Ranged/Bows/StormBows/StonePlatedBow.cs new file mode 100644 index 0000000..dd866b6 --- /dev/null +++ b/Items/Weapons/Ranged/Bows/StormBows/StonePlatedBow.cs @@ -0,0 +1,41 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows; + +public class StonePlatedBow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Stone-Plated Bow"); + Tooltip.SetDefault("Doesn't use ammo\nAlways shoots Wooden Arrows"); + } + + public override void SetDefaults() + { + Item.damage = 5; + Item.width = 18; + Item.height = 38; + Item.useTime = 32; + Item.useAnimation = 32; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 0, 5, 60); + Item.UseSound = SoundID.Item5; + Item.autoReuse = false; + Item.shootSpeed = 9f; + Item.shoot = ProjectileID.WoodenArrowFriendly; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType(), 2); + val.AddIngredient(ItemID.StoneBlock, 4); + val.AddIngredient(ItemID.FallenStar, 1); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Bows/StormBows/StonePlatedBow.png b/Items/Weapons/Ranged/Bows/StormBows/StonePlatedBow.png new file mode 100644 index 0000000..112cde2 Binary files /dev/null and b/Items/Weapons/Ranged/Bows/StormBows/StonePlatedBow.png differ diff --git a/Items/Weapons/Ranged/Bows/StormBows/StormBow.cs b/Items/Weapons/Ranged/Bows/StormBows/StormBow.cs new file mode 100644 index 0000000..cd314f5 --- /dev/null +++ b/Items/Weapons/Ranged/Bows/StormBows/StormBow.cs @@ -0,0 +1,60 @@ +using FabusMod.Projectiles.Arrows; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Bows.StormBows; + +public class StormBow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Storm Bow"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't use ammo \nAlways shoots Wooden Arrows (except with ) \nPressing fires 6 Storm Arrows in quick succession, but it has lower damage and a 3 second cooldown"); + } + + public override void SetDefaults() + { + Item.damage = 24; + Item.width = 18; + Item.height = 38; + Item.useTime = 18; + Item.useAnimation = 18; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 2f; + Item.value = Item.sellPrice(0, 0, 60, 0); + Item.expert = true; + Item.UseSound = SoundID.Item5; + Item.autoReuse = true; + Item.shootSpeed = 16f; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 4; + Item.useAnimation = 24; + Item.damage = 24; + Item.reuseDelay = 90; + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.reuseDelay = 0; + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 18; + Item.useAnimation = 18; + Item.damage = 28; + Item.shoot = ProjectileID.WoodenArrowFriendly; + } + return CanUseItem(player); + } +} diff --git a/Items/Weapons/Ranged/Bows/StormBows/StormBow.png b/Items/Weapons/Ranged/Bows/StormBows/StormBow.png new file mode 100644 index 0000000..46e066f Binary files /dev/null and b/Items/Weapons/Ranged/Bows/StormBows/StormBow.png differ diff --git a/Items/Weapons/Ranged/FoxPistols/FoxPistol.cs b/Items/Weapons/Ranged/FoxPistols/FoxPistol.cs new file mode 100644 index 0000000..8a8adb7 --- /dev/null +++ b/Items/Weapons/Ranged/FoxPistols/FoxPistol.cs @@ -0,0 +1,103 @@ +using FabusMod.Projectiles.FoxPistol; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FoxPistols; + +public class FoxPistol : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Pistol"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo, dyeable]\nGrants the [c/D78624:Fox Mending] buff for 5 seconds, which regenerates HP and increases speed, but lowers damage by 12% \nUsing increases damage and reduces use time, as well as: \n - Grants the [c/9E9E9E:Fox Break] debuff for 1 second, reducing movement speed \n - Grants the [c/732C73:Fox Wither] debuff for 1.3 seconds on self, and 4 seconds on hit enemies \n - [c/732C73:Fox Wither] debuff deals damage over time and nullifies the [c/D78624:Fox Mending] buff's regeneration"); + } + + public override void SetDefaults() + { + Item.damage = 22; + Item.width = 36; + Item.height = 21; + Item.useTime = 12; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 3, 80, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shootSpeed = 7f; + Item.expert = true; + Item.shoot = ModContent.ProjectileType(); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(0f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + if (player.altFunctionUse == 2) + { + player.AddBuff(ModContent.BuffType(), 60, true); + player.AddBuff(ModContent.BuffType(), 78, true); + } + else + { + player.AddBuff(ModContent.BuffType(), 300, true); + } + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + return true; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 10; + Item.useAnimation = 10; + Item.damage = 28; + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 12; + Item.useAnimation = 12; + Item.damage = 22; + Item.shoot = ModContent.ProjectileType(); + } + return CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:GoldBar", 10); + val.AddTile(TileID.Anvils); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.OrangeDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/FoxPistols/FoxPistol.png b/Items/Weapons/Ranged/FoxPistols/FoxPistol.png new file mode 100644 index 0000000..de389e3 Binary files /dev/null and b/Items/Weapons/Ranged/FoxPistols/FoxPistol.png differ diff --git a/Items/Weapons/Ranged/FoxPistols/FoxPistolBlue.cs b/Items/Weapons/Ranged/FoxPistols/FoxPistolBlue.cs new file mode 100644 index 0000000..69b2625 --- /dev/null +++ b/Items/Weapons/Ranged/FoxPistols/FoxPistolBlue.cs @@ -0,0 +1,103 @@ +using FabusMod.Projectiles.FoxPistol; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FoxPistols; + +public class FoxPistolBlue : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Pistol - Blue"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo, dyeable]\nGrants the [c/37C8AB:Fox Mending] buff for 5 seconds, which regenerates HP and increases speed, but lowers damage by 12% \nUsing increases damage and reduces use time, as well as: \n - Grants the [c/9E9E9E:Fox Break] debuff for 1 second, reducing movement speed \n - Grants the [c/732C73:Fox Wither] debuff for 1.3 seconds on self, and 4 seconds on hit enemies \n - [c/732C73:Fox Wither] debuff deals damage over time and nullifies the [c/37C8AB:Fox Mending] buff's regeneration"); + } + + public override void SetDefaults() + { + Item.damage = 22; + Item.width = 36; + Item.height = 21; + Item.useTime = 12; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 3, 80, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shootSpeed = 7f; + Item.expert = true; + Item.shoot = ModContent.ProjectileType(); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(0f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + if (player.altFunctionUse == 2) + { + player.AddBuff(ModContent.BuffType(), 60, true); + player.AddBuff(ModContent.BuffType(), 78, true); + } + else + { + player.AddBuff(ModContent.BuffType(), 300, true); + } + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + return true; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 10; + Item.useAnimation = 10; + Item.damage = 28; + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 12; + Item.useAnimation = 12; + Item.damage = 22; + Item.shoot = ModContent.ProjectileType(); + } + return CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:GoldBar", 10); + val.AddTile(TileID.Anvils); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType(), 1); + val2.AddIngredient(ItemID.BlueDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/FoxPistols/FoxPistolBlue.png b/Items/Weapons/Ranged/FoxPistols/FoxPistolBlue.png new file mode 100644 index 0000000..61ec658 Binary files /dev/null and b/Items/Weapons/Ranged/FoxPistols/FoxPistolBlue.png differ diff --git a/Items/Weapons/Ranged/FoxPistols/SpectralHowler.cs b/Items/Weapons/Ranged/FoxPistols/SpectralHowler.cs new file mode 100644 index 0000000..a72906c --- /dev/null +++ b/Items/Weapons/Ranged/FoxPistols/SpectralHowler.cs @@ -0,0 +1,97 @@ +using FabusMod.Projectiles.FoxPistol; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FoxPistols; + +public class SpectralHowler : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Howler"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, doesn't require ammo]\nGrants the [c/AB2C2C:S][c/F3821B:p][c/E6AF31:e][c/63B465:c][c/82E8E8:t][c/9EF3EF:r][c/2BA0B5:a][c/734679:l ][c/AB2C2C:M][c/F3821B:e][c/E6AF31:n][c/63B465:d][c/82E8E8:i][c/9EF3EF:n][c/2BA0B5:g] buff for 7 seconds, which has the following effects:\n - Increases max HP by 200, regenerates HP, and increases movement speed, but lowers damage by 7% \nUsing increases damage and reduces use time, as well as: \n - Grants the [c/8F77AF:Spectral Wither] debuff for 0.4 seconds, dealing damage over time and nullifying [c/AB2C2C:S][c/F3821B:p][c/E6AF31:e][c/63B465:c][c/82E8E8:t][c/9EF3EF:r][c/2BA0B5:a][c/734679:l ][c/AB2C2C:M][c/F3821B:e][c/E6AF31:n][c/63B465:d][c/82E8E8:i][c/9EF3EF:n][c/2BA0B5:g]'s regeneration\n - Inflicts the [c/AB2C2C:R][c/F3821B:a][c/E6AF31:i][c/63B465:n][c/82E8E8:b][c/9EF3EF:o][c/2BA0B5:w][c/734679:'s ][c/AB2C2C:W][c/F3821B:r][c/E6AF31:a][c/63B465:t][c/82E8E8:h] debuff on hit enemies for 8 seconds, dealing damage over time"); + } + + public override void SetDefaults() + { + Item.damage = 260; + Item.width = 36; + Item.height = 21; + Item.useTime = 6; + Item.useAnimation = 6; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 97, 60, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shootSpeed = 8f; + Item.expert = true; + Item.shoot = ModContent.ProjectileType(); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-6f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + if (player.altFunctionUse == 2) + { + player.AddBuff(ModContent.BuffType(), 24, true); + } + else + { + player.AddBuff(ModContent.BuffType(), 420, true); + } + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(3f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + return true; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 4; + Item.useAnimation = 4; + Item.damage = 270; + Item.shoot = ModContent.ProjectileType(); + } + else + { + Item.useStyle = ItemUseStyleID.Shoot; + Item.useTime = 6; + Item.useAnimation = 6; + Item.damage = 260; + Item.shoot = ModContent.ProjectileType(); + } + return CanUseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:FoxPistol", 1); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/FoxPistols/SpectralHowler.png b/Items/Weapons/Ranged/FoxPistols/SpectralHowler.png new file mode 100644 index 0000000..5f31248 Binary files /dev/null and b/Items/Weapons/Ranged/FoxPistols/SpectralHowler.png differ diff --git a/Items/Weapons/Ranged/FusionDrivers/DynasticFuser.cs b/Items/Weapons/Ranged/FusionDrivers/DynasticFuser.cs new file mode 100644 index 0000000..ba6ba89 --- /dev/null +++ b/Items/Weapons/Ranged/FusionDrivers/DynasticFuser.cs @@ -0,0 +1,54 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FusionDrivers; + +public class DynasticFuser : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dynastic Fusion"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n30% chance to not consume ammo"); + } + + public override void SetDefaults() + { + Item.damage = 14; + Item.width = 72; + Item.height = 32; + Item.useTime = 7; + Item.useAnimation = 7; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 6, 66, 0); + Item.rare = ItemRarityID.Orange; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 30f; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, 2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.3f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HellstoneBar, 12); + val.AddIngredient(ItemID.Sapphire, 8); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/FusionDrivers/DynasticFuser.png b/Items/Weapons/Ranged/FusionDrivers/DynasticFuser.png new file mode 100644 index 0000000..49a1201 Binary files /dev/null and b/Items/Weapons/Ranged/FusionDrivers/DynasticFuser.png differ diff --git a/Items/Weapons/Ranged/FusionDrivers/DynasticFuserGolden.cs b/Items/Weapons/Ranged/FusionDrivers/DynasticFuserGolden.cs new file mode 100644 index 0000000..89bdc08 --- /dev/null +++ b/Items/Weapons/Ranged/FusionDrivers/DynasticFuserGolden.cs @@ -0,0 +1,53 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FusionDrivers; + +public class DynasticFuserGolden : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Fusion"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n55% chance to not consume ammo"); + } + + public override void SetDefaults() + { + Item.damage = 72; + Item.width = 70; + Item.height = 32; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 30, 0, 0); + Item.rare = ItemRarityID.Yellow; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 18f; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, 2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.55f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:ProtectionFuser", 1); + val.AddIngredient(ModContent.ItemType(), 8); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/FusionDrivers/DynasticFuserGolden.png b/Items/Weapons/Ranged/FusionDrivers/DynasticFuserGolden.png new file mode 100644 index 0000000..e12d48d Binary files /dev/null and b/Items/Weapons/Ranged/FusionDrivers/DynasticFuserGolden.png differ diff --git a/Items/Weapons/Ranged/FusionDrivers/FusedRainbow.cs b/Items/Weapons/Ranged/FusionDrivers/FusedRainbow.cs new file mode 100644 index 0000000..789ef43 --- /dev/null +++ b/Items/Weapons/Ranged/FusionDrivers/FusedRainbow.cs @@ -0,0 +1,64 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FusionDrivers; + +public class FusedRainbow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cosmic Fusion"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nConverts Musket Balls into homing rainbow bullets"); + } + + public override void SetDefaults() + { + Item.damage = 85; + Item.width = 70; + Item.height = 32; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(2, 80, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 18f; + Item.useAmmo = AmmoID.Bullet; + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, 2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.8f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 12); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/FusionDrivers/FusedRainbow.png b/Items/Weapons/Ranged/FusionDrivers/FusedRainbow.png new file mode 100644 index 0000000..e3b3a55 Binary files /dev/null and b/Items/Weapons/Ranged/FusionDrivers/FusedRainbow.png differ diff --git a/Items/Weapons/Ranged/FusionDrivers/FusionDriver.cs b/Items/Weapons/Ranged/FusionDrivers/FusionDriver.cs new file mode 100644 index 0000000..68e5c90 --- /dev/null +++ b/Items/Weapons/Ranged/FusionDrivers/FusionDriver.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FusionDrivers; + +public class FusionDriver : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fusion Driver"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]"); + } + + public override void SetDefaults() + { + Item.damage = 5; + Item.width = 72; + Item.height = 32; + Item.useTime = 8; + Item.useAnimation = 8; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 0, 96, 0); + Item.rare = ItemRarityID.Blue; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 30f; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, 2f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("IronBar", 12); + val.AddIngredient(ItemID.Emerald, 4); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/FusionDrivers/FusionDriver.png b/Items/Weapons/Ranged/FusionDrivers/FusionDriver.png new file mode 100644 index 0000000..81b1b58 Binary files /dev/null and b/Items/Weapons/Ranged/FusionDrivers/FusionDriver.png differ diff --git a/Items/Weapons/Ranged/FusionDrivers/ProtectionFuser.cs b/Items/Weapons/Ranged/FusionDrivers/ProtectionFuser.cs new file mode 100644 index 0000000..e5d9caf --- /dev/null +++ b/Items/Weapons/Ranged/FusionDrivers/ProtectionFuser.cs @@ -0,0 +1,59 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FusionDrivers; + +public class ProtectionFuser : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Protective Fusion"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \n42% chance to not consume ammo"); + } + + public override void SetDefaults() + { + Item.damage = 36; + Item.width = 72; + Item.height = 32; + Item.useTime = 5; + Item.useAnimation = 5; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 15, 66, 0); + Item.rare = ItemRarityID.LightRed; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 20f; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, 2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.42f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:AdamantiteBar", 12); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.SilverDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/FusionDrivers/ProtectionFuser.png b/Items/Weapons/Ranged/FusionDrivers/ProtectionFuser.png new file mode 100644 index 0000000..530c7f2 Binary files /dev/null and b/Items/Weapons/Ranged/FusionDrivers/ProtectionFuser.png differ diff --git a/Items/Weapons/Ranged/FusionDrivers/ProtectionFuserCarbonFiber.cs b/Items/Weapons/Ranged/FusionDrivers/ProtectionFuserCarbonFiber.cs new file mode 100644 index 0000000..2a98a0a --- /dev/null +++ b/Items/Weapons/Ranged/FusionDrivers/ProtectionFuserCarbonFiber.cs @@ -0,0 +1,53 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.FusionDrivers; + +public class ProtectionFuserCarbonFiber : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Protective Fusion - Carbon Fiber"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n42% chance to not consume ammo"); + } + + public override void SetDefaults() + { + Item.damage = 36; + Item.width = 72; + Item.height = 32; + Item.useTime = 5; + Item.useAnimation = 5; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 15, 66, 0); + Item.rare = ItemRarityID.LightRed; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 20f; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, 2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.42f; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.BlackDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/FusionDrivers/ProtectionFuserCarbonFiber.png b/Items/Weapons/Ranged/FusionDrivers/ProtectionFuserCarbonFiber.png new file mode 100644 index 0000000..9ea3400 Binary files /dev/null and b/Items/Weapons/Ranged/FusionDrivers/ProtectionFuserCarbonFiber.png differ diff --git a/Items/Weapons/Ranged/LightGuns/GoldenStinger.cs b/Items/Weapons/Ranged/LightGuns/GoldenStinger.cs new file mode 100644 index 0000000..2f385cd --- /dev/null +++ b/Items/Weapons/Ranged/LightGuns/GoldenStinger.cs @@ -0,0 +1,54 @@ +using FabusMod.Projectiles.LightBlasts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.LightGuns; + +public class GoldenStinger : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Stinger"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nDoesn't require ammo\nShoots golden light blasts"); + } + + public override void SetDefaults() + { + Item.damage = 68; + Item.width = 32; + Item.height = 38; + Item.useTime = 3; + Item.useAnimation = 3; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 30, 35, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; + Item.rare = 12; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:TheStinger", 1); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/LightGuns/GoldenStinger.png b/Items/Weapons/Ranged/LightGuns/GoldenStinger.png new file mode 100644 index 0000000..c676314 Binary files /dev/null and b/Items/Weapons/Ranged/LightGuns/GoldenStinger.png differ diff --git a/Items/Weapons/Ranged/LightGuns/LightGun.cs b/Items/Weapons/Ranged/LightGuns/LightGun.cs new file mode 100644 index 0000000..bee2831 --- /dev/null +++ b/Items/Weapons/Ranged/LightGuns/LightGun.cs @@ -0,0 +1,55 @@ +using FabusMod.Projectiles.LightBlasts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.LightGuns; + +public class LightGun : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Light Gun"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nDoesn't require ammo \nShoots little light blasts"); + } + + public override void SetDefaults() + { + Item.damage = 14; + Item.width = 32; + Item.height = 38; + Item.useTime = 7; + Item.useAnimation = 7; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 5, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 7f; + Item.rare = ItemRarityID.Green; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:GoldBar", 20); + val.AddIngredient(ItemID.Diamond, 4); + val.AddIngredient(ItemID.Amethyst, 6); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/LightGuns/LightGun.png b/Items/Weapons/Ranged/LightGuns/LightGun.png new file mode 100644 index 0000000..b6ff7cd Binary files /dev/null and b/Items/Weapons/Ranged/LightGuns/LightGun.png differ diff --git a/Items/Weapons/Ranged/LightGuns/SpectralBlaster.cs b/Items/Weapons/Ranged/LightGuns/SpectralBlaster.cs new file mode 100644 index 0000000..48e879a --- /dev/null +++ b/Items/Weapons/Ranged/LightGuns/SpectralBlaster.cs @@ -0,0 +1,54 @@ +using FabusMod.Projectiles.LightBlasts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.LightGuns; + +public class SpectralBlaster : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Blaster"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nDoesn't require ammo\nShoots rainbow blasts"); + } + + public override void SetDefaults() + { + Item.damage = 100; + Item.width = 32; + Item.height = 38; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(1, 55, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; + Item.expert = true; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/LightGuns/SpectralBlaster.png b/Items/Weapons/Ranged/LightGuns/SpectralBlaster.png new file mode 100644 index 0000000..2a1f7c6 Binary files /dev/null and b/Items/Weapons/Ranged/LightGuns/SpectralBlaster.png differ diff --git a/Items/Weapons/Ranged/LightGuns/Taegeukgi.cs b/Items/Weapons/Ranged/LightGuns/Taegeukgi.cs new file mode 100644 index 0000000..299a381 --- /dev/null +++ b/Items/Weapons/Ranged/LightGuns/Taegeukgi.cs @@ -0,0 +1,55 @@ +using FabusMod.Projectiles.LightBlasts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.LightGuns; + +public class Taegeukgi : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Taegeukgi"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nDoesn't require ammo\nShoots little light blasts"); + } + + public override void SetDefaults() + { + Item.damage = 40; + Item.width = 32; + Item.height = 38; + Item.useTime = 5; + Item.useAnimation = 5; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 8, 25, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 6f; + Item.rare = ItemRarityID.LightRed; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:OrichalcumBar", 6); + val.AddIngredient(ItemID.Sapphire, 6); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/LightGuns/Taegeukgi.png b/Items/Weapons/Ranged/LightGuns/Taegeukgi.png new file mode 100644 index 0000000..685e9d8 Binary files /dev/null and b/Items/Weapons/Ranged/LightGuns/Taegeukgi.png differ diff --git a/Items/Weapons/Ranged/LightGuns/TheStinger.cs b/Items/Weapons/Ranged/LightGuns/TheStinger.cs new file mode 100644 index 0000000..6670880 --- /dev/null +++ b/Items/Weapons/Ranged/LightGuns/TheStinger.cs @@ -0,0 +1,60 @@ +using FabusMod.Projectiles.LightBlasts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.LightGuns; + +public class TheStinger : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Stinger"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable]\nDoesn't require ammo\nShoots little light blasts"); + } + + public override void SetDefaults() + { + Item.damage = 66; + Item.width = 32; + Item.height = 38; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 13, 85, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 5f; + Item.rare = ItemRarityID.Pink; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HallowedBar, 14); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.BlueDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/LightGuns/TheStinger.png b/Items/Weapons/Ranged/LightGuns/TheStinger.png new file mode 100644 index 0000000..58272b4 Binary files /dev/null and b/Items/Weapons/Ranged/LightGuns/TheStinger.png differ diff --git a/Items/Weapons/Ranged/LightGuns/TheStingerBlackCat.cs b/Items/Weapons/Ranged/LightGuns/TheStingerBlackCat.cs new file mode 100644 index 0000000..b0f7a73 --- /dev/null +++ b/Items/Weapons/Ranged/LightGuns/TheStingerBlackCat.cs @@ -0,0 +1,54 @@ +using FabusMod.Projectiles.LightBlasts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.LightGuns; + +public class TheStingerBlackCat : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Stinger - Black Cat"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]\nDoesn't require ammo\nShoots little light blasts"); + } + + public override void SetDefaults() + { + Item.damage = 66; + Item.width = 32; + Item.height = 38; + Item.useTime = 4; + Item.useAnimation = 4; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 13, 85, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 5f; + Item.rare = ItemRarityID.Pink; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 32f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(null, "TheStinger", 1); + val.AddIngredient(ItemID.BlackDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/LightGuns/TheStingerBlackCat.png b/Items/Weapons/Ranged/LightGuns/TheStingerBlackCat.png new file mode 100644 index 0000000..75c5550 Binary files /dev/null and b/Items/Weapons/Ranged/LightGuns/TheStingerBlackCat.png differ diff --git a/Items/Weapons/Ranged/MachinePistols/AugmentedUzi.cs b/Items/Weapons/Ranged/MachinePistols/AugmentedUzi.cs new file mode 100644 index 0000000..2908d56 --- /dev/null +++ b/Items/Weapons/Ranged/MachinePistols/AugmentedUzi.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.MachinePistols; + +public class AugmentedUzi : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Augmented Uzi"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n70% chance to not consume ammo \nShoots incredibly fast"); + } + + public override void SetDefaults() + { + Item.damage = 32; + Item.width = 48; + Item.height = 38; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 8, 20, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 18f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.Lime; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-12f, -8f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.7f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(6f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.Uzi, 1); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/MachinePistols/AugmentedUzi.png b/Items/Weapons/Ranged/MachinePistols/AugmentedUzi.png new file mode 100644 index 0000000..73d3f88 Binary files /dev/null and b/Items/Weapons/Ranged/MachinePistols/AugmentedUzi.png differ diff --git a/Items/Weapons/Ranged/MachinePistols/CosmicHacker.cs b/Items/Weapons/Ranged/MachinePistols/CosmicHacker.cs new file mode 100644 index 0000000..701c483 --- /dev/null +++ b/Items/Weapons/Ranged/MachinePistols/CosmicHacker.cs @@ -0,0 +1,67 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.MachinePistols; + +public class CosmicHacker : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cosmic Uzi"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n90% chance to not consume ammo \nConverts Musket Balls into homing Rainbow Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 82; + Item.width = 48; + Item.height = 36; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(2, 30, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 18f; + Item.useAmmo = AmmoID.Bullet; + Item.expert = true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-8f, -8f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.9f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 10); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/MachinePistols/CosmicHacker.png b/Items/Weapons/Ranged/MachinePistols/CosmicHacker.png new file mode 100644 index 0000000..51b48c9 Binary files /dev/null and b/Items/Weapons/Ranged/MachinePistols/CosmicHacker.png differ diff --git a/Items/Weapons/Ranged/MachinePistols/MachinePistol.cs b/Items/Weapons/Ranged/MachinePistols/MachinePistol.cs new file mode 100644 index 0000000..494e5fc --- /dev/null +++ b/Items/Weapons/Ranged/MachinePistols/MachinePistol.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.MachinePistols; + +public class MachinePistol : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Machine Pistol"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nShoots incredibly fast "); + } + + public override void SetDefaults() + { + Item.damage = 10; + Item.width = 50; + Item.height = 38; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 7, 20, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 18f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.LightRed; + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.8f; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-12f, -8f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(6f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:OrichalcumBar", 16); + val.AddIngredient(ItemID.Amethyst, 5); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/MachinePistols/MachinePistol.png b/Items/Weapons/Ranged/MachinePistols/MachinePistol.png new file mode 100644 index 0000000..6a006bd Binary files /dev/null and b/Items/Weapons/Ranged/MachinePistols/MachinePistol.png differ diff --git a/Items/Weapons/Ranged/MachinePistols/MachinePistolGolden.cs b/Items/Weapons/Ranged/MachinePistols/MachinePistolGolden.cs new file mode 100644 index 0000000..a4c159e --- /dev/null +++ b/Items/Weapons/Ranged/MachinePistols/MachinePistolGolden.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.MachinePistols; + +public class MachinePistolGolden : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Machine Pistol"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nShoots incredibly fast"); + } + + public override void SetDefaults() + { + Item.damage = 66; + Item.width = 50; + Item.height = 38; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 16, 50, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 18f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = 12; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-12f, -8f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.8f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:Verano", 1); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/MachinePistols/MachinePistolGolden.png b/Items/Weapons/Ranged/MachinePistols/MachinePistolGolden.png new file mode 100644 index 0000000..a39e9f4 Binary files /dev/null and b/Items/Weapons/Ranged/MachinePistols/MachinePistolGolden.png differ diff --git a/Items/Weapons/Ranged/MachinePistols/Verano.cs b/Items/Weapons/Ranged/MachinePistols/Verano.cs new file mode 100644 index 0000000..780e6d4 --- /dev/null +++ b/Items/Weapons/Ranged/MachinePistols/Verano.cs @@ -0,0 +1,68 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.MachinePistols; + +public class Verano : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Verano"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \n80% chance to not consume ammo \nShoots incredibly fast"); + } + + public override void SetDefaults() + { + Item.damage = 60; + Item.width = 48; + Item.height = 36; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 10, 60, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 18f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.Red; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-12f, -8f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.8f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.FragmentVortex, 12); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.GreenDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/MachinePistols/Verano.png b/Items/Weapons/Ranged/MachinePistols/Verano.png new file mode 100644 index 0000000..0610bd4 Binary files /dev/null and b/Items/Weapons/Ranged/MachinePistols/Verano.png differ diff --git a/Items/Weapons/Ranged/MachinePistols/VeranoRime.cs b/Items/Weapons/Ranged/MachinePistols/VeranoRime.cs new file mode 100644 index 0000000..d5080d0 --- /dev/null +++ b/Items/Weapons/Ranged/MachinePistols/VeranoRime.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.MachinePistols; + +public class VeranoRime : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Verano - Rime"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nShoots incredibly fast"); + } + + public override void SetDefaults() + { + Item.damage = 60; + Item.width = 56; + Item.height = 36; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 10, 60, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 18f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.Red; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-16f, 0f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.8f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.BlueDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/MachinePistols/VeranoRime.png b/Items/Weapons/Ranged/MachinePistols/VeranoRime.png new file mode 100644 index 0000000..248abfa Binary files /dev/null and b/Items/Weapons/Ranged/MachinePistols/VeranoRime.png differ diff --git a/Items/Weapons/Ranged/Peacekeeper/GoddessRevolver.cs b/Items/Weapons/Ranged/Peacekeeper/GoddessRevolver.cs new file mode 100644 index 0000000..a43dd8d --- /dev/null +++ b/Items/Weapons/Ranged/Peacekeeper/GoddessRevolver.cs @@ -0,0 +1,70 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Peacekeeper; + +public class GoddessRevolver : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Goddess' Revolver"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots 6 bullets in quick succession \n50% chance to not consume ammo \nConverts Musket Balls into High Velocity Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 86; + Item.width = 50; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 58, 20, 0); + Item.rare = ItemRarityID.Yellow; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 40f; + Item.reuseDelay = 12; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.5f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 35f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + if (type == 14) + { + type = 242; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:Peaceforcer", 1); + val.AddIngredient(ModContent.ItemType(), 8); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Peacekeeper/GoddessRevolver.png b/Items/Weapons/Ranged/Peacekeeper/GoddessRevolver.png new file mode 100644 index 0000000..cd50494 Binary files /dev/null and b/Items/Weapons/Ranged/Peacekeeper/GoddessRevolver.png differ diff --git a/Items/Weapons/Ranged/Peacekeeper/Peaceforcer.cs b/Items/Weapons/Ranged/Peacekeeper/Peaceforcer.cs new file mode 100644 index 0000000..a1765b4 --- /dev/null +++ b/Items/Weapons/Ranged/Peacekeeper/Peaceforcer.cs @@ -0,0 +1,77 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Peacekeeper; + +public class Peaceforcer : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Silencer"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \nShoots 6 bullets in quick succession \n50% chance to not consume ammo \nConverts Musket Balls into High Velocity Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 48; + Item.width = 50; + Item.height = 30; + Item.useTime = 2; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 21, 80, 0); + Item.rare = ItemRarityID.Pink; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 40f; + Item.reuseDelay = 12; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.5f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 35f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + if (type == 14) + { + type = 242; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:Peacegunner", 1); + val.AddRecipeGroup("FabusMod:AdamantiteBar", 8); + val.AddIngredient(ItemID.SoulofNight, 6); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType(), 1); + val2.AddIngredient(ItemID.SilverDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/Peacekeeper/Peaceforcer.png b/Items/Weapons/Ranged/Peacekeeper/Peaceforcer.png new file mode 100644 index 0000000..be323b6 Binary files /dev/null and b/Items/Weapons/Ranged/Peacekeeper/Peaceforcer.png differ diff --git a/Items/Weapons/Ranged/Peacekeeper/PeaceforcerVanHelsing.cs b/Items/Weapons/Ranged/Peacekeeper/PeaceforcerVanHelsing.cs new file mode 100644 index 0000000..2f760bb --- /dev/null +++ b/Items/Weapons/Ranged/Peacekeeper/PeaceforcerVanHelsing.cs @@ -0,0 +1,69 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Peacekeeper; + +public class PeaceforcerVanHelsing : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Silencer - Van Helsing"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots 6 bullets in quick succession \n50% chance to not consume ammo \nConverts Musket Balls into High Velocity Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 48; + Item.width = 50; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 10, 0, 0); + Item.rare = ItemRarityID.Pink; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 40f; + Item.reuseDelay = 12; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.5f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 35f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + if (type == 14) + { + type = 242; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.BrownDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Peacekeeper/PeaceforcerVanHelsing.png b/Items/Weapons/Ranged/Peacekeeper/PeaceforcerVanHelsing.png new file mode 100644 index 0000000..f8156c6 Binary files /dev/null and b/Items/Weapons/Ranged/Peacekeeper/PeaceforcerVanHelsing.png differ diff --git a/Items/Weapons/Ranged/Peacekeeper/Peacegunner.cs b/Items/Weapons/Ranged/Peacekeeper/Peacegunner.cs new file mode 100644 index 0000000..259c248 --- /dev/null +++ b/Items/Weapons/Ranged/Peacekeeper/Peacegunner.cs @@ -0,0 +1,65 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Peacekeeper; + +public class Peacegunner : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Solitude"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable]"); + } + + public override void SetDefaults() + { + Item.damage = 32; + Item.width = 50; + Item.height = 28; + Item.useTime = 12; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 4, 60, 0); + Item.rare = ItemRarityID.Orange; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 40f; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 35f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HellstoneBar, 10); + val.AddTile(TileID.Anvils); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.SilverDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/Peacekeeper/Peacegunner.png b/Items/Weapons/Ranged/Peacekeeper/Peacegunner.png new file mode 100644 index 0000000..f4ca232 Binary files /dev/null and b/Items/Weapons/Ranged/Peacekeeper/Peacegunner.png differ diff --git a/Items/Weapons/Ranged/Peacekeeper/PeacegunnerAmerican.cs b/Items/Weapons/Ranged/Peacekeeper/PeacegunnerAmerican.cs new file mode 100644 index 0000000..6503947 --- /dev/null +++ b/Items/Weapons/Ranged/Peacekeeper/PeacegunnerAmerican.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Peacekeeper; + +public class PeacegunnerAmerican : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Solitude - American"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]"); + } + + public override void SetDefaults() + { + Item.damage = 32; + Item.width = 50; + Item.height = 28; + Item.useTime = 12; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 4, 60, 0); + Item.rare = ItemRarityID.Orange; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 40f; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 35f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.BlueDye, 1); + val.AddIngredient(ItemID.RedDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Peacekeeper/PeacegunnerAmerican.png b/Items/Weapons/Ranged/Peacekeeper/PeacegunnerAmerican.png new file mode 100644 index 0000000..f3fd648 Binary files /dev/null and b/Items/Weapons/Ranged/Peacekeeper/PeacegunnerAmerican.png differ diff --git a/Items/Weapons/Ranged/Peacekeeper/Peacekeeper.cs b/Items/Weapons/Ranged/Peacekeeper/Peacekeeper.cs new file mode 100644 index 0000000..d037b3e --- /dev/null +++ b/Items/Weapons/Ranged/Peacekeeper/Peacekeeper.cs @@ -0,0 +1,59 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Peacekeeper; + +public class Peacekeeper : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Peacekeeper"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots]"); + } + + public override void SetDefaults() + { + Item.damage = 12; + Item.width = 50; + Item.height = 26; + Item.useTime = 15; + Item.useAnimation = 15; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 0, 60, 0); + Item.rare = ItemRarityID.Blue; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 40f; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 35f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("IronBar", 10); + val.AddIngredient(ItemID.Sapphire, 2); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Peacekeeper/Peacekeeper.png b/Items/Weapons/Ranged/Peacekeeper/Peacekeeper.png new file mode 100644 index 0000000..2471d85 Binary files /dev/null and b/Items/Weapons/Ranged/Peacekeeper/Peacekeeper.png differ diff --git a/Items/Weapons/Ranged/Peacekeeper/Unity.cs b/Items/Weapons/Ranged/Peacekeeper/Unity.cs new file mode 100644 index 0000000..19753b9 --- /dev/null +++ b/Items/Weapons/Ranged/Peacekeeper/Unity.cs @@ -0,0 +1,70 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Peacekeeper; + +public class Unity : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Unity"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots 6 bullets in quick succession \n60% chance to not consume ammo \nConverts Musket Balls into homing rainbow bullets"); + } + + public override void SetDefaults() + { + Item.damage = 150; + Item.width = 38; + Item.height = 24; + Item.useTime = 2; + Item.useAnimation = 12; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(2, 26, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 100f; + Item.reuseDelay = 12; + Item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -2f); + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.6f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 muzzleOffset = Vector2.Normalize(new Vector2(velocity.X, velocity.Y)) * 35f; + if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) + { + position += muzzleOffset; + } + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 8); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Peacekeeper/Unity.png b/Items/Weapons/Ranged/Peacekeeper/Unity.png new file mode 100644 index 0000000..5596eaa Binary files /dev/null and b/Items/Weapons/Ranged/Peacekeeper/Unity.png differ diff --git a/Items/Weapons/Ranged/PulsePistols/GoldenPulse.cs b/Items/Weapons/Ranged/PulsePistols/GoldenPulse.cs new file mode 100644 index 0000000..07ef9be --- /dev/null +++ b/Items/Weapons/Ranged/PulsePistols/GoldenPulse.cs @@ -0,0 +1,67 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.PulsePistols; + +public class GoldenPulse : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Pulse"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n90% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into golden Pulse Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 66; + Item.width = 40; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 15, 70, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.VilethornTip; + Item.shootSpeed = 25f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = 12; + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.9f; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(1f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:PulseSprayer", 1); + val.AddIngredient(ModContent.ItemType(), 2); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/PulsePistols/GoldenPulse.png b/Items/Weapons/Ranged/PulsePistols/GoldenPulse.png new file mode 100644 index 0000000..e85bce0 Binary files /dev/null and b/Items/Weapons/Ranged/PulsePistols/GoldenPulse.png differ diff --git a/Items/Weapons/Ranged/PulsePistols/Graffiti.cs b/Items/Weapons/Ranged/PulsePistols/Graffiti.cs new file mode 100644 index 0000000..3d19c0c --- /dev/null +++ b/Items/Weapons/Ranged/PulsePistols/Graffiti.cs @@ -0,0 +1,67 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.PulsePistols; + +public class Graffiti : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Graffiti"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n90% chance to not consume ammo \nConverts Musket Balls into homing Rainbow Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 80; + Item.width = 40; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(2, 25, 0, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 40f; + Item.useAmmo = AmmoID.Bullet; + Item.expert = true; + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.9f; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(1f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 10); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/PulsePistols/Graffiti.png b/Items/Weapons/Ranged/PulsePistols/Graffiti.png new file mode 100644 index 0000000..babba44 Binary files /dev/null and b/Items/Weapons/Ranged/PulsePistols/Graffiti.png differ diff --git a/Items/Weapons/Ranged/PulsePistols/PulsePistol.cs b/Items/Weapons/Ranged/PulsePistols/PulsePistol.cs new file mode 100644 index 0000000..4c8a576 --- /dev/null +++ b/Items/Weapons/Ranged/PulsePistols/PulsePistol.cs @@ -0,0 +1,68 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.PulsePistols; + +public class PulsePistol : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pulse Pistol"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n70% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into Pulse Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 10; + Item.width = 40; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 5, 32, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.LightRed; + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.7f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(1f, -2f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:AdamantiteBar", 6); + val.AddIngredient(ItemID.Diamond, 2); + val.AddIngredient(ItemID.Sapphire, 2); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/PulsePistols/PulsePistol.png b/Items/Weapons/Ranged/PulsePistols/PulsePistol.png new file mode 100644 index 0000000..a98c8ef Binary files /dev/null and b/Items/Weapons/Ranged/PulsePistols/PulsePistol.png differ diff --git a/Items/Weapons/Ranged/PulsePistols/PulseSprayer.cs b/Items/Weapons/Ranged/PulsePistols/PulseSprayer.cs new file mode 100644 index 0000000..cee60a0 --- /dev/null +++ b/Items/Weapons/Ranged/PulsePistols/PulseSprayer.cs @@ -0,0 +1,73 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.PulsePistols; + +public class PulseSprayer : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pulse Sprayer"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \n80% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into dark blue Pulse Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 54; + Item.width = 40; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 10, 20, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.Red; + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.8f; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(1f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:PunksPulse", 1); + val.AddIngredient(ItemID.FragmentVortex, 8); + val.AddTile(TileID.LunarCraftingStation); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.BlueDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/PulsePistols/PulseSprayer.png b/Items/Weapons/Ranged/PulsePistols/PulseSprayer.png new file mode 100644 index 0000000..e6888d8 Binary files /dev/null and b/Items/Weapons/Ranged/PulsePistols/PulseSprayer.png differ diff --git a/Items/Weapons/Ranged/PulsePistols/PulseSprayerCadet.cs b/Items/Weapons/Ranged/PulsePistols/PulseSprayerCadet.cs new file mode 100644 index 0000000..944d952 --- /dev/null +++ b/Items/Weapons/Ranged/PulsePistols/PulseSprayerCadet.cs @@ -0,0 +1,67 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.PulsePistols; + +public class PulseSprayerCadet : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pulse Sprayer - Cadet"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n80% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into Pulse Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 54; + Item.width = 40; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 10, 20, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.Red; + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.8f; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(1f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.SilverDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/PulsePistols/PulseSprayerCadet.png b/Items/Weapons/Ranged/PulsePistols/PulseSprayerCadet.png new file mode 100644 index 0000000..a41b29f Binary files /dev/null and b/Items/Weapons/Ranged/PulsePistols/PulseSprayerCadet.png differ diff --git a/Items/Weapons/Ranged/PulsePistols/PunksPulse.cs b/Items/Weapons/Ranged/PulsePistols/PunksPulse.cs new file mode 100644 index 0000000..2e9b77b --- /dev/null +++ b/Items/Weapons/Ranged/PulsePistols/PunksPulse.cs @@ -0,0 +1,74 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.PulsePistols; + +public class PunksPulse : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Punk's Pulse"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \n70% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into Pulse Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 25; + Item.width = 40; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 8, 64, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.Pink; + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.7f; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(1f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.HallowedBar, 8); + val.AddIngredient(ItemID.SoulofNight, 6); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.BlueDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/PulsePistols/PunksPulse.png b/Items/Weapons/Ranged/PulsePistols/PunksPulse.png new file mode 100644 index 0000000..f895af8 Binary files /dev/null and b/Items/Weapons/Ranged/PulsePistols/PunksPulse.png differ diff --git a/Items/Weapons/Ranged/PulsePistols/PunksPulseUltraviolet.cs b/Items/Weapons/Ranged/PulsePistols/PunksPulseUltraviolet.cs new file mode 100644 index 0000000..17715c1 --- /dev/null +++ b/Items/Weapons/Ranged/PulsePistols/PunksPulseUltraviolet.cs @@ -0,0 +1,67 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.PulsePistols; + +public class PunksPulseUltraviolet : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Punk's Pulse - Ultraviolet"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \n70% chance to not consume ammo \nShoots incredibly fast \nConverts Musket Balls into pink Pulse Bullets"); + } + + public override void SetDefaults() + { + Item.damage = 25; + Item.width = 40; + Item.height = 28; + Item.useTime = 2; + Item.useAnimation = 2; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 0f; + Item.value = Item.sellPrice(0, 8, 64, 0); + Item.UseSound = SoundID.Item11; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 25f; + Item.useAmmo = AmmoID.Bullet; + Item.rare = ItemRarityID.Pink; + } + + public override bool CanConsumeAmmo(Item ammo, Player player) + { + return Utils.NextFloat(Main.rand) >= 0.7f; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(1f, -2f); + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + velocity.X = perturbedSpeed.X; + velocity.Y = perturbedSpeed.Y; + if (type == 14) + { + type = ModContent.ProjectileType(); + } + return true; + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.PinkDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/PulsePistols/PunksPulseUltraviolet.png b/Items/Weapons/Ranged/PulsePistols/PunksPulseUltraviolet.png new file mode 100644 index 0000000..60c1700 Binary files /dev/null and b/Items/Weapons/Ranged/PulsePistols/PunksPulseUltraviolet.png differ diff --git a/Items/Weapons/Ranged/Shotguns/Depriver.cs b/Items/Weapons/Ranged/Shotguns/Depriver.cs new file mode 100644 index 0000000..cae7db6 --- /dev/null +++ b/Items/Weapons/Ranged/Shotguns/Depriver.cs @@ -0,0 +1,94 @@ +using FabusMod.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Shotguns; + +public class Depriver : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Color Splash"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nFires a spread of 8 bullets \nUsing grants the [c/8A8A8A:Ultracharging] buff, which has the following effects:\n - After 2 seconds of not being able to use items, grants the [c/AB2C2C:U][c/F3821B:l][c/E6AF31:t][c/63B465:r][c/82E8E8:a][c/9EF3EF:c][c/2BA0B5:h][c/734679:a][c/AB2C2C:r][c/F3821B:g][c/E6AF31:e] buff\n - [c/AB2C2C:U][c/F3821B:l][c/E6AF31:t][c/63B465:r][c/82E8E8:a][c/9EF3EF:c][c/2BA0B5:h][c/734679:a][c/AB2C2C:r][c/F3821B:g][c/E6AF31:e] increases damage dealt by Color Splasher by 12%, and reduces Color Splasher's use time by 20% \n[c/AB2C2C:U][c/F3821B:l][c/E6AF31:t][c/63B465:r][c/82E8E8:a][c/9EF3EF:c][c/2BA0B5:h][c/734679:a][c/AB2C2C:r][c/F3821B:g][c/E6AF31:e] has a cooldown of [c/CA4646:40 seconds] once the effect ends\nConverts Musket Balls into homing Rainbow Bullets \nOnly uses one Bullet per use"); + } + + public override void SetDefaults() + { + Item.damage = 120; + Item.width = 70; + Item.height = 36; + Item.useTime = 18; + Item.useAnimation = 18; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(2, 14, 0, 0); + Item.expert = true; + Item.UseSound = SoundID.Item38; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 35f; + Item.useAmmo = AmmoID.Bullet; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + if (type == 14) + { + type = ModContent.ProjectileType(); + } + int numberProjectiles = 8; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 140, true); + } + } + else if (player.HasBuff(ModContent.BuffType())) + { + Item.damage = 134; + Item.useTime = 16; + Item.useAnimation = 16; + } + else + { + Item.damage = 120; + Item.useTime = 20; + Item.useAnimation = 20; + } + return CanUseItem(player); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -5f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 8); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Shotguns/Depriver.png b/Items/Weapons/Ranged/Shotguns/Depriver.png new file mode 100644 index 0000000..f9c8552 Binary files /dev/null and b/Items/Weapons/Ranged/Shotguns/Depriver.png differ diff --git a/Items/Weapons/Ranged/Shotguns/GoldenShotgun.cs b/Items/Weapons/Ranged/Shotguns/GoldenShotgun.cs new file mode 100644 index 0000000..45d5258 --- /dev/null +++ b/Items/Weapons/Ranged/Shotguns/GoldenShotgun.cs @@ -0,0 +1,90 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Shotguns; + +public class GoldenShotgun : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Shotgun"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nFires a spread of 7 bullets \nUsing grants the [c/8A8A8A:Hypercharging] buff, which has the following effects:\n - After 2 seconds of not being able to use items, grants the [c/FF9300:Hypercharge] buff\n - [c/FF9300:Hypercharge] increases damage dealt by Golden Shotgun by 12%, and reduces Golden Shotgun's use time by 20% \n[c/FF9300:Hypercharge] has a cooldown of [c/CA4646:40 seconds] once the effect ends\nOnly uses one Bullet per use"); + } + + public override void SetDefaults() + { + Item.damage = 52; + Item.width = 80; + Item.height = 34; + Item.useTime = 25; + Item.useAnimation = 25; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 46, 0, 0); + Item.rare = ItemRarityID.Yellow; + Item.UseSound = SoundID.Item38; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 35f; + Item.useAmmo = AmmoID.Bullet; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 7; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return true; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 140, true); + } + } + else if (player.HasBuff(ModContent.BuffType())) + { + Item.damage = 58; + Item.useTime = 20; + Item.useAnimation = 20; + } + else + { + Item.damage = 52; + Item.useTime = 25; + Item.useAnimation = 25; + } + return CanUseItem(player); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -5f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:HellkinShotgun", 1); + val.AddIngredient(ModContent.ItemType(), 8); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Shotguns/GoldenShotgun.png b/Items/Weapons/Ranged/Shotguns/GoldenShotgun.png new file mode 100644 index 0000000..c181f40 Binary files /dev/null and b/Items/Weapons/Ranged/Shotguns/GoldenShotgun.png differ diff --git a/Items/Weapons/Ranged/Shotguns/HellfireShotgun.cs b/Items/Weapons/Ranged/Shotguns/HellfireShotgun.cs new file mode 100644 index 0000000..e68700f --- /dev/null +++ b/Items/Weapons/Ranged/Shotguns/HellfireShotgun.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Shotguns; + +public class HellfireShotgun : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hellfire Shotgun"); + Tooltip.SetDefault("Fires a spread of 5 bullets \nOnly uses one Bullet per use"); + } + + public override void SetDefaults() + { + Item.damage = 21; + Item.width = 78; + Item.height = 28; + Item.useTime = 45; + Item.useAnimation = 45; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 2, 0, 0); + Item.rare = ItemRarityID.Orange; + Item.UseSound = SoundID.Item36; + Item.autoReuse = false; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 35f; + Item.useAmmo = AmmoID.Bullet; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 5; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(12f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -5f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.Obsidian, 16); + val.AddIngredient(ItemID.HellstoneBar, 4); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Shotguns/HellfireShotgun.png b/Items/Weapons/Ranged/Shotguns/HellfireShotgun.png new file mode 100644 index 0000000..9f4266c Binary files /dev/null and b/Items/Weapons/Ranged/Shotguns/HellfireShotgun.png differ diff --git a/Items/Weapons/Ranged/Shotguns/HellkinShotgun.cs b/Items/Weapons/Ranged/Shotguns/HellkinShotgun.cs new file mode 100644 index 0000000..0bb9c66 --- /dev/null +++ b/Items/Weapons/Ranged/Shotguns/HellkinShotgun.cs @@ -0,0 +1,96 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Shotguns; + +public class HellkinShotgun : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hellraiser"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \nFires a spread of 6 bullets \nUsing grants the [c/8A8A8A:Hypercharging] buff, which has the following effects:\n - After 2 seconds of not being able to use items, grants the [c/FF9300:Hypercharge] buff\n - [c/FF9300:Hypercharge] increases damage dealt by Hellraiser by 12%, and reduces Hellraiser's use time by 20% \n[c/FF9300:Hypercharge] has a cooldown of [c/CA4646:40 seconds] once the effect ends\nOnly uses one Bullet per use"); + } + + public override void SetDefaults() + { + Item.damage = 46; + Item.width = 80; + Item.height = 34; + Item.useTime = 28; + Item.useAnimation = 28; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 14, 20, 0); + Item.rare = ItemRarityID.LightPurple; + Item.UseSound = SoundID.Item38; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 35f; + Item.useAmmo = AmmoID.Bullet; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 6; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return true; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 140, true); + } + } + else if (player.HasBuff(ModContent.BuffType())) + { + Item.damage = 52; + Item.useTime = 25; + Item.useAnimation = 25; + } + else + { + Item.damage = 46; + Item.useTime = 28; + Item.useAnimation = 28; + } + return CanUseItem(player); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -5f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:HellshiverGun"); + val.AddIngredient(ItemID.HallowedBar, 6); + val.AddIngredient(ModContent.ItemType(), 4); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.OrangeDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/Shotguns/HellkinShotgun.png b/Items/Weapons/Ranged/Shotguns/HellkinShotgun.png new file mode 100644 index 0000000..b8d5175 Binary files /dev/null and b/Items/Weapons/Ranged/Shotguns/HellkinShotgun.png differ diff --git a/Items/Weapons/Ranged/Shotguns/HellkinShotgunDracula.cs b/Items/Weapons/Ranged/Shotguns/HellkinShotgunDracula.cs new file mode 100644 index 0000000..efee80d --- /dev/null +++ b/Items/Weapons/Ranged/Shotguns/HellkinShotgunDracula.cs @@ -0,0 +1,89 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Shotguns; + +public class HellkinShotgunDracula : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hellraiser - Dracula"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nFires a spread of 6 bullets \nUsing grants the [c/8A8A8A:Hypercharging] buff, which has the following effects:\n - After 2 seconds of not being able to use items, grants the [c/FF9300:Hypercharge] buff\n - [c/FF9300:Hypercharge] increases damage dealt by Hellraiser by 12%, and reduces Hellraiser's use time by 20% \n[c/FF9300:Hypercharge] has a cooldown of [c/CA4646:40 seconds] once the effect ends\nOnly uses one Bullet per use"); + } + + public override void SetDefaults() + { + Item.damage = 46; + Item.width = 78; + Item.height = 30; + Item.useTime = 28; + Item.useAnimation = 28; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 14, 20, 0); + Item.rare = ItemRarityID.LightPurple; + Item.UseSound = SoundID.Item38; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 35f; + Item.useAmmo = AmmoID.Bullet; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 6; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(8f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return true; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 140, true); + } + } + else if (player.HasBuff(ModContent.BuffType())) + { + Item.damage = 52; + Item.useTime = 25; + Item.useAnimation = 25; + } + else + { + Item.damage = 46; + Item.useTime = 28; + Item.useAnimation = 28; + } + return this.CanUseItem(player); + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -5f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.RedDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Shotguns/HellkinShotgunDracula.png b/Items/Weapons/Ranged/Shotguns/HellkinShotgunDracula.png new file mode 100644 index 0000000..ccfe6c8 Binary files /dev/null and b/Items/Weapons/Ranged/Shotguns/HellkinShotgunDracula.png differ diff --git a/Items/Weapons/Ranged/Shotguns/HellshiverGun.cs b/Items/Weapons/Ranged/Shotguns/HellshiverGun.cs new file mode 100644 index 0000000..c2c9c97 --- /dev/null +++ b/Items/Weapons/Ranged/Shotguns/HellshiverGun.cs @@ -0,0 +1,67 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Shotguns; + +public class HellshiverGun : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shivering Shotgun"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots, dyeable] \nFires a spread of 6 bullets \nOnly uses one Bullet per use"); + } + + public override void SetDefaults() + { + Item.damage = 30; + Item.width = 78; + Item.height = 28; + Item.useTime = 35; + Item.useAnimation = 35; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 4, 64, 0); + Item.rare = ItemRarityID.LightRed; + Item.UseSound = SoundID.Item36; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 35f; + Item.useAmmo = AmmoID.Bullet; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 6; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + } + return false; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -5f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:OrichalcumBar", 6); + val.AddIngredient(ItemID.IceBlock, 20); + val.AddTile(TileID.MythrilAnvil); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.BlueFlameDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Ranged/Shotguns/HellshiverGun.png b/Items/Weapons/Ranged/Shotguns/HellshiverGun.png new file mode 100644 index 0000000..5c02c04 Binary files /dev/null and b/Items/Weapons/Ranged/Shotguns/HellshiverGun.png differ diff --git a/Items/Weapons/Ranged/Shotguns/HellshiverGunHellfire.cs b/Items/Weapons/Ranged/Shotguns/HellshiverGunHellfire.cs new file mode 100644 index 0000000..c97ab3b --- /dev/null +++ b/Items/Weapons/Ranged/Shotguns/HellshiverGunHellfire.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Ranged.Shotguns; + +public class HellshiverGunHellfire : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shivering Shotgun - Hellfire"); + Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nFires a spread of 6 bullets \nOnly uses one Bullet per use"); + } + + public override void SetDefaults() + { + Item.damage = 30; + Item.width = 78; + Item.height = 28; + Item.useTime = 35; + Item.useAnimation = 35; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 4f; + Item.value = Item.sellPrice(0, 4, 64, 0); + Item.rare = ItemRarityID.LightRed; + Item.UseSound = SoundID.Item36; + Item.autoReuse = true; + Item.shoot = ProjectileID.PurificationPowder; + Item.shootSpeed = 35f; + Item.useAmmo = AmmoID.Bullet; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + int numberProjectiles = 6; + for (int i = 0; i < numberProjectiles; i++) + { + Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f)); + Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI); + } + return false; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-2f, -5f); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.FlameDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Ranged/Shotguns/HellshiverGunHellfire.png b/Items/Weapons/Ranged/Shotguns/HellshiverGunHellfire.png new file mode 100644 index 0000000..53c6613 Binary files /dev/null and b/Items/Weapons/Ranged/Shotguns/HellshiverGunHellfire.png differ diff --git a/Items/Weapons/Summon/GoddessSummoner.cs b/Items/Weapons/Summon/GoddessSummoner.cs new file mode 100644 index 0000000..2f87a3b --- /dev/null +++ b/Items/Weapons/Summon/GoddessSummoner.cs @@ -0,0 +1,63 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Summon; + +public class GoddessSummoner : ModItem +{ + public override void SetDefaults() + { + Item.damage = 120; + Item.mana = 18; + Item.width = 58; + Item.height = 62; + Item.useTime = 36; + Item.useAnimation = 36; + Item.useStyle = ItemUseStyleID.Swing; + Item.noMelee = true; + Item.knockBack = 3f; + Item.value = Item.buyPrice(0, 9, 0, 0); + Item.rare = ItemRarityID.Yellow; + Item.UseSound = SoundID.Item44; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 1f; + Item.buffType = ModContent.BuffType(); + Item.buffTime = 3600; + } + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Goddess' Summoning Staff"); + Tooltip.SetDefault("Summons a golden servant to fight for you"); + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + return player.altFunctionUse != 2; + } + + public override bool? UseItem(Player player)/* tModPorter Suggestion: Return null instead of false */ + { + if (player.altFunctionUse == 2) + { + player.MinionNPCTargetAim(false); + } + return UseItem(player); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType(), 16); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Weapons/Summon/GoddessSummoner.png b/Items/Weapons/Summon/GoddessSummoner.png new file mode 100644 index 0000000..cd44acd Binary files /dev/null and b/Items/Weapons/Summon/GoddessSummoner.png differ diff --git a/Items/Weapons/Thrown/Daggers/ColorfulSolution.cs b/Items/Weapons/Thrown/Daggers/ColorfulSolution.cs new file mode 100644 index 0000000..699049a --- /dev/null +++ b/Items/Weapons/Thrown/Daggers/ColorfulSolution.cs @@ -0,0 +1,44 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Thrown.Daggers; + +public class ColorfulSolution : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Colorful Solution"); + Tooltip.SetDefault("Doesn't consume on use \n[c/B6FF00:Autothrows] \nInflicts [c/401440:Venom] for 12 seconds on hit"); + } + + public override void SetDefaults() + { + Item.maxStack = 1; + Item.damage = 195; + Item.knockBack = 3f; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.useAnimation = 3; + Item.useTime = 3; + Item.width = 22; + Item.height = 44; + Item.consumable = false; + Item.noUseGraphic = true; + Item.noMelee = true; + Item.autoReuse = true; + Item.value = Item.sellPrice(3, 0, 0, 0); + Item.expert = true; + Item.shootSpeed = 28f; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ItemID.MagicDagger, 1); + val.AddIngredient(ModContent.ItemType(), 14); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Thrown/Daggers/ColorfulSolution.png b/Items/Weapons/Thrown/Daggers/ColorfulSolution.png new file mode 100644 index 0000000..10af83c Binary files /dev/null and b/Items/Weapons/Thrown/Daggers/ColorfulSolution.png differ diff --git a/Items/Weapons/Thrown/Shuriken/CarbonShuriken.cs b/Items/Weapons/Thrown/Shuriken/CarbonShuriken.cs new file mode 100644 index 0000000..8eeb224 --- /dev/null +++ b/Items/Weapons/Thrown/Shuriken/CarbonShuriken.cs @@ -0,0 +1,52 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Thrown.Shuriken; + +public class CarbonShuriken : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Carbon Shuriken"); + Tooltip.SetDefault("[c/B6FF00:Autothrows, dyeable]\nThrows 3 fast-flying Shurikens at once"); + } + + public override void SetDefaults() + { + Item.maxStack = 1; + Item.damage = 19; + Item.knockBack = 0f; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.useAnimation = 9; + Item.useTime = 3; + Item.width = 30; + Item.height = 28; + Item.consumable = false; + Item.noUseGraphic = true; + Item.noMelee = true; + Item.autoReuse = true; + Item.value = Item.sellPrice(0, 1, 50, 0); + Item.rare = ItemRarityID.Green; + Item.shootSpeed = 30f; + Item.reuseDelay = 14; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("FabusMod:DemoniteBar", 3); + val.AddIngredient(ItemID.Sapphire, 1); + val.AddTile(TileID.Anvils); + val.Register(); + + Recipe val2 = CreateRecipe(); + val2.AddIngredient(ModContent.ItemType()); + val2.AddIngredient(ItemID.BlueDye, 1); + val2.AddTile(TileID.DyeVat); + val2.Register(); + } +} diff --git a/Items/Weapons/Thrown/Shuriken/CarbonShuriken.png b/Items/Weapons/Thrown/Shuriken/CarbonShuriken.png new file mode 100644 index 0000000..085c82c Binary files /dev/null and b/Items/Weapons/Thrown/Shuriken/CarbonShuriken.png differ diff --git a/Items/Weapons/Thrown/Shuriken/CarbonShurikenNihon.cs b/Items/Weapons/Thrown/Shuriken/CarbonShurikenNihon.cs new file mode 100644 index 0000000..fee4b33 --- /dev/null +++ b/Items/Weapons/Thrown/Shuriken/CarbonShurikenNihon.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Thrown.Shuriken; + +public class CarbonShurikenNihon : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Carbon Shuriken - Nihon"); + Tooltip.SetDefault("[c/B6FF00:Autothrows]\nThrows 3 fast-flying Shurikens at once"); + } + + public override void SetDefaults() + { + Item.maxStack = 1; + Item.damage = 19; + Item.knockBack = 0f; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.useAnimation = 9; + Item.useTime = 3; + Item.width = 30; + Item.height = 28; + Item.consumable = false; + Item.noUseGraphic = true; + Item.noMelee = true; + Item.autoReuse = true; + Item.value = Item.sellPrice(0, 1, 50, 0); + Item.rare = ItemRarityID.Green; + Item.shootSpeed = 30f; + Item.reuseDelay = 14; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.SilverDye, 1); + val.AddTile(TileID.DyeVat); + val.Register(); + } +} diff --git a/Items/Weapons/Thrown/Shuriken/CarbonShurikenNihon.png b/Items/Weapons/Thrown/Shuriken/CarbonShurikenNihon.png new file mode 100644 index 0000000..59c2fe5 Binary files /dev/null and b/Items/Weapons/Thrown/Shuriken/CarbonShurikenNihon.png differ diff --git a/Items/Weapons/Thrown/Shuriken/HerosShuriken.cs b/Items/Weapons/Thrown/Shuriken/HerosShuriken.cs new file mode 100644 index 0000000..8d1c921 --- /dev/null +++ b/Items/Weapons/Thrown/Shuriken/HerosShuriken.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Thrown.Shuriken; + +public class HerosShuriken : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hero's Shuriken"); + Tooltip.SetDefault("Does not consume on use \nThrows 3 fast-flying Shurikens at once"); + } + + public override void SetDefaults() + { + Item.maxStack = 1; + Item.damage = 10; + Item.knockBack = 0f; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.useAnimation = 12; + Item.useTime = 4; + Item.width = 34; + Item.height = 38; + Item.consumable = false; + Item.noUseGraphic = true; + Item.noMelee = true; + Item.autoReuse = false; + Item.value = Item.sellPrice(0, 0, 80, 0); + Item.rare = ItemRarityID.Blue; + Item.shootSpeed = 30f; + Item.reuseDelay = 14; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddRecipeGroup("IronBar", 3); + val.AddIngredient(ItemID.Emerald, 1); + val.AddTile(TileID.Anvils); + val.Register(); + } +} diff --git a/Items/Weapons/Thrown/Shuriken/HerosShuriken.png b/Items/Weapons/Thrown/Shuriken/HerosShuriken.png new file mode 100644 index 0000000..905fe21 Binary files /dev/null and b/Items/Weapons/Thrown/Shuriken/HerosShuriken.png differ diff --git a/Items/Weapons/Thrown/Shuriken/OniSlayer.cs b/Items/Weapons/Thrown/Shuriken/OniSlayer.cs new file mode 100644 index 0000000..c92a5f8 --- /dev/null +++ b/Items/Weapons/Thrown/Shuriken/OniSlayer.cs @@ -0,0 +1,47 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Thrown.Shuriken; + +public class OniSlayer : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Demon Slayer"); + Tooltip.SetDefault("[c/B6FF00:Autothrows]\nThrows 4 fast-flying Shurikens at once"); + } + + public override void SetDefaults() + { + Item.maxStack = 1; + Item.damage = 48; + Item.knockBack = 0f; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.useAnimation = 8; + Item.useTime = 2; + Item.width = 38; + Item.height = 42; + Item.consumable = false; + Item.noUseGraphic = true; + Item.noMelee = true; + Item.autoReuse = true; + Item.value = Item.sellPrice(0, 11, 85, 0); + Item.rare = ItemRarityID.LightRed; + Item.shootSpeed = 30f; + Item.reuseDelay = 12; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddRecipeGroup("FabusMod:CarbonShuriken", 1); + val.AddRecipeGroup("FabusMod:AdamantiteBar", 6); + val.AddIngredient(ItemID.Ruby, 3); + val.AddIngredient(ItemID.SoulofNight, 3); + val.AddTile(TileID.DemonAltar); + val.Register(); + } +} diff --git a/Items/Weapons/Thrown/Shuriken/OniSlayer.png b/Items/Weapons/Thrown/Shuriken/OniSlayer.png new file mode 100644 index 0000000..da09a7d Binary files /dev/null and b/Items/Weapons/Thrown/Shuriken/OniSlayer.png differ diff --git a/Items/Weapons/Thrown/Shuriken/SparklingDemon.cs b/Items/Weapons/Thrown/Shuriken/SparklingDemon.cs new file mode 100644 index 0000000..95798b6 --- /dev/null +++ b/Items/Weapons/Thrown/Shuriken/SparklingDemon.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Thrown.Shuriken; + +public class SparklingDemon : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sparkling Demon"); + Tooltip.SetDefault("[c/B6FF00:Autothrows]\nThrows 5 fast-flying Shurikens at once"); + } + + public override void SetDefaults() + { + Item.maxStack = 1; + Item.damage = 90; + Item.knockBack = 0f; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.useAnimation = 10; + Item.useTime = 2; + Item.width = 38; + Item.height = 42; + Item.consumable = false; + Item.noUseGraphic = true; + Item.noMelee = true; + Item.autoReuse = true; + Item.value = Item.sellPrice(0, 58, 50, 0); + Item.rare = ItemRarityID.Yellow; + Item.shootSpeed = 30f; + Item.reuseDelay = 12; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(TileID.AdamantiteForge); + val.Register(); + } +} diff --git a/Items/Weapons/Thrown/Shuriken/SparklingDemon.png b/Items/Weapons/Thrown/Shuriken/SparklingDemon.png new file mode 100644 index 0000000..d6a0e98 Binary files /dev/null and b/Items/Weapons/Thrown/Shuriken/SparklingDemon.png differ diff --git a/Items/Weapons/Thrown/Shuriken/StonePlatedShuriken.cs b/Items/Weapons/Thrown/Shuriken/StonePlatedShuriken.cs new file mode 100644 index 0000000..b3f3eb3 --- /dev/null +++ b/Items/Weapons/Thrown/Shuriken/StonePlatedShuriken.cs @@ -0,0 +1,46 @@ +using FabusMod.Projectiles.Shuriken; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Thrown.Shuriken; + +public class StonePlatedShuriken : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Stone-Plated Shuriken"); + Tooltip.SetDefault("Does not consume on use"); + } + + public override void SetDefaults() + { + Item.maxStack = 1; + Item.damage = 9; + Item.knockBack = 0f; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.useAnimation = 16; + Item.useTime = 16; + Item.width = 34; + Item.height = 38; + Item.consumable = false; + Item.noUseGraphic = true; + Item.noMelee = true; + Item.autoReuse = false; + Item.value = Item.sellPrice(0, 0, 5, 40); + Item.rare = ItemRarityID.White; + Item.shootSpeed = 9f; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ItemID.StoneBlock, 3); + val.AddIngredient(ItemID.FallenStar, 1); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Thrown/Shuriken/StonePlatedShuriken.png b/Items/Weapons/Thrown/Shuriken/StonePlatedShuriken.png new file mode 100644 index 0000000..239ad70 Binary files /dev/null and b/Items/Weapons/Thrown/Shuriken/StonePlatedShuriken.png differ diff --git a/Items/Weapons/Thrown/Shuriken/TheSpinningRainbow.cs b/Items/Weapons/Thrown/Shuriken/TheSpinningRainbow.cs new file mode 100644 index 0000000..46268a6 --- /dev/null +++ b/Items/Weapons/Thrown/Shuriken/TheSpinningRainbow.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Items.Weapons.Thrown.Shuriken; + +public class TheSpinningRainbow : ModItem +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Spinning Rainbow"); + Tooltip.SetDefault("[c/B6FF00:Autothrows]\nThrows 6 Shurikens at once"); + } + + public override void SetDefaults() + { + Item.maxStack = 1; + Item.damage = 230; + Item.knockBack = 0f; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.useAnimation = 12; + Item.useTime = 2; + Item.width = 28; + Item.height = 28; + Item.consumable = false; + Item.noUseGraphic = true; + Item.noMelee = true; + Item.autoReuse = true; + Item.value = Item.sellPrice(2, 70, 0, 0); + Item.expert = true; + Item.shootSpeed = 25f; + Item.reuseDelay = 8; + Item.shoot = ModContent.ProjectileType(); + } + + public override void AddRecipes() + { + Recipe val = CreateRecipe(); + val.AddIngredient(ModContent.ItemType()); + val.AddIngredient(ModContent.ItemType(), 6); + val.AddTile(ModContent.TileType()); + val.Register(); + } +} diff --git a/Items/Weapons/Thrown/Shuriken/TheSpinningRainbow.png b/Items/Weapons/Thrown/Shuriken/TheSpinningRainbow.png new file mode 100644 index 0000000..e465d83 Binary files /dev/null and b/Items/Weapons/Thrown/Shuriken/TheSpinningRainbow.png differ diff --git a/NPCs/ModGlobalNPC.cs b/NPCs/ModGlobalNPC.cs new file mode 100644 index 0000000..7f04c83 --- /dev/null +++ b/NPCs/ModGlobalNPC.cs @@ -0,0 +1,33 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Terraria.DataStructures; + +namespace FabusMod.NPCs; + +public class ModGlobalNPC : GlobalNPC +{ + public override void OnKill(NPC npc) + { + if (npc.type == NPCID.SkeletronPrime && Utils.NextFloat(Main.rand) < 0.1f) + { + Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType(), 1, false, 0, false, false); + } + if (npc.type == NPCID.TheDestroyer && Utils.NextFloat(Main.rand) < 0.1f) + { + Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType(), 1, false, 0, false, false); + } + if (npc.type == NPCID.Retinazer && Utils.NextFloat(Main.rand) < 0.1f) + { + Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType(), 1, false, 0, false, false); + } + if (npc.type == NPCID.Spazmatism && Utils.NextFloat(Main.rand) < 0.1f) + { + Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType(), 1, false, 0, false, false); + } + if (npc.type == NPCID.Unicorn && Utils.NextFloat(Main.rand) < 0.3f && Main.expertMode) + { + Item.NewItem(new EntitySource_Misc(""), npc.position, npc.width, npc.height, ModContent.ItemType(), Main.rand.Next(1, 5), false, 0, false, false); + } + } +} diff --git a/NPCs/VanillaNPCShop.cs b/NPCs/VanillaNPCShop.cs new file mode 100644 index 0000000..b8093f6 --- /dev/null +++ b/NPCs/VanillaNPCShop.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.NPCs; + +public class VanillaNPCShop : GlobalNPC +{ + public override void SetupShop(int type, Chest shop, ref int nextSlot) + { + if (type == 17) + { + shop.item[nextSlot].SetDefaults(75, false); + nextSlot++; + shop.item[nextSlot].SetDefaults(150, false); + shop.item[nextSlot].shopCustomPrice = 100; + nextSlot++; + } + if (type == 20) + { + shop.item[nextSlot].SetDefaults(ModContent.ItemType(), false); + nextSlot++; + } + } +} diff --git a/Projectiles/Arrows/DemonArrow.cs b/Projectiles/Arrows/DemonArrow.cs new file mode 100644 index 0000000..a375e1a --- /dev/null +++ b/Projectiles/Arrows/DemonArrow.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Arrows; + +public class DemonArrow : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = false; + Projectile.timeLeft = 1000; + Projectile.light = 1f; + Projectile.penetrate = 1; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[dust]; + obj.velocity /= 2f; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f); + } + SoundEngine.PlaySound(SoundID.Item2, Projectile.position); + } +} diff --git a/Projectiles/Arrows/DemonArrow.png b/Projectiles/Arrows/DemonArrow.png new file mode 100644 index 0000000..096efd2 Binary files /dev/null and b/Projectiles/Arrows/DemonArrow.png differ diff --git a/Projectiles/Arrows/GoldenSpiritArrow.cs b/Projectiles/Arrows/GoldenSpiritArrow.cs new file mode 100644 index 0000000..f384c8a --- /dev/null +++ b/Projectiles/Arrows/GoldenSpiritArrow.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Arrows; + +public class GoldenSpiritArrow : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = false; + Projectile.timeLeft = 1000; + Projectile.light = 1f; + Projectile.penetrate = 1; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[dust]; + obj.velocity /= 2f; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f); + } + SoundEngine.PlaySound(SoundID.Item1, Projectile.position); + } +} diff --git a/Projectiles/Arrows/GoldenSpiritArrow.png b/Projectiles/Arrows/GoldenSpiritArrow.png new file mode 100644 index 0000000..813b005 Binary files /dev/null and b/Projectiles/Arrows/GoldenSpiritArrow.png differ diff --git a/Projectiles/Arrows/LegendaryArrow.cs b/Projectiles/Arrows/LegendaryArrow.cs new file mode 100644 index 0000000..14e56ab --- /dev/null +++ b/Projectiles/Arrows/LegendaryArrow.cs @@ -0,0 +1,55 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Arrows; + +public class LegendaryArrow : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 18; + Projectile.height = 34; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = false; + Projectile.timeLeft = 1000; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[dust]; + obj.velocity /= 2f; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(1)) + { + target.AddBuff(69, 900, false); + target.AddBuff(70, 900, false); + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f); + } + for (int j = 0; j < 5; j++) + { + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f); + } + SoundEngine.PlaySound(SoundID.Item1, Projectile.position); + } +} diff --git a/Projectiles/Arrows/LegendaryArrow.png b/Projectiles/Arrows/LegendaryArrow.png new file mode 100644 index 0000000..c034072 Binary files /dev/null and b/Projectiles/Arrows/LegendaryArrow.png differ diff --git a/Projectiles/Arrows/PiercingArrow.cs b/Projectiles/Arrows/PiercingArrow.cs new file mode 100644 index 0000000..d316cb2 --- /dev/null +++ b/Projectiles/Arrows/PiercingArrow.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Arrows; + +public class PiercingArrow : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 14; + Projectile.height = 40; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = false; + + Projectile.timeLeft = 1000; + Projectile.light = 1f; + Projectile.penetrate = -1; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + } +} diff --git a/Projectiles/Arrows/PiercingArrow.png b/Projectiles/Arrows/PiercingArrow.png new file mode 100644 index 0000000..f1baad4 Binary files /dev/null and b/Projectiles/Arrows/PiercingArrow.png differ diff --git a/Projectiles/Arrows/RainbowArrow.cs b/Projectiles/Arrows/RainbowArrow.cs new file mode 100644 index 0000000..51a2c71 --- /dev/null +++ b/Projectiles/Arrows/RainbowArrow.cs @@ -0,0 +1,80 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Arrows; + +public class RainbowArrow : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = false; + + Projectile.timeLeft = 1000; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(1)) + { + target.AddBuff(69, 900, false); + target.AddBuff(70, 900, false); + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + SoundEngine.PlaySound(SoundID.Item1, Projectile.position); + } +} diff --git a/Projectiles/Arrows/RainbowArrow.png b/Projectiles/Arrows/RainbowArrow.png new file mode 100644 index 0000000..e2f3204 Binary files /dev/null and b/Projectiles/Arrows/RainbowArrow.png differ diff --git a/Projectiles/Arrows/StormArrow.cs b/Projectiles/Arrows/StormArrow.cs new file mode 100644 index 0000000..c55fba8 --- /dev/null +++ b/Projectiles/Arrows/StormArrow.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Arrows; + +public class StormArrow : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = false; + Projectile.timeLeft = 1000; + Projectile.light = 1f; + Projectile.penetrate = 1; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[dust]; + obj.velocity /= 2f; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f); + } + SoundEngine.PlaySound(SoundID.Item1, Projectile.position); + } +} diff --git a/Projectiles/Arrows/StormArrow.png b/Projectiles/Arrows/StormArrow.png new file mode 100644 index 0000000..5dd1501 Binary files /dev/null and b/Projectiles/Arrows/StormArrow.png differ diff --git a/Projectiles/Daggers/ColorfulSolution.cs b/Projectiles/Daggers/ColorfulSolution.cs new file mode 100644 index 0000000..14157ee --- /dev/null +++ b/Projectiles/Daggers/ColorfulSolution.cs @@ -0,0 +1,81 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Daggers; + +public class ColorfulSolution : ModProjectile +{ + private const float maxTicks = 70f; + + private const int alphaReducation = 25; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Colorful Solution"); + } + + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 34; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + AIType = 48; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(1)) + { + target.AddBuff(70, 720, false); + } + } +} diff --git a/Projectiles/Daggers/ColorfulSolution.png b/Projectiles/Daggers/ColorfulSolution.png new file mode 100644 index 0000000..5049e3a Binary files /dev/null and b/Projectiles/Daggers/ColorfulSolution.png differ diff --git a/Projectiles/FoxPistol/BlueBolt.cs b/Projectiles/FoxPistol/BlueBolt.cs new file mode 100644 index 0000000..88dd42f --- /dev/null +++ b/Projectiles/FoxPistol/BlueBolt.cs @@ -0,0 +1,53 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.FoxPistol; + +public class BlueBolt : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + Projectile.velocity.Y += Projectile.ai[0]; + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.5f; + Main.dust[dust1].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.5f; + Main.dust[dust1].noGravity = true; + } + } + } +} diff --git a/Projectiles/FoxPistol/BlueBolt.png b/Projectiles/FoxPistol/BlueBolt.png new file mode 100644 index 0000000..c9a90fd Binary files /dev/null and b/Projectiles/FoxPistol/BlueBolt.png differ diff --git a/Projectiles/FoxPistol/BlueBoltRMB.cs b/Projectiles/FoxPistol/BlueBoltRMB.cs new file mode 100644 index 0000000..fa4acfc --- /dev/null +++ b/Projectiles/FoxPistol/BlueBoltRMB.cs @@ -0,0 +1,68 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.FoxPistol; + +public class BlueBoltRMB : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + Projectile.velocity.Y += Projectile.ai[0]; + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.5f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.8f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.5f; + Main.dust[dust2].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.5f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.8f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.5f; + Main.dust[dust2].noGravity = true; + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } +} diff --git a/Projectiles/FoxPistol/BlueBoltRMB.png b/Projectiles/FoxPistol/BlueBoltRMB.png new file mode 100644 index 0000000..e21faee Binary files /dev/null and b/Projectiles/FoxPistol/BlueBoltRMB.png differ diff --git a/Projectiles/FoxPistol/OrangeBolt.cs b/Projectiles/FoxPistol/OrangeBolt.cs new file mode 100644 index 0000000..4ceba28 --- /dev/null +++ b/Projectiles/FoxPistol/OrangeBolt.cs @@ -0,0 +1,53 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.FoxPistol; + +public class OrangeBolt : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + Projectile.velocity.Y += Projectile.ai[0]; + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.5f; + Main.dust[dust1].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.5f; + Main.dust[dust1].noGravity = true; + } + } + } +} diff --git a/Projectiles/FoxPistol/OrangeBolt.png b/Projectiles/FoxPistol/OrangeBolt.png new file mode 100644 index 0000000..dda1b02 Binary files /dev/null and b/Projectiles/FoxPistol/OrangeBolt.png differ diff --git a/Projectiles/FoxPistol/OrangeBoltRMB.cs b/Projectiles/FoxPistol/OrangeBoltRMB.cs new file mode 100644 index 0000000..f962a0d --- /dev/null +++ b/Projectiles/FoxPistol/OrangeBoltRMB.cs @@ -0,0 +1,68 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.FoxPistol; + +public class OrangeBoltRMB : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + Projectile.velocity.Y += Projectile.ai[0]; + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.5f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.8f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.5f; + Main.dust[dust2].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.5f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.8f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.5f; + Main.dust[dust2].noGravity = true; + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } +} diff --git a/Projectiles/FoxPistol/OrangeBoltRMB.png b/Projectiles/FoxPistol/OrangeBoltRMB.png new file mode 100644 index 0000000..b070a31 Binary files /dev/null and b/Projectiles/FoxPistol/OrangeBoltRMB.png differ diff --git a/Projectiles/FoxPistol/RainbowBolt.cs b/Projectiles/FoxPistol/RainbowBolt.cs new file mode 100644 index 0000000..1b95042 --- /dev/null +++ b/Projectiles/FoxPistol/RainbowBolt.cs @@ -0,0 +1,73 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.FoxPistol; + +public class RainbowBolt : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + Projectile.velocity.Y += Projectile.ai[0]; + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + } +} diff --git a/Projectiles/FoxPistol/RainbowBolt.png b/Projectiles/FoxPistol/RainbowBolt.png new file mode 100644 index 0000000..3ce14d7 Binary files /dev/null and b/Projectiles/FoxPistol/RainbowBolt.png differ diff --git a/Projectiles/FoxPistol/RainbowBoltRMB.cs b/Projectiles/FoxPistol/RainbowBoltRMB.cs new file mode 100644 index 0000000..dbf2471 --- /dev/null +++ b/Projectiles/FoxPistol/RainbowBoltRMB.cs @@ -0,0 +1,88 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.FoxPistol; + +public class RainbowBoltRMB : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + Projectile.velocity.Y += Projectile.ai[0]; + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + Main.dust[dust4].scale = 0.7f; + Dust obj4 = Main.dust[dust4]; + obj4.velocity *= 0.1f; + Main.dust[dust4].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + Main.dust[dust4].scale = 0.7f; + Dust obj4 = Main.dust[dust4]; + obj4.velocity *= 0.1f; + Main.dust[dust4].noGravity = true; + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 480, false); + } +} diff --git a/Projectiles/FoxPistol/RainbowBoltRMB.png b/Projectiles/FoxPistol/RainbowBoltRMB.png new file mode 100644 index 0000000..eafcf69 Binary files /dev/null and b/Projectiles/FoxPistol/RainbowBoltRMB.png differ diff --git a/Projectiles/GoldenOrb.cs b/Projectiles/GoldenOrb.cs new file mode 100644 index 0000000..4e9f143 --- /dev/null +++ b/Projectiles/GoldenOrb.cs @@ -0,0 +1,99 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class GoldenOrb : ModProjectile +{ + public override void SetStaticDefaults() + { + //Sets.Homing[Projectile.type] = true; + Main.projFrames[Projectile.type] = 4; + } + + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 42; + Projectile.alpha = 255; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.timeLeft = 300; + } + + public override void AI() + { + if (Projectile.alpha > 70) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 70) + { + Projectile.alpha = 70; + } + } + if (Projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref Projectile.velocity); + Projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 400f; + bool target = false; + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5) + { + Vector2 newMove = ((Entity)Main.npc[i]).Center - Projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + } + } + if (target) + { + AdjustMagnitude(ref move); + Projectile.velocity = (10f * Projectile.velocity + move) / 11f; + AdjustMagnitude(ref Projectile.velocity); + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + AnimateProjectile(); + } + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 6f) + { + vector *= 6f / magnitude; + } + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 5) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 3; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/GoldenOrb.png b/Projectiles/GoldenOrb.png new file mode 100644 index 0000000..711f114 Binary files /dev/null and b/Projectiles/GoldenOrb.png differ diff --git a/Projectiles/IllusoryMirror/IllusoryMirrorProj.cs b/Projectiles/IllusoryMirror/IllusoryMirrorProj.cs new file mode 100644 index 0000000..61e94a9 --- /dev/null +++ b/Projectiles/IllusoryMirror/IllusoryMirrorProj.cs @@ -0,0 +1,49 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.IllusoryMirror; + +public class IllusoryMirrorProj : ModProjectile +{ + private const int alphaReducation = 50; + + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 20; + Projectile.aiStyle = -1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 100; + } + + public override void AI() + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[num1]; + obj.velocity *= 0f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj2 = Main.dust[num2]; + obj2.velocity *= 0f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj3 = Main.dust[num3]; + obj3.velocity *= 0f; + Main.dust[num3].noGravity = true; + int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj4 = Main.dust[num4]; + obj4.velocity *= 0f; + Main.dust[num4].noGravity = true; + int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj5 = Main.dust[num5]; + obj5.velocity *= 0f; + Main.dust[num5].noGravity = true; + } +} diff --git a/Projectiles/IllusoryMirror/IllusoryMirrorProj.png b/Projectiles/IllusoryMirror/IllusoryMirrorProj.png new file mode 100644 index 0000000..60548fe Binary files /dev/null and b/Projectiles/IllusoryMirror/IllusoryMirrorProj.png differ diff --git a/Projectiles/IllusoryMirror/IllusoryMirrorRMB.cs b/Projectiles/IllusoryMirror/IllusoryMirrorRMB.cs new file mode 100644 index 0000000..2b27977 --- /dev/null +++ b/Projectiles/IllusoryMirror/IllusoryMirrorRMB.cs @@ -0,0 +1,68 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.IllusoryMirror; + +public class IllusoryMirrorRMB : ModProjectile +{ + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 6; + } + + public override void SetDefaults() + { + Projectile.width = 400; + Projectile.height = 360; + Projectile.friendly = false; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 1200; + Projectile.alpha = 80; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.extraUpdates = 0; + Projectile.velocity = Projectile.velocity * 0f; + } + + public override void AI() + { + AnimateProjectile(); + if (Main.rand.NextBool(2)) + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num1].scale = 2f; + Main.dust[num1].velocity.Y -= 0.5f; + Main.dust[num1].velocity.X = 0f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num2].scale = 2f; + Main.dust[num2].velocity.Y += 0.5f; + Main.dust[num2].velocity.X = 0f; + Main.dust[num2].noGravity = true; + } + for (int i = 0; i < 255; i++) + { + Player player = Main.player[i]; + if (player.active && player.Distance(Projectile.Center) < 200f) + { + player.AddBuff(ModContent.BuffType(), 20, true); + } + } + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 7) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 5; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/IllusoryMirror/IllusoryMirrorRMB.png b/Projectiles/IllusoryMirror/IllusoryMirrorRMB.png new file mode 100644 index 0000000..4f6f70f Binary files /dev/null and b/Projectiles/IllusoryMirror/IllusoryMirrorRMB.png differ diff --git a/Projectiles/IllusoryMirror/SpectralIllusionProj.cs b/Projectiles/IllusoryMirror/SpectralIllusionProj.cs new file mode 100644 index 0000000..a8f364b --- /dev/null +++ b/Projectiles/IllusoryMirror/SpectralIllusionProj.cs @@ -0,0 +1,49 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.IllusoryMirror; + +public class SpectralIllusionProj : ModProjectile +{ + private const int alphaReducation = 50; + + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 20; + Projectile.aiStyle = -1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 100; + } + + public override void AI() + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[num1]; + obj.velocity *= 0f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj2 = Main.dust[num2]; + obj2.velocity *= 0f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj3 = Main.dust[num3]; + obj3.velocity *= 0f; + Main.dust[num3].noGravity = true; + int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj4 = Main.dust[num4]; + obj4.velocity *= 0f; + Main.dust[num4].noGravity = true; + int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj5 = Main.dust[num5]; + obj5.velocity *= 0f; + Main.dust[num5].noGravity = true; + } +} diff --git a/Projectiles/IllusoryMirror/SpectralIllusionProj.png b/Projectiles/IllusoryMirror/SpectralIllusionProj.png new file mode 100644 index 0000000..60548fe Binary files /dev/null and b/Projectiles/IllusoryMirror/SpectralIllusionProj.png differ diff --git a/Projectiles/IllusoryMirror/SpectralIllusionRMB.cs b/Projectiles/IllusoryMirror/SpectralIllusionRMB.cs new file mode 100644 index 0000000..e0fd4e7 --- /dev/null +++ b/Projectiles/IllusoryMirror/SpectralIllusionRMB.cs @@ -0,0 +1,78 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.IllusoryMirror; + +public class SpectralIllusionRMB : ModProjectile +{ + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 8; + } + + public override void SetDefaults() + { + Projectile.width = 400; + Projectile.height = 360; + Projectile.friendly = false; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 1200; + Projectile.alpha = 80; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.extraUpdates = 0; + Projectile.velocity = Projectile.velocity * 0f; + } + + public override void AI() + { + AnimateProjectile(); + if (Main.rand.NextBool(2)) + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num1].scale = 2f; + Main.dust[num1].velocity.Y -= 0.5f; + Main.dust[num1].velocity.X = 0f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num2].scale = 2f; + Main.dust[num2].velocity.Y += 0.5f; + Main.dust[num2].velocity.X = 0f; + Main.dust[num2].noGravity = true; + Main.dust[num3].scale = 2f; + Main.dust[num3].velocity.Y += 0.5f; + Main.dust[num3].velocity.X = 0f; + Main.dust[num3].noGravity = true; + Main.dust[num4].scale = 2f; + Main.dust[num4].velocity.Y += 0.5f; + Main.dust[num4].velocity.X = 0f; + Main.dust[num4].noGravity = true; + } + for (int i = 0; i < 255; i++) + { + Player player = Main.player[i]; + if (player.active && player.Distance(Projectile.Center) < 200f) + { + player.AddBuff(ModContent.BuffType(), 20, true); + } + } + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 8) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 7; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/IllusoryMirror/SpectralIllusionRMB.png b/Projectiles/IllusoryMirror/SpectralIllusionRMB.png new file mode 100644 index 0000000..1983fe0 Binary files /dev/null and b/Projectiles/IllusoryMirror/SpectralIllusionRMB.png differ diff --git a/Projectiles/IronStinger.cs b/Projectiles/IronStinger.cs new file mode 100644 index 0000000..50824d0 --- /dev/null +++ b/Projectiles/IronStinger.cs @@ -0,0 +1,28 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class IronStinger : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 22; + Projectile.height = 32; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = false; + Projectile.timeLeft = 300; + Projectile.light = 1f; + Projectile.penetrate = -1; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + } +} diff --git a/Projectiles/IronStinger.png b/Projectiles/IronStinger.png new file mode 100644 index 0000000..58f6a4b Binary files /dev/null and b/Projectiles/IronStinger.png differ diff --git a/Projectiles/Lasers/CoalescenceBeam.cs b/Projectiles/Lasers/CoalescenceBeam.cs new file mode 100644 index 0000000..a8e9f84 --- /dev/null +++ b/Projectiles/Lasers/CoalescenceBeam.cs @@ -0,0 +1,189 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Lasers; + +public class CoalescenceBeam : ModProjectile +{ + private const int MAX_CHARGE = 50; + + private const float MOVE_DISTANCE = 60f; + + public float Distance + { + get + { + return Projectile.ai[0]; + } + set + { + Projectile.ai[0] = value; + } + } + + public float Charge + { + get + { + return Projectile.localAI[0]; + } + set + { + Projectile.localAI[0] = value; + } + } + + public override void SetDefaults() + { + Projectile.width = 5; + Projectile.height = 5; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.hide = true; + } + + public override bool PreDraw(ref Color lightColor) + { + if (Charge == MAX_CHARGE) + { + Vector2 unit = Projectile.velocity; + DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, unit, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60); + } + return false; + } + + public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, int damage, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default, int transDist = 50) + { + float r = Utils.ToRotation(unit) + rotation; + for (float i = transDist; i <= Distance; i += step) + { + Color c = Color.White; + Vector2 origin = start + i * unit; + Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (Charge == MAX_CHARGE) + { + Player p = Main.player[Projectile.owner]; + Vector2 unit = Projectile.velocity; + float point = 0f; + if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), p.Center, p.Center + unit * Distance, 22f, ref point)) + { + return true; + } + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.immune[Projectile.owner] = 8; + } + + public override void AI() + { + Vector2 mousePos = Main.MouseWorld; + Player player = Main.player[Projectile.owner]; + if (Projectile.owner == Main.myPlayer) + { + Vector2 diff = mousePos - player.Center; + diff.Normalize(); + Projectile.velocity = diff; + Projectile.direction = ((Main.MouseWorld.X > player.position.X) ? 1 : (-1)); + Projectile.netUpdate = true; + } + Projectile.position = player.Center + Projectile.velocity * MOVE_DISTANCE; + Projectile.timeLeft = 2; + int dir = Projectile.direction; + player.ChangeDir(dir); + player.heldProj = Projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * dir, Projectile.velocity.X * dir); + if (!player.channel) + { + Projectile.Kill(); + } + else + { + if (Main.time % 10.0 < 1.0 && !player.CheckMana(player.inventory[player.selectedItem].mana, true, false)) + { + Projectile.Kill(); + } + Vector2 offset = Projectile.velocity; + offset *= 40f; + Vector2 pos = player.Center + offset - new Vector2(10f, 10f); + if (Charge < MAX_CHARGE) + { + Charge++; + } + int chargeFact = (int)(Charge / 20f); + Vector2 dustVelocity = Vector2.UnitX * 18f; + dustVelocity = Utils.RotatedBy(dustVelocity, (double)(Projectile.rotation - 1.57f), default); + Vector2 spawnPos = Projectile.Center + dustVelocity; + for (int j = 0; j < chargeFact + 1; j++) + { + Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2); + Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)]; + obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f; + obj.noGravity = true; + obj.scale = Main.rand.Next(10, 20) * 0.05f; + } + } + if (Charge < MAX_CHARGE) + { + return; + } + Vector2 start = player.Center; + _ = Projectile.velocity * -1f; + for (Distance = MOVE_DISTANCE; Distance <= 2200f; Distance += 5f) + { + start = player.Center + Projectile.velocity * Distance; + if (!Collision.CanHit(player.Center, 1, 1, start, 1, 1)) + { + Distance -= 5f; + break; + } + } + if (Projectile.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item15, Projectile.Center); + Projectile.soundDelay = 40; + } + for (int i = 0; i < 2; i++) + { + float num1 = Utils.ToRotation(Projectile.velocity) + ((Main.rand.NextBool(2)) ? (-1f) : 1f) * 1.57f; + float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0); + //new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + } + DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight)); + } + + public override bool ShouldUpdatePosition() + { + return false; + } + + public override void CutTiles() + { + DelegateMethods.tilecut_0 = (TileCuttingContext)2; + Vector2 unit = Projectile.velocity; + Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } +} diff --git a/Projectiles/Lasers/CoalescenceBeam.png b/Projectiles/Lasers/CoalescenceBeam.png new file mode 100644 index 0000000..2d36772 Binary files /dev/null and b/Projectiles/Lasers/CoalescenceBeam.png differ diff --git a/Projectiles/Lasers/GoldenBeam.cs b/Projectiles/Lasers/GoldenBeam.cs new file mode 100644 index 0000000..733fcb4 --- /dev/null +++ b/Projectiles/Lasers/GoldenBeam.cs @@ -0,0 +1,190 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Lasers; + +public class GoldenBeam : ModProjectile +{ + private const int MAX_CHARGE = 50; + + private const float MOVE_DISTANCE = 60f; + + public float Distance + { + get + { + return Projectile.ai[0]; + } + set + { + Projectile.ai[0] = value; + } + } + + public float Charge + { + get + { + return Projectile.localAI[0]; + } + set + { + Projectile.localAI[0] = value; + } + } + + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.hide = true; + } + + public override bool PreDraw(ref Color lightColor) + { + if (Charge == MAX_CHARGE) + { + Vector2 unit = Projectile.velocity; + DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, unit, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60); + } + return false; + } + + public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, int damage, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default, int transDist = 50) + { + float r = Utils.ToRotation(unit) + rotation; + for (float i = transDist; i <= Distance; i += step) + { + Color c = Color.White; + Vector2 origin = start + i * unit; + Main.EntitySpriteDraw(texture, origin - Main.screenPosition, (Rectangle?)new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, (Rectangle?)new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, (Rectangle?)new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (Charge == 50f) + { + Player p = Main.player[Projectile.owner]; + Vector2 unit = Projectile.velocity; + float point = 0f; + if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), p.Center, p.Center + unit * Distance, 22f, ref point)) + { + return true; + } + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.immune[Projectile.owner] = 4; + target.AddBuff(ModContent.BuffType(), 240, false); + target.AddBuff(72, 180, false); + } + + public override void AI() + { + Vector2 mousePos = Main.MouseWorld; + Player player = Main.player[Projectile.owner]; + if (Projectile.owner == Main.myPlayer) + { + Vector2 diff = mousePos - player.Center; + diff.Normalize(); + Projectile.velocity = diff; + Projectile.direction = ((Main.MouseWorld.X > player.position.X) ? 1 : (-1)); + Projectile.netUpdate = true; + } + Projectile.position = player.Center + Projectile.velocity * MOVE_DISTANCE; + Projectile.timeLeft = 2; + int dir = Projectile.direction; + player.ChangeDir(dir); + player.heldProj = Projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * dir, Projectile.velocity.X * dir); + if (!player.channel) + { + Projectile.Kill(); + } + else + { + if (Main.time % 10.0 < 1.0 && !player.CheckMana(player.inventory[player.selectedItem].mana, true, false)) + { + Projectile.Kill(); + } + Vector2 offset = Projectile.velocity; + offset *= 40f; + Vector2 pos = player.Center + offset - new Vector2(10f, 10f); + if (Charge < MAX_CHARGE) + { + Charge++; + } + int chargeFact = (int)(Charge / 20f); + Vector2 dustVelocity = Vector2.UnitX * 18f; + dustVelocity = Utils.RotatedBy(dustVelocity, (double)(Projectile.rotation - 1.57f), default); + Vector2 spawnPos = Projectile.Center + dustVelocity; + for (int j = 0; j < chargeFact + 1; j++) + { + Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2); + Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)]; + obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f; + obj.noGravity = true; + obj.scale = Main.rand.Next(10, 20) * 0.05f; + } + } + if (Charge < 50f) + { + return; + } + Vector2 start = player.Center; + _ = Projectile.velocity * -1f; + for (Distance = MOVE_DISTANCE; Distance <= 2200f; Distance += 5f) + { + start = player.Center + Projectile.velocity * Distance; + if (!Collision.CanHit(player.Center, 1, 1, start, 1, 1)) + { + Distance -= 5f; + break; + } + } + if (Projectile.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item15, Projectile.Center); + Projectile.soundDelay = 40; + } + for (int i = 0; i < 2; i++) + { + float num1 = Utils.ToRotation(Projectile.velocity) + ((Main.rand.NextBool(2)) ? (-1f) : 1f) * 1.57f; + float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0); + new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + } + DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight)); + } + + public override bool ShouldUpdatePosition() + { + return false; + } + + public override void CutTiles() + { + DelegateMethods.tilecut_0 = (TileCuttingContext)2; + Vector2 unit = Projectile.velocity; + Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } +} diff --git a/Projectiles/Lasers/GoldenBeam.png b/Projectiles/Lasers/GoldenBeam.png new file mode 100644 index 0000000..fbd5442 Binary files /dev/null and b/Projectiles/Lasers/GoldenBeam.png differ diff --git a/Projectiles/Lasers/HellfireBeamProj.cs b/Projectiles/Lasers/HellfireBeamProj.cs new file mode 100644 index 0000000..75625d8 --- /dev/null +++ b/Projectiles/Lasers/HellfireBeamProj.cs @@ -0,0 +1,190 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Lasers; + +public class HellfireBeamProj : ModProjectile +{ + private const int MAX_CHARGE = 50; + + private const float MOVE_DISTANCE = 60f; + + public float Distance + { + get + { + return Projectile.ai[0]; + } + set + { + Projectile.ai[0] = value; + } + } + + public float Charge + { + get + { + return Projectile.localAI[0]; + } + set + { + Projectile.localAI[0] = value; + } + } + + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.hide = true; + } + + public override bool PreDraw(ref Color lightColor) + { + if (Charge == MAX_CHARGE) + { + Vector2 unit = Projectile.velocity; + DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, unit, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60); + } + return false; + } + + public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, int damage, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default, int transDist = 50) + { + float r = Utils.ToRotation(unit) + rotation; + for (float i = transDist; i <= Distance; i += step) + { + Color c = Color.White; + Vector2 origin = start + i * unit; + Main.EntitySpriteDraw(texture, origin - Main.screenPosition, (Rectangle?)new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, (Rectangle?)new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, (Rectangle?)new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (Charge == MAX_CHARGE) + { + Player p = Main.player[Projectile.owner]; + Vector2 unit = Projectile.velocity; + float point = 0f; + if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), p.Center, p.Center + unit * Distance, 22f, ref point)) + { + return true; + } + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.immune[Projectile.owner] = 5; + target.AddBuff(24, 120, false); + } + + public override void AI() + { + Vector2 mousePos = Main.MouseWorld; + Player player = Main.player[Projectile.owner]; + if (Projectile.owner == Main.myPlayer) + { + Vector2 diff = mousePos - player.Center; + diff.Normalize(); + Projectile.velocity = diff; + Projectile.direction = (Main.MouseWorld.X > player.position.X) ? 1 : (-1); + Projectile.netUpdate = true; + } + Projectile.position = player.Center + Projectile.velocity * MOVE_DISTANCE; + Projectile.timeLeft = 2; + int dir = Projectile.direction; + player.ChangeDir(dir); + player.heldProj = Projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * dir, Projectile.velocity.X * dir); + if (!player.channel) + { + Projectile.Kill(); + } + else + { + if (Main.time % 10.0 < 1.0 && !player.CheckMana(player.inventory[player.selectedItem].mana, true, false)) + { + Projectile.Kill(); + } + Vector2 offset = Projectile.velocity; + offset *= 40f; + Vector2 pos = player.Center + offset - new Vector2(10f, 10f); + if (Charge < MAX_CHARGE) + { + Charge++; + } + int chargeFact = (int)(Charge / 20f); + Vector2 dustVelocity = Vector2.UnitX * 18f; + dustVelocity = Utils.RotatedBy(dustVelocity, (double)(Projectile.rotation - 1.57f), default); + Vector2 spawnPos = Projectile.Center + dustVelocity; + for (int j = 0; j < chargeFact + 1; j++) + { + Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2); + Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)]; + obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f; + obj.noGravity = true; + obj.scale = Main.rand.Next(10, 20) * 0.05f; + } + } + if (Charge < MAX_CHARGE) + { + return; + } + Vector2 start = player.Center; + _ = Projectile.velocity * -1f; + for (Distance = MOVE_DISTANCE; Distance <= 2200f; Distance += 5f) + { + start = player.Center + Projectile.velocity * Distance; + if (!Collision.CanHit(player.Center, 1, 1, start, 1, 1)) + { + Distance -= 5f; + break; + } + } + if (Projectile.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item15, Projectile.Center); + Projectile.soundDelay = 40; + } + for (int i = 0; i < 2; i++) + { + float num1 = Utils.ToRotation(Projectile.velocity) + (Main.rand.NextBool(2) ? (-1f) : 1f) * 1.57f; + float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0); + //new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + } + DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight)); + } + + public override bool ShouldUpdatePosition() + { + return false; + } + + public override void CutTiles() + { + DelegateMethods.tilecut_0 = (TileCuttingContext)2; + Vector2 unit = Projectile.velocity; + Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } +} diff --git a/Projectiles/Lasers/HellfireBeamProj.png b/Projectiles/Lasers/HellfireBeamProj.png new file mode 100644 index 0000000..df9b43c Binary files /dev/null and b/Projectiles/Lasers/HellfireBeamProj.png differ diff --git a/Projectiles/Lasers/RainbowBeam.cs b/Projectiles/Lasers/RainbowBeam.cs new file mode 100644 index 0000000..ae480f7 --- /dev/null +++ b/Projectiles/Lasers/RainbowBeam.cs @@ -0,0 +1,192 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Lasers; + +public class RainbowBeam : ModProjectile +{ + private const int MAX_CHARGE = 50; + + private const float MOVE_DISTANCE = 60f; + + public float Distance + { + get + { + return Projectile.ai[0]; + } + set + { + Projectile.ai[0] = value; + } + } + + public float Charge + { + get + { + return Projectile.localAI[0]; + } + set + { + Projectile.localAI[0] = value; + } + } + + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.hide = true; + } + + public override bool PreDraw(ref Color lightColor) + { + if (Charge == MAX_CHARGE) + { + Vector2 unit = Projectile.velocity; + DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, unit, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60); + } + return false; + } + + public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, int damage, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default, int transDist = 50) + { + float r = Utils.ToRotation(unit) + rotation; + for (float i = transDist; i <= Distance; i += step) + { + Color c = Color.White; + Vector2 origin = start + i * unit; + Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (Charge == MAX_CHARGE) + { + Player p = Main.player[Projectile.owner]; + Vector2 unit = Projectile.velocity; + float point = 0f; + if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), p.Center, p.Center + unit * Distance, 22f, ref point)) + { + return true; + } + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.immune[Projectile.owner] = 3; + target.AddBuff(72, 180, false); + target.AddBuff(ModContent.BuffType(), 120, false); + } + + public override void AI() + { + Vector2 mousePos = Main.MouseWorld; + Player player = Main.player[Projectile.owner]; + if (Projectile.owner == Main.myPlayer) + { + Vector2 diff = mousePos - player.Center; + diff.Normalize(); + Projectile.velocity = diff; + Projectile.direction = ((Main.MouseWorld.X > player.position.X) ? 1 : (-1)); + Projectile.netUpdate = true; + } + Projectile.position = player.Center + Projectile.velocity * MOVE_DISTANCE; + Projectile.timeLeft = 2; + int dir = Projectile.direction; + player.ChangeDir(dir); + player.heldProj = Projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * dir, Projectile.velocity.X * dir); + if (!player.channel) + { + Projectile.Kill(); + } + else + { + if (Main.time % 10.0 < 1.0 && !player.CheckMana(player.inventory[player.selectedItem].mana, true, false)) + { + Projectile.Kill(); + } + Vector2 offset = Projectile.velocity; + offset *= 40f; + Vector2 pos = player.Center + offset - new Vector2(10f, 10f); + if (Charge < MAX_CHARGE) + { + Charge++; + } + int chargeFact = (int)(Charge / 20f); + Vector2 dustVelocity = Vector2.UnitX * 18f; + dustVelocity = Utils.RotatedBy(dustVelocity, (double)(Projectile.rotation - 1.57f), default); + Vector2 spawnPos = Projectile.Center + dustVelocity; + for (int j = 0; j < chargeFact + 1; j++) + { + Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2); + Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)]; + obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f; + obj.noGravity = true; + obj.scale = Main.rand.Next(10, 20) * 0.05f; + } + } + if (Charge < MAX_CHARGE) + { + return; + } + Vector2 start = player.Center; + _ = Projectile.velocity * -1f; + for (Distance = MOVE_DISTANCE; Distance <= 2200f; Distance += 5f) + { + start = player.Center + Projectile.velocity * Distance; + if (!Collision.CanHit(player.Center, 1, 1, start, 1, 1)) + { + Distance -= 5f; + break; + } + } + if (Projectile.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item15, Projectile.Center); + Projectile.soundDelay = 40; + } + for (int i = 0; i < 2; i++) + { + float num1 = Utils.ToRotation(Projectile.velocity) + ((Main.rand.NextBool(2)) ? (-1f) : 1f) * 1.57f; + float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0); + //new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + } + DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight)); + } + + public override bool ShouldUpdatePosition() + { + return false; + } + + public override void CutTiles() + { + DelegateMethods.tilecut_0 = (TileCuttingContext)2; + Vector2 unit = Projectile.velocity; + Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } +} diff --git a/Projectiles/Lasers/RainbowBeam.png b/Projectiles/Lasers/RainbowBeam.png new file mode 100644 index 0000000..450f652 Binary files /dev/null and b/Projectiles/Lasers/RainbowBeam.png differ diff --git a/Projectiles/Lasers/VengeanceBeam.cs b/Projectiles/Lasers/VengeanceBeam.cs new file mode 100644 index 0000000..9ba8e4e --- /dev/null +++ b/Projectiles/Lasers/VengeanceBeam.cs @@ -0,0 +1,191 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Lasers; + +public class VengeanceBeam : ModProjectile +{ + private const int MAX_CHARGE = 50; + + private const float MOVE_DISTANCE = 60f; + + public float Distance + { + get + { + return Projectile.ai[0]; + } + set + { + Projectile.ai[0] = value; + } + } + + public float Charge + { + get + { + return Projectile.localAI[0]; + } + set + { + Projectile.localAI[0] = value; + } + } + + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.hide = true; + } + + public override bool PreDraw(ref Color lightColor) + { + if (Charge == MAX_CHARGE) + { + Vector2 unit = Projectile.velocity; + DrawLaser(TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, unit, 10f, Projectile.damage, -1.57f, 1f, 1000f, Color.White, 60); + } + return false; + } + + public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, int damage, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default, int transDist = 50) + { + Vector2 origin = start; + float r = Utils.ToRotation(unit) + rotation; + for (float i = transDist; i <= Distance; i += step) + { + Color c = Color.White; + origin = start + i * unit; + Main.EntitySpriteDraw(texture, origin - Main.screenPosition, new Rectangle(0, 26, 28, 26), (i < transDist) ? Color.Transparent : c, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition, new Rectangle(0, 0, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition, new Rectangle(0, 52, 28, 26), Color.White, r, new Vector2(14f, 13f), scale, SpriteEffects.None, 0); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (Charge == MAX_CHARGE) + { + Player p = Main.player[Projectile.owner]; + Vector2 unit = Projectile.velocity; + float point = 0f; + if (Collision.CheckAABBvLineCollision(Utils.TopLeft(targetHitbox), Utils.Size(targetHitbox), p.Center, p.Center + unit * Distance, 22f, ref point)) + { + return true; + } + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.immune[Projectile.owner] = 4; + target.AddBuff(ModContent.BuffType(), 180, false); + } + + public override void AI() + { + Vector2 mousePos = Main.MouseWorld; + Player player = Main.player[Projectile.owner]; + if (Projectile.owner == Main.myPlayer) + { + Vector2 diff = mousePos - player.Center; + diff.Normalize(); + Projectile.velocity = diff; + Projectile.direction = ((Main.MouseWorld.X > player.position.X) ? 1 : (-1)); + Projectile.netUpdate = true; + } + Projectile.position = player.Center + Projectile.velocity * MOVE_DISTANCE; + Projectile.timeLeft = 2; + int dir = Projectile.direction; + player.ChangeDir(dir); + player.heldProj = Projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * dir, Projectile.velocity.X * dir); + if (!player.channel) + { + Projectile.Kill(); + } + else + { + if (Main.time % 10.0 < 1.0 && !player.CheckMana(player.inventory[player.selectedItem].mana, true, false)) + { + Projectile.Kill(); + } + Vector2 offset = Projectile.velocity; + offset *= 40f; + Vector2 pos = player.Center + offset - new Vector2(10f, 10f); + if (Charge < MAX_CHARGE) + { + Charge++; + } + int chargeFact = (int)(Charge / 20f); + Vector2 dustVelocity = Vector2.UnitX * 18f; + dustVelocity = Utils.RotatedBy(dustVelocity, (double)(Projectile.rotation - 1.57f), default); + Vector2 spawnPos = Projectile.Center + dustVelocity; + for (int j = 0; j < chargeFact + 1; j++) + { + Vector2 spawn = spawnPos + Utils.ToRotationVector2((float)Main.rand.NextDouble() * 6.28f) * (12f - chargeFact * 2); + Dust obj = Main.dust[Dust.NewDust(pos, 20, 20, DustID.YellowTorch, Projectile.velocity.X / 2f, Projectile.velocity.Y / 2f, 0, default, 1f)]; + obj.velocity = Vector2.Normalize(spawnPos - spawn) * 1.5f * (10f - chargeFact * 2f) / 10f; + obj.noGravity = true; + obj.scale = Main.rand.Next(10, 20) * 0.05f; + } + } + if (Charge < MAX_CHARGE) + { + return; + } + Vector2 start = player.Center; + _ = Projectile.velocity * -1f; + for (Distance = MOVE_DISTANCE; Distance <= 2200f; Distance += 5f) + { + start = player.Center + Projectile.velocity * Distance; + if (!Collision.CanHit(player.Center, 1, 1, start, 1, 1)) + { + Distance -= 5f; + break; + } + } + if (Projectile.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item15, Projectile.Center); + Projectile.soundDelay = 40; + } + for (int i = 0; i < 2; i++) + { + float num1 = Utils.ToRotation(Projectile.velocity) + ((Main.rand.NextBool(2)) ? (-1f) : 1f) * 1.57f; + float num2 = (float)(Main.rand.NextDouble() * 0.800000011920929 + 1.0); + new Vector2((float)Math.Cos(num1) * num2, (float)Math.Sin(num1) * num2); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + } + DelegateMethods.v3_1 = new Vector3(0.8f, 0.8f, 1f); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE), 26f, new Utils.TileActionAttempt(DelegateMethods.CastLight)); + } + + public override bool ShouldUpdatePosition() + { + return false; + } + + public override void CutTiles() + { + DelegateMethods.tilecut_0 = (TileCuttingContext)2; + Vector2 unit = Projectile.velocity; + Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Distance, (Projectile.width + 16) * Projectile.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } +} diff --git a/Projectiles/Lasers/VengeanceBeam.png b/Projectiles/Lasers/VengeanceBeam.png new file mode 100644 index 0000000..98c3320 Binary files /dev/null and b/Projectiles/Lasers/VengeanceBeam.png differ diff --git a/Projectiles/Lasers/lasertemplate.png b/Projectiles/Lasers/lasertemplate.png new file mode 100644 index 0000000..e4c74af Binary files /dev/null and b/Projectiles/Lasers/lasertemplate.png differ diff --git a/Projectiles/LightBlasts/GoldenLightBlast.cs b/Projectiles/LightBlasts/GoldenLightBlast.cs new file mode 100644 index 0000000..367b248 --- /dev/null +++ b/Projectiles/LightBlasts/GoldenLightBlast.cs @@ -0,0 +1,53 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.LightBlasts; + +public class GoldenLightBlast : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + Projectile.velocity.Y += Projectile.ai[0]; + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, Projectile.position); + } +} diff --git a/Projectiles/LightBlasts/GoldenLightBlast.png b/Projectiles/LightBlasts/GoldenLightBlast.png new file mode 100644 index 0000000..5f8f140 Binary files /dev/null and b/Projectiles/LightBlasts/GoldenLightBlast.png differ diff --git a/Projectiles/LightBlasts/LightBlast.cs b/Projectiles/LightBlasts/LightBlast.cs new file mode 100644 index 0000000..39fa94f --- /dev/null +++ b/Projectiles/LightBlasts/LightBlast.cs @@ -0,0 +1,53 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.LightBlasts; + +public class LightBlast : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + Projectile.velocity.Y += Projectile.ai[0]; + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, Projectile.position); + } +} diff --git a/Projectiles/LightBlasts/LightBlast.png b/Projectiles/LightBlasts/LightBlast.png new file mode 100644 index 0000000..7fd486e Binary files /dev/null and b/Projectiles/LightBlasts/LightBlast.png differ diff --git a/Projectiles/LightBlasts/RainbowLightBlast.cs b/Projectiles/LightBlasts/RainbowLightBlast.cs new file mode 100644 index 0000000..313f74d --- /dev/null +++ b/Projectiles/LightBlasts/RainbowLightBlast.cs @@ -0,0 +1,75 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.LightBlasts; + +public class RainbowLightBlast : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, Projectile.position); + } +} diff --git a/Projectiles/LightBlasts/RainbowLightBlast.png b/Projectiles/LightBlasts/RainbowLightBlast.png new file mode 100644 index 0000000..3ce14d7 Binary files /dev/null and b/Projectiles/LightBlasts/RainbowLightBlast.png differ diff --git a/Projectiles/LunarBolt.cs b/Projectiles/LunarBolt.cs new file mode 100644 index 0000000..b6ba23a --- /dev/null +++ b/Projectiles/LunarBolt.cs @@ -0,0 +1,43 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class LunarBolt : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = true; + + Projectile.timeLeft = 600; + Projectile.light = 1f; + Projectile.penetrate = 1; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[dust]; + obj.velocity /= 2f; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 1f); + } + SoundEngine.PlaySound(SoundID.Item1, Projectile.position); + } +} diff --git a/Projectiles/LunarBolt.png b/Projectiles/LunarBolt.png new file mode 100644 index 0000000..8d9a6c0 Binary files /dev/null and b/Projectiles/LunarBolt.png differ diff --git a/Projectiles/Minions/GoddessMinion.cs b/Projectiles/Minions/GoddessMinion.cs new file mode 100644 index 0000000..0b7ce47 --- /dev/null +++ b/Projectiles/Minions/GoddessMinion.cs @@ -0,0 +1,74 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Minions; + +public class GoddessMinion : Minion +{ + public override void SetDefaults() + { + Projectile.netImportant = true; + Projectile.CloneDefaults(388); + AIType = 388; + Projectile.width = 50; + Projectile.height = 50; + Main.projFrames[Projectile.type] = 8; + Projectile.friendly = true; + Projectile.minion = true; + Projectile.minionSlots = 1f; + Projectile.penetrate = -1; + Projectile.timeLeft = 18000; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + AnimateProjectile(); + } + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Goddess' Summoner"); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = oldVelocity.Y; + } + return false; + } + + public override void CheckActive() + { + Player obj = Main.player[Projectile.owner]; + FabuPlayer modPlayer = obj.GetModPlayer(); + if (obj.dead) + { + modPlayer.goddessMinion = false; + } + if (modPlayer.goddessMinion) + { + Projectile.timeLeft = 2; + } + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 2) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 3; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/Minions/GoddessMinion.png b/Projectiles/Minions/GoddessMinion.png new file mode 100644 index 0000000..940f4e2 Binary files /dev/null and b/Projectiles/Minions/GoddessMinion.png differ diff --git a/Projectiles/Minions/Minion.cs b/Projectiles/Minions/Minion.cs new file mode 100644 index 0000000..60efe6d --- /dev/null +++ b/Projectiles/Minions/Minion.cs @@ -0,0 +1,13 @@ +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Minions; + +public abstract class Minion : ModProjectile +{ + public override void AI() + { + CheckActive(); + } + + public abstract void CheckActive(); +} diff --git a/Projectiles/Pets/FoxPet.cs b/Projectiles/Pets/FoxPet.cs new file mode 100644 index 0000000..eac8844 --- /dev/null +++ b/Projectiles/Pets/FoxPet.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Pets; + +public class FoxPet : ModProjectile +{ + public override void SetDefaults() + { + Projectile.CloneDefaults(111); + AIType = 111; + Main.projFrames[Projectile.type] = 8; + Projectile.width = 70; + Projectile.height = 48; + Main.projPet[Projectile.type] = true; + } + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fox Pet"); + } + + public override bool PreAI() + { + Main.player[Projectile.owner].bunny = false; + return true; + } + + public override void AI() + { + Player obj = Main.player[Projectile.owner]; + FabuPlayer modPlayer = obj.GetModPlayer(); + if (obj.dead) + { + modPlayer.foxPet = false; + } + if (modPlayer.foxPet) + { + Projectile.timeLeft = 2; + } + } +} diff --git a/Projectiles/Pets/FoxPet.png b/Projectiles/Pets/FoxPet.png new file mode 100644 index 0000000..9de7f33 Binary files /dev/null and b/Projectiles/Pets/FoxPet.png differ diff --git a/Projectiles/Pets/MechanicalTooth.cs b/Projectiles/Pets/MechanicalTooth.cs new file mode 100644 index 0000000..4c1c248 --- /dev/null +++ b/Projectiles/Pets/MechanicalTooth.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Pets; + +public class MechanicalTooth : ModProjectile +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mechanical Tooth"); + Main.projFrames[Projectile.type] = 4; + Main.projPet[Projectile.type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 26; + Projectile.height = 20; + Projectile.CloneDefaults(380); + AIType = 380; + } + + public override bool PreAI() + { + Main.player[Projectile.owner].zephyrfish = false; + return true; + } + + public override void AI() + { + Player obj = Main.player[Projectile.owner]; + FabuPlayer modPlayer = obj.GetModPlayer(); + if (obj.dead) + { + modPlayer.kregPet = false; + } + if (modPlayer.kregPet) + { + Projectile.timeLeft = 2; + } + } +} diff --git a/Projectiles/Pets/MechanicalTooth.png b/Projectiles/Pets/MechanicalTooth.png new file mode 100644 index 0000000..b6809d5 Binary files /dev/null and b/Projectiles/Pets/MechanicalTooth.png differ diff --git a/Projectiles/Pets/PinkFoxPet.cs b/Projectiles/Pets/PinkFoxPet.cs new file mode 100644 index 0000000..09cb3d2 --- /dev/null +++ b/Projectiles/Pets/PinkFoxPet.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Pets; + +public class PinkFoxPet : ModProjectile +{ + public override void SetDefaults() + { + Projectile.CloneDefaults(111); + AIType = 111; + Main.projFrames[Projectile.type] = 8; + Projectile.width = 70; + Projectile.height = 48; + Main.projPet[Projectile.type] = true; + } + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pink Fox Pet"); + } + + public override bool PreAI() + { + Main.player[Projectile.owner].bunny = false; + return true; + } + + public override void AI() + { + Player obj = Main.player[Projectile.owner]; + FabuPlayer modPlayer = obj.GetModPlayer(); + if (obj.dead) + { + modPlayer.pinkFoxPet = false; + } + if (modPlayer.pinkFoxPet) + { + Projectile.timeLeft = 2; + } + } +} diff --git a/Projectiles/Pets/PinkFoxPet.png b/Projectiles/Pets/PinkFoxPet.png new file mode 100644 index 0000000..51119d2 Binary files /dev/null and b/Projectiles/Pets/PinkFoxPet.png differ diff --git a/Projectiles/Pets/WindUpFabu.cs b/Projectiles/Pets/WindUpFabu.cs new file mode 100644 index 0000000..25278cc --- /dev/null +++ b/Projectiles/Pets/WindUpFabu.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Pets; + +public class WindUpFabu : ModProjectile +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Wind-Up Fabu"); + Main.projFrames[Projectile.type] = 3; + Main.projPet[Projectile.type] = true; + } + + public override void SetDefaults() + { + Projectile.CloneDefaults(112); + Projectile.width = 34; + Projectile.height = 34; + AIType = 112; + } + + public override bool PreAI() + { + Main.player[Projectile.owner].penguin = false; + return true; + } + + public override void AI() + { + Player obj = Main.player[Projectile.owner]; + FabuPlayer modPlayer = obj.GetModPlayer(); + if (obj.dead) + { + modPlayer.fabu = false; + } + if (modPlayer.fabu) + { + Projectile.timeLeft = 2; + } + } +} diff --git a/Projectiles/Pets/WindUpFabu.png b/Projectiles/Pets/WindUpFabu.png new file mode 100644 index 0000000..3b8058a Binary files /dev/null and b/Projectiles/Pets/WindUpFabu.png differ diff --git a/Projectiles/PulseBullet.cs b/Projectiles/PulseBullet.cs new file mode 100644 index 0000000..0d48c10 --- /dev/null +++ b/Projectiles/PulseBullet.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class PulseBullet : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 20; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } +} diff --git a/Projectiles/PulseBullet.png b/Projectiles/PulseBullet.png new file mode 100644 index 0000000..60548fe Binary files /dev/null and b/Projectiles/PulseBullet.png differ diff --git a/Projectiles/PulseBulletBlue.cs b/Projectiles/PulseBulletBlue.cs new file mode 100644 index 0000000..ebcf100 --- /dev/null +++ b/Projectiles/PulseBulletBlue.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class PulseBulletBlue : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 20; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } +} diff --git a/Projectiles/PulseBulletBlue.png b/Projectiles/PulseBulletBlue.png new file mode 100644 index 0000000..b7c5be2 Binary files /dev/null and b/Projectiles/PulseBulletBlue.png differ diff --git a/Projectiles/PulseBulletGolden.cs b/Projectiles/PulseBulletGolden.cs new file mode 100644 index 0000000..472df52 --- /dev/null +++ b/Projectiles/PulseBulletGolden.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class PulseBulletGolden : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 20; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } +} diff --git a/Projectiles/PulseBulletGolden.png b/Projectiles/PulseBulletGolden.png new file mode 100644 index 0000000..7a2362a Binary files /dev/null and b/Projectiles/PulseBulletGolden.png differ diff --git a/Projectiles/PulseBulletPink.cs b/Projectiles/PulseBulletPink.cs new file mode 100644 index 0000000..694e5e5 --- /dev/null +++ b/Projectiles/PulseBulletPink.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class PulseBulletPink : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 20; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } +} diff --git a/Projectiles/PulseBulletPink.png b/Projectiles/PulseBulletPink.png new file mode 100644 index 0000000..ca30890 Binary files /dev/null and b/Projectiles/PulseBulletPink.png differ diff --git a/Projectiles/RainbowAxeBeam.cs b/Projectiles/RainbowAxeBeam.cs new file mode 100644 index 0000000..f7707dd --- /dev/null +++ b/Projectiles/RainbowAxeBeam.cs @@ -0,0 +1,57 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class RainbowAxeBeam : ModProjectile +{ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow Axe Beam"); + } + + public override void SetDefaults() + { + Projectile.width = 46; + Projectile.height = 52; + Projectile.aiStyle = 18; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + AIType = 274; + Projectile.timeLeft = 200; + Projectile.alpha = 0; + } + + public override void AI() + { + if (Projectile.alpha <= 140) + { + Projectile projectile = Projectile; + projectile.alpha++; + } + if (Projectile.alpha > 140) + { + Projectile projectile2 = Projectile; + projectile2.alpha += 15; + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } +} diff --git a/Projectiles/RainbowAxeBeam.png b/Projectiles/RainbowAxeBeam.png new file mode 100644 index 0000000..9e38c75 Binary files /dev/null and b/Projectiles/RainbowAxeBeam.png differ diff --git a/Projectiles/RainbowBullet.cs b/Projectiles/RainbowBullet.cs new file mode 100644 index 0000000..6bdc540 --- /dev/null +++ b/Projectiles/RainbowBullet.cs @@ -0,0 +1,97 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class RainbowBullet : ModProjectile +{ + public override void SetStaticDefaults() + { + //Sets.Homing[Projectile.type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 2; + Projectile.height = 20; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + if (Projectile.alpha > 70) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 70) + { + Projectile.alpha = 70; + } + } + if (Projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref Projectile.velocity); + Projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 200f; + bool target = false; + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5) + { + Vector2 newMove = Main.npc[i].Center - Projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + } + } + if (target) + { + AdjustMagnitude(ref move); + Projectile.velocity = (5f * Projectile.velocity + move) / 6f; + AdjustMagnitude(ref Projectile.velocity); + } + if (Main.rand.NextBool(3)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[dust1]; + obj.velocity *= 0f; + Main.dust[dust1].noGravity = true; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0f; + Main.dust[dust2].noGravity = true; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0f; + Main.dust[dust3].noGravity = true; + } + } + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 6f) + { + vector *= 6f / magnitude; + } + } +} diff --git a/Projectiles/RainbowBullet.png b/Projectiles/RainbowBullet.png new file mode 100644 index 0000000..5ffbb18 Binary files /dev/null and b/Projectiles/RainbowBullet.png differ diff --git a/Projectiles/RainbowDemon/RainbowDemonArrow.cs b/Projectiles/RainbowDemon/RainbowDemonArrow.cs new file mode 100644 index 0000000..ccac18d --- /dev/null +++ b/Projectiles/RainbowDemon/RainbowDemonArrow.cs @@ -0,0 +1,83 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.RainbowDemon; + +public class RainbowDemonArrow : ModProjectile +{ + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 18; + Projectile.height = 34; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = false; + + Projectile.timeLeft = 1000; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.alpha = 0; + } + + public override void AI() + { + if (Projectile.alpha > 30) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 30) + { + Projectile.alpha = 30; + } + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + SoundEngine.PlaySound(SoundID.Item1, Projectile.position); + } +} diff --git a/Projectiles/RainbowDemon/RainbowDemonArrow.png b/Projectiles/RainbowDemon/RainbowDemonArrow.png new file mode 100644 index 0000000..e2f3204 Binary files /dev/null and b/Projectiles/RainbowDemon/RainbowDemonArrow.png differ diff --git a/Projectiles/RainbowDemon/RainbowDemonClaymoreProj.cs b/Projectiles/RainbowDemon/RainbowDemonClaymoreProj.cs new file mode 100644 index 0000000..7635734 --- /dev/null +++ b/Projectiles/RainbowDemon/RainbowDemonClaymoreProj.cs @@ -0,0 +1,110 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.RainbowDemon; + +public class RainbowDemonClaymoreProj : ModProjectile +{ + public override void SetStaticDefaults() + { + //ProjectileID.Sets.Homing[Projectile.type] = true; + Main.projFrames[Projectile.type] = 4; + } + + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 42; + Projectile.alpha = 255; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.timeLeft = 300; + } + + public override void AI() + { + if (Projectile.alpha > 70) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 70) + { + Projectile.alpha = 70; + } + } + if (Projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref Projectile.velocity); + Projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 200f; + bool target = false; + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5) + { + Vector2 newMove = Main.npc[i].Center - Projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + } + } + if (target) + { + AdjustMagnitude(ref move); + Projectile.velocity = (10f * Projectile.velocity + move) / 11f; + AdjustMagnitude(ref Projectile.velocity); + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + AnimateProjectile(); + } + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 6f) + { + vector *= 6f / magnitude; + } + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 5) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 3; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/RainbowDemon/RainbowDemonClaymoreProj.png b/Projectiles/RainbowDemon/RainbowDemonClaymoreProj.png new file mode 100644 index 0000000..eb8daca Binary files /dev/null and b/Projectiles/RainbowDemon/RainbowDemonClaymoreProj.png differ diff --git a/Projectiles/RainbowDemon/RainbowDemonKnife.cs b/Projectiles/RainbowDemon/RainbowDemonKnife.cs new file mode 100644 index 0000000..2972df3 --- /dev/null +++ b/Projectiles/RainbowDemon/RainbowDemonKnife.cs @@ -0,0 +1,84 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.RainbowDemon; + +public class RainbowDemonKnife : ModProjectile +{ + private const int alphaReducation = 25; + + private const float maxTicks = 70f; + + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 34; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + AIType = 48; + Projectile.alpha = 255; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Projectile.alpha > 30) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 30) + { + Projectile.alpha = 30; + } + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(1)) + { + target.AddBuff(70, 720, false); + } + } +} diff --git a/Projectiles/RainbowDemon/RainbowDemonKnife.png b/Projectiles/RainbowDemon/RainbowDemonKnife.png new file mode 100644 index 0000000..5049e3a Binary files /dev/null and b/Projectiles/RainbowDemon/RainbowDemonKnife.png differ diff --git a/Projectiles/RainbowDemon/RainbowDemonMagicBall.cs b/Projectiles/RainbowDemon/RainbowDemonMagicBall.cs new file mode 100644 index 0000000..f912147 --- /dev/null +++ b/Projectiles/RainbowDemon/RainbowDemonMagicBall.cs @@ -0,0 +1,78 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.RainbowDemon; + +public class RainbowDemonMagicBall : ModProjectile +{ + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 0; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile projectile = Projectile; + projectile.penetrate--; + if (Projectile.penetrate <= 0) + { + Projectile.Kill(); + } + else + { + Projectile.ai[0] += 0.1f; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = 0f - oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = 0f - oldVelocity.Y; + } + Projectile projectile2 = Projectile; + projectile2.velocity = projectile2.velocity * 0.75f; + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + return false; + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } +} diff --git a/Projectiles/RainbowDemon/RainbowDemonMagicBall.png b/Projectiles/RainbowDemon/RainbowDemonMagicBall.png new file mode 100644 index 0000000..7510ef6 Binary files /dev/null and b/Projectiles/RainbowDemon/RainbowDemonMagicBall.png differ diff --git a/Projectiles/RainbowDemon/RainbowDemonMelee.cs b/Projectiles/RainbowDemon/RainbowDemonMelee.cs new file mode 100644 index 0000000..165c56e --- /dev/null +++ b/Projectiles/RainbowDemon/RainbowDemonMelee.cs @@ -0,0 +1,90 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.RainbowDemon; + +public class RainbowDemonMelee : ModProjectile +{ + private const float maxTicks = 300f; + + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 80; + Projectile.height = 48; + Projectile.aiStyle = 28; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.tileCollide = false; + Projectile.timeLeft = 200; + Projectile.alpha = 255; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Projectile.alpha > 30) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 30) + { + Projectile.alpha = 30; + } + } + if (Projectile.ai[0] == 0f) + { + Projectile.ai[1] += 1f; + if (Projectile.ai[1] >= maxTicks) + { + float velXmult = 0.98f; + float velYmult = 0.35f; + Projectile.ai[1] = maxTicks; + Projectile.velocity.X = Projectile.velocity.X * velXmult; + Projectile.velocity.Y = Projectile.velocity.Y + velYmult; + } + Projectile.rotation = Utils.ToRotation(Projectile.velocity) + MathHelper.ToRadians(90f); + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } +} diff --git a/Projectiles/RainbowDemon/RainbowDemonMelee.png b/Projectiles/RainbowDemon/RainbowDemonMelee.png new file mode 100644 index 0000000..163c7c9 Binary files /dev/null and b/Projectiles/RainbowDemon/RainbowDemonMelee.png differ diff --git a/Projectiles/RainbowDemon/RainbowDemonShredderProj.cs b/Projectiles/RainbowDemon/RainbowDemonShredderProj.cs new file mode 100644 index 0000000..7abbe7f --- /dev/null +++ b/Projectiles/RainbowDemon/RainbowDemonShredderProj.cs @@ -0,0 +1,53 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.RainbowDemon; + +public class RainbowDemonShredderProj : ModProjectile +{ + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 46; + Projectile.height = 52; + Projectile.aiStyle = 18; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.tileCollide = false; + AIType = 274; + Projectile.timeLeft = 200; + Projectile.alpha = 255; + } + + public override void AI() + { + if (Projectile.alpha > 30) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 30) + { + Projectile.alpha = 30; + } + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } +} diff --git a/Projectiles/RainbowDemon/RainbowDemonShredderProj.png b/Projectiles/RainbowDemon/RainbowDemonShredderProj.png new file mode 100644 index 0000000..9e38c75 Binary files /dev/null and b/Projectiles/RainbowDemon/RainbowDemonShredderProj.png differ diff --git a/Projectiles/RainbowOrb.cs b/Projectiles/RainbowOrb.cs new file mode 100644 index 0000000..dc58c60 --- /dev/null +++ b/Projectiles/RainbowOrb.cs @@ -0,0 +1,109 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class RainbowOrb : ModProjectile +{ + public override void SetStaticDefaults() + { + //Sets.Homing[Projectile.type] = true; + Main.projFrames[Projectile.type] = 4; + } + + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 42; + Projectile.alpha = 255; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.timeLeft = 300; + } + + public override void AI() + { + if (Projectile.alpha > 70) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 70) + { + Projectile.alpha = 70; + } + } + if (Projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref Projectile.velocity); + Projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 200f; + bool target = false; + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5) + { + Vector2 newMove = Main.npc[i].Center - Projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + } + } + if (target) + { + AdjustMagnitude(ref move); + Projectile.velocity = (10f * Projectile.velocity + move) / 11f; + AdjustMagnitude(ref Projectile.velocity); + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + AnimateProjectile(); + } + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 6f) + { + vector *= 6f / magnitude; + } + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 5) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 3; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/RainbowOrb.png b/Projectiles/RainbowOrb.png new file mode 100644 index 0000000..eb8daca Binary files /dev/null and b/Projectiles/RainbowOrb.png differ diff --git a/Projectiles/RainbowRyuuichimojiWave.png b/Projectiles/RainbowRyuuichimojiWave.png new file mode 100644 index 0000000..163c7c9 Binary files /dev/null and b/Projectiles/RainbowRyuuichimojiWave.png differ diff --git a/Projectiles/Shimada/BloodDrop.cs b/Projectiles/Shimada/BloodDrop.cs new file mode 100644 index 0000000..b84d55f --- /dev/null +++ b/Projectiles/Shimada/BloodDrop.cs @@ -0,0 +1,39 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class BloodDrop : ModProjectile +{ + private const float maxTicks = 45f; + + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 20; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void AI() + { + if (Main.rand.NextBool(3)&& Projectile.alpha <= 100) + { + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + } + } +} diff --git a/Projectiles/Shimada/BloodDrop.png b/Projectiles/Shimada/BloodDrop.png new file mode 100644 index 0000000..60d08f4 Binary files /dev/null and b/Projectiles/Shimada/BloodDrop.png differ diff --git a/Projectiles/Shimada/DemonProjRMB.cs b/Projectiles/Shimada/DemonProjRMB.cs new file mode 100644 index 0000000..bd917a8 --- /dev/null +++ b/Projectiles/Shimada/DemonProjRMB.cs @@ -0,0 +1,108 @@ +using FabusMod.Buffs.ShimadaSword.Stacks; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class DemonProjRMB : ModProjectile +{ + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 14; + } + + public override void SetDefaults() + { + Projectile.width = 300; + Projectile.height = 132; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = -1; + Projectile.timeLeft = 42; + Projectile.alpha = 80; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.extraUpdates = 0; + Projectile.velocity = Projectile.velocity * 0f; + } + + public override void AI() + { + AnimateProjectile(); + if (Main.rand.NextBool(2)) + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num1].scale = 1.9f; + Main.dust[num1].velocity.Y -= 1.5f; + Main.dust[num1].velocity.X = 0f; + Main.dust[num1].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner != Main.myPlayer) + { + return; + } + Player player = Main.player[Projectile.owner]; + if (!(Utils.NextFloat(Main.rand) < 0.02f)) + { + return; + } + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.statLife += 75; + player.statMana += 75; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(75, true); + player.ManaEffect(75); + SoundEngine.PlaySound(SoundID.Item3); + SoundEngine.PlaySound(SoundID.Item4); + } + } + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 3) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 14; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/Shimada/DemonProjRMB.png b/Projectiles/Shimada/DemonProjRMB.png new file mode 100644 index 0000000..ac8a40b Binary files /dev/null and b/Projectiles/Shimada/DemonProjRMB.png differ diff --git a/Projectiles/Shimada/DemonProjRMBSolo.png b/Projectiles/Shimada/DemonProjRMBSolo.png new file mode 100644 index 0000000..ac6a40d Binary files /dev/null and b/Projectiles/Shimada/DemonProjRMBSolo.png differ diff --git a/Projectiles/Shimada/DemonProjTwo.cs b/Projectiles/Shimada/DemonProjTwo.cs new file mode 100644 index 0000000..cdaeee5 --- /dev/null +++ b/Projectiles/Shimada/DemonProjTwo.cs @@ -0,0 +1,88 @@ +using FabusMod.Buffs.ShimadaSword.Stacks; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class DemonProjTwo : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 46; + Projectile.height = 28; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + //Projectile.melee = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 2f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust2].scale = 2f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner != Main.myPlayer) + { + return; + } + Player player = Main.player[Projectile.owner]; + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.statLife += 75; + player.statMana += 75; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(75, true); + player.ManaEffect(75); + SoundEngine.PlaySound(SoundID.Item3); + SoundEngine.PlaySound(SoundID.Item4); + } + } + } +} diff --git a/Projectiles/Shimada/DemonProjTwo.png b/Projectiles/Shimada/DemonProjTwo.png new file mode 100644 index 0000000..12951b2 Binary files /dev/null and b/Projectiles/Shimada/DemonProjTwo.png differ diff --git a/Projectiles/Shimada/DemonWave.cs b/Projectiles/Shimada/DemonWave.cs new file mode 100644 index 0000000..d14929a --- /dev/null +++ b/Projectiles/Shimada/DemonWave.cs @@ -0,0 +1,64 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class DemonWave : ModProjectile +{ + private const int alphaReducation = 50; + + public override void SetDefaults() + { + Projectile.width = 13; + Projectile.height = 13; + Projectile.aiStyle = -1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 5; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.extraUpdates = 100; + AIType = 14; + } + + public override void AI() + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[num1]; + obj.velocity *= 0f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj2 = Main.dust[num2]; + obj2.velocity *= 0f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj3 = Main.dust[num3]; + obj3.velocity *= 0f; + Main.dust[num3].noGravity = true; + int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj4 = Main.dust[num4]; + obj4.velocity *= 0f; + Main.dust[num4].noGravity = true; + int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj5 = Main.dust[num5]; + obj5.velocity *= 0f; + Main.dust[num5].noGravity = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner == Main.myPlayer) + { + Player player = Main.player[Projectile.owner]; + if (Main.myPlayer == player.whoAmI) + { + player.statMana++; + player.ManaEffect(1); + } + } + target.immune[Projectile.owner] = 0; + } +} diff --git a/Projectiles/Shimada/DemonWave.png b/Projectiles/Shimada/DemonWave.png new file mode 100644 index 0000000..f910335 Binary files /dev/null and b/Projectiles/Shimada/DemonWave.png differ diff --git a/Projectiles/Shimada/DreamCatcherProjRMB.cs b/Projectiles/Shimada/DreamCatcherProjRMB.cs new file mode 100644 index 0000000..021b408 --- /dev/null +++ b/Projectiles/Shimada/DreamCatcherProjRMB.cs @@ -0,0 +1,118 @@ +using FabusMod.Buffs.ShimadaSword.Stacks; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class DreamCatcherProjRMB : ModProjectile +{ + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 14; + } + + public override void SetDefaults() + { + Projectile.width = 300; + Projectile.height = 132; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = -1; + Projectile.timeLeft = 42; + Projectile.alpha = 80; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.extraUpdates = 0; + Projectile projectile = Projectile; + Projectile.velocity = Projectile.velocity * 0f; + } + + public override void AI() + { + AnimateProjectile(); + if (Main.rand.NextBool(2)) + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num1].scale = 1.9f; + Main.dust[num1].velocity.Y -= 1.5f; + Main.dust[num1].velocity.X = 0f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num2].scale = 1.9f; + Main.dust[num2].velocity.Y -= 1.5f; + Main.dust[num2].velocity.X = 0f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num3].scale = 1.9f; + Main.dust[num3].velocity.Y -= 1.5f; + Main.dust[num3].velocity.X = 0f; + Main.dust[num3].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner == Main.myPlayer) + { + Player player = Main.player[Projectile.owner]; + if (Utils.NextFloat(Main.rand) < 0.03f) + { + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.statLife += 85; + player.statMana += 85; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(85, true); + player.ManaEffect(85); + SoundEngine.PlaySound(SoundID.Item3); + SoundEngine.PlaySound(SoundID.Item4); + } + } + } + } + target.AddBuff(72, 300, false); + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 3) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 14; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/Shimada/DreamCatcherProjRMB.png b/Projectiles/Shimada/DreamCatcherProjRMB.png new file mode 100644 index 0000000..aca97df Binary files /dev/null and b/Projectiles/Shimada/DreamCatcherProjRMB.png differ diff --git a/Projectiles/Shimada/DreamCatcherProjTwo.cs b/Projectiles/Shimada/DreamCatcherProjTwo.cs new file mode 100644 index 0000000..9b14d8a --- /dev/null +++ b/Projectiles/Shimada/DreamCatcherProjTwo.cs @@ -0,0 +1,157 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class DreamCatcherProjTwo : ModProjectile +{ + public override void SetStaticDefaults() + { + //Sets.Homing[Projectile.type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 46; + Projectile.height = 28; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + if (Projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref Projectile.velocity); + Projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 400f; + bool target = false; + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5) + { + Vector2 newMove = Main.npc[i].Center - Projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + } + } + if (target) + { + AdjustMagnitude(ref move); + Projectile.velocity = (10f * Projectile.velocity + move) / 11f; + AdjustMagnitude(ref Projectile.velocity); + } + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 2f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust2].scale = 2f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust3].scale = 2f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + int dust4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust4].scale = 2f; + Dust obj4 = Main.dust[dust4]; + obj4.velocity *= 0.1f; + Main.dust[dust4].noGravity = true; + int dust5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust5].scale = 2f; + Dust obj5 = Main.dust[dust5]; + obj5.velocity *= 0.1f; + Main.dust[dust5].noGravity = true; + int dust6 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust6].scale = 2f; + Dust obj6 = Main.dust[dust6]; + obj6.velocity *= 0.1f; + Main.dust[dust6].noGravity = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner != Main.myPlayer) + { + return; + } + Player player = Main.player[Projectile.owner]; + player.statLife += 20; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(20, true); + SoundEngine.PlaySound(SoundID.Item3); + } + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 480, true); + player.statLife += 85; + player.statMana += 85; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(85, true); + player.ManaEffect(85); + SoundEngine.PlaySound(SoundID.Item3); + SoundEngine.PlaySound(SoundID.Item4); + } + } + } + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 6f) + { + vector *= 6f / magnitude; + } + } +} diff --git a/Projectiles/Shimada/DreamCatcherProjTwo.png b/Projectiles/Shimada/DreamCatcherProjTwo.png new file mode 100644 index 0000000..1788291 Binary files /dev/null and b/Projectiles/Shimada/DreamCatcherProjTwo.png differ diff --git a/Projectiles/Shimada/DreamCatcherWave.cs b/Projectiles/Shimada/DreamCatcherWave.cs new file mode 100644 index 0000000..581950f --- /dev/null +++ b/Projectiles/Shimada/DreamCatcherWave.cs @@ -0,0 +1,68 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class DreamCatcherWave : ModProjectile +{ + private const int alphaReducation = 50; + + public override void SetDefaults() + { + Projectile.width = 13; + Projectile.height = 13; + Projectile.aiStyle = -1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 6; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.extraUpdates = 100; + AIType = 14; + } + + public override void AI() + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[num1]; + obj.velocity *= 0f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj2 = Main.dust[num2]; + obj2.velocity *= 0f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj3 = Main.dust[num3]; + obj3.velocity *= 0f; + Main.dust[num3].noGravity = true; + int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj4 = Main.dust[num4]; + obj4.velocity *= 0f; + Main.dust[num4].noGravity = true; + int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj5 = Main.dust[num5]; + obj5.velocity *= 0f; + Main.dust[num5].noGravity = true; + int num6 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj6 = Main.dust[num6]; + obj6.velocity *= 0f; + Main.dust[num6].noGravity = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner == Main.myPlayer) + { + Player player = Main.player[Projectile.owner]; + if (Main.myPlayer == player.whoAmI) + { + player.statMana++; + player.ManaEffect(1); + } + } + target.immune[Projectile.owner] = 0; + } +} diff --git a/Projectiles/Shimada/DreamCatcherWave.png b/Projectiles/Shimada/DreamCatcherWave.png new file mode 100644 index 0000000..f910335 Binary files /dev/null and b/Projectiles/Shimada/DreamCatcherWave.png differ diff --git a/Projectiles/Shimada/GoldenFuryProjRMB.cs b/Projectiles/Shimada/GoldenFuryProjRMB.cs new file mode 100644 index 0000000..5c653a6 --- /dev/null +++ b/Projectiles/Shimada/GoldenFuryProjRMB.cs @@ -0,0 +1,107 @@ +using FabusMod.Buffs.ShimadaSword.Stacks; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class GoldenFuryProjRMB : ModProjectile +{ + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 14; + } + + public override void SetDefaults() + { + Projectile.width = 300; + Projectile.height = 132; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = -1; + Projectile.timeLeft = 42; + Projectile.alpha = 80; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.extraUpdates = 0; + Projectile.velocity = Projectile.velocity * 0f; + } + + public override void AI() + { + AnimateProjectile(); + if (Main.rand.NextBool(2)) + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[num1].scale = 1.9f; + Main.dust[num1].velocity.Y -= 1.5f; + Main.dust[num1].velocity.X = 0f; + Main.dust[num1].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner == Main.myPlayer) + { + Player player = Main.player[Projectile.owner]; + if (Utils.NextFloat(Main.rand) < 0.03f) + { + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.statLife += 75; + player.statMana += 75; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(75, true); + player.ManaEffect(75); + SoundEngine.PlaySound(SoundID.Item3); + SoundEngine.PlaySound(SoundID.Item4); + } + } + } + } + target.AddBuff(72, 300, false); + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 3) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 14; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/Shimada/GoldenFuryProjRMB.png b/Projectiles/Shimada/GoldenFuryProjRMB.png new file mode 100644 index 0000000..d5ea335 Binary files /dev/null and b/Projectiles/Shimada/GoldenFuryProjRMB.png differ diff --git a/Projectiles/Shimada/GoldenFuryProjTwo.cs b/Projectiles/Shimada/GoldenFuryProjTwo.cs new file mode 100644 index 0000000..609ccdd --- /dev/null +++ b/Projectiles/Shimada/GoldenFuryProjTwo.cs @@ -0,0 +1,88 @@ +using FabusMod.Buffs.ShimadaSword.Stacks; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class GoldenFuryProjTwo : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 46; + Projectile.height = 28; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + //Projectile.melee = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 2f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust2].scale = 2f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner != Main.myPlayer) + { + return; + } + Player player = Main.player[Projectile.owner]; + if (!player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType()) && !player.HasBuff(ModContent.BuffType())) + { + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.AddBuff(ModContent.BuffType(), 960, true); + } + else if (player.HasBuff(ModContent.BuffType())) + { + player.ClearBuff(ModContent.BuffType()); + player.statLife += 75; + player.statMana += 75; + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(75, true); + player.ManaEffect(75); + SoundEngine.PlaySound(SoundID.Item3); + SoundEngine.PlaySound(SoundID.Item4); + } + } + } +} diff --git a/Projectiles/Shimada/GoldenFuryProjTwo.png b/Projectiles/Shimada/GoldenFuryProjTwo.png new file mode 100644 index 0000000..4b1f65e Binary files /dev/null and b/Projectiles/Shimada/GoldenFuryProjTwo.png differ diff --git a/Projectiles/Shimada/GoldenFuryWave.cs b/Projectiles/Shimada/GoldenFuryWave.cs new file mode 100644 index 0000000..8c87d1c --- /dev/null +++ b/Projectiles/Shimada/GoldenFuryWave.cs @@ -0,0 +1,64 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class GoldenFuryWave : ModProjectile +{ + private const int alphaReducation = 50; + + public override void SetDefaults() + { + Projectile.width = 13; + Projectile.height = 13; + Projectile.aiStyle = -1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 6; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.extraUpdates = 100; + AIType = 14; + } + + public override void AI() + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[num1]; + obj.velocity *= 0f; + Main.dust[num1].noGravity = true; + int num2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj2 = Main.dust[num2]; + obj2.velocity *= 0f; + Main.dust[num2].noGravity = true; + int num3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj3 = Main.dust[num3]; + obj3.velocity *= 0f; + Main.dust[num3].noGravity = true; + int num4 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj4 = Main.dust[num4]; + obj4.velocity *= 0f; + Main.dust[num4].noGravity = true; + int num5 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj5 = Main.dust[num5]; + obj5.velocity *= 0f; + Main.dust[num5].noGravity = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Projectile.owner == Main.myPlayer) + { + Player player = Main.player[Projectile.owner]; + if (Main.myPlayer == player.whoAmI) + { + player.statMana++; + player.ManaEffect(1); + } + } + target.immune[Projectile.owner] = 0; + } +} diff --git a/Projectiles/Shimada/GoldenFuryWave.png b/Projectiles/Shimada/GoldenFuryWave.png new file mode 100644 index 0000000..f910335 Binary files /dev/null and b/Projectiles/Shimada/GoldenFuryWave.png differ diff --git a/Projectiles/Shimada/RainbowClump.cs b/Projectiles/Shimada/RainbowClump.cs new file mode 100644 index 0000000..49c9850 --- /dev/null +++ b/Projectiles/Shimada/RainbowClump.cs @@ -0,0 +1,47 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class RainbowClump : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 20; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } +} diff --git a/Projectiles/Shimada/RainbowClump.png b/Projectiles/Shimada/RainbowClump.png new file mode 100644 index 0000000..654cb09 Binary files /dev/null and b/Projectiles/Shimada/RainbowClump.png differ diff --git a/Projectiles/Shimada/ShimadaWave.cs b/Projectiles/Shimada/ShimadaWave.cs new file mode 100644 index 0000000..ff1adfe --- /dev/null +++ b/Projectiles/Shimada/ShimadaWave.cs @@ -0,0 +1,36 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class ShimadaWave : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 13; + Projectile.height = 13; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.5f) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } +} diff --git a/Projectiles/Shimada/ShimadaWave.png b/Projectiles/Shimada/ShimadaWave.png new file mode 100644 index 0000000..f910335 Binary files /dev/null and b/Projectiles/Shimada/ShimadaWave.png differ diff --git a/Projectiles/Shimada/ShimadaWaveNihon.cs b/Projectiles/Shimada/ShimadaWaveNihon.cs new file mode 100644 index 0000000..a636151 --- /dev/null +++ b/Projectiles/Shimada/ShimadaWaveNihon.cs @@ -0,0 +1,36 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shimada; + +public class ShimadaWaveNihon : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 13; + Projectile.height = 13; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.5f) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } +} diff --git a/Projectiles/Shimada/ShimadaWaveNihon.png b/Projectiles/Shimada/ShimadaWaveNihon.png new file mode 100644 index 0000000..f910335 Binary files /dev/null and b/Projectiles/Shimada/ShimadaWaveNihon.png differ diff --git a/Projectiles/Shortsword/CarbonKnife.cs b/Projectiles/Shortsword/CarbonKnife.cs new file mode 100644 index 0000000..52b6a08 --- /dev/null +++ b/Projectiles/Shortsword/CarbonKnife.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shortsword; + +public class CarbonKnife : ModProjectile +{ + private const float maxTicks = 70f; + + private const int alphaReducation = 25; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Carbon Knife"); + } + + public override void SetDefaults() + { + Projectile.CloneDefaults(304); + AIType = 304; + Projectile.width = 14; + Projectile.height = 30; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } +} diff --git a/Projectiles/Shortsword/CarbonKnife.png b/Projectiles/Shortsword/CarbonKnife.png new file mode 100644 index 0000000..adf7492 Binary files /dev/null and b/Projectiles/Shortsword/CarbonKnife.png differ diff --git a/Projectiles/Shortsword/CarbonKnifeNihon.cs b/Projectiles/Shortsword/CarbonKnifeNihon.cs new file mode 100644 index 0000000..d233591 --- /dev/null +++ b/Projectiles/Shortsword/CarbonKnifeNihon.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shortsword; + +public class CarbonKnifeNihon : ModProjectile +{ + private const float maxTicks = 70f; + + private const int alphaReducation = 25; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Carbon Knife - Nihon"); + } + + public override void SetDefaults() + { + Projectile.CloneDefaults(304); + AIType = 304; + Projectile.width = 14; + Projectile.height = 30; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } +} diff --git a/Projectiles/Shortsword/CarbonKnifeNihon.png b/Projectiles/Shortsword/CarbonKnifeNihon.png new file mode 100644 index 0000000..96af74f Binary files /dev/null and b/Projectiles/Shortsword/CarbonKnifeNihon.png differ diff --git a/Projectiles/Shortsword/DeathBlossom.cs b/Projectiles/Shortsword/DeathBlossom.cs new file mode 100644 index 0000000..79cabc7 --- /dev/null +++ b/Projectiles/Shortsword/DeathBlossom.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shortsword; + +public class DeathBlossom : ModProjectile +{ + private const float maxTicks = 70f; + + private const int alphaReducation = 25; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Death Blossom Knife"); + } + + public override void SetDefaults() + { + Projectile.CloneDefaults(304); + AIType = 304; + Projectile.width = 14; + Projectile.height = 30; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } +} diff --git a/Projectiles/Shortsword/DeathBlossom.png b/Projectiles/Shortsword/DeathBlossom.png new file mode 100644 index 0000000..adf7492 Binary files /dev/null and b/Projectiles/Shortsword/DeathBlossom.png differ diff --git a/Projectiles/Shortsword/FumaShuriken.cs b/Projectiles/Shortsword/FumaShuriken.cs new file mode 100644 index 0000000..e4ca3d9 --- /dev/null +++ b/Projectiles/Shortsword/FumaShuriken.cs @@ -0,0 +1,73 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shortsword; + +public class FumaShuriken : ModProjectile +{ + public override void SetStaticDefaults() + { + //Sets.Homing[Projectile.type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 32; + Projectile.height = 32; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + } + + public override void AI() + { + if (Projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref Projectile.velocity); + Projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 400f; + bool target = false; + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5) + { + Vector2 newMove = Main.npc[i].Center - Projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + } + } + if (target) + { + AdjustMagnitude(ref move); + Projectile.velocity = (5f * Projectile.velocity + move) / 6f; + AdjustMagnitude(ref Projectile.velocity); + } + if (Main.rand.NextBool(3)) + { + int num1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Dust obj = Main.dust[num1]; + obj.velocity *= 0f; + Main.dust[num1].noGravity = true; + } + } + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 16f) + { + vector *= 16f / magnitude; + } + } +} diff --git a/Projectiles/Shortsword/FumaShuriken.png b/Projectiles/Shortsword/FumaShuriken.png new file mode 100644 index 0000000..2deb2a7 Binary files /dev/null and b/Projectiles/Shortsword/FumaShuriken.png differ diff --git a/Projectiles/Shortsword/GoldenKnife.cs b/Projectiles/Shortsword/GoldenKnife.cs new file mode 100644 index 0000000..27cfec0 --- /dev/null +++ b/Projectiles/Shortsword/GoldenKnife.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shortsword; + +public class GoldenKnife : ModProjectile +{ + private const float maxTicks = 70f; + + private const int alphaReducation = 25; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Golden Knife"); + } + + public override void SetDefaults() + { + Projectile.CloneDefaults(304); + AIType = 304; + Projectile.width = 14; + Projectile.height = 30; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } +} diff --git a/Projectiles/Shortsword/GoldenKnife.png b/Projectiles/Shortsword/GoldenKnife.png new file mode 100644 index 0000000..e4dfc6d Binary files /dev/null and b/Projectiles/Shortsword/GoldenKnife.png differ diff --git a/Projectiles/Shortsword/RainbowKnife.cs b/Projectiles/Shortsword/RainbowKnife.cs new file mode 100644 index 0000000..2da5f76 --- /dev/null +++ b/Projectiles/Shortsword/RainbowKnife.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shortsword; + +public class RainbowKnife : ModProjectile +{ + private const float maxTicks = 70f; + + private const int alphaReducation = 25; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rainbow Knife"); + } + + public override void SetDefaults() + { + Projectile.CloneDefaults(304); + AIType = 304; + Projectile.width = 14; + Projectile.height = 30; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } +} diff --git a/Projectiles/Shortsword/RainbowKnife.png b/Projectiles/Shortsword/RainbowKnife.png new file mode 100644 index 0000000..b67a22a Binary files /dev/null and b/Projectiles/Shortsword/RainbowKnife.png differ diff --git a/Projectiles/Shortsword/Substitute.cs b/Projectiles/Shortsword/Substitute.cs new file mode 100644 index 0000000..9fbb42d --- /dev/null +++ b/Projectiles/Shortsword/Substitute.cs @@ -0,0 +1,14 @@ +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.Shortsword; + +public class Substitute : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 32; + Projectile.height = 32; + Projectile.friendly = true; + } +} diff --git a/Projectiles/Shortsword/Substitute.png b/Projectiles/Shortsword/Substitute.png new file mode 100644 index 0000000..f910335 Binary files /dev/null and b/Projectiles/Shortsword/Substitute.png differ diff --git a/Projectiles/Shuriken/CarbonShuriken.cs b/Projectiles/Shuriken/CarbonShuriken.cs new file mode 100644 index 0000000..9cfe050 --- /dev/null +++ b/Projectiles/Shuriken/CarbonShuriken.cs @@ -0,0 +1,57 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shuriken; + +public class CarbonShuriken : ModProjectile +{ + private const float maxTicks = 45f; + + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 17; + Projectile.height = 19; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } +} diff --git a/Projectiles/Shuriken/CarbonShuriken.png b/Projectiles/Shuriken/CarbonShuriken.png new file mode 100644 index 0000000..e575c8e Binary files /dev/null and b/Projectiles/Shuriken/CarbonShuriken.png differ diff --git a/Projectiles/Shuriken/CarbonShurikenNihon.cs b/Projectiles/Shuriken/CarbonShurikenNihon.cs new file mode 100644 index 0000000..c7eb58e --- /dev/null +++ b/Projectiles/Shuriken/CarbonShurikenNihon.cs @@ -0,0 +1,57 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shuriken; + +public class CarbonShurikenNihon : ModProjectile +{ + private const float maxTicks = 45f; + + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 17; + Projectile.height = 19; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } +} diff --git a/Projectiles/Shuriken/CarbonShurikenNihon.png b/Projectiles/Shuriken/CarbonShurikenNihon.png new file mode 100644 index 0000000..6573d9c Binary files /dev/null and b/Projectiles/Shuriken/CarbonShurikenNihon.png differ diff --git a/Projectiles/Shuriken/HerosShuriken.cs b/Projectiles/Shuriken/HerosShuriken.cs new file mode 100644 index 0000000..ebacea0 --- /dev/null +++ b/Projectiles/Shuriken/HerosShuriken.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shuriken; + +public class HerosShuriken : ModProjectile +{ + private const float maxTicks = 45f; + + private const int alphaReducation = 25; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hero's Shuriken"); + } + + public override void SetDefaults() + { + Projectile.width = 17; + Projectile.height = 19; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } +} diff --git a/Projectiles/Shuriken/HerosShuriken.png b/Projectiles/Shuriken/HerosShuriken.png new file mode 100644 index 0000000..5f59af8 Binary files /dev/null and b/Projectiles/Shuriken/HerosShuriken.png differ diff --git a/Projectiles/Shuriken/OniSlayer.cs b/Projectiles/Shuriken/OniSlayer.cs new file mode 100644 index 0000000..f5c1f01 --- /dev/null +++ b/Projectiles/Shuriken/OniSlayer.cs @@ -0,0 +1,57 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shuriken; + +public class OniSlayer : ModProjectile +{ + private const float maxTicks = 45f; + + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 19; + Projectile.height = 21; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } +} diff --git a/Projectiles/Shuriken/OniSlayer.png b/Projectiles/Shuriken/OniSlayer.png new file mode 100644 index 0000000..28b15ed Binary files /dev/null and b/Projectiles/Shuriken/OniSlayer.png differ diff --git a/Projectiles/Shuriken/SparklingDemon.cs b/Projectiles/Shuriken/SparklingDemon.cs new file mode 100644 index 0000000..94fb158 --- /dev/null +++ b/Projectiles/Shuriken/SparklingDemon.cs @@ -0,0 +1,57 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shuriken; + +public class SparklingDemon : ModProjectile +{ + private const float maxTicks = 45f; + + private const int alphaReducation = 25; + + public override void SetDefaults() + { + Projectile.width = 19; + Projectile.height = 21; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } +} diff --git a/Projectiles/Shuriken/SparklingDemon.png b/Projectiles/Shuriken/SparklingDemon.png new file mode 100644 index 0000000..a17f3f4 Binary files /dev/null and b/Projectiles/Shuriken/SparklingDemon.png differ diff --git a/Projectiles/Shuriken/StonePlatedShurikenProj.cs b/Projectiles/Shuriken/StonePlatedShurikenProj.cs new file mode 100644 index 0000000..2556ffe --- /dev/null +++ b/Projectiles/Shuriken/StonePlatedShurikenProj.cs @@ -0,0 +1,53 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles.Shuriken; + +public class StonePlatedShurikenProj : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 15; + Projectile.height = 17; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Main.rand.NextBool(6)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = false; + } + } +} diff --git a/Projectiles/Shuriken/StonePlatedShurikenProj.png b/Projectiles/Shuriken/StonePlatedShurikenProj.png new file mode 100644 index 0000000..377a543 Binary files /dev/null and b/Projectiles/Shuriken/StonePlatedShurikenProj.png differ diff --git a/Projectiles/SorcerousStaff/GoldenStaffProj.cs b/Projectiles/SorcerousStaff/GoldenStaffProj.cs new file mode 100644 index 0000000..025280d --- /dev/null +++ b/Projectiles/SorcerousStaff/GoldenStaffProj.cs @@ -0,0 +1,73 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.SorcerousStaff; + +public class GoldenStaffProj : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + } + + public override void AI() + { + if (Main.rand.NextBool(4)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile projectile = Projectile; + projectile.penetrate--; + if (Projectile.penetrate <= 0) + { + Projectile.Kill(); + } + else + { + Projectile.ai[0] += 0.1f; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = 0f - oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = 0f - oldVelocity.Y; + } + Projectile projectile2 = Projectile; + projectile2.velocity = projectile2.velocity * 0.75f; + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } +} diff --git a/Projectiles/SorcerousStaff/GoldenStaffProj.png b/Projectiles/SorcerousStaff/GoldenStaffProj.png new file mode 100644 index 0000000..ffbaaea Binary files /dev/null and b/Projectiles/SorcerousStaff/GoldenStaffProj.png differ diff --git a/Projectiles/SorcerousStaff/NatureStaffProj.cs b/Projectiles/SorcerousStaff/NatureStaffProj.cs new file mode 100644 index 0000000..9891622 --- /dev/null +++ b/Projectiles/SorcerousStaff/NatureStaffProj.cs @@ -0,0 +1,89 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.SorcerousStaff; + +public class NatureStaffProj : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + } + + public override void AI() + { + if (Main.rand.NextBool(5)) + { + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust2].scale = 0.9f; + Dust obj = Main.dust[dust2]; + obj.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + } + if (Main.rand.NextBool(4)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj2 = Main.dust[dust1]; + obj2.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile projectile = Projectile; + projectile.penetrate--; + if (Projectile.penetrate <= 0) + { + Projectile.Kill(); + } + else + { + Projectile.ai[0] += 0.1f; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = 0f - oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = 0f - oldVelocity.Y; + } + Projectile projectile2 = Projectile; + projectile2.velocity *= 0.75f; + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(20, 180, false); + } + } +} diff --git a/Projectiles/SorcerousStaff/NatureStaffProj.png b/Projectiles/SorcerousStaff/NatureStaffProj.png new file mode 100644 index 0000000..776d5ed Binary files /dev/null and b/Projectiles/SorcerousStaff/NatureStaffProj.png differ diff --git a/Projectiles/SorcerousStaff/SorcerousHellstaffProj.cs b/Projectiles/SorcerousStaff/SorcerousHellstaffProj.cs new file mode 100644 index 0000000..ef27d40 --- /dev/null +++ b/Projectiles/SorcerousStaff/SorcerousHellstaffProj.cs @@ -0,0 +1,89 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.SorcerousStaff; + +public class SorcerousHellstaffProj : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust2].scale = 0.9f; + Dust obj = Main.dust[dust2]; + obj.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + } + if (Main.rand.NextBool(4)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj2 = Main.dust[dust1]; + obj2.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile projectile = Projectile; + projectile.penetrate--; + if (Projectile.penetrate <= 0) + { + Projectile.Kill(); + } + else + { + Projectile.ai[0] += 0.1f; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = 0f - oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = 0f - oldVelocity.Y; + } + Projectile projectile2 = Projectile; + projectile2.velocity *= 0.75f; + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(6)) + { + target.AddBuff(24, 180, false); + } + } +} diff --git a/Projectiles/SorcerousStaff/SorcerousHellstaffProj.png b/Projectiles/SorcerousStaff/SorcerousHellstaffProj.png new file mode 100644 index 0000000..83767be Binary files /dev/null and b/Projectiles/SorcerousStaff/SorcerousHellstaffProj.png differ diff --git a/Projectiles/SorcerousStaff/SorcerousHellstaffProjWhite.cs b/Projectiles/SorcerousStaff/SorcerousHellstaffProjWhite.cs new file mode 100644 index 0000000..2317704 --- /dev/null +++ b/Projectiles/SorcerousStaff/SorcerousHellstaffProjWhite.cs @@ -0,0 +1,89 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.SorcerousStaff; + +public class SorcerousHellstaffProjWhite : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust2].scale = 0.9f; + Dust obj = Main.dust[dust2]; + obj.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + } + if (Main.rand.NextBool(4)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj2 = Main.dust[dust1]; + obj2.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile projectile = Projectile; + projectile.penetrate--; + if (Projectile.penetrate <= 0) + { + Projectile.Kill(); + } + else + { + Projectile.ai[0] += 0.1f; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = 0f - oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = 0f - oldVelocity.Y; + } + Projectile projectile2 = Projectile; + projectile2.velocity *= 0.75f; + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(6)) + { + target.AddBuff(24, 180, false); + } + } +} diff --git a/Projectiles/SorcerousStaff/SorcerousHellstaffProjWhite.png b/Projectiles/SorcerousStaff/SorcerousHellstaffProjWhite.png new file mode 100644 index 0000000..964bd84 Binary files /dev/null and b/Projectiles/SorcerousStaff/SorcerousHellstaffProjWhite.png differ diff --git a/Projectiles/SorcerousStaff/SorcerousStaffProj.cs b/Projectiles/SorcerousStaff/SorcerousStaffProj.cs new file mode 100644 index 0000000..8030bfe --- /dev/null +++ b/Projectiles/SorcerousStaff/SorcerousStaffProj.cs @@ -0,0 +1,81 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.SorcerousStaff; + +public class SorcerousStaffProj : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust2].scale = 0.9f; + Dust obj = Main.dust[dust2]; + obj.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + } + if (Main.rand.NextBool(4)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj2 = Main.dust[dust1]; + obj2.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile projectile = Projectile; + projectile.penetrate--; + if (Projectile.penetrate <= 0) + { + Projectile.Kill(); + } + else + { + Projectile.ai[0] += 0.1f; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = 0f - oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = 0f - oldVelocity.Y; + } + Projectile projectile2 = Projectile; + projectile2.velocity *= 0.75f; + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } +} diff --git a/Projectiles/SorcerousStaff/SorcerousStaffProj.png b/Projectiles/SorcerousStaff/SorcerousStaffProj.png new file mode 100644 index 0000000..74f3f0b Binary files /dev/null and b/Projectiles/SorcerousStaff/SorcerousStaffProj.png differ diff --git a/Projectiles/SorcerousStaff/TranquilityProj.cs b/Projectiles/SorcerousStaff/TranquilityProj.cs new file mode 100644 index 0000000..d17f2d5 --- /dev/null +++ b/Projectiles/SorcerousStaff/TranquilityProj.cs @@ -0,0 +1,75 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles.SorcerousStaff; + +public class TranquilityProj : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile projectile = Projectile; + projectile.penetrate--; + if (Projectile.penetrate <= 0) + { + Projectile.Kill(); + } + else + { + Projectile.ai[0] += 0.1f; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = 0f - oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = 0f - oldVelocity.Y; + } + Projectile projectile2 = Projectile; + projectile2.velocity = projectile2.velocity * 0.75f; + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + return false; + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } +} diff --git a/Projectiles/SorcerousStaff/TranquilityProj.png b/Projectiles/SorcerousStaff/TranquilityProj.png new file mode 100644 index 0000000..7510ef6 Binary files /dev/null and b/Projectiles/SorcerousStaff/TranquilityProj.png differ diff --git a/Projectiles/SpectralMoonBolt.cs b/Projectiles/SpectralMoonBolt.cs new file mode 100644 index 0000000..7fc4560 --- /dev/null +++ b/Projectiles/SpectralMoonBolt.cs @@ -0,0 +1,69 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class SpectralMoonBolt : ModProjectile +{ + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.ignoreWater = true; + + Projectile.timeLeft = 600; + Projectile.light = 1f; + Projectile.penetrate = 1; + AIType = 1; + Projectile.aiStyle = 1; + } + + public override void AI() + { + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + SoundEngine.PlaySound(SoundID.Item1, Projectile.position); + } +} diff --git a/Projectiles/SpectralMoonBolt.png b/Projectiles/SpectralMoonBolt.png new file mode 100644 index 0000000..7d7b8b9 Binary files /dev/null and b/Projectiles/SpectralMoonBolt.png differ diff --git a/Projectiles/TheSpinningRainbow.cs b/Projectiles/TheSpinningRainbow.cs new file mode 100644 index 0000000..6f62e2e --- /dev/null +++ b/Projectiles/TheSpinningRainbow.cs @@ -0,0 +1,72 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; +using Terraria.ID; + +namespace FabusMod.Projectiles; + +public class TheSpinningRainbow : ModProjectile +{ + private const float maxTicks = 45f; + + private const int alphaReducation = 25; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The Spinning Rainbow"); + } + + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.aiStyle = 2; + Projectile.friendly = true; + Projectile.penetrate = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return projHitbox.Intersects(targetHitbox); + } + + public override void Kill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.position); + Vector2 position = Projectile.position; + Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f)); + _ = position + rotVector * 16f; + int item = 0; + if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0) + { + NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 1f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 1f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 1f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } +} diff --git a/Projectiles/TheSpinningRainbow.png b/Projectiles/TheSpinningRainbow.png new file mode 100644 index 0000000..6d6daaa Binary files /dev/null and b/Projectiles/TheSpinningRainbow.png differ diff --git a/Projectiles/TheWhisperingIcicle.cs b/Projectiles/TheWhisperingIcicle.cs new file mode 100644 index 0000000..54bf468 --- /dev/null +++ b/Projectiles/TheWhisperingIcicle.cs @@ -0,0 +1,104 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class TheWhisperingIcicle : ModProjectile +{ + public override void SetStaticDefaults() + { + //Sets.Homing[Projectile.type] = true; + Main.projFrames[Projectile.type] = 17; + } + + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.light = 1f; + AIType = 1; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + } + + public override void AI() + { + if (Main.rand.NextBool(3)) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + AnimateProjectile(); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile projectile = Projectile; + projectile.penetrate--; + if (Projectile.penetrate <= 0) + { + Projectile.Kill(); + } + else + { + Projectile.ai[0] += 0.1f; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = 0f - oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = 0f - oldVelocity.Y; + } + Projectile projectile2 = Projectile; + projectile2.velocity *= 0.75f; + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + } + SoundEngine.PlaySound(SoundID.Item27, Projectile.position); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Projectile.ai[0] += 0.1f; + Projectile.velocity *= 0.75f; + if (Main.rand.NextBool(1)) + { + target.AddBuff(44, 180, false); + } + } + + public void AnimateProjectile() + { + Projectile projectile = Projectile; + projectile.frameCounter++; + if (Projectile.frameCounter >= 3) + { + Projectile projectile2 = Projectile; + projectile2.frame++; + Projectile projectile3 = Projectile; + projectile3.frame %= 16; + Projectile.frameCounter = 0; + } + } +} diff --git a/Projectiles/TheWhisperingIcicle.png b/Projectiles/TheWhisperingIcicle.png new file mode 100644 index 0000000..96d1084 Binary files /dev/null and b/Projectiles/TheWhisperingIcicle.png differ diff --git a/Projectiles/WishNeedle.cs b/Projectiles/WishNeedle.cs new file mode 100644 index 0000000..81a0125 --- /dev/null +++ b/Projectiles/WishNeedle.cs @@ -0,0 +1,99 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace FabusMod.Projectiles; + +public class WishNeedle : ModProjectile +{ + public override void SetStaticDefaults() + { + //Sets.Homing[Projectile.type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 6; + Projectile.height = 32; + Projectile.aiStyle = 1; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.alpha = 255; + Projectile.light = 0.5f; + Projectile.ignoreWater = false; + Projectile.tileCollide = true; + Projectile.extraUpdates = 2; + AIType = 14; + } + + public override void AI() + { + if (Projectile.alpha > 70) + { + Projectile projectile = Projectile; + projectile.alpha -= 15; + if (Projectile.alpha < 70) + { + Projectile.alpha = 70; + } + } + if (Projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref Projectile.velocity); + Projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 200f; + bool target = false; + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].lifeMax > 5) + { + Vector2 newMove = Main.npc[i].Center - Projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + } + } + if (target) + { + AdjustMagnitude(ref move); + Projectile.velocity = (10f * Projectile.velocity + move) / 11f; + AdjustMagnitude(ref Projectile.velocity); + } + if (Utils.NextFloat(Main.rand) < 0.1f && Projectile.alpha <= 100) + { + int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), 0f, 0f, 0, default, 1f); + Main.dust[dust1].scale = 0.9f; + Dust obj = Main.dust[dust1]; + obj.velocity *= 0.1f; + Main.dust[dust1].noGravity = true; + Main.dust[dust2].scale = 0.9f; + Dust obj2 = Main.dust[dust2]; + obj2.velocity *= 0.1f; + Main.dust[dust2].noGravity = true; + Main.dust[dust3].scale = 0.9f; + Dust obj3 = Main.dust[dust3]; + obj3.velocity *= 0.1f; + Main.dust[dust3].noGravity = true; + } + } + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 6f) + { + vector *= 6f / magnitude; + } + } +} diff --git a/Projectiles/WishNeedle.png b/Projectiles/WishNeedle.png new file mode 100644 index 0000000..eb8505b Binary files /dev/null and b/Projectiles/WishNeedle.png differ diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..8da89ff --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,16 @@ +{ + "profiles": { + "Terraria": { + "commandName": "Executable", + "executablePath": "dotnet", + "commandLineArgs": "$(tMLPath)", + "workingDirectory": "$(tMLSteamPath)" + }, + "TerrariaServer": { + "commandName": "Executable", + "executablePath": "dotnet", + "commandLineArgs": "$(tMLServerPath)", + "workingDirectory": "$(tMLSteamPath)" + } + } +} \ No newline at end of file diff --git a/Tiles/RainbowStation.cs b/Tiles/RainbowStation.cs new file mode 100644 index 0000000..87e503e --- /dev/null +++ b/Tiles/RainbowStation.cs @@ -0,0 +1,46 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace FabusMod.Tiles; + +public class RainbowStation : ModTile +{ + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileLavaDeath[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style5x4); + TileObjectData.addTile(Type); + AnimationFrameHeight = 72; + ModTranslation name = this.CreateMapEntryName(null); + name.SetDefault("Rainbow Station"); + AddMapEntry(new Color(113, 85, 122), name); + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + r = 0.9f; + g = 0.1f; + b = 0.5f; + } + + public override void AnimateTile(ref int frame, ref int frameCounter) + { + frameCounter++; + if (frameCounter > 4) + { + frameCounter = 0; + frame++; + frame %= 8; + } + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(new EntitySource_Misc(""), i * 16, j * 16, 32, 16, ModContent.ItemType(), 1, false, 0, false, false); + } +} diff --git a/Tiles/RainbowStation.png b/Tiles/RainbowStation.png new file mode 100644 index 0000000..730575c Binary files /dev/null and b/Tiles/RainbowStation.png differ diff --git a/Tiles/RainbowStationsheet.png b/Tiles/RainbowStationsheet.png new file mode 100644 index 0000000..8b50b3d Binary files /dev/null and b/Tiles/RainbowStationsheet.png differ diff --git a/Tiles/ReinforcedWorkBench.cs b/Tiles/ReinforcedWorkBench.cs new file mode 100644 index 0000000..bffbe6e --- /dev/null +++ b/Tiles/ReinforcedWorkBench.cs @@ -0,0 +1,31 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace FabusMod.Tiles; + +public class ReinforcedWorkBench : ModTile +{ + public override void SetStaticDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileTable[Type] = true; + Main.tileLavaDeath[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.CoordinateHeights = new[] { 18 }; + TileObjectData.addTile(Type); + ModTranslation name = this.CreateMapEntryName(null); + name.SetDefault("Reinforced Work Bench"); + AddMapEntry(new Color(120, 120, 120), name); + AdjTiles = new int[1] { 18 }; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(new EntitySource_Misc(""), i * 16, j * 16, 32, 16, ModContent.ItemType(), 1, false, 0, false, false); + } +} diff --git a/Tiles/ReinforcedWorkBench.png b/Tiles/ReinforcedWorkBench.png new file mode 100644 index 0000000..227f4d7 Binary files /dev/null and b/Tiles/ReinforcedWorkBench.png differ diff --git a/build.txt b/build.txt new file mode 100644 index 0000000..915aba5 --- /dev/null +++ b/build.txt @@ -0,0 +1,5 @@ +displayName = ♥ Fabu's Mod ♥ +author = Fabu +version = 3.0 +homepage = https://forums.terraria.org/index.php?threads/fabus-mod-version-1-0.60792/ +includePDB = true diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..7862c61 --- /dev/null +++ b/description.txt @@ -0,0 +1,26 @@ +Fabu's Mod is a pretty cool mod, it does...this. Modify this file with a description of your mod.Fabu's Mod is a little Terraria Mod made with tModloader, which adds weapons that the player can upgrade as they progress in the game. +It also adds some new and unique weapons, which have surprisingly in-depth features. + +There are several weapons that you can craft in the beginning, and keep upgrading until post-Moon Lord. +Including one accessory. + +It currently adds: + +- 81 new weapons (With 14 different dyed variants for some weapons!) +- 11 new items +- 2 new tiles +- 1 new vanity sets (+ 3 Fox Ears!) +- 4 new tools; 1 Pickaxe, 1 Digging Claw, 1 Axe, and 1 Hamaxe +- 2 new pets +- 11 new accessories +Keep in mind that this mod is still a work-in-progress, and if anything seems unfinished or unrefined, there is a high chance that it will be finished/refined in a future update. + +For a list of recipes I suggest using jopojelly's Recipe Browser mod, or any other recipe list mod. + +Credit for a lot of the sprites goes to KregJoke. + +Fabu's Mod has a Discord Server! +Do you have any questions about the mod? Any suggestions? Any bugs you would like to see fixed? +Come join, and talk to me! + +Want a preview of some of the weapons? Check out the forum post! Link below. \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..70d9800 Binary files /dev/null and b/icon.png differ