commit 57dfc3dc9932d7b3258f24deeb26b75159119d41 Author: FyloZ Date: Tue Mar 3 21:17:42 2020 -0500 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd43d67 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +*.OLD +*.csproj.user + +/obj +/bin/Debug +/.vs + +/bin +/Properties +*.csproj diff --git a/Buffs/Buffs/Commander.cs b/Buffs/Buffs/Commander.cs new file mode 100644 index 0000000..5614fe2 --- /dev/null +++ b/Buffs/Buffs/Commander.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Buffs +{ + internal class Commander : DecimationBuff + { + protected override string DisplayName => "Commander"; + protected override string Description => "Max minions +1 \nMinion's damages +10% \nMinion's Knockback +10%"; + + protected override void Init() + { + save = true; + clearable = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.maxMinions++; + player.minionDamage += 0.1f; + player.minionKB += 0.1f; + } + } +} diff --git a/Buffs/Buffs/Commander.png b/Buffs/Buffs/Commander.png new file mode 100644 index 0000000..aebfbdc Binary files /dev/null and b/Buffs/Buffs/Commander.png differ diff --git a/Buffs/Buffs/DemonicallyBewitched.cs b/Buffs/Buffs/DemonicallyBewitched.cs new file mode 100644 index 0000000..9ebc0fc --- /dev/null +++ b/Buffs/Buffs/DemonicallyBewitched.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Buffs +{ + internal class DemonicallyBewitched : DecimationBuff + { + protected override string DisplayName => "Demonically Bewitched"; + protected override string Description => "+1 minion" + "\nIncrease minions damages and knockback"; + + protected override void Init() + { + save = true; + clearable = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.maxMinions += 1; + player.minionDamage *= 1.05f; + player.minionKB *= 1.02f; + } + } +} diff --git a/Buffs/Buffs/DemonicallyBewitched.png b/Buffs/Buffs/DemonicallyBewitched.png new file mode 100644 index 0000000..4ab7288 Binary files /dev/null and b/Buffs/Buffs/DemonicallyBewitched.png differ diff --git a/Buffs/Buffs/FatesSmile.cs b/Buffs/Buffs/FatesSmile.cs new file mode 100644 index 0000000..5d8586c --- /dev/null +++ b/Buffs/Buffs/FatesSmile.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.DataStructures; + +namespace Decimation.Buffs.Buffs +{ + internal class FatesSmile : DecimationBuff + { + protected override string DisplayName => "Fate's Smile"; + protected override string Description => "Provide a slight life regeneration boost."; + + protected override void Init() + { + save = false; + displayTime = false; + clearable = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen += 1; + } + } +} \ No newline at end of file diff --git a/Buffs/Buffs/FatesSmile.png b/Buffs/Buffs/FatesSmile.png new file mode 100644 index 0000000..26796d1 Binary files /dev/null and b/Buffs/Buffs/FatesSmile.png differ diff --git a/Buffs/Buffs/MysticFlame.cs b/Buffs/Buffs/MysticFlame.cs new file mode 100644 index 0000000..76150bc --- /dev/null +++ b/Buffs/Buffs/MysticFlame.cs @@ -0,0 +1,28 @@ +using Terraria; + +namespace Decimation.Buffs.Buffs +{ + internal class MysticFlame : DecimationBuff + { + protected override string DisplayName => "Mystic Flame"; + protected override string Description => "A warmth envelops you"; + + protected override void Init() + { + save = true; + clearable = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen += 2; + player.manaRegen += 1; + player.moveSpeed *= 1.05f; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.lifeRegen += 2; + } + } +} diff --git a/Buffs/Buffs/MysticFlame.png b/Buffs/Buffs/MysticFlame.png new file mode 100644 index 0000000..1158813 Binary files /dev/null and b/Buffs/Buffs/MysticFlame.png differ diff --git a/Buffs/Buffs/NaturesAura.cs b/Buffs/Buffs/NaturesAura.cs new file mode 100644 index 0000000..9e712d3 --- /dev/null +++ b/Buffs/Buffs/NaturesAura.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.DataStructures; + +namespace Decimation.Buffs.Buffs +{ + internal class NaturesAura : DecimationBuff + { + protected override string DisplayName => "Natures Aura"; + protected override string Description => "Nature strengthens your will and power."; + + protected override void Init() + { + save = false; + displayTime = false; + clearable = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeRegen += 2; + } + } +} \ No newline at end of file diff --git a/Buffs/Buffs/NaturesAura.png b/Buffs/Buffs/NaturesAura.png new file mode 100644 index 0000000..c9dcd5f Binary files /dev/null and b/Buffs/Buffs/NaturesAura.png differ diff --git a/Buffs/Buffs/ScarabEndurance.cs b/Buffs/Buffs/ScarabEndurance.cs new file mode 100644 index 0000000..34efa3b --- /dev/null +++ b/Buffs/Buffs/ScarabEndurance.cs @@ -0,0 +1,64 @@ +using Decimation.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Buffs +{ + internal class ScarabEndurance : DecimationBuff + { + protected override string DisplayName => "Scarab Endurance"; + protected override string Description => "To add"; + + protected override void Init() + { + save = false; + clearable = false; + } + + public override void Update(Player player, ref int buffIndex) + { + DecimationPlayer modPlayer = player.GetModPlayer(); + + if (modPlayer.scarabEnduranceBuffTimeCounter >= 180) + { + if (modPlayer.scarabCounter < 3) + { + modPlayer.scarabCounter++; + modPlayer.scarabs[modPlayer.scarabCounter - 1] = Projectile.NewProjectile(player.Center, + new Vector2(0, 0), ModContent.ProjectileType(), 0, 0, 255, player.whoAmI); + } + + modPlayer.scarabEnduranceBuffTimeCounter = 0; + } + + modPlayer.scarabEnduranceBuffTimeCounter++; + + for (int i = 0; i < modPlayer.scarabCounter; i++) + player.statDefense += (int) (modPlayer.oldStatDefense * 0.15f); + } + + public override void ModifyBuffTip(ref string tip, ref int rare) + { + DecimationPlayer modPlayer = Main.LocalPlayer.GetModPlayer(); + int defenseAdded = 0; + + for (int i = 0; i < modPlayer.scarabCounter; i++) + defenseAdded += (int) (modPlayer.oldStatDefense * 0.15f); + + tip += "Summons scarabs to protect you."; + tip += "\nGive 15% more defense for each scarabs alive."; + tip += "\n3 scarabs maximum"; + tip += "\nCurrently, you have " + defenseAdded + " defense added."; + } + } + + public class ScarabEnduranceEffect : GlobalNPC + { + public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit) + { + if (target.HasBuff(ModContent.BuffType())) npc.AddBuff(BuffID.OnFire, 300); + } + } +} \ No newline at end of file diff --git a/Buffs/Buffs/ScarabEndurance.png b/Buffs/Buffs/ScarabEndurance.png new file mode 100644 index 0000000..632db1f Binary files /dev/null and b/Buffs/Buffs/ScarabEndurance.png differ diff --git a/Buffs/Buffs/SlimyFeet.cs b/Buffs/Buffs/SlimyFeet.cs new file mode 100644 index 0000000..51ce6ae --- /dev/null +++ b/Buffs/Buffs/SlimyFeet.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework.Input; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Buffs +{ + internal class SlimyFeet : DecimationBuff + { + protected override string DisplayName => "Slimy feet!"; + protected override string Description => "You now have the abilities of slimes!"; + + protected override void Init() + { + save = true; + clearable = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.noFallDmg = true; + player.waterWalk2 = true; + + Keys[] pressedKeys = Main.keyState.GetPressedKeys(); + + if (player.GetModPlayer().lastJumpBoost > 5) + player.GetModPlayer().lastJumpBoost--; + + + for (int j = 0; j < pressedKeys.Length; j++) + { + string a = string.Concat(pressedKeys[j]); + + if (a == Main.cJump) + { + if (!player.GetModPlayer().wasJumping && player.wingTime == player.wingTimeMax) + { + player.GetModPlayer().lastJumpBoost++; + } + player.GetModPlayer().wasJumping = true; + break; + } + player.GetModPlayer().wasJumping = false; + } + player.jumpSpeedBoost += player.GetModPlayer().lastJumpBoost; + } + } +} diff --git a/Buffs/Buffs/SlimyFeet.png b/Buffs/Buffs/SlimyFeet.png new file mode 100644 index 0000000..70e58ea Binary files /dev/null and b/Buffs/Buffs/SlimyFeet.png differ diff --git a/Buffs/Buffs/Ubered.cs b/Buffs/Buffs/Ubered.cs new file mode 100644 index 0000000..1d02a23 --- /dev/null +++ b/Buffs/Buffs/Ubered.cs @@ -0,0 +1,28 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Buffs +{ + internal class Ubered : DecimationBuff + { + protected override string DisplayName => "Ubered!"; + protected override string Description => "YOU ARE ZE UBERMENSCH!"; + + protected override void Init() + { + save = true; + clearable = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.statDefense += (int)(player.statDefense * 0.5f); + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.defense += (int)(npc.defense * 0.5f); + } + } +} diff --git a/Buffs/Buffs/Ubered.png b/Buffs/Buffs/Ubered.png new file mode 100644 index 0000000..6274cbd Binary files /dev/null and b/Buffs/Buffs/Ubered.png differ diff --git a/Buffs/Buffs/Vampire.cs b/Buffs/Buffs/Vampire.cs new file mode 100644 index 0000000..b7459bc --- /dev/null +++ b/Buffs/Buffs/Vampire.cs @@ -0,0 +1,35 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Buffs +{ + internal class Vampire : DecimationBuff + { + protected override string DisplayName => "Vampire!"; + protected override string Description => "You are now a vampire!"; + + protected override void Init() + { + save = true; + displayTime = true; + clearable = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.lifeSteal *= 1.3f; + player.statDefense += 2; + player.moveSpeed *= 1.05f; + player.meleeSpeed *= 1.05f; + + player.GetModPlayer().vampire = true; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.defense += 2; + } + } +} \ No newline at end of file diff --git a/Buffs/Buffs/Vampire.png b/Buffs/Buffs/Vampire.png new file mode 100644 index 0000000..411dfb7 Binary files /dev/null and b/Buffs/Buffs/Vampire.png differ diff --git a/Buffs/Buffs/Warlock.cs b/Buffs/Buffs/Warlock.cs new file mode 100644 index 0000000..5638a1c --- /dev/null +++ b/Buffs/Buffs/Warlock.cs @@ -0,0 +1,27 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Buffs +{ + internal class Warlock : DecimationBuff + { + protected override string DisplayName => "Warlock"; + protected override string Description => "Max mana +50 \nMana Regeneration Bonus +25 \nMagic Damages + 10% \nMagic Critical Chances + 5%"; + + protected override void Init() + { + displayTime = true; + save = true; + clearable = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.statManaMax2 += 50; + // To review + player.manaRegenBonus += 25; + player.magicDamage += 0.1f; + player.magicCrit += 5; + } + } +} \ No newline at end of file diff --git a/Buffs/Buffs/Warlock.png b/Buffs/Buffs/Warlock.png new file mode 100644 index 0000000..b8fb6e4 Binary files /dev/null and b/Buffs/Buffs/Warlock.png differ diff --git a/Buffs/Buffs/Werepire.cs b/Buffs/Buffs/Werepire.cs new file mode 100644 index 0000000..fcfb73a --- /dev/null +++ b/Buffs/Buffs/Werepire.cs @@ -0,0 +1,32 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Buffs +{ + internal class Werepire : DecimationBuff + { + protected override string DisplayName => "Werepire!"; + protected override string Description => "Grants both Vampire! and Werewolf effects"; + + protected override void Init() + { + save = true; + clearable = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.AddBuff(BuffID.Werewolf, 1); + player.AddBuff(ModContent.BuffType(), 1); + + player.wereWolf = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.AddBuff(BuffID.Werewolf, 1); + npc.AddBuff(ModContent.BuffType(), 1); + } + } +} diff --git a/Buffs/Buffs/Werepire.png b/Buffs/Buffs/Werepire.png new file mode 100644 index 0000000..bade989 Binary files /dev/null and b/Buffs/Buffs/Werepire.png differ diff --git a/Buffs/Debuffs/Amnesia.cs b/Buffs/Debuffs/Amnesia.cs new file mode 100644 index 0000000..8025d46 --- /dev/null +++ b/Buffs/Debuffs/Amnesia.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ID; + +namespace Decimation.Buffs.Debuffs +{ + internal class Amnesia : DecimationBuff + { + protected override string DisplayName => "Amnesia"; + protected override string Description => "Discombobulate"; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + longerExpertDebuff = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.moveSpeed *= 0.95f; + player.buffImmune[BuffID.Confused] = false; + player.AddBuff(BuffID.Confused, 1, false); + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.velocity *= 0.95f; + npc.buffImmune[BuffID.Confused] = false; + npc.AddBuff(BuffID.Confused, 1, false); + } + } +} diff --git a/Buffs/Debuffs/Amnesia.png b/Buffs/Debuffs/Amnesia.png new file mode 100644 index 0000000..1cdcd68 Binary files /dev/null and b/Buffs/Debuffs/Amnesia.png differ diff --git a/Buffs/Debuffs/AvianFlu.cs b/Buffs/Debuffs/AvianFlu.cs new file mode 100644 index 0000000..66201f7 --- /dev/null +++ b/Buffs/Debuffs/AvianFlu.cs @@ -0,0 +1,43 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Debuffs +{ + internal class AvianFlu : DecimationBuff + { + protected override string DisplayName => "Avian Flu"; + protected override string Description => "Your wings don't feel too hot..."; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + longerExpertDebuff = true; + } + + public override void Update(Player player, ref int buffIndex) + { + if (player.lifeRegen > 0) + { + player.lifeRegen = 0; + } + player.lifeRegenTime = 0; + player.lifeRegen -= 3; + + player.jumpSpeedBoost += -2; + } + + public override void Update(NPC npc, ref int buffIndex) + { + if (npc.lifeRegen > 0) + { + npc.lifeRegen = 0; + } + npc.lifeRegenExpectedLossPerSecond += 3; + npc.lifeRegen -= 3; + } + } +} \ No newline at end of file diff --git a/Buffs/Debuffs/AvianFlu.png b/Buffs/Debuffs/AvianFlu.png new file mode 100644 index 0000000..af9d614 Binary files /dev/null and b/Buffs/Debuffs/AvianFlu.png differ diff --git a/Buffs/Debuffs/Corrosion.cs b/Buffs/Debuffs/Corrosion.cs new file mode 100644 index 0000000..993b47e --- /dev/null +++ b/Buffs/Debuffs/Corrosion.cs @@ -0,0 +1,35 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Debuffs +{ + internal class Corrosion : DecimationBuff + { + protected override string DisplayName => "Corrosion"; + protected override string Description => "Your armor is getting lighter..."; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + longerExpertDebuff = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.AddBuff(BuffID.Poisoned, 1); + + player.statDefense -= (int)(player.statDefense * 0.25f); + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.AddBuff(BuffID.Poisoned, 1); + + npc.defense -= (int)(npc.defense * 0.25f); + } + } +} \ No newline at end of file diff --git a/Buffs/Debuffs/Corrosion.png b/Buffs/Debuffs/Corrosion.png new file mode 100644 index 0000000..af9d614 Binary files /dev/null and b/Buffs/Debuffs/Corrosion.png differ diff --git a/Buffs/Debuffs/Discombobulated.cs b/Buffs/Debuffs/Discombobulated.cs new file mode 100644 index 0000000..d3c7bca --- /dev/null +++ b/Buffs/Debuffs/Discombobulated.cs @@ -0,0 +1,33 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Debuffs +{ + internal class Discombobulated : DecimationBuff + { + protected override string DisplayName => "Discombobulated?"; + protected override string Description => ""; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + longerExpertDebuff = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffImmune[BuffID.Confused] = false; + + player.moveSpeed *= 0.95f; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.buffImmune[BuffID.Confused] = false; + } + } +} \ No newline at end of file diff --git a/Buffs/Debuffs/Discombobulated.png b/Buffs/Debuffs/Discombobulated.png new file mode 100644 index 0000000..af9d614 Binary files /dev/null and b/Buffs/Debuffs/Discombobulated.png differ diff --git a/Buffs/Debuffs/Enveloped.cs b/Buffs/Debuffs/Enveloped.cs new file mode 100644 index 0000000..e62feff --- /dev/null +++ b/Buffs/Debuffs/Enveloped.cs @@ -0,0 +1,38 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Debuffs +{ + internal class Enveloped : DecimationBuff + { + protected override string DisplayName => "Enveloped!"; + protected override string Description => "Is it frostbite? Or are your nerves burnt out?"; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + longerExpertDebuff = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.AddBuff(BuffID.OnFire, 1); + player.AddBuff(BuffID.Chilled, 1); + + player.meleeDamage -= (int)(player.meleeDamage * 0.05f); + player.meleeCrit -= (int)(player.meleeCrit * 0.04f); + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.AddBuff(BuffID.OnFire, 1); + npc.AddBuff(BuffID.Chilled, 1); + + npc.damage -= (int)(npc.damage * 0.05f); + } + } +} \ No newline at end of file diff --git a/Buffs/Debuffs/Enveloped.png b/Buffs/Debuffs/Enveloped.png new file mode 100644 index 0000000..af9d614 Binary files /dev/null and b/Buffs/Debuffs/Enveloped.png differ diff --git a/Buffs/Debuffs/Hyperthermic.cs b/Buffs/Debuffs/Hyperthermic.cs new file mode 100644 index 0000000..b9b7bdc --- /dev/null +++ b/Buffs/Debuffs/Hyperthermic.cs @@ -0,0 +1,41 @@ +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Debuffs +{ + internal class Hyperthermic : DecimationBuff + { + protected override string DisplayName => "Hyperthermic!"; + protected override string Description => "Water, water everywhere but not a drop to drink... \nBlock mana potions use \nLowers defense by 10% \nLowers speed by 5%"; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + clearable = false; + displayTime = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.statDefense = (int)(player.statDefense * 0.90f); + player.moveSpeed *= 0.95f; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.defense = (int)(npc.defense * 0.90f); + npc.velocity *= 0.95f; + } + } + + public class HyperthermicManaBlock : GlobalItem + { + public override bool CanUseItem(Item item, Player player) + { + return !(player.HasBuff(ModContent.BuffType()) && item.healMana > 0); + } + } +} diff --git a/Buffs/Debuffs/Hyperthermic.png b/Buffs/Debuffs/Hyperthermic.png new file mode 100644 index 0000000..af9d614 Binary files /dev/null and b/Buffs/Debuffs/Hyperthermic.png differ diff --git a/Buffs/Debuffs/InfernalGaze.cs b/Buffs/Debuffs/InfernalGaze.cs new file mode 100644 index 0000000..0463cfc --- /dev/null +++ b/Buffs/Debuffs/InfernalGaze.cs @@ -0,0 +1,37 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Debuffs +{ + internal class InfernalGaze : DecimationBuff + { + protected override string DisplayName => "Infernal Gaze"; + protected override string Description => "You feel your sins burning inside of you"; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + longerExpertDebuff = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.statDefense -= (int)(player.statDefense * 0.1f); + player.meleeDamage *= 0.90f; + + player.AddBuff(BuffID.CursedInferno, 1); + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.defense -= (int)(npc.defense * 0.1f); + npc.damage -= (int)(npc.damage * 0.1f); + + npc.AddBuff(BuffID.CursedInferno, 1); + } + } +} \ No newline at end of file diff --git a/Buffs/Debuffs/InfernalGaze.png b/Buffs/Debuffs/InfernalGaze.png new file mode 100644 index 0000000..b76e31b Binary files /dev/null and b/Buffs/Debuffs/InfernalGaze.png differ diff --git a/Buffs/Debuffs/PiercingGaze.cs b/Buffs/Debuffs/PiercingGaze.cs new file mode 100644 index 0000000..9c9d1dd --- /dev/null +++ b/Buffs/Debuffs/PiercingGaze.cs @@ -0,0 +1,32 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Debuffs +{ + internal class PiercingGaze : DecimationBuff + { + protected override string DisplayName => "Piercing Gaze"; + protected override string Description => "Eyes are peering into your soul..."; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + longerExpertDebuff = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.statDefense -= (int)(player.statDefense * 0.08f); + player.moveSpeed *= 0.85f; + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.defense -= (int)(npc.defense * 0.08f); + } + } +} \ No newline at end of file diff --git a/Buffs/Debuffs/PiercingGaze.png b/Buffs/Debuffs/PiercingGaze.png new file mode 100644 index 0000000..c374196 Binary files /dev/null and b/Buffs/Debuffs/PiercingGaze.png differ diff --git a/Buffs/Debuffs/Singed.cs b/Buffs/Debuffs/Singed.cs new file mode 100644 index 0000000..e38232a --- /dev/null +++ b/Buffs/Debuffs/Singed.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Buffs.Debuffs +{ + internal class Singed : DecimationBuff + { + protected override string DisplayName => "Singed!"; + protected override string Description => "Burn target \nSlow target by 5% \nLower target defense by 5% \n Block potion use"; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.onFire2 = true; + player.moveSpeed *= 0.95f; + player.statDefense = (int)(0.95f * player.statDefense); + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.onFire = true; + npc.velocity *= 0.95f; + npc.defense = (int)(0.95f * npc.defense); + } + } + + public class SingedGlobalItem : GlobalItem + { + public override bool CanUseItem(Item item, Player player) + { + if (player.HasBuff(ModContent.BuffType())) + { + return !(item.UseSound != null && item.useStyle == 2); + } + return true; + } + } +} \ No newline at end of file diff --git a/Buffs/Debuffs/Singed.png b/Buffs/Debuffs/Singed.png new file mode 100644 index 0000000..4513079 Binary files /dev/null and b/Buffs/Debuffs/Singed.png differ diff --git a/Buffs/Debuffs/Slimed.cs b/Buffs/Debuffs/Slimed.cs new file mode 100644 index 0000000..f698461 --- /dev/null +++ b/Buffs/Debuffs/Slimed.cs @@ -0,0 +1,47 @@ +using Terraria; +using Terraria.ModLoader; +using Terraria.DataStructures; + +namespace Decimation.Buffs.Debuffs +{ + internal class Slimed : DecimationBuff + { + protected override string DisplayName => "Slimed!"; + protected override string Description => "Movement speed -20% \nDeal 2 damages each 5 seconds \nIncrease jump height \n Block potion use"; + public override bool Debuff => true; + + protected override void Init() + { + save = false; + displayTime = true; + clearable = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.moveSpeed *= 0.80f; + player.jumpBoost = true; + + if (player.miscCounter % 300 == 0) + player.Hurt(PlayerDeathReason.LegacyDefault(), 2, 0); + } + + public override void Update(NPC npc, ref int buffIndex) + { + npc.velocity *= 0.80f; + npc.lifeRegen -= 1; + } + } + + public class SlimedGlobalItem : GlobalItem + { + public override bool CanUseItem(Item item, Player player) + { + if (player.HasBuff(ModContent.BuffType())) + { + return !(item.UseSound != null && item.useStyle == 2); + } + return true; + } + } +} \ No newline at end of file diff --git a/Buffs/Debuffs/Slimed.png b/Buffs/Debuffs/Slimed.png new file mode 100644 index 0000000..58147b5 Binary files /dev/null and b/Buffs/Debuffs/Slimed.png differ diff --git a/Buffs/DecimationBuff.cs b/Buffs/DecimationBuff.cs new file mode 100644 index 0000000..276d4e5 --- /dev/null +++ b/Buffs/DecimationBuff.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria.ModLoader; +using Terraria; + +namespace Decimation.Buffs +{ + internal abstract class DecimationBuff : ModBuff + { + protected bool save = false; + protected bool displayTime = true; + protected bool clearable = true; + + protected new abstract string DisplayName { get; } + protected new abstract string Description { get; } + public virtual bool Debuff { get; } = false; + + protected abstract void Init(); + + public sealed override void SetDefaults() + { + base.DisplayName.SetDefault(DisplayName); + base.Description.SetDefault(Description); + + Main.debuff[Type] = Debuff; + Main.buffNoSave[Type] = !save; + Main.buffNoTimeDisplay[Type] = !displayTime; + canBeCleared = clearable; + } + } +} diff --git a/Core/Amulets/Amulet.cs b/Core/Amulets/Amulet.cs new file mode 100644 index 0000000..3b37ed1 --- /dev/null +++ b/Core/Amulets/Amulet.cs @@ -0,0 +1,62 @@ +using System.Collections.Generic; +using Decimation.Core.Amulets.Synergy; +using Decimation.Core.Collections; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Core.Amulets +{ + public abstract class Amulet : DecimationItem + { + public abstract AmuletClasses AmuletClass { get; } + public virtual IAmuletsSynergy Synergy { get; } = new AmuletSynergyAdapter(); + + protected abstract void GetAmuletTooltip(ref AmuletTooltip tooltip); + + protected virtual void InitAmulet() { } + protected virtual void UpdateAmulet(Player player) + { + } + + protected sealed override void Init() + { + width = 28; + height = 30; + rarity = Rarity.Green; + this.item.maxStack = 1; + + InitAmulet(); + + AmuletList.Instance.Add(this); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + UpdateAmulet(Main.LocalPlayer); + } + + public sealed override void ModifyTooltips(List tooltips) + { + AmuletTooltip tooltip = new AmuletTooltip(this.mod, this); + GetAmuletTooltip(ref tooltip); + + tooltips.AddRange(tooltip.Lines); + } + } + + public enum AmuletClasses + { + Melee, + Summoner, + Mage, + Ranger, + Throwing, + Tank, + Healer, + Builder, + Miner, + Creator + } +} \ No newline at end of file diff --git a/Core/Amulets/AmuletTooltip.cs b/Core/Amulets/AmuletTooltip.cs new file mode 100644 index 0000000..06617b5 --- /dev/null +++ b/Core/Amulets/AmuletTooltip.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria.ModLoader; +using Terraria.UI.Chat; + +namespace Decimation.Core.Amulets +{ + public class AmuletTooltip + { + private readonly Amulet _amulet; + private readonly Color _classColor = ChatManager.WaveColor(Color.Fuchsia); + private readonly Color _effectColor = Color.ForestGreen; + private readonly Mod _mod; + private readonly Color _synergyColor = Color.CadetBlue; + + private int _effectCount; + private bool _hasSynergy; + + public AmuletTooltip(Mod mod, Amulet amulet) + { + _mod = mod; + _amulet = amulet; + this.Lines = new List(); + + SetClassTooltip(); + } + + public List Lines { get; set; } + + private void SetClassTooltip() + { + this.Lines.Add(new TooltipLine(_mod, "DecimationAmuletClass", _amulet.AmuletClass.ToString("F")) + { + overrideColor = _classColor + }); + } + + public AmuletTooltip AddEffect(string tooltip) + { + this.Lines.Add(new TooltipLine(_mod, $"Effect{_effectCount}", tooltip) + { + overrideColor = _effectColor + }); + + _effectCount++; + return this; + } + + public AmuletTooltip AddSynergy(string tooltip) + { + if (!_hasSynergy) + { + this.Lines.Add(new TooltipLine(_mod, "Synergy", tooltip) + { + overrideColor = _synergyColor + }); + + _hasSynergy = true; + } + else + { + throw new InvalidOperationException($"Can't add more than one synergy tooltip to {_amulet.Name}"); + } + + return this; + } + } +} \ No newline at end of file diff --git a/Core/Amulets/Synergy/AmuletSynergyAdapter.cs b/Core/Amulets/Synergy/AmuletSynergyAdapter.cs new file mode 100644 index 0000000..f7a6ed7 --- /dev/null +++ b/Core/Amulets/Synergy/AmuletSynergyAdapter.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Core.Amulets.Synergy +{ + public class AmuletSynergyAdapter : IAmuletsSynergy + { + public virtual void OnHitPlayer(DecimationModPlayer modPlayer, ref int damages) + { + } + + public virtual void OnShoot(DecimationModPlayer modPlayer, Item item, ref Vector2 position, ref float speedX, ref float speedY, + ref int projectileType, ref int damages, ref float knockBack) + { + } + + public virtual void Update(DecimationModPlayer modPlayer) + { + } + } +} diff --git a/Core/Amulets/Synergy/IAmuletsSynergy.cs b/Core/Amulets/Synergy/IAmuletsSynergy.cs new file mode 100644 index 0000000..80bf291 --- /dev/null +++ b/Core/Amulets/Synergy/IAmuletsSynergy.cs @@ -0,0 +1,14 @@ +using Microsoft.Xna.Framework; +using Terraria; + +namespace Decimation.Core.Amulets.Synergy +{ + public interface IAmuletsSynergy + { + void OnHitPlayer(DecimationModPlayer modPlayer, ref int damages); + + void OnShoot(DecimationModPlayer modPlayer, Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int projectileType, ref int damages, ref float knockBack); + + void Update(DecimationModPlayer modPlayer); + } +} diff --git a/Core/Collections/AmuletList.cs b/Core/Collections/AmuletList.cs new file mode 100644 index 0000000..d64d44e --- /dev/null +++ b/Core/Collections/AmuletList.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Decimation.Core.Amulets; +using Terraria; + +namespace Decimation.Core.Collections +{ + public class AmuletList : List + { + + private static readonly AmuletList _instance = new AmuletList(); + public static AmuletList Instance { get; } = _instance; + private AmuletList() { } + + public Amulet GetAmuletForItem(Item item) + { + return this.FirstOrDefault(amulet => amulet.item.type == item.type); + } + + public bool Contains(Item item) + { + return GetAmuletForItem(item) != null; + } + + } +} diff --git a/Core/DecimationModPlayer.cs b/Core/DecimationModPlayer.cs new file mode 100644 index 0000000..e80ac82 --- /dev/null +++ b/Core/DecimationModPlayer.cs @@ -0,0 +1,12 @@ +using Terraria.ModLoader; + +namespace Decimation.Core +{ + public abstract class DecimationModPlayer : ModPlayer, IDecimationPlayer + { + + public abstract bool HasLavaCharm { get; set; } + public abstract bool HasShield { get; set; } + + } +} diff --git a/Core/IDecimationPlayer.cs b/Core/IDecimationPlayer.cs new file mode 100644 index 0000000..28abda7 --- /dev/null +++ b/Core/IDecimationPlayer.cs @@ -0,0 +1,12 @@ +using Terraria.ModLoader; + +namespace Decimation.Core +{ + public interface IDecimationPlayer + { + + bool HasLavaCharm { get; } + bool HasShield { get; } + + } +} diff --git a/Core/Items/DecimationAccessory.cs b/Core/Items/DecimationAccessory.cs new file mode 100644 index 0000000..0d0dedc --- /dev/null +++ b/Core/Items/DecimationAccessory.cs @@ -0,0 +1,15 @@ +namespace Decimation.Core.Items +{ + public abstract class DecimationAccessory : DecimationItem + { + protected abstract void InitAccessory(); + + protected sealed override void Init() + { + this.item.accessory = true; + this.item.maxStack = 1; + + InitAccessory(); + } + } +} \ No newline at end of file diff --git a/Core/Items/DecimationAmmo.cs b/Core/Items/DecimationAmmo.cs new file mode 100644 index 0000000..1a9a2bd --- /dev/null +++ b/Core/Items/DecimationAmmo.cs @@ -0,0 +1,32 @@ +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Core.Items +{ + public abstract class DecimationAmmo : DecimationItem + { + protected int damages = 0; + protected float projKnockBack = 0; + + protected abstract string Projectile { get; } + protected abstract int Ammo { get; } + protected virtual bool VanillaProjectile { get; } = false; + protected abstract void InitAmmo(); + + protected sealed override void Init() + { + this.item.maxStack = 999; + this.item.consumable = true; + + InitAmmo(); + + this.item.damage = damages; + this.item.knockBack = projKnockBack; + + this.item.shoot = ItemUtils.GetIdFromName(this.Projectile, typeof(Projectile), this.VanillaProjectile); + this.item.ammo = this.Ammo; + + this.item.ranged = true; + } + } +} \ No newline at end of file diff --git a/Core/Items/DecimationItem.cs b/Core/Items/DecimationItem.cs new file mode 100644 index 0000000..0a35b9c --- /dev/null +++ b/Core/Items/DecimationItem.cs @@ -0,0 +1,97 @@ +using System.Collections.Generic; +using Decimation.Core.Util; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Core.Items +{ + public abstract class DecimationItem : ModItem + { + protected bool autoReuse = false; + protected bool consumable = false; + protected int height = 16; + protected Rarity rarity = Rarity.White; + protected int useAnimation = 20; + protected LegacySoundStyle useSound = SoundID.Item1; + protected int useStyle = 1; + protected int useTime = 20; + protected int value = 1; + + protected int width = 16; + protected abstract string ItemName { get; } + protected virtual string ItemTooltip { get; } = ""; + protected virtual DrawAnimation Animation { get; } = null; + protected virtual bool IsClone { get; } = false; + + public sealed override void SetStaticDefaults() + { + this.DisplayName.SetDefault(this.ItemName); + this.Tooltip.SetDefault(this.ItemTooltip); + + if (this.Animation != null) Main.RegisterItemAnimation(this.item.type, this.Animation); + } + + public sealed override void SetDefaults() + { + this.item.maxStack = 999; + this.item.noMelee = true; + + Init(); + + if (!this.IsClone) + { + this.item.width = width; + this.item.height = height; + this.item.rare = (int) rarity; + this.item.consumable = consumable; + this.item.autoReuse = autoReuse; + this.item.useStyle = useStyle; + this.item.useTime = useTime; + this.item.useAnimation = useAnimation; + this.item.UseSound = useSound; + this.item.value = value; + } + } + + public sealed override void AddRecipes() + { + List recipes = GetAdditionalRecipes(); + recipes.Add(GetRecipe()); + + foreach (ModRecipe recipe in recipes) recipe?.AddRecipe(); + } + + protected abstract void Init(); + + protected virtual ModRecipe GetRecipe() + { + return null; + } + + protected virtual List GetAdditionalRecipes() + { + return new List(); + } + + protected static ModRecipe GetNewModRecipe(DecimationItem result, int quantity, int tile, + bool anyIronBar = false) + { + return GetNewModRecipe(result, quantity, new List {tile}, anyIronBar); + } + + protected static ModRecipe GetNewModRecipe(DecimationItem result, int quantity, List tiles, + bool anyIronBar = false) + { + ModRecipe recipe = new ModRecipe(References.mod) {anyIronBar = anyIronBar}; + + recipe.SetResult(result, quantity); + + foreach (int tile in tiles) recipe.AddTile(tile); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Core/Items/DecimationPlaceableItem.cs b/Core/Items/DecimationPlaceableItem.cs new file mode 100644 index 0000000..54ebc80 --- /dev/null +++ b/Core/Items/DecimationPlaceableItem.cs @@ -0,0 +1,26 @@ +namespace Decimation.Core.Items +{ + public abstract class DecimationPlaceableItem : DecimationItem + { + protected abstract int Tile { get; } + + protected abstract void InitPlaceable(); + + protected sealed override void Init() + { + width = 12; + height = 12; + autoReuse = true; + useTime = 15; + useAnimation = 15; + useStyle = 1; + consumable = true; + + this.item.useTurn = true; + + InitPlaceable(); + + this.item.createTile = this.Tile; + } + } +} \ No newline at end of file diff --git a/Core/Items/DecimationPotion.cs b/Core/Items/DecimationPotion.cs new file mode 100644 index 0000000..9bcc544 --- /dev/null +++ b/Core/Items/DecimationPotion.cs @@ -0,0 +1,37 @@ +namespace Decimation.Core.Items +{ + public abstract class DecimationPotion : DecimationItem + { + protected virtual int HealLife { get; } = 0; + protected virtual int HealMana { get; } = 0; + protected abstract int BuffType { get; } + protected abstract int BuffTime { get; } + + protected abstract void InitPotion(); + + protected sealed override void Init() + { + width = 20; + height = 20; + consumable = true; + useTime = 20; + useAnimation = 20; + + item.maxStack = 30; + item.useTurn = true; + item.useStyle = 2; + + InitPotion(); + + item.healLife = HealLife; + item.healMana = HealMana; + item.buffType = BuffType; + item.buffTime = BuffTime; + + if (HealLife > 0) + { + item.potion = true; + } + } + } +} diff --git a/Core/Items/DecimationTool.cs b/Core/Items/DecimationTool.cs new file mode 100644 index 0000000..c9c1966 --- /dev/null +++ b/Core/Items/DecimationTool.cs @@ -0,0 +1,28 @@ +namespace Decimation.Core.Items +{ + public abstract class DecimationTool : DecimationItem + { + protected virtual int MeleeDamages { get; } + protected virtual int PickaxePower { get; } + protected virtual int AxePower { get; } + protected virtual int HammerPower { get; } + + protected abstract void InitTool(); + + protected override void Init() + { + autoReuse = true; + this.item.useTurn = true; + this.item.maxStack = 1; + + InitTool(); + + this.item.damage = this.MeleeDamages; + this.item.pick = this.PickaxePower; + this.item.axe = this.AxePower; + this.item.hammer = this.HammerPower; + + if (this.MeleeDamages > 0) this.item.melee = true; + } + } +} \ No newline at end of file diff --git a/Core/Items/DecimationWeapon.cs b/Core/Items/DecimationWeapon.cs new file mode 100644 index 0000000..fa4d71e --- /dev/null +++ b/Core/Items/DecimationWeapon.cs @@ -0,0 +1,69 @@ +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Core.Items +{ + public abstract class DecimationWeapon : DecimationItem + { + protected int criticalStrikeChance = 0; // Percents + protected float knockBack = 0; // https://terraria.gamepedia.com/Knockback + protected float shootSpeed = 0; + + protected virtual DamageType DamagesType { get; } = DamageType.MELEE; + protected virtual string Projectile { get; } + protected virtual string Ammo { get; } + protected virtual bool VanillaProjectile { get; } = false; + protected virtual bool VanillaAmmo { get; } = false; + + protected abstract int Damages { get; } + protected abstract void InitWeapon(); + + protected override void Init() + { + useStyle = 1; + + autoReuse = false; + this.item.useTurn = true; + this.item.maxStack = 1; + + switch (this.DamagesType) + { + case DamageType.MAGIC: + this.item.magic = true; + break; + case DamageType.RANGED: + this.item.ranged = true; + break; + case DamageType.THROW: + this.item.thrown = true; + break; + default: + this.item.melee = true; + break; + } + + InitWeapon(); + + this.item.damage = this.Damages; + this.item.crit = criticalStrikeChance; + this.item.knockBack = knockBack; + this.item.shootSpeed = shootSpeed; + + if (this.Projectile != null) + this.item.shoot = ItemUtils.GetIdFromName(this.Projectile, typeof(Projectile), this.VanillaProjectile); + + if (this.Ammo != null) + this.item.useAmmo = ItemUtils.GetIdFromName(this.Ammo, typeof(Item), this.VanillaAmmo); + + if (!this.item.melee) this.item.noMelee = true; + } + + public enum DamageType + { + MELEE, + MAGIC, + THROW, + RANGED + } + } +} \ No newline at end of file diff --git a/Core/NPCs/Worm.cs b/Core/NPCs/Worm.cs new file mode 100644 index 0000000..a2ec853 --- /dev/null +++ b/Core/NPCs/Worm.cs @@ -0,0 +1,422 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Core.NPCs +{ + public abstract class Worm : ModNPC + { + public int bodyType; + public bool directional = false; + + public bool flies = false; + + /* ai[0] = follower + * ai[1] = following + * ai[2] = distanceFromTail + * ai[3] = head + */ + public bool head; + public int headType; + public int maxLength; + public int minLength; + public float speed; + public bool tail; + public int tailType; + public float turnSpeed; + + public override void AI() + { + if (this.npc.localAI[1] == 0f) + { + this.npc.localAI[1] = 1f; + Init(); + } + + if (this.npc.ai[3] > 0f) this.npc.realLife = (int)this.npc.ai[3]; + if (!head && this.npc.timeLeft < 300) this.npc.timeLeft = 300; + if (this.npc.target < 0 || this.npc.target == 255 || Main.player[this.npc.target].dead) + this.npc.TargetClosest(); + if (Main.player[this.npc.target].dead && this.npc.timeLeft > 300) this.npc.timeLeft = 300; + if (Main.netMode != 1) + { + if (!tail && this.npc.ai[0] == 0f) + { + if (head) + { + this.npc.ai[3] = this.npc.whoAmI; + this.npc.realLife = this.npc.whoAmI; + this.npc.ai[2] = Main.rand.Next(minLength, maxLength + 1); + this.npc.ai[0] = NPC.NewNPC((int)(this.npc.position.X + this.npc.width / 2), + (int)(this.npc.position.Y + this.npc.height), bodyType, this.npc.whoAmI); + } + else if (this.npc.ai[2] > 0f) + { + this.npc.ai[0] = NPC.NewNPC((int)(this.npc.position.X + this.npc.width / 2), + (int)(this.npc.position.Y + this.npc.height), this.npc.type, this.npc.whoAmI); + } + else + { + this.npc.ai[0] = NPC.NewNPC((int)(this.npc.position.X + this.npc.width / 2), + (int)(this.npc.position.Y + this.npc.height), tailType, this.npc.whoAmI); + } + + Main.npc[(int)this.npc.ai[0]].ai[3] = this.npc.ai[3]; + Main.npc[(int)this.npc.ai[0]].realLife = this.npc.realLife; + Main.npc[(int)this.npc.ai[0]].ai[1] = this.npc.whoAmI; + Main.npc[(int)this.npc.ai[0]].ai[2] = this.npc.ai[2] - 1f; + this.npc.netUpdate = true; + } + + if (!head && (!Main.npc[(int)this.npc.ai[1]].active || + Main.npc[(int)this.npc.ai[1]].type != headType && + Main.npc[(int)this.npc.ai[1]].type != bodyType)) + { + this.npc.life = 0; + this.npc.HitEffect(); + this.npc.active = false; + } + + if (!tail && (!Main.npc[(int)this.npc.ai[0]].active || + Main.npc[(int)this.npc.ai[0]].type != bodyType && + Main.npc[(int)this.npc.ai[0]].type != tailType)) + { + this.npc.life = 0; + this.npc.HitEffect(); + this.npc.active = false; + } + + if (!this.npc.active && Main.netMode == 2) NetMessage.SendData(28, -1, -1, null, this.npc.whoAmI, -1f); + } + + int num180 = (int)(this.npc.position.X / 16f) - 1; + int num181 = (int)((this.npc.position.X + this.npc.width) / 16f) + 2; + int num182 = (int)(this.npc.position.Y / 16f) - 1; + int num183 = (int)((this.npc.position.Y + this.npc.height) / 16f) + 2; + if (num180 < 0) num180 = 0; + if (num181 > Main.maxTilesX) num181 = Main.maxTilesX; + if (num182 < 0) num182 = 0; + if (num183 > Main.maxTilesY) num183 = Main.maxTilesY; + bool flag18 = flies; + if (!flag18) + for (int num184 = num180; num184 < num181; num184++) + for (int num185 = num182; num185 < num183; num185++) + if (Main.tile[num184, num185] != null && + (Main.tile[num184, num185].nactive() && + (Main.tileSolid[Main.tile[num184, num185].type] || + Main.tileSolidTop[Main.tile[num184, num185].type] && Main.tile[num184, num185].frameY == 0) || + Main.tile[num184, num185].liquid > 64)) + { + Vector2 vector17; + vector17.X = num184 * 16; + vector17.Y = num185 * 16; + if (this.npc.position.X + this.npc.width > vector17.X && + this.npc.position.X < vector17.X + 16f && + this.npc.position.Y + this.npc.height > vector17.Y && + this.npc.position.Y < vector17.Y + 16f) + { + flag18 = true; + if (Main.rand.NextBool(100) && this.npc.behindTiles && Main.tile[num184, num185].nactive()) + WorldGen.KillTile(num184, num185, true, true); + if (Main.netMode != 1 && Main.tile[num184, num185].type == 2) + { + ushort arg_BFCA_0 = Main.tile[num184, num185 - 1].type; + } + } + } + + if (!flag18 && head) + { + Rectangle rectangle = new Rectangle((int)this.npc.position.X, (int)this.npc.position.Y, + this.npc.width, this.npc.height); + int num186 = 1000; + bool flag19 = true; + for (int num187 = 0; num187 < 255; num187++) + if (Main.player[num187].active) + { + Rectangle rectangle2 = new Rectangle((int)Main.player[num187].position.X - num186, + (int)Main.player[num187].position.Y - num186, num186 * 2, num186 * 2); + if (rectangle.Intersects(rectangle2)) + { + flag19 = false; + break; + } + } + + if (flag19) flag18 = true; + } + + if (directional) + { + if (this.npc.velocity.X < 0f) + this.npc.spriteDirection = 1; + else if (this.npc.velocity.X > 0f) this.npc.spriteDirection = -1; + } + + float num188 = speed; + float num189 = turnSpeed; + Vector2 vector18 = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + float num191 = Main.player[this.npc.target].position.X + Main.player[this.npc.target].width / 2; + float num192 = Main.player[this.npc.target].position.Y + Main.player[this.npc.target].height / 2; + num191 = (int)(num191 / 16f) * 16; + num192 = (int)(num192 / 16f) * 16; + vector18.X = (int)(vector18.X / 16f) * 16; + vector18.Y = (int)(vector18.Y / 16f) * 16; + num191 -= vector18.X; + num192 -= vector18.Y; + float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + if (this.npc.ai[1] > 0f && this.npc.ai[1] < Main.npc.Length) + { + try + { + vector18 = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + num191 = Main.npc[(int)this.npc.ai[1]].position.X + Main.npc[(int)this.npc.ai[1]].width / 2 - + vector18.X; + num192 = Main.npc[(int)this.npc.ai[1]].position.Y + Main.npc[(int)this.npc.ai[1]].height / 2 - + vector18.Y; + } + catch + { + } + + this.npc.rotation = (float)Math.Atan2(num192, num191) + 1.57f; + num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + int num194 = this.npc.width; + num193 = (num193 - num194) / num193; + num191 *= num193; + num192 *= num193; + this.npc.velocity = Vector2.Zero; + this.npc.position.X = this.npc.position.X + num191; + this.npc.position.Y = this.npc.position.Y + num192; + if (directional) + { + if (num191 < 0f) this.npc.spriteDirection = 1; + if (num191 > 0f) this.npc.spriteDirection = -1; + } + } + else + { + if (!flag18) + { + this.npc.TargetClosest(); + this.npc.velocity.Y = this.npc.velocity.Y + 0.11f; + if (this.npc.velocity.Y > num188) this.npc.velocity.Y = num188; + if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < num188 * 0.4) + { + if (this.npc.velocity.X < 0f) + this.npc.velocity.X = this.npc.velocity.X - num189 * 1.1f; + else + this.npc.velocity.X = this.npc.velocity.X + num189 * 1.1f; + } + else if (this.npc.velocity.Y == num188) + { + if (this.npc.velocity.X < num191) + this.npc.velocity.X = this.npc.velocity.X + num189; + else if (this.npc.velocity.X > num191) this.npc.velocity.X = this.npc.velocity.X - num189; + } + else if (this.npc.velocity.Y > 4f) + { + if (this.npc.velocity.X < 0f) + this.npc.velocity.X = this.npc.velocity.X + num189 * 0.9f; + else + this.npc.velocity.X = this.npc.velocity.X - num189 * 0.9f; + } + } + else + { + if (!flies && this.npc.behindTiles && this.npc.soundDelay == 0) + { + float num195 = num193 / 40f; + if (num195 < 10f) num195 = 10f; + if (num195 > 20f) num195 = 20f; + this.npc.soundDelay = (int)num195; + Main.PlaySound(SoundID.Roar, this.npc.position); + } + + num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + float num196 = Math.Abs(num191); + float num197 = Math.Abs(num192); + float num198 = num188 / num193; + num191 *= num198; + num192 *= num198; + if (ShouldRun()) + { + if (Main.netMode != 1 && + this.npc.position.Y / 16f > (Main.rockLayer + Main.maxTilesY) / 2.0) + { + this.npc.active = false; + int num200 = (int)this.npc.ai[0]; + while (num200 > 0 && num200 < 200 && Main.npc[num200].active && + Main.npc[num200].aiStyle == this.npc.aiStyle) + { + int num201 = (int)Main.npc[num200].ai[0]; + Main.npc[num200].active = false; + this.npc.life = 0; + if (Main.netMode == 2) NetMessage.SendData(23, -1, -1, null, num200); + num200 = num201; + } + + if (Main.netMode == 2) NetMessage.SendData(23, -1, -1, null, this.npc.whoAmI); + } + + num191 = 0f; + num192 = num188; + } + + bool flag21 = false; + if (this.npc.type == 87) + { + if ((this.npc.velocity.X > 0f && num191 < 0f || this.npc.velocity.X < 0f && num191 > 0f || + this.npc.velocity.Y > 0f && num192 < 0f || this.npc.velocity.Y < 0f && num192 > 0f) && + Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) > num189 / 2f && + num193 < 300f) + { + flag21 = true; + if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < num188) + this.npc.velocity *= 1.1f; + } + + if (this.npc.position.Y > Main.player[this.npc.target].position.Y || + Main.player[this.npc.target].position.Y / 16f > Main.worldSurface || + Main.player[this.npc.target].dead) + { + flag21 = true; + if (Math.Abs(this.npc.velocity.X) < num188 / 2f) + { + if (this.npc.velocity.X == 0f) + this.npc.velocity.X = this.npc.velocity.X - this.npc.direction; + this.npc.velocity.X = this.npc.velocity.X * 1.1f; + } + else + { + if (this.npc.velocity.Y > -num188) this.npc.velocity.Y = this.npc.velocity.Y - num189; + } + } + } + + if (!flag21) + { + if (this.npc.velocity.X > 0f && num191 > 0f || this.npc.velocity.X < 0f && num191 < 0f || + this.npc.velocity.Y > 0f && num192 > 0f || this.npc.velocity.Y < 0f && num192 < 0f) + { + if (this.npc.velocity.X < num191) + { + this.npc.velocity.X = this.npc.velocity.X + num189; + } + else + { + if (this.npc.velocity.X > num191) this.npc.velocity.X = this.npc.velocity.X - num189; + } + + if (this.npc.velocity.Y < num192) + { + this.npc.velocity.Y = this.npc.velocity.Y + num189; + } + else + { + if (this.npc.velocity.Y > num192) this.npc.velocity.Y = this.npc.velocity.Y - num189; + } + + if (Math.Abs(num192) < num188 * 0.2 && + (this.npc.velocity.X > 0f && num191 < 0f || this.npc.velocity.X < 0f && num191 > 0f)) + { + if (this.npc.velocity.Y > 0f) + this.npc.velocity.Y = this.npc.velocity.Y + num189 * 2f; + else + this.npc.velocity.Y = this.npc.velocity.Y - num189 * 2f; + } + + if (Math.Abs(num191) < num188 * 0.2 && + (this.npc.velocity.Y > 0f && num192 < 0f || this.npc.velocity.Y < 0f && num192 > 0f)) + { + if (this.npc.velocity.X > 0f) + this.npc.velocity.X = this.npc.velocity.X + num189 * 2f; + else + this.npc.velocity.X = this.npc.velocity.X - num189 * 2f; + } + } + else + { + if (num196 > num197) + { + if (this.npc.velocity.X < num191) + this.npc.velocity.X = this.npc.velocity.X + num189 * 1.1f; + else if (this.npc.velocity.X > num191) + this.npc.velocity.X = this.npc.velocity.X - num189 * 1.1f; + if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < num188 * 0.5) + { + if (this.npc.velocity.Y > 0f) + this.npc.velocity.Y = this.npc.velocity.Y + num189; + else + this.npc.velocity.Y = this.npc.velocity.Y - num189; + } + } + else + { + if (this.npc.velocity.Y < num192) + this.npc.velocity.Y = this.npc.velocity.Y + num189 * 1.1f; + else if (this.npc.velocity.Y > num192) + this.npc.velocity.Y = this.npc.velocity.Y - num189 * 1.1f; + if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < num188 * 0.5) + { + if (this.npc.velocity.X > 0f) + this.npc.velocity.X = this.npc.velocity.X + num189; + else + this.npc.velocity.X = this.npc.velocity.X - num189; + } + } + } + } + } + + this.npc.rotation = (float)Math.Atan2(this.npc.velocity.Y, this.npc.velocity.X) + 1.57f; + if (head) + { + if (flag18) + { + if (this.npc.localAI[0] != 1f) this.npc.netUpdate = true; + this.npc.localAI[0] = 1f; + } + else + { + if (this.npc.localAI[0] != 0f) this.npc.netUpdate = true; + this.npc.localAI[0] = 0f; + } + + if ((this.npc.velocity.X > 0f && this.npc.oldVelocity.X < 0f || + this.npc.velocity.X < 0f && this.npc.oldVelocity.X > 0f || + this.npc.velocity.Y > 0f && this.npc.oldVelocity.Y < 0f || + this.npc.velocity.Y < 0f && this.npc.oldVelocity.Y > 0f) && !this.npc.justHit) + { + this.npc.netUpdate = true; + return; + } + } + } + + CustomBehavior(); + } + + public virtual void Init() + { + } + + public virtual bool ShouldRun() + { + return false; + } + + public virtual void CustomBehavior() + { + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + return head ? (bool?)null : false; + } + } +} \ No newline at end of file diff --git a/Core/Util/Builder/RecipeBuilder.cs b/Core/Util/Builder/RecipeBuilder.cs new file mode 100644 index 0000000..a749882 --- /dev/null +++ b/Core/Util/Builder/RecipeBuilder.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using Terraria.ModLoader; + +namespace Decimation.Core.Util.Builder +{ + internal class RecipeBuilder + { + private readonly IDictionary _ingredients = new Dictionary(); + private readonly Mod _mod; + private readonly int _result; + private readonly int _resultQuantity; + private readonly IList _tiles = new List(); + private bool _anyIronBar; + + public RecipeBuilder(Mod mod, ModItem result, int resultQuantity = 1) + { + _mod = mod; + _result = result.item.type; + _resultQuantity = resultQuantity; + } + + public RecipeBuilder WithIngredient(int item, int quantity = 1) + { + _ingredients.Add(item, quantity); + + return this; + } + + public RecipeBuilder WithStation(int tile) + { + _tiles.Add(tile); + + return this; + } + + public RecipeBuilder AnyIronBar(bool anyIronBar) + { + _anyIronBar = anyIronBar; + + return this; + } + + public ModRecipe Build() + { + ModRecipe recipe = new ModRecipe(_mod) {anyIronBar = _anyIronBar}; + + foreach (KeyValuePair ingredient in _ingredients) + recipe.AddIngredient(ingredient.Key, ingredient.Value); + + foreach (int tile in _tiles) recipe.AddTile(tile); + + recipe.SetResult(_result, _resultQuantity); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Core/Util/ItemUtils.cs b/Core/Util/ItemUtils.cs new file mode 100644 index 0000000..cb16bdd --- /dev/null +++ b/Core/Util/ItemUtils.cs @@ -0,0 +1,68 @@ +using System; +using System.Reflection; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +/** + * Class ItemUtils provides several static methods to simplify items + */ +namespace Decimation.Core.Util +{ + public class ItemUtils + { + private static readonly Mod Mod = References.mod; + + /** + * Returns the identifier of an entity. + */ + public static int GetIdFromName(string name, Type entityType, bool isVanilla) + { + return isVanilla + ? GetVanillaEntityIdFromName(name, entityType) + : GetModdedEntityIdFromName(name, entityType); + } + + /** + * Returns the identifier of a modded entity from its name. + */ + public static int GetModdedEntityIdFromName(string name, Type entityType) + { + int id = int.MinValue; + if (entityType == typeof(Item)) + id = Mod.ItemType(name); + else if (entityType == typeof(Projectile)) + id = Mod.ProjectileType(name); + else if (entityType == typeof(NPC)) id = Mod.NPCType(name); + + if (id == int.MinValue) + throw new ArgumentException($"No entity of type {entityType.Name} found with the name '{name}'"); + + return id; + } + + /** + * Returns the identifier of a vanilla entity from its name in an ID class using reflection. + */ + public static int GetVanillaEntityIdFromName(string name, Type entityType) + { + // Get which ID class to use + Type idType; + if (entityType == typeof(Item)) + idType = typeof(ItemID); + else if (entityType == typeof(Projectile)) + idType = typeof(ProjectileID); + else if (entityType == typeof(NPCID)) + idType = typeof(NPCID); + else + throw new ArgumentException($"There is no entity of type ${entityType.Name}"); + + // Gets the field in the ID class and check if it's valid + FieldInfo correspondingItemField = idType.GetField(name); + if (correspondingItemField == null || correspondingItemField.FieldType != typeof(short)) + throw new ArgumentException($"No entity of type {entityType.Name} found with the name '{name}'"); + + return (short) correspondingItemField.GetValue(null); + } + } +} \ No newline at end of file diff --git a/Core/Util/References.cs b/Core/Util/References.cs new file mode 100644 index 0000000..236b04b --- /dev/null +++ b/Core/Util/References.cs @@ -0,0 +1,59 @@ +using System.Collections; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Core.Util +{ + public class References + { + public static Mod mod; + + public static ArrayList bullets = new ArrayList + { + ProjectileID.Bullet, + ProjectileID.ChlorophyteBullet, + ProjectileID.CrystalBullet, + ProjectileID.ExplosiveBullet, + ProjectileID.GoldenBullet, + ProjectileID.IchorBullet, + ProjectileID.MoonlordBullet, + ProjectileID.CursedBullet, + ProjectileID.MeteorShot, + ProjectileID.NanoBullet, + ProjectileID.PartyBullet, + ProjectileID.BulletHighVelocity, + ProjectileID.RainbowRodBullet, + ProjectileID.SniperBullet, + ProjectileID.VenomBullet, + ProjectileID.BulletDeadeye, + ProjectileID.BulletSnowman + }; + + // TODO + //public static ArrayList styngerBolts = new ArrayList() + //{ + // ProjectileID.Stynger, + // Decimation.Instance.ProjectileType(), + // Decimation.Instance.ProjectileType() + //}; + } + + public enum Rarity + { + Gray = -1, + White = 0, + Blue = 1, + Green = 2, + Orange = 3, + LightRed = 4, + Pink = 5, + LightPurple = 6, + Lime = 7, + Yellow = 8, + Cyan = 9, + Red = 10, + Purple = 11, + Rainbow = -12, + Quest = -11 + } +} \ No newline at end of file diff --git a/Decimation.cs b/Decimation.cs new file mode 100644 index 0000000..ea116e1 --- /dev/null +++ b/Decimation.cs @@ -0,0 +1,166 @@ +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Decimation.NPCs.Arachnus; +using Decimation.NPCs.AncientDuneWorm; +using Decimation.UI; +using System.Collections.Generic; +using Decimation.Core.Util; +using Terraria.UI; +using Microsoft.Xna.Framework; + +namespace Decimation +{ + public class Decimation : Mod + { + public static Decimation Instance { set; get; } + + public static AmuletSlotState amuletSlotState; + private UserInterface amuletSlotInterface; + + internal UserInterface skeletonUserInterface; + + public Decimation() + { + Instance = this; + + Properties = new ModProperties() + { + Autoload = true, + AutoloadGores = true, + AutoloadSounds = true + }; + + References.mod = this; + } + + public override void Load() + { + if (!Main.dedServ) + { + amuletSlotState = new AmuletSlotState(); + amuletSlotState.Activate(); + amuletSlotInterface = new UserInterface(); + amuletSlotInterface.SetState(amuletSlotState); + + skeletonUserInterface = new UserInterface(); + } + } + + public override void UpdateUI(GameTime gameTime) + { + Player player = Main.LocalPlayer; + if (player.GetModPlayer().necrosisStoneEquipped && player.respawnTimer != 0) + player.respawnTimer -= 1; + + amuletSlotInterface?.Update(gameTime); + skeletonUserInterface?.Update(gameTime); + } + + public override void ModifyInterfaceLayers(List layers) + { + int inventoryIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Inventory")); + + if (inventoryIndex != -1) + { + layers.Insert(inventoryIndex + 1, new LegacyGameInterfaceLayer( + "Decimation: Amulet Slot", + delegate + { + if (Main.playerInventory) + amuletSlotInterface.Draw(Main.spriteBatch, new GameTime()); + return true; + }, + InterfaceScaleType.UI) + ); + + layers.Insert(inventoryIndex + 2, new LegacyGameInterfaceLayer( + "Decimation: Skeleton UI", + delegate + { + skeletonUserInterface.Draw(Main.spriteBatch, new GameTime()); + return true; + }, + InterfaceScaleType.UI) + ); + } + } + + public override void PostSetupContent() + { + Mod bossChecklist = ModLoader.GetMod("BossChecklist"); + if (bossChecklist != null) + { + bossChecklist.Call("AddBossWithInfo", "The Bloodshot Eye", 2.5f, (Func)(() => DecimationWorld.downedBloodshotEye), "INSERT LATER"); + bossChecklist.Call("AddBossWithInfo", "The Ancient Dune Worm", 5.7f, (Func)(() => DecimationWorld.downedDuneWorm), "INSERT LATER"); + bossChecklist.Call("AddBossWithInfo", "Arachnus", 20f, (Func)(() => DecimationWorld.downedArachnus), "INSERT LATER"); + } + } + + public override void AddRecipeGroups() + { + RecipeGroup gems = new RecipeGroup(() => Lang.misc[37] + " Gem", new int[] + { + ItemID.Amethyst, + ItemID.Topaz, + ItemID.Emerald, + ItemID.Sapphire, + ItemID.Ruby, + ItemID.Diamond, + }); + + RecipeGroup threads = new RecipeGroup(() => Lang.misc[37] + " Thread", new int[] + { + ItemID.BlackThread, + ItemID.GreenThread, + ItemID.PinkThread + }); + + RecipeGroup.RegisterGroup("AnyGem", gems); + RecipeGroup.RegisterGroup("AnyThread", threads); + } + + public override void HandlePacket(BinaryReader reader, int whoAmI) + { + DecimationModMessageType msgType = (DecimationModMessageType)reader.ReadByte(); + + switch (msgType) + { + case DecimationModMessageType.Arachnus: + Arachnus arachnus = (Arachnus)Main.npc[reader.ReadInt32()].modNPC; + if (arachnus != null && arachnus.npc.active) + { + arachnus.HandlePacket(reader); + } + break; + case DecimationModMessageType.DuneWorm: + AncientDuneWormHead duneWorm = (AncientDuneWormHead)Main.npc[reader.ReadInt32()].modNPC; + if (duneWorm != null && duneWorm.npc.active) + { + // TODO multiplayer + //duneWorm.HandlePacket(reader); + } + break; + case DecimationModMessageType.SpawnBoss: + int type = reader.ReadInt32(); + int player = reader.ReadInt32(); + Main.PlaySound(15, (int)Main.player[player].position.X, (int)Main.player[player].position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(player, type); + break; + default: + ErrorLogger.Log("DecimationMod: Unknown Message type: " + msgType); + break; + } + } + } + + enum DecimationModMessageType : byte + { + Arachnus, + DuneWorm, + SpawnBoss + } +} \ No newline at end of file diff --git a/Decimation.csproj b/Decimation.csproj new file mode 100644 index 0000000..3bdd6ce --- /dev/null +++ b/Decimation.csproj @@ -0,0 +1,448 @@ + + + + + Debug + AnyCPU + {0827514F-8B33-478D-82E2-67F4D4E07F3B} + Library + Properties + Decimation + Decimation + v4.7.2 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\.steam\steam\steamapps\common\Terraria\FNA.dll + + + + + + + ..\..\..\..\..\.steam\steam\steamapps\common\Terraria\tModLoader.exe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DecimationPlayer.cs b/DecimationPlayer.cs new file mode 100644 index 0000000..2c0b45e --- /dev/null +++ b/DecimationPlayer.cs @@ -0,0 +1,828 @@ +using System; +using Decimation.Buffs.Buffs; +using Decimation.Core; +using Decimation.Core.Amulets; +using Decimation.Core.Collections; +using Decimation.Core.Util; +using Decimation.Items.Amulets; +using Decimation.Items.Misc; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ModLoader.IO; + +namespace Decimation +{ + public class DecimationPlayer : DecimationModPlayer + { + // Amulet slot + private Amulet _amuletSlotAmulet; + private Item _amuletSlotItem; + + // amulets + public int amuletsBuff; + public byte amuletsBuffChances; + public int amuletsBuffTime; + public bool amuletsBuffWhenAttacking; + public bool closeToEnchantedAnvil; + public uint combatTime; + public uint counter; + + public int dash; + public int dashDamages; + public int dashDelay; + public int dashTime; + public bool deadeyesQuiverEquipped; + public uint enchantedHeartDropTime; + public bool endlessPouchofLifeEquipped; + public bool graniteLinedTunicEquipped; + + // Effects + public bool hasCursedAccessory; + public byte hyperStars; + public byte soulFruits; + + public bool isInCombat; + public bool jestersQuiverEquiped; + public byte lastHitCounter; + public float lastJumpBoost; + public bool necrosisStoneEquipped; + public int oldStatDefense; + public byte scarabCounter; + + // Scarab Endurance buff + public byte scarabEnduranceBuffTimeCounter; + public int[] scarabs = new int[3]; + + // Scarab shield + public int solarCounter = 0; + public bool tideTurnerEquipped; + public int ttDash; + public int ttHit; + public bool vampire; + public bool wasHurt; + + // Slimy Feet buff + public bool wasJumping = false; + + public override bool HasShield { get; set; } + public override bool HasLavaCharm { get; set; } + + public Item AmuletSlotItem + { + get => _amuletSlotItem; + set + { + _amuletSlotAmulet = AmuletList.Instance.GetAmuletForItem(value); + _amuletSlotItem = value; + } + } + + public override void Initialize() + { + this.AmuletSlotItem = new Item(); + this.AmuletSlotItem.SetDefaults(0, true); + } + + public override void ResetEffects() + { + closeToEnchantedAnvil = false; + jestersQuiverEquiped = false; + deadeyesQuiverEquipped = false; + endlessPouchofLifeEquipped = false; + graniteLinedTunicEquipped = false; + necrosisStoneEquipped = false; + tideTurnerEquipped = false; + vampire = false; + + this.HasLavaCharm = false; + this.HasShield = false; + + hasCursedAccessory = false; + + this.player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount; + this.player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount; + + if (combatTime > 360) + { + combatTime = 0; + enchantedHeartDropTime = 0; + isInCombat = false; + } + + amuletsBuff = 0; + amuletsBuffChances = 0; + amuletsBuffTime = 0; + amuletsBuffWhenAttacking = false; + + if (!this.player.HasBuff(ModContent.BuffType())) lastJumpBoost = 0; + if (!this.player.HasBuff(ModContent.BuffType())) + { + scarabEnduranceBuffTimeCounter = 0; + scarabCounter = 0; + } + + dash = 0; + dashDamages = 0; + + if (counter > uint.MaxValue - uint.MaxValue % 60) + counter = 0; + } + + public override TagCompound Save() + { + Decimation.amuletSlotState.slot.item = new Item(); + + return new TagCompound + { + {"amuletSlotItem", ItemIO.Save(this.AmuletSlotItem)}, + {"hyperStars", this.hyperStars}, + {"soulFruits", soulFruits } + }; + } + + public override void Load(TagCompound tag) + { + this.AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem")); + this.hyperStars = tag.GetByte("hyperStars"); + this.soulFruits = tag.GetByte("soulFruits"); + } + + // FIND AN ALTERNATIVE! THIS METHOD DOESN'T GET CALLED WITH EVERY WEAPONS + public override bool Shoot(Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type, + ref int damage, ref float knockBack) + { + Projectile toCheck = Main.projectile[type]; + + // Jester's Quiver + if (jestersQuiverEquiped && toCheck.arrow) + type = ProjectileID.JestersArrow; + + // Endless Pouch of Life + if (endlessPouchofLifeEquipped && References.bullets.Contains(type)) + type = ProjectileID.ChlorophyteBullet; + + // Deadeye's Quiver + if (deadeyesQuiverEquipped && (toCheck.arrow || References.bullets.Contains(type))) + { + if (toCheck.arrow) + type = ProjectileID.IchorArrow; + else + type = ProjectileID.ChlorophyteBullet; + + speedX *= 1.15f; + speedY *= 1.15f; + } + + // Frost Amulet + if (this.AmuletSlotItem.type == ModContent.ItemType() && toCheck.arrow) + { + speedX *= 1.03f; + speedY *= 1.03f; + } + + _amuletSlotAmulet?.Synergy.OnShoot(this, item, ref position, ref speedX, ref speedY, ref type, ref damage, + ref knockBack); + + return base.Shoot(item, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack); + } + + public override bool ConsumeAmmo(Item weapon, Item ammo) + { + if (deadeyesQuiverEquipped && (ammo.ammo == AmmoID.Arrow || ammo.ammo == AmmoID.Bullet) && + Main.rand.Next(20) > 3) + return false; + if (endlessPouchofLifeEquipped && ammo.ammo == AmmoID.Bullet) + return false; + if (this.AmuletSlotItem.type == ModContent.ItemType() && ammo.ammo == AmmoID.Arrow && + Main.rand.NextBool(50)) + return false; + if (this.AmuletSlotItem.type == ModContent.ItemType() && weapon.thrown && + Main.rand.NextBool(50) && weapon.thrown) + return false; + + return base.ConsumeAmmo(weapon, ammo); + } + + public override void UpdateVanityAccessories() + { + Decimation.amuletSlotState.UpdateAmulet(this); + _amuletSlotAmulet?.Synergy.Update(this); + + base.UpdateVanityAccessories(); + } + + public override void UpdateEquips(ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff) + { + DashMovement(); + + base.UpdateEquips(ref wallSpeedBuff, ref tileSpeedBuff, ref tileRangeBuff); + } + + public override void FrameEffects() + { + if (vampire) + { + this.player.head = 124; + this.player.body = 85; + this.player.legs = 72; + } + } + + public override void PostUpdate() + { + oldStatDefense = this.player.statDefense; + + if (lastHitCounter >= 60) + { + lastHitCounter = 0; + wasHurt = false; + } + + if (wasHurt) + lastHitCounter++; + + if (isInCombat) + { + combatTime++; + enchantedHeartDropTime++; + } + + counter++; + + base.PostUpdate(); + } + + public override void OnHitPvp(Item item, Player target, int damage, bool crit) + { + if (target.HasBuff(ModContent.BuffType())) this.player.AddBuff(BuffID.OnFire, 300); + + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && + this.AmuletSlotItem.type != ModContent.ItemType()) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + target.AddBuff(amuletsBuff, amuletsBuffTime); + + if (this.AmuletSlotItem.type == ModContent.ItemType()) + CrystalAmuletEffect(); + } + + public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit) + { + isInCombat = true; + combatTime = 0; + + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && + this.AmuletSlotItem.type != ModContent.ItemType()) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + target.AddBuff(amuletsBuff, amuletsBuffTime); + } + + public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit) + { + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && + (this.AmuletSlotItem.type != ModContent.ItemType() || + this.AmuletSlotItem.type == ModContent.ItemType() && proj.thrown)) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + target.AddBuff(amuletsBuff, amuletsBuffTime); + } + + public override void OnHitNPCWithProj(Projectile proj, NPC target, int damage, float knockback, bool crit) + { + isInCombat = true; + combatTime = 0; + + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking && + (this.AmuletSlotItem.type != ModContent.ItemType() || + this.AmuletSlotItem.type == ModContent.ItemType() && proj.thrown)) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + target.AddBuff(amuletsBuff, amuletsBuffTime); + } + + public override void OnHitByNPC(NPC npc, int damage, bool crit) + { + if (this.player.HasBuff(ModContent.BuffType()) && scarabCounter > 0 && + lastHitCounter == 0 && + !wasHurt) + { + Main.projectile[scarabs[scarabCounter - 1]].Kill(); + scarabCounter--; + wasHurt = true; + } + + if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && !amuletsBuffWhenAttacking) + if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + npc.AddBuff(amuletsBuff, amuletsBuffTime); + + if (graniteLinedTunicEquipped) + { + this.player.statLife += (int) (damage * 0.04f); + + if (Main.rand.Next(3, 100) < 3) + npc.AddBuff(BuffID.Confused, 600); + } + + if (tideTurnerEquipped && Main.rand.NextBool(2)) this.player.statLife += damage; + + foreach (Player otherPlayer in Main.player) + if (otherPlayer.whoAmI != this.player.whoAmI) + if (otherPlayer.GetModPlayer().AmuletSlotItem.type == + ModContent.ItemType() && otherPlayer.team == this.player.team) + { + this.player.statLife += (int) (damage * 0.03f); + break; + } + + if (this.AmuletSlotItem.type == ModContent.ItemType() && Main.rand.NextBool(25)) + CrystalAmuletEffect(); + } + + public override void OnHitByProjectile(Projectile proj, int damage, bool crit) + { + if (this.player.HasBuff(ModContent.BuffType()) && scarabCounter > 0 && + lastHitCounter == 0 && + !wasHurt) + { + Main.projectile[scarabs[scarabCounter - 1]].Kill(); + scarabCounter--; + wasHurt = true; + } + + if (amuletsBuff != 0 && amuletsBuffTime != 0 && amuletsBuffChances != 0 && !amuletsBuffWhenAttacking) + { + if (proj.npcProj && Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + Main.npc[proj.owner].AddBuff(amuletsBuff, amuletsBuffTime); + else if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances) + Main.player[proj.owner].AddBuff(amuletsBuff, amuletsBuffTime); + } + + if (graniteLinedTunicEquipped) + { + this.player.statLife += (int) (damage * 0.04f); + + if (proj.npcProj && Main.rand.Next(3, 100) < 3) + Main.npc[proj.owner].AddBuff(BuffID.Confused, 600); + else if (Main.rand.Next(3, 100) < 3) + Main.player[proj.owner].AddBuff(BuffID.Confused, 600); + } + + foreach (Player otherPlayer in Main.player) + if (otherPlayer.whoAmI != this.player.whoAmI) + if (otherPlayer.GetModPlayer().AmuletSlotItem.type == + ModContent.ItemType() && otherPlayer.team == this.player.team) + { + this.player.statLife += (int) (damage * 0.03f); + break; + } + + if (this.AmuletSlotItem.type == ModContent.ItemType() && Main.rand.NextBool(25)) + CrystalAmuletEffect(); + } + + public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit) + { + _amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage); + } + + public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit) + { + _amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage); + } + + public void DashMovement() + { + if (dash == 2 && ttDash > 0) + { + if (ttHit < 0) + { + Rectangle rectangle = + new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0), + (int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8, + this.player.height + 8); + for (int i = 0; i < 200; i++) + if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly) + { + NPC nPC = Main.npc[i]; + Rectangle rect = nPC.getRect(); + if (rectangle.Intersects(rect) && (nPC.noTileCollide || this.player.CanHit(nPC))) + { + float num = dashDamages * this.player.meleeDamage; + float num2 = 9f; + bool crit = false; + if (this.player.kbGlove) num2 *= 2f; + if (this.player.kbBuff) num2 *= 1.5f; + if (Main.rand.Next(100) < this.player.meleeCrit) crit = true; + int num3 = this.player.direction; + if (this.player.velocity.X < 0f) num3 = -1; + if (this.player.velocity.X > 0f) num3 = 1; + if (this.player.whoAmI == Main.myPlayer) + this.player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit); + ttDash = 10; + dashDelay = 30; + this.player.velocity.X = (0f - num3) * 9f; + this.player.velocity.Y = -4f; + this.player.immune = true; + this.player.immuneNoBlink = true; + this.player.immuneTime = 4; + ttHit = i; + } + } + } + else if ((!this.player.controlLeft || this.player.velocity.X >= 0f) && + (!this.player.controlRight || this.player.velocity.X <= 0f)) + { + this.player.velocity.X = this.player.velocity.X * 0.95f; + } + } + + if (dash == 3 && dashDelay < 0 && this.player.whoAmI == Main.myPlayer) + { + Rectangle rectangle2 = + new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0), + (int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8, + this.player.height + 8); + for (int j = 0; j < 200; j++) + if (Main.npc[j].active && !Main.npc[j].dontTakeDamage && !Main.npc[j].friendly && + Main.npc[j].immune[this.player.whoAmI] <= 0) + { + NPC nPC2 = Main.npc[j]; + Rectangle rect2 = nPC2.getRect(); + if (rectangle2.Intersects(rect2) && (nPC2.noTileCollide || this.player.CanHit(nPC2))) + { + float num4 = 150f * this.player.meleeDamage; + float num5 = 9f; + bool crit2 = false; + if (this.player.kbGlove) num5 *= 2f; + if (this.player.kbBuff) num5 *= 1.5f; + if (Main.rand.Next(100) < this.player.meleeCrit) crit2 = true; + int direction = this.player.direction; + if (this.player.velocity.X < 0f) direction = -1; + if (this.player.velocity.X > 0f) direction = 1; + if (this.player.whoAmI == Main.myPlayer) + { + this.player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2); + int num6 = Projectile.NewProjectile(this.player.Center.X, this.player.Center.Y, 0f, 0f, + 608, 150, 15f, Main.myPlayer); + Main.projectile[num6].Kill(); + } + + nPC2.immune[this.player.whoAmI] = 6; + this.player.immune = true; + this.player.immuneNoBlink = true; + this.player.immuneTime = 4; + } + } + } + + if (dashDelay > 0) + { + if (ttDash > 0) ttDash--; + if (ttDash == 0) ttHit = -1; + dashDelay--; + } + else if (dashDelay < 0) + { + float num7 = 12f; + float num8 = 0.992f; + float num9 = Math.Max(this.player.accRunSpeed, this.player.maxRunSpeed); + float num10 = 0.96f; + int num11 = 20; + if (dash == 1) + { + for (int k = 0; k < 2; k++) + { + int num12 = this.player.velocity.Y != 0f + ? Dust.NewDust( + new Vector2(this.player.position.X, + this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31, + 0f, 0f, 100, default, 1.4f) + : Dust.NewDust( + new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f), + this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f); + Dust obj = Main.dust[num12]; + obj.velocity *= 0.1f; + Main.dust[num12].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); + } + } + else if (dash == 2) + { + for (int l = 0; l < 0; l++) + { + int num13 = this.player.velocity.Y != 0f + ? Dust.NewDust( + new Vector2(this.player.position.X, + this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31, + 0f, 0f, 100, default, 1.4f) + : Dust.NewDust( + new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f), + this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f); + Dust obj2 = Main.dust[num13]; + obj2.velocity *= 0.1f; + Main.dust[num13].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); + } + + num8 = 0.985f; + num10 = 0.94f; + num11 = 30; + } + else if (dash == 3) + { + for (int m = 0; m < 4; m++) + { + int num14 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f), + this.player.width, this.player.height - 8, 6, 0f, 0f, 100, default, 1.7f); + Dust obj3 = Main.dust[num14]; + obj3.velocity *= 0.1f; + Main.dust[num14].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num14].shader = + GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player); + Main.dust[num14].noGravity = true; + if (Main.rand.Next(2) == 0) Main.dust[num14].fadeIn = 0.5f; + } + + num7 = 14f; + num8 = 0.985f; + num10 = 0.94f; + num11 = 20; + } + else if (dash == 4) + { + for (int n = 0; n < 2; n++) + { + int num15 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f), + this.player.width, this.player.height - 8, 229, 0f, 0f, 100, default, 1.2f); + Dust obj4 = Main.dust[num15]; + obj4.velocity *= 0.1f; + Main.dust[num15].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num15].shader = GameShaders.Armor.GetSecondaryShader(this.player.cWings, this.player); + Main.dust[num15].noGravity = true; + if (Main.rand.Next(2) == 0) Main.dust[num15].fadeIn = 0.3f; + } + + num8 = 0.985f; + num10 = 0.94f; + num11 = 20; + } + + if (dash > 0) + { + this.player.vortexStealthActive = false; + if (this.player.velocity.X > num7 || this.player.velocity.X < 0f - num7) + { + this.player.velocity.X = this.player.velocity.X * num8; + } + else if (this.player.velocity.X > num9 || this.player.velocity.X < 0f - num9) + { + this.player.velocity.X = this.player.velocity.X * num10; + } + else + { + dashDelay = num11; + if (this.player.velocity.X < 0f) + this.player.velocity.X = 0f - num9; + else if (this.player.velocity.X > 0f) this.player.velocity.X = num9; + } + } + } + else if (dash > 0 && !this.player.mount.Active) + { + if (dash == 1) + { + int num16 = 0; + bool flag = false; + if (dashTime > 0) dashTime--; + if (dashTime < 0) dashTime++; + if (this.player.controlRight && this.player.releaseRight) + { + if (dashTime > 0) + { + num16 = 1; + flag = true; + dashTime = 0; + } + else + { + dashTime = 15; + } + } + else if (this.player.controlLeft && this.player.releaseLeft) + { + if (dashTime < 0) + { + num16 = -1; + flag = true; + dashTime = 0; + } + else + { + dashTime = -15; + } + } + + if (flag) + { + this.player.velocity.X = 16.9f * num16; + Point point = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, + this.player.gravDir * (0f - this.player.height) / 2f + + this.player.gravDir * 2f)).ToTileCoordinates(); + Point point2 = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, 0f)) + .ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(point.X, point.Y) || + WorldGen.SolidOrSlopedTile(point2.X, point2.Y)) + this.player.velocity.X = this.player.velocity.X / 2f; + dashDelay = -1; + for (int num17 = 0; num17 < 20; num17++) + { + int num18 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), + this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f); + Dust dust = Main.dust[num18]; + dust.position.X = dust.position.X + Main.rand.Next(-5, 6); + Dust dust2 = Main.dust[num18]; + dust2.position.Y = dust2.position.Y + Main.rand.Next(-5, 6); + Dust obj5 = Main.dust[num18]; + obj5.velocity *= 0.2f; + Main.dust[num18].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num18].shader = + GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player); + } + + int num19 = Gore.NewGore( + new Vector2(this.player.position.X + this.player.width / 2 - 24f, + this.player.position.Y + this.player.height / 2 - 34f), default, + Main.rand.Next(61, 64)); + Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f; + Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f; + Gore obj6 = Main.gore[num19]; + obj6.velocity *= 0.4f; + num19 = Gore.NewGore( + new Vector2(this.player.position.X + this.player.width / 2 - 24f, + this.player.position.Y + this.player.height / 2 - 14f), default, + Main.rand.Next(61, 64)); + Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f; + Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f; + Gore obj7 = Main.gore[num19]; + obj7.velocity *= 0.4f; + } + } + else if (dash == 2) + { + int num20 = 0; + bool flag2 = false; + if (dashTime > 0) dashTime--; + if (dashTime < 0) dashTime++; + if (this.player.controlRight && this.player.releaseRight) + { + if (dashTime > 0) + { + num20 = 1; + flag2 = true; + dashTime = 0; + } + else + { + dashTime = 15; + } + } + else if (this.player.controlLeft && this.player.releaseLeft) + { + if (dashTime < 0) + { + num20 = -1; + flag2 = true; + dashTime = 0; + } + else + { + dashTime = -15; + } + } + + if (flag2) + { + this.player.velocity.X = 14.5f * num20; + Point point3 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, + this.player.gravDir * (0f - this.player.height) / 2f + + this.player.gravDir * 2f)).ToTileCoordinates(); + Point point4 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, 0f)) + .ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(point3.X, point3.Y) || + WorldGen.SolidOrSlopedTile(point4.X, point4.Y)) + this.player.velocity.X = this.player.velocity.X / 2f; + dashDelay = -1; + ttDash = 15; + for (int num21 = 0; num21 < 0; num21++) + { + int num22 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), + this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f); + Dust dust3 = Main.dust[num22]; + dust3.position.X = dust3.position.X + Main.rand.Next(-5, 6); + Dust dust4 = Main.dust[num22]; + dust4.position.Y = dust4.position.Y + Main.rand.Next(-5, 6); + Dust obj8 = Main.dust[num22]; + obj8.velocity *= 0.2f; + Main.dust[num22].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num22].shader = + GameShaders.Armor.GetSecondaryShader(this.player.cShield, this.player); + } + } + } + else if (dash == 3) + { + int num23 = 0; + bool flag3 = false; + if (dashTime > 0) dashTime--; + if (dashTime < 0) dashTime++; + if (this.player.controlRight && this.player.releaseRight) + { + if (dashTime > 0) + { + num23 = 1; + flag3 = true; + dashTime = 0; + } + else + { + dashTime = 15; + } + } + else if (this.player.controlLeft && this.player.releaseLeft) + { + if (dashTime < 0) + { + num23 = -1; + flag3 = true; + dashTime = 0; + } + else + { + dashTime = -15; + } + } + + if (flag3) + { + this.player.velocity.X = 21.9f * num23; + Point point5 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, + this.player.gravDir * (0f - this.player.height) / 2f + + this.player.gravDir * 2f)).ToTileCoordinates(); + Point point6 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, 0f)) + .ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) || + WorldGen.SolidOrSlopedTile(point6.X, point6.Y)) + this.player.velocity.X = this.player.velocity.X / 2f; + dashDelay = -1; + for (int num24 = 0; num24 < 20; num24++) + { + int num25 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y), + this.player.width, this.player.height, 6, 0f, 0f, 100, default, 2f); + Dust dust5 = Main.dust[num25]; + dust5.position.X = dust5.position.X + Main.rand.Next(-5, 6); + Dust dust6 = Main.dust[num25]; + dust6.position.Y = dust6.position.Y + Main.rand.Next(-5, 6); + Dust obj9 = Main.dust[num25]; + obj9.velocity *= 0.2f; + Main.dust[num25].scale *= 1f + Main.rand.Next(20) * 0.01f; + Main.dust[num25].shader = + GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player); + Main.dust[num25].noGravity = true; + Main.dust[num25].fadeIn = 0.5f; + } + } + } + } + } + + private void CrystalAmuletEffect() + { + int shardNumber = Main.rand.Next(5, 11); + float angleDifference = (float) (Math.PI * 2) / shardNumber; + float speed = 5f; + float currentAngle = 0; + + for (int i = 0; i < shardNumber; i++) + { + float speedX = (float) Math.Cos(currentAngle) * speed; + float speedY = (float) Math.Sin(currentAngle) * speed; + + Projectile.NewProjectile(this.player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20, + 5, this.player.whoAmI); + + currentAngle += angleDifference; + } + } + } + + public class PlayerPropertiesUpdater : GlobalItem + { + public override void UpdateAccessory(Item item, Player player, bool hideVisual) + { + DecimationPlayer modPlayer = player.GetModPlayer(); + if (item.type == ItemID.CobaltShield || item.type == ItemID.AnkhShield || + item.type == ItemID.PaladinsShield || item.type == ItemID.ObsidianShield) modPlayer.HasShield = true; + if (item.type == ItemID.LavaCharm) modPlayer.HasLavaCharm = true; + } + } +} \ No newline at end of file diff --git a/DecimationWorld.cs b/DecimationWorld.cs new file mode 100644 index 0000000..cfc5092 --- /dev/null +++ b/DecimationWorld.cs @@ -0,0 +1,100 @@ +using System.IO; +using System.Collections.Generic; +using Terraria; +using Terraria.ModLoader; +using Terraria.World.Generation; +using Terraria.GameContent.Generation; +using Terraria.ModLoader.IO; +using Decimation.Structures; +using Microsoft.Xna.Framework; +using System; +using Terraria.ID; + +namespace Decimation +{ + public class DecimationWorld : ModWorld + { + public static bool downedBloodshotEye; + public static bool downedDuneWorm; + public static bool downedArachnus; + public static bool downedWyvern; + + public override void Initialize() + { + downedBloodshotEye = false; + downedDuneWorm = false; + downedArachnus = false; + downedWyvern = false; + } + + public override TagCompound Save() + { + var downed = new List(); + if (downedBloodshotEye) downed.Add("downedBloodshotEye"); + if (downedDuneWorm) downed.Add("downedDuneWorm"); + if (downedArachnus) downed.Add("downedArachnus"); + if (downedWyvern) downed.Add("downedWyvern"); + return new TagCompound { + {"downed", downed}, + }; + } + public override void Load(TagCompound tag) + { + var downed = tag.GetList("downed"); + downedBloodshotEye = downed.Contains("downedBloodshotEye"); + downedDuneWorm = downed.Contains("downedDuneWorm"); + downedArachnus = downed.Contains("downedArachnus"); + downedWyvern = downed.Contains("downedWyvern"); + } + public override void NetSend(BinaryWriter writer) + { + BitsByte flags = new BitsByte(); + flags[0] = downedBloodshotEye; //+1 flag number for each new boss + flags[1] = downedDuneWorm; + flags[2] = downedArachnus; + flags[3] = downedWyvern; + writer.Write(flags); + } + public override void NetReceive(BinaryReader reader) + { + BitsByte flags = reader.ReadByte(); + downedBloodshotEye = flags[0]; + downedDuneWorm = flags[1]; + downedArachnus = flags[2]; + downedWyvern = flags[3]; + } + public override void LoadLegacy(BinaryReader reader) + { + int loadVersion = reader.ReadInt32(); + if (loadVersion == 1) + { + byte flags = reader.ReadByte(); + DecimationWorld.downedBloodshotEye = ((flags & 1) != 0); + DecimationWorld.downedDuneWorm = ((flags & 2) != 0); //double flag numbers with each new boss + DecimationWorld.downedArachnus = ((flags & 4) != 0); + DecimationWorld.downedWyvern = ((flags & 8) != 0); + } + else if (loadVersion == 2) + { + byte flags = reader.ReadByte(); + byte flags2 = reader.ReadByte(); + DecimationWorld.downedBloodshotEye = ((flags & 1) != 0); + DecimationWorld.downedDuneWorm = ((flags & 2) != 0); + DecimationWorld.downedArachnus = ((flags & 4) != 0); + DecimationWorld.downedWyvern = ((flags & 8) != 0); + } + } + + // For custom biome + public override void ModifyWorldGenTasks(List tasks, ref float totalWeight) + { + ShrineoftheMoltenOne biome = new ShrineoftheMoltenOne(); + + int genIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes")); + tasks.Insert(genIndex + 1, new PassLegacy("[Decimation] The Shrine of the Molten One", delegate (GenerationProgress progress) + { + biome.Generate(); + })); + } + } +} diff --git a/Dusts/Blood.cs b/Dusts/Blood.cs new file mode 100644 index 0000000..2dd96de --- /dev/null +++ b/Dusts/Blood.cs @@ -0,0 +1,16 @@ +using System; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace Decimation.Dusts +{ + class Blood : ModDust + { + public override void OnSpawn(Dust dust) + { + dust.velocity.Y = 0.02f; + dust.scale = 1f; + } + } +} diff --git a/Dusts/Blood.png b/Dusts/Blood.png new file mode 100644 index 0000000..ef36ace Binary files /dev/null and b/Dusts/Blood.png differ diff --git a/Items/Accessories/AlucardPendant.cs b/Items/Accessories/AlucardPendant.cs new file mode 100644 index 0000000..2968a85 --- /dev/null +++ b/Items/Accessories/AlucardPendant.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using Decimation.Buffs.Buffs; +using Decimation.Items.Misc.Souls; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class AlucardPendant : DecimationAccessory + { + protected override string ItemName => "Alucard Pendant"; + + protected override string ItemTooltip => "Stronger than your average vampire\n" + + "Gives Vampire buff\n" + + "Bats will be friendly"; + + protected override void InitAccessory() + { + width = 46; + height = 62; + rarity = Rarity.LightPurple; + this.item.value = Item.buyPrice(0, 4); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.AddBuff(ModContent.BuffType(), 1); + + player.npcTypeNoAggro[NPCID.CaveBat] = true; + player.npcTypeNoAggro[NPCID.JungleBat] = true; + player.npcTypeNoAggro[NPCID.Hellbat] = true; + player.npcTypeNoAggro[NPCID.IceBat] = true; + player.npcTypeNoAggro[NPCID.GiantBat] = true; + player.npcTypeNoAggro[NPCID.IlluminantBat] = true; + player.npcTypeNoAggro[NPCID.Lavabat] = true; + player.npcTypeNoAggro[NPCID.Slimer] = true; + player.npcTypeNoAggro[NPCID.GiantFlyingFox] = true; + player.npcTypeNoAggro[NPCID.Vampire] = true; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {ModContent.TileType()}); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.SoulofLight, 10); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.HolyWater, 5); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/AlucardPendant.png b/Items/Accessories/AlucardPendant.png new file mode 100644 index 0000000..a83167e Binary files /dev/null and b/Items/Accessories/AlucardPendant.png differ diff --git a/Items/Accessories/CelestialTransmogrifier.cs b/Items/Accessories/CelestialTransmogrifier.cs new file mode 100644 index 0000000..29c5a70 --- /dev/null +++ b/Items/Accessories/CelestialTransmogrifier.cs @@ -0,0 +1,74 @@ +using System.Collections.Generic; +using Decimation.Buffs.Buffs; +using Decimation.Items.Misc.Souls; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class CelestialTransmogrifier : DecimationAccessory + { + protected override string ItemName => "Celestial Transmogrifier"; + + protected override string ItemTooltip => "Change form on a whim\n\n" + + "Gives Werewolf buff\n" + + "Transforms holder into merfolk when entering water\n" + + "Gives Celestial Stone effects\n" + + "Bats will be friendly"; + + protected override void InitAccessory() + { + width = 46; + height = 62; + rarity = Rarity.LightPurple; + + this.item.value = Item.buyPrice(0, 4); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.AddBuff(ModContent.BuffType(), 1); + + player.meleeSpeed *= 1.1f; + player.meleeDamage *= 1.1f; + player.magicDamage *= 1.1f; + player.rangedDamage *= 1.1f; + player.thrownDamage *= 1.1f; + player.meleeCrit += 2; + player.magicCrit += 2; + player.rangedCrit += 2; + player.thrownCrit += 2; + player.lifeRegen += 1; + player.statDefense += 4; + player.tileSpeed *= 1.15f; + player.minionKB *= 1.5f; + + player.npcTypeNoAggro[NPCID.CaveBat] = true; + player.npcTypeNoAggro[NPCID.JungleBat] = true; + player.npcTypeNoAggro[NPCID.Hellbat] = true; + player.npcTypeNoAggro[NPCID.IceBat] = true; + player.npcTypeNoAggro[NPCID.GiantBat] = true; + player.npcTypeNoAggro[NPCID.IlluminantBat] = true; + player.npcTypeNoAggro[NPCID.Lavabat] = true; + player.npcTypeNoAggro[NPCID.Slimer] = true; + player.npcTypeNoAggro[NPCID.GiantFlyingFox] = true; + player.npcTypeNoAggro[NPCID.Vampire] = true; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {ModContent.TileType()}); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.CelestialShell); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ItemID.FallenStar, 5); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/CelestialTransmogrifier.png b/Items/Accessories/CelestialTransmogrifier.png new file mode 100644 index 0000000..63654b1 Binary files /dev/null and b/Items/Accessories/CelestialTransmogrifier.png differ diff --git a/Items/Accessories/CrystalSkull.cs b/Items/Accessories/CrystalSkull.cs new file mode 100644 index 0000000..e2da738 --- /dev/null +++ b/Items/Accessories/CrystalSkull.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class CrystalSkull : DecimationAccessory + { + protected override string ItemName => "Crystal Skull"; + protected override string ItemTooltip => "It seems that this skull has been enchanted."; + + protected override void InitAccessory() + { + width = 24; + height = 24; + rarity = Rarity.Green; + this.item.value = Item.buyPrice(0, 0, 0, 10); + this.item.defense = 2; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.GlassKiln}, true); + + recipe.AddIngredient(ItemID.ObsidianSkull); + recipe.AddIngredient(ItemID.CrystalShard, 5); + recipe.AddRecipeGroup("AnyGem", 4); + recipe.AddIngredient(ItemID.Glass, 6); + + return new List {recipe}; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.AddBuff(BuffID.Thorns, 1); + Lighting.AddLight(player.Center, new Vector3(0.9f * 0.6f, 0.9f * 0.1f, 0.9f)); + } + } +} \ No newline at end of file diff --git a/Items/Accessories/CrystalSkull.png b/Items/Accessories/CrystalSkull.png new file mode 100644 index 0000000..4f3b294 Binary files /dev/null and b/Items/Accessories/CrystalSkull.png differ diff --git a/Items/Accessories/DeadeyesQuiver.cs b/Items/Accessories/DeadeyesQuiver.cs new file mode 100644 index 0000000..9ee79cb --- /dev/null +++ b/Items/Accessories/DeadeyesQuiver.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; +using Decimation.Items.Misc; +using Decimation.Items.Misc.Souls; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class DeadeyesQuiver : DecimationAccessory + { + protected override string ItemName => "Deadeye's Quiver"; + + protected override string ItemTooltip => + "Turns wooden arrows into ichor arrows and turns musket balls into chlorophyte bullets\n+16% ranged damage\n+15% arrow and bullet velocity\n15% chance not to consume ammo\n+2% increased ranged crit chance"; + + protected override void InitAccessory() + { + width = 30; + height = 30; + rarity = Rarity.Red; + this.item.value = Item.buyPrice(0, 15); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {ModContent.TileType()}); + recipe.AddIngredient(ModContent.ItemType()); + //r.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ItemID.SoulofSight, 15); + recipe.AddIngredient(ItemID.SoulofFright, 15); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.FlaskofIchor, 5); + recipe.AddIngredient(ItemID.BlackDye, 3); + recipe.AddIngredient(ItemID.RedDye, 3); + + return new List {recipe}; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.rangedDamage += 0.16f; + player.rangedCrit += 2; + player.GetModPlayer().deadeyesQuiverEquipped = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/DeadeyesQuiver.png b/Items/Accessories/DeadeyesQuiver.png new file mode 100644 index 0000000..face9c8 Binary files /dev/null and b/Items/Accessories/DeadeyesQuiver.png differ diff --git a/Items/Accessories/DraculaPendant.cs b/Items/Accessories/DraculaPendant.cs new file mode 100644 index 0000000..c42b727 --- /dev/null +++ b/Items/Accessories/DraculaPendant.cs @@ -0,0 +1,60 @@ +using Decimation.Buffs.Buffs; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class DraculaPendant : DecimationAccessory + { + protected override string ItemName => "Dracula's Pendant"; + + protected override string ItemTooltip => "Dont tread under the suns gaze!\n\n" + + "Gives Vampire debuff\n" + + "Bats will be friendly\n" + + "You will burn at sun"; + + protected override void InitAccessory() + { + width = 46; + height = 62; + rarity = Rarity.LightPurple; + this.item.value = Item.buyPrice(0, 4); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.AddBuff(ModContent.BuffType(), 1); + + player.npcTypeNoAggro[NPCID.CaveBat] = true; + player.npcTypeNoAggro[NPCID.JungleBat] = true; + player.npcTypeNoAggro[NPCID.Hellbat] = true; + player.npcTypeNoAggro[NPCID.IceBat] = true; + player.npcTypeNoAggro[NPCID.GiantBat] = true; + player.npcTypeNoAggro[NPCID.IlluminantBat] = true; + player.npcTypeNoAggro[NPCID.Lavabat] = true; + player.npcTypeNoAggro[NPCID.Slimer] = true; + player.npcTypeNoAggro[NPCID.GiantFlyingFox] = true; + player.npcTypeNoAggro[NPCID.Vampire] = true; + + if (player.ZoneOverworldHeight && Main.dayTime) + { + int damages = 4; + player.lifeRegen -= damages; + + Dust.NewDust(player.position, player.width, player.height, DustID.GoldFlame); + } + } + } + + public class DraculaPendantDrop : GlobalNPC + { + public override void NPCLoot(NPC npc) + { + if (npc.type == NPCID.Vampire && Main.rand.NextBool(50)) + Item.NewItem(npc.getRect(), ModContent.ItemType()); + } + } +} \ No newline at end of file diff --git a/Items/Accessories/DraculaPendant.png b/Items/Accessories/DraculaPendant.png new file mode 100644 index 0000000..5e40b3b Binary files /dev/null and b/Items/Accessories/DraculaPendant.png differ diff --git a/Items/Accessories/EnchantedFocuser.cs b/Items/Accessories/EnchantedFocuser.cs new file mode 100644 index 0000000..75e5fc5 --- /dev/null +++ b/Items/Accessories/EnchantedFocuser.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class EnchantedFocuser : DecimationAccessory + { + protected override string ItemName => "Enchanted Focuser"; + protected override string ItemTooltip => "Focuses one's Ki."; + + protected override void InitAccessory() + { + width = 62; + height = 46; + rarity = Rarity.Green; + this.item.value = Item.buyPrice(0, 0, 0, 10); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.Anvils}, true); + + recipe.AddIngredient(ItemID.FallenStar, 5); + recipe.AddIngredient(ItemID.Wire, 15); + recipe.AddIngredient(ItemID.CopperBar, 5); + recipe.AddIngredient(ItemID.WaterCandle); + recipe.AddIngredient(ModContent.ItemType()); + + return new List {recipe}; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.rangedDamage += 0.10f; + player.magicDamage += 0.10f; + player.rangedCrit += 02; + player.meleeCrit += 02; + player.magicCrit += 02; + player.thrownCrit += 02; + player.manaRegen += 2; + player.statManaMax2 += 20; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/EnchantedFocuser.png b/Items/Accessories/EnchantedFocuser.png new file mode 100644 index 0000000..62c7491 Binary files /dev/null and b/Items/Accessories/EnchantedFocuser.png differ diff --git a/Items/Accessories/EndlessPouchofLife.cs b/Items/Accessories/EndlessPouchofLife.cs new file mode 100644 index 0000000..3115b58 --- /dev/null +++ b/Items/Accessories/EndlessPouchofLife.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class EndlessPouchofLife : DecimationAccessory + { + protected override string ItemName => "Endless Pouch of Life"; + + protected override string ItemTooltip => "Cancels ammunition consumption." + + "\nIncrease maximum life by 15" + + "\nChange ammunitions in Chlorophyte Bullets \nProvide a life regeneration boost \n+8% ranged damage \n+15% critical strike chance"; + + protected override void InitAccessory() + { + width = 24; + height = 32; + rarity = Rarity.Lime; + this.item.value = Item.buyPrice(0, 50); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.lifeRegen += 5; + player.rangedDamage += 0.08f; + player.rangedCrit += 5; + player.statLifeMax2 += 15; + Main.LocalPlayer.GetModPlayer().endlessPouchofLifeEquipped = true; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {ModContent.TileType()}); + + recipe.AddIngredient(ItemID.ChlorophyteBar, 25); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.EndlessMusketPouch); + recipe.AddIngredient(ItemID.SoulofSight, 50); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/EndlessPouchofLife.png b/Items/Accessories/EndlessPouchofLife.png new file mode 100644 index 0000000..6a36a1f Binary files /dev/null and b/Items/Accessories/EndlessPouchofLife.png differ diff --git a/Items/Accessories/EnergyFocuser.cs b/Items/Accessories/EnergyFocuser.cs new file mode 100644 index 0000000..aa445d4 --- /dev/null +++ b/Items/Accessories/EnergyFocuser.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class EnergyFocuser : DecimationAccessory + { + protected override string ItemName => "Energy Focuser"; + protected override string ItemTooltip => "Opens one's chakra points."; + + protected override void InitAccessory() + { + width = 62; + height = 46; + rarity = Rarity.Green; + this.item.value = Item.buyPrice(0, 0, 0, 10); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.MythrilAnvil}, true); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.PixieDust, 40); + recipe.AddIngredient(ItemID.SoulofSight, 15); + recipe.AddIngredient(ItemID.SoulofLight, 15); + recipe.AddIngredient(ModContent.ItemType()); + + return new List {recipe}; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.rangedDamage += 0.10f; + player.magicDamage += 0.10f; + player.rangedCrit += 05; + player.meleeCrit += 05; + player.magicCrit += 05; + player.thrownCrit += 05; + player.manaRegen += 2; + player.statManaMax2 += 20; + player.statLifeMax2 += 20; + player.lifeRegen += 2; + player.meleeDamage += 0.04f; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/EnergyFocuser.png b/Items/Accessories/EnergyFocuser.png new file mode 100644 index 0000000..353b066 Binary files /dev/null and b/Items/Accessories/EnergyFocuser.png differ diff --git a/Items/Accessories/Focuser.cs b/Items/Accessories/Focuser.cs new file mode 100644 index 0000000..41df6f5 --- /dev/null +++ b/Items/Accessories/Focuser.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class Focuser : DecimationAccessory + { + protected override string ItemName => "Focuser"; + protected override string ItemTooltip => "Focuses one's inner strength."; + + protected override void InitAccessory() + { + width = 54; + height = 46; + rarity = Rarity.Green; + this.item.value = Item.buyPrice(0, 0, 0, 10); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.Anvils}, true); + + recipe.AddIngredient(ItemID.Chain, 3); + recipe.AddIngredient(ItemID.CopperBar, 10); + recipe.AddIngredient(ItemID.GoldBar); + recipe.AddIngredient(ItemID.Ruby); + recipe.AddIngredient(ItemID.IronBar, 3); + + return new List {recipe}; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.rangedDamage += 0.05f; + player.rangedCrit += 05; + player.meleeCrit += 05; + player.magicCrit += 05; + player.thrownCrit += 05; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/Focuser.png b/Items/Accessories/Focuser.png new file mode 100644 index 0000000..19d2791 Binary files /dev/null and b/Items/Accessories/Focuser.png differ diff --git a/Items/Accessories/GraniteLinedTunic.cs b/Items/Accessories/GraniteLinedTunic.cs new file mode 100644 index 0000000..cb0549c --- /dev/null +++ b/Items/Accessories/GraniteLinedTunic.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class GraniteLinedTunic : DecimationAccessory + { + protected override string ItemName => "Granite Lined Tunic"; + + protected override void InitAccessory() + { + width = 30; + height = 20; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.statDefense += 2; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.Anvils}); + + recipe.AddIngredient(ItemID.FamiliarShirt); + recipe.AddIngredient(ItemID.Granite, 16); + recipe.AddRecipeGroup("AnyThread", 10); + recipe.AddIngredient(ItemID.Chain, 6); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/GraniteLinedTunic.png b/Items/Accessories/GraniteLinedTunic.png new file mode 100644 index 0000000..daa34ea Binary files /dev/null and b/Items/Accessories/GraniteLinedTunic.png differ diff --git a/Items/Accessories/JestersQuiver.cs b/Items/Accessories/JestersQuiver.cs new file mode 100644 index 0000000..8532c1f --- /dev/null +++ b/Items/Accessories/JestersQuiver.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class JestersQuiver : DecimationAccessory + { + protected override string ItemName => "Jester's Quiver"; + + protected override string ItemTooltip => + "Turns wooden arrows into jesters arrows \n+15% Ranged Damage \n-20% Ammo Cost \n+5% Ranged Critical Chance"; + + protected override void InitAccessory() + { + width = 20; + height = 20; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.rangedDamage += 0.15f; + player.ammoCost80 = true; + player.rangedCrit += 5; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.SoulofSight, 25); + recipe.AddIngredient(ItemID.SoulofFright, 5); + recipe.AddIngredient(ItemID.FallenStar, 15); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/JestersQuiver.png b/Items/Accessories/JestersQuiver.png new file mode 100644 index 0000000..2308119 Binary files /dev/null and b/Items/Accessories/JestersQuiver.png differ diff --git a/Items/Accessories/LightweightGlove.cs b/Items/Accessories/LightweightGlove.cs new file mode 100644 index 0000000..f532de8 --- /dev/null +++ b/Items/Accessories/LightweightGlove.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + using Decimation.Core.Items; + +namespace Decimation.Items.Accessories +{ + internal class LightweightGlove : DecimationAccessory + { + protected override string ItemName => "Lightweight Glove"; + + protected override string ItemTooltip => + "+5% throwing velocity\n+4% throwing damages\n+3% throwing critical strikes chances"; + + protected override void InitAccessory() + { + width = 22; + height = 28; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.thrownVelocity *= 1.05f; + player.thrownDamage *= 1.04f; + player.thrownCrit += 3; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List() { TileID.Loom }, false); + + recipe.AddIngredient(ItemID.Leather, 6); + recipe.AddRecipeGroup("AnyThread", 2); + recipe.AddIngredient(ItemID.Sapphire, 2); + + return new List() { recipe }; + } + } +} diff --git a/Items/Accessories/LightweightGlove.png b/Items/Accessories/LightweightGlove.png new file mode 100644 index 0000000..82bbf6e Binary files /dev/null and b/Items/Accessories/LightweightGlove.png differ diff --git a/Items/Accessories/NecrosisStone.cs b/Items/Accessories/NecrosisStone.cs new file mode 100644 index 0000000..8d7356a --- /dev/null +++ b/Items/Accessories/NecrosisStone.cs @@ -0,0 +1,28 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Items.Accessories +{ + internal class NecrosisStone : DecimationAccessory + { + protected override string ItemName => "Necrosis Stone"; + + protected override string ItemTooltip => + "This stone breathes life into once deceased creatures\nReduces respawn time by 50%"; + + protected override void InitAccessory() + { + width = 20; + height = 20; + rarity = Rarity.Rainbow; + this.item.value = Item.buyPrice(0, 5); + this.item.expert = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.GetModPlayer().necrosisStoneEquipped = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/NecrosisStone.png b/Items/Accessories/NecrosisStone.png new file mode 100644 index 0000000..82beed9 Binary files /dev/null and b/Items/Accessories/NecrosisStone.png differ diff --git a/Items/Accessories/RangersPouch.cs b/Items/Accessories/RangersPouch.cs new file mode 100644 index 0000000..090ad89 --- /dev/null +++ b/Items/Accessories/RangersPouch.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + using Decimation.Core.Items; +using Decimation.Core.Util; + +namespace Decimation.Items.Accessories +{ + internal class RangersPouch : DecimationAccessory + { + protected override string ItemName => "Ranger's Pouch"; + protected override string ItemTooltip => + "25% Chance to not consume ammo \n+10% Ranged damage \n+5% Ranged critical chance"; + + protected override void InitAccessory() + { + width = 30; + height = 30; + item.value = 10; + rarity = Rarity.Green; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List() { TileID.MythrilAnvil }, false); + + recipe.AddIngredient(ItemID.EndlessMusketPouch); + recipe.AddIngredient(ItemID.RangerEmblem); + recipe.AddIngredient(ItemID.SoulofSight, 5); + + return new List() { recipe }; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.rangedDamage += 0.10f; + player.rangedCrit += 5; + player.ammoCost75 = true; + } + + } +} \ No newline at end of file diff --git a/Items/Accessories/RangersPouch.png b/Items/Accessories/RangersPouch.png new file mode 100644 index 0000000..792d8b8 Binary files /dev/null and b/Items/Accessories/RangersPouch.png differ diff --git a/Items/Accessories/RangersQuiver.cs b/Items/Accessories/RangersQuiver.cs new file mode 100644 index 0000000..b3a5a7d --- /dev/null +++ b/Items/Accessories/RangersQuiver.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class RangersQuiver : DecimationAccessory + { + protected override string ItemName => "Ranger's Quiver"; + + protected override string ItemTooltip => + "25% Chance not to consume ammo\n+10%ranged damage\n+15% arrow velocity\n+5% ranged Crit Chance"; + + protected override void InitAccessory() + { + width = 32; + height = 32; + rarity = Rarity.Green; + this.item.value = Item.buyPrice(0, 0, 0, 10); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.MythrilAnvil}, true); + + recipe.AddIngredient(ItemID.MagicQuiver); + recipe.AddIngredient(ItemID.RangerEmblem); + recipe.AddIngredient(ItemID.SoulofSight, 5); + + return new List {recipe}; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.rangedDamage += 0.10f; + player.rangedCrit += 05; + player.ammoCost75 = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/RangersQuiver.png b/Items/Accessories/RangersQuiver.png new file mode 100644 index 0000000..b0a374e Binary files /dev/null and b/Items/Accessories/RangersQuiver.png differ diff --git a/Items/Accessories/RedHotShackle.cs b/Items/Accessories/RedHotShackle.cs new file mode 100644 index 0000000..999d865 --- /dev/null +++ b/Items/Accessories/RedHotShackle.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + using Decimation.Core.Items; +using Decimation.Core.Util; + +namespace Decimation.Items.Accessories +{ + internal class RedHotShackle : DecimationAccessory + { + protected override string ItemName => "Red Hot Shackle"; + protected override string ItemTooltip => "WIP"; + + protected override void InitAccessory() + { + width = 24; + height = 24; + rarity = Rarity.Green; + item.value = Item.buyPrice(0, 0, 2); + item.defense = 1; + } + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List() { TileID.Furnaces }, true); + + recipe.AddIngredient(ItemID.Shackle); + recipe.AddIngredient(ItemID.Gel, 10); + + return new List() { recipe }; + } + } +} diff --git a/Items/Accessories/RedHotShackle.png b/Items/Accessories/RedHotShackle.png new file mode 100644 index 0000000..b165b8a Binary files /dev/null and b/Items/Accessories/RedHotShackle.png differ diff --git a/Items/Accessories/ShinySentinel.cs b/Items/Accessories/ShinySentinel.cs new file mode 100644 index 0000000..979ff42 --- /dev/null +++ b/Items/Accessories/ShinySentinel.cs @@ -0,0 +1,28 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Items.Accessories +{ + internal class ShinySentinel : DecimationAccessory + { + protected override string ItemName => "Shiny Sentinel"; + protected override string ItemTooltip => "Doubles life and mana regeneration \n+5 defense"; + + protected override void InitAccessory() + { + width = 30; + height = 28; + rarity = Rarity.Rainbow; + this.item.value = Item.buyPrice(0, 45); + this.item.expert = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.lifeRegen *= 2; + player.manaRegen *= 2; + player.statDefense += 5; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/ShinySentinel.png b/Items/Accessories/ShinySentinel.png new file mode 100644 index 0000000..2f3607d Binary files /dev/null and b/Items/Accessories/ShinySentinel.png differ diff --git a/Items/Accessories/SlimeBracelet.cs b/Items/Accessories/SlimeBracelet.cs new file mode 100644 index 0000000..dc56c6a --- /dev/null +++ b/Items/Accessories/SlimeBracelet.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class SlimeBracelet : DecimationAccessory + { + protected override string ItemName => "Slime Bracelet"; + protected override string ItemTooltip => "WIP"; + + protected override void InitAccessory() + { + width = 24; + height = 24; + rarity = Rarity.Green; + + this.item.value = Item.buyPrice(0, 0, 0, 10); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.WorkBenches}, true); + + recipe.AddIngredient(ItemID.Shackle); + recipe.AddIngredient(ItemID.Gel, 5); + recipe.AddIngredient(ItemID.Aglet); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/SlimeBracelet.png b/Items/Accessories/SlimeBracelet.png new file mode 100644 index 0000000..c21976f Binary files /dev/null and b/Items/Accessories/SlimeBracelet.png differ diff --git a/Items/Accessories/TideTurner.cs b/Items/Accessories/TideTurner.cs new file mode 100644 index 0000000..e9cc41d --- /dev/null +++ b/Items/Accessories/TideTurner.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using Decimation.Items.Ores; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories +{ + internal class TideTurner : DecimationAccessory + { + protected override string ItemName => "Tide Turner"; + + protected override string ItemTooltip => "Not one of ya’s going to survive this!\n" + + "Deals the same amount of damage as held item\n" + + "Increase underwater mobility\n" + + "+10% chance to dodge attacks when charging"; + + protected override void InitAccessory() + { + width = 46; + height = 36; + rarity = Rarity.Rainbow; + item.value = Item.buyPrice(0, 3); + item.defense = 3; + item.shieldSlot = 5; + item.expert = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + DecimationPlayer modPlayer = player.GetModPlayer(); + + item.damage = player.HeldItem.damage; + modPlayer.dashDamages = player.HeldItem.damage; + modPlayer.dash = 2; + + player.accFlipper = true; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {ModContent.TileType()}, false); + + recipe.AddIngredient(ItemID.EoCShield); + recipe.AddIngredient(ItemID.Coral, 10); + recipe.AddIngredient(ModContent.ItemType(), 5); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/TideTurner.png b/Items/Accessories/TideTurner.png new file mode 100644 index 0000000..3a18267 Binary files /dev/null and b/Items/Accessories/TideTurner.png differ diff --git a/Items/Accessories/Wings/ScarabWings.cs b/Items/Accessories/Wings/ScarabWings.cs new file mode 100644 index 0000000..70d68bd --- /dev/null +++ b/Items/Accessories/Wings/ScarabWings.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using Decimation.Items.Misc.CondensedSouls; +using Decimation.Items.Ores; +using Decimation.Projectiles; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Accessories.Wings +{ + [AutoloadEquip(EquipType.Wings)] + internal class ScarabWings : DecimationAccessory + { + protected override string ItemName => "Scarab Wings"; + protected override string ItemTooltip => "Blessed by the sun"; + + protected override void InitAccessory() + { + width = 26; + height = 26; + rarity = Rarity.Red; + + this.item.value = Item.buyPrice(0, 5); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.wingTimeMax = 240; + Lighting.AddLight((int)(player.position.X + player.width / 2f) / 16, + (int)(player.position.Y + player.height / 2f) / 16, 1.05f, 0.95f, 0.55f); + + if ((int)player.wingTime % 2 == 1) + Projectile.NewProjectile(player.Center, new Vector2(0, 0), ModContent.ProjectileType(), 25, 5, + player.whoAmI); + } + + public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, + ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) + { + ascentWhenFalling = 0.85f; + ascentWhenRising = 0.15f; + maxCanAscendMultiplier = 1f; + maxAscentMultiplier = 3f; + constantAscend = 0.135f; + } + + public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) + { + speed = 9f; + acceleration *= 2.5f; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List { ModContent.TileType() }); + + recipe.AddIngredient(ItemID.BeetleWings); + recipe.AddIngredient(ItemID.WingsSolar); + recipe.AddIngredient(ModContent.ItemType(), 2); + recipe.AddIngredient(ModContent.ItemType(), 5); + + return new List { recipe }; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/Wings/ScarabWings.png b/Items/Accessories/Wings/ScarabWings.png new file mode 100644 index 0000000..11bd908 Binary files /dev/null and b/Items/Accessories/Wings/ScarabWings.png differ diff --git a/Items/Accessories/Wings/ScarabWings_Wings.png b/Items/Accessories/Wings/ScarabWings_Wings.png new file mode 100644 index 0000000..3f326a8 Binary files /dev/null and b/Items/Accessories/Wings/ScarabWings_Wings.png differ diff --git a/Items/Ammo/MoltenStyngerBolt.cs b/Items/Ammo/MoltenStyngerBolt.cs new file mode 100644 index 0000000..7381bd5 --- /dev/null +++ b/Items/Ammo/MoltenStyngerBolt.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using Decimation.Buffs.Debuffs; +using Decimation.Items.Misc; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Ammo +{ + internal class MoltenStyngerBolt : DecimationAmmo + { + protected override string ItemName => "Molten Stynger Bolt"; + protected override string ItemTooltip => "Explodes into molten shrapnel."; + protected override string Projectile => "MoltenStyngerBolt"; + protected override int Ammo => AmmoID.StyngerBolt; + + protected override void InitAmmo() + { + width = 8; + height = 8; + damages = 25; + projKnockBack = 1; + rarity = Rarity.Orange; + value = Item.buyPrice(0, 0, 10); + consumable = true; + + this.item.shootSpeed = 2f; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool isCritical) + { + target.AddBuff(ModContent.BuffType(), 600); + } + + public override void OnHitPvp(Player player, Player target, int damage, bool isCritical) + { + player.AddBuff(ModContent.BuffType(), 600); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 50, new List {ModContent.TileType()}); + + recipe.AddIngredient(ItemID.StyngerBolt, 50); + recipe.AddIngredient(ModContent.ItemType(), 5); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Ammo/MoltenStyngerBolt.png b/Items/Ammo/MoltenStyngerBolt.png new file mode 100644 index 0000000..4b9880e Binary files /dev/null and b/Items/Ammo/MoltenStyngerBolt.png differ diff --git a/Items/Ammo/Pebble.cs b/Items/Ammo/Pebble.cs new file mode 100644 index 0000000..705b8a4 --- /dev/null +++ b/Items/Ammo/Pebble.cs @@ -0,0 +1,35 @@ +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Ammo +{ + internal class Pebble : DecimationAmmo + { + protected override string ItemName => "Pebble"; + protected override string ItemTooltip => "For use with slings and slingshots"; + protected override string Projectile => "Pebble"; + protected override int Ammo => ModContent.ItemType(); + + protected override void InitAmmo() + { + damages = 11; + width = 16; + height = 16; + this.item.maxStack = 999; + this.item.consumable = true; + projKnockBack = 1f; + this.item.value = Item.sellPrice(0, 0, 1); + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 15, TileID.WorkBenches); + + recipe.AddIngredient(ItemID.StoneBlock); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Ammo/Pebble.png b/Items/Ammo/Pebble.png new file mode 100644 index 0000000..7552e60 Binary files /dev/null and b/Items/Ammo/Pebble.png differ diff --git a/Items/Ammo/SiphonArrow.cs b/Items/Ammo/SiphonArrow.cs new file mode 100644 index 0000000..5a939d4 --- /dev/null +++ b/Items/Ammo/SiphonArrow.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; +using Decimation.Items.Misc; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Ammo +{ + internal class SiphonArrow : DecimationAmmo + { + protected override string ItemName => "Siphon Arrow"; + protected override string ItemTooltip => "Aspires other's life"; + protected override string Projectile => "SiphonArrow"; + protected override int Ammo => AmmoID.Arrow; + + protected override void InitAmmo() + { + damages = 11; + projKnockBack = 2; + width = 14; + height = 32; + value = Item.buyPrice(0, 0, 0, 55); + + this.item.shootSpeed = 2.5f; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.Anvils}); + + recipe.AddIngredient(ItemID.WoodenArrow, 50); + recipe.AddIngredient(ModContent.ItemType()); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Ammo/SiphonArrow.png b/Items/Ammo/SiphonArrow.png new file mode 100644 index 0000000..286c55d Binary files /dev/null and b/Items/Ammo/SiphonArrow.png differ diff --git a/Items/Ammo/TitanicStyngerBolt.cs b/Items/Ammo/TitanicStyngerBolt.cs new file mode 100644 index 0000000..69fbf4b --- /dev/null +++ b/Items/Ammo/TitanicStyngerBolt.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using Decimation.Buffs.Debuffs; +using Decimation.Items.Ores; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Ammo +{ + internal class TitanicStyngerBolt : DecimationAmmo + { + protected override string ItemName => "Titanic Stynger Bolt"; + protected override string ItemTooltip => "Explodes into deadly shrapnel."; + protected override string Projectile => "TitanicStyngerBolt"; + protected override int Ammo => AmmoID.StyngerBolt; + + protected override void InitAmmo() + { + damages = 35; + projKnockBack = 2; + rarity = Rarity.Orange; + width = 8; + height = 8; + value = Item.buyPrice(0, 0, 10); + consumable = true; + + this.item.shootSpeed = 2f; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) + { + if (Main.rand.NextBool(100)) + target.AddBuff(ModContent.BuffType(), 600); + } + + public override void OnHitPvp(Player player, Player target, int damage, bool crit) + { + if (Main.rand.NextBool(100)) + target.AddBuff(ModContent.BuffType(), 600); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 50, new List {ModContent.TileType()}); + + recipe.AddIngredient(ItemID.StyngerBolt, 50); + recipe.AddIngredient(ModContent.ItemType(), 3); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Ammo/TitanicStyngerBolt.png b/Items/Ammo/TitanicStyngerBolt.png new file mode 100644 index 0000000..c4e2860 Binary files /dev/null and b/Items/Ammo/TitanicStyngerBolt.png differ diff --git a/Items/Amulets/BuildersAmulet.cs b/Items/Amulets/BuildersAmulet.cs new file mode 100644 index 0000000..bfbea75 --- /dev/null +++ b/Items/Amulets/BuildersAmulet.cs @@ -0,0 +1,50 @@ +using System.Collections.Generic; +using Decimation.Core.Amulets; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class BuildersAmulet : Amulet + { + protected override string ItemName => "Builder's Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Builder; + + protected override void InitAmulet() + { + height = 34; + } + + protected override void UpdateAmulet(Player player) + { + player.blockRange += 2; + player.tileSpeed *= 1.05f; + player.wallSpeed *= 1.05f; + + Lighting.AddLight((int) (player.position.X + player.width / 2f) / 16, + (int) (player.position.Y + player.height / 2f) / 16, 1.05f, 0.95f, 0.55f); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}, true); + + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ItemID.CopperHammer); + recipe.AddIngredient(ItemID.Shackle); + recipe.AddIngredient(ItemID.Torch, 10); + recipe.AddIngredient(ItemID.IronBar); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+2 block interaction range") + .AddEffect("+5% tile and wall placement speed") + .AddEffect("Provides light"); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/BuildersAmulet.png b/Items/Amulets/BuildersAmulet.png new file mode 100644 index 0000000..c7406a3 Binary files /dev/null and b/Items/Amulets/BuildersAmulet.png differ diff --git a/Items/Amulets/CreatorAmulet.cs b/Items/Amulets/CreatorAmulet.cs new file mode 100644 index 0000000..65f1ea3 --- /dev/null +++ b/Items/Amulets/CreatorAmulet.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using Decimation.Core.Amulets; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class CreatorAmulet : Amulet + { + protected override string ItemName => "Creator's Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Creator; + + protected override void InitAmulet() + { + height = 32; + } + + protected override void UpdateAmulet(Player player) + { + player.blockRange += 2; + player.tileSpeed *= 1.04f; + player.meleeSpeed *= 1.04f; + player.pickSpeed *= 1.03f; + + player.AddBuff(BuffID.NightOwl, 1); + Lighting.AddLight((int) (player.position.X + player.width / 2f) / 16, + (int) (player.position.Y + player.height / 2f) / 16, 1, 1, 1); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.MiningHelmet); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+4% tile placement speed") + .AddEffect("+4% melee speed") + .AddEffect("+4% mining speed") + .AddEffect("+2 block interaction range") + .AddEffect("Provides light") + .AddEffect("Provides Night Owl buff"); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/CreatorAmulet.png b/Items/Amulets/CreatorAmulet.png new file mode 100644 index 0000000..a87cab4 Binary files /dev/null and b/Items/Amulets/CreatorAmulet.png differ diff --git a/Items/Amulets/CrystalAmulet.cs b/Items/Amulets/CrystalAmulet.cs new file mode 100644 index 0000000..76d34fe --- /dev/null +++ b/Items/Amulets/CrystalAmulet.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using Decimation.Core.Amulets; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class CrystalAmulet : Amulet + { + protected override string ItemName => "Crystal Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Mage; + + protected override void InitAmulet() + { + height = 32; + } + + protected override void UpdateAmulet(Player player) + { + player.statManaMax2 += 5; + player.magicDamage *= 1.03f; + player.magicCrit += 3; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}); + + recipe.AddRecipeGroup("AnyGem", 2); + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ItemID.ManaCrystal); + recipe.AddIngredient(ItemID.ManaRegenerationBand); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+5 maximum mana") + .AddEffect("+3% magic damages") + .AddEffect("+3% magic critical strike chances") + .AddEffect("+4% chances to shoot out a burst of crystal shards when taking damages") + .AddSynergy( + "Causes all basics staffs to burst into a quad spread of crystals on hit, dealing a small amount of extra damages"); + } + } + + public class CrystalAmuletSynergy : GlobalProjectile + { + private const double BaseAngle = Math.PI / 2; + + private static readonly List Bolts = new List + { + ProjectileID.AmethystBolt, + ProjectileID.DiamondBolt, + ProjectileID.EmeraldBolt, + ProjectileID.RubyBolt, + ProjectileID.SapphireBolt, + ProjectileID.TopazBolt + }; + + public override void Kill(Projectile projectile, int timeLeft) + { + if (Main.LocalPlayer.GetModPlayer().AmuletSlotItem.type == + ModContent.ItemType() && Bolts.Contains(projectile.type)) + // Create 4 crystal sparks in 4 different direction + for (int i = 1; i <= 4; i++) + { + double angle = BaseAngle * i; + float velocityX = (float) (Math.Cos(angle) - Math.Sin(angle)) * 2f; + float velocityY = (float) (Math.Sin(angle) + Math.Cos(angle)) * 2f; + Projectile spark = Projectile.NewProjectileDirect(projectile.Center, + new Vector2(velocityX, velocityY), ProjectileID.CrystalShard, 20, 5, Main.LocalPlayer.whoAmI); + spark.hostile = false; + spark.friendly = true; + } + } + } +} \ No newline at end of file diff --git a/Items/Amulets/CrystalAmulet.png b/Items/Amulets/CrystalAmulet.png new file mode 100644 index 0000000..8648676 Binary files /dev/null and b/Items/Amulets/CrystalAmulet.png differ diff --git a/Items/Amulets/FireAmulet.cs b/Items/Amulets/FireAmulet.cs new file mode 100644 index 0000000..3610059 --- /dev/null +++ b/Items/Amulets/FireAmulet.cs @@ -0,0 +1,60 @@ +using System.Collections.Generic; +using Decimation.Buffs.Debuffs; +using Decimation.Core.Amulets; +using Decimation.Core.Amulets.Synergy; +using Decimation.Items.Accessories; +using Decimation.Synergies; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class FireAmulet : Amulet + { + protected override string ItemName => "Fire Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Melee; + public override IAmuletsSynergy Synergy => new FireAmuletSynergy(); + + protected override void InitAmulet() + { + height = 34; + } + + protected override void UpdateAmulet(Player player) + { + player.meleeDamage *= 1.03f; + player.meleeSpeed *= 1.03f; + player.meleeCrit += 3; + player.lavaMax += 420; + + DecimationPlayer modPlayer = player.GetModPlayer(); + modPlayer.amuletsBuff = ModContent.BuffType(); + modPlayer.amuletsBuffChances = 4; + modPlayer.amuletsBuffTime = 300; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.Obsidian, 6); + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ItemID.Gel, 20); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+3% melee speed") + .AddEffect("+3% melee damages") + .AddEffect("+3% melee critical strike chances") + .AddEffect("+7 seconds of immunity to lava") + .AddEffect("+4% chances to inflict \"Slimed!\" debuff to ennemies on strikes") + .AddSynergy("The lava charm grant an additional 5 seconds of lava immunity"); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/FireAmulet.png b/Items/Amulets/FireAmulet.png new file mode 100644 index 0000000..3c880f0 Binary files /dev/null and b/Items/Amulets/FireAmulet.png differ diff --git a/Items/Amulets/FrostAmulet.cs b/Items/Amulets/FrostAmulet.cs new file mode 100644 index 0000000..adcec3a --- /dev/null +++ b/Items/Amulets/FrostAmulet.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using Decimation.Core.Amulets; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class FrostAmulet : Amulet + { + protected override string ItemName => "Frost Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Ranger; + + protected override void InitAmulet() + { + height = 32; + } + + protected override void UpdateAmulet(Player player) + { + player.rangedDamage *= 1.03f; + player.rangedCrit += 3; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}); + + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ItemID.IceBlock, 20); + recipe.AddIngredient(ItemID.Lens, 2); + recipe.AddIngredient(ItemID.ArcheryPotion); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+3% ranged damages") + .AddEffect("+3% ranged velocity") + .AddEffect("+3% ranged critical strike chances") + .AddEffect("+2% chance to not consume ammo") + .AddEffect("+4% chance that arrows will inflict \"Forstburn\""); + } + } + + public class FrostAmuletRangedEffect : GlobalNPC + { + public override void OnHitByProjectile(NPC npc, Projectile projectile, int damage, float knockback, bool crit) + { + if (Main.LocalPlayer.GetModPlayer().AmuletSlotItem.type == + ModContent.ItemType() && projectile.arrow && Main.rand.NextBool(25)) + npc.AddBuff(BuffID.Frostburn, 300); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/FrostAmulet.png b/Items/Amulets/FrostAmulet.png new file mode 100644 index 0000000..0e300a9 Binary files /dev/null and b/Items/Amulets/FrostAmulet.png differ diff --git a/Items/Amulets/GraniteAmulet.cs b/Items/Amulets/GraniteAmulet.cs new file mode 100644 index 0000000..0b64eb0 --- /dev/null +++ b/Items/Amulets/GraniteAmulet.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using Decimation.Core.Amulets; +using Decimation.Core.Amulets.Synergy; +using Decimation.Items.Accessories; +using Decimation.Synergies; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class GraniteAmulet : Amulet + { + protected override string ItemName => "Granite Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Tank; + public override IAmuletsSynergy Synergy => new GraniteAmuletSynergy(); + + protected override void UpdateAmulet(Player player) + { + player.statDefense += 1; + + if (player.statLife >= player.statLifeMax * 0.75f) + { + player.moveSpeed *= 0.95f; + player.statDefense = (int) (player.statDefense * 1.05f); + player.noKnockback = true; + } + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ItemID.Granite, 6); + recipe.AddIngredient(ItemID.Gel, 20); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+1 to defense") + .AddEffect("-3% of incoming damage to team members (WIP)") + .AddEffect( + $"When above {Main.LocalPlayer.statLifeMax * 0.75f} hp, your are slowed by 5%, but your defense is increased by 5% and the knockback is cancelled") + .AddSynergy( + "Cobalt Shield, Ankh Shield, Paladins Shield and Obsidian Shield gives 10% chance to block attacks"); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/GraniteAmulet.png b/Items/Amulets/GraniteAmulet.png new file mode 100644 index 0000000..37270e2 Binary files /dev/null and b/Items/Amulets/GraniteAmulet.png differ diff --git a/Items/Amulets/HealtyAmulet.cs b/Items/Amulets/HealtyAmulet.cs new file mode 100644 index 0000000..267f10e --- /dev/null +++ b/Items/Amulets/HealtyAmulet.cs @@ -0,0 +1,47 @@ +using System.Collections.Generic; +using Decimation.Core.Amulets; +using Decimation.Items.Misc; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class HealtyAmulet : Amulet + { + protected override string ItemName => "Healty Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Healer; + + protected override void UpdateAmulet(Player player) + { + player.statManaMax2 += 10; + player.statLifeMax2 += (int) (player.statLifeMax * 0.05f); + + if (player.GetModPlayer().isInCombat && + player.GetModPlayer().enchantedHeartDropTime % 300 == 0) + Item.NewItem(new Vector2(player.position.X, player.position.Y), ModContent.ItemType()); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}); + + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ItemID.LifeCrystal); + recipe.AddIngredient(ItemID.BottledHoney); + recipe.AddIngredient(ItemID.Gel, 5); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+10 to maximum mana") + .AddEffect("+5% to maximum life") + .AddEffect("Drop enchanted hearts each 5 seconds when you are in combat") + .AddEffect("Your lifesteal will be given to your allies (WIP)"); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/HealtyAmulet.png b/Items/Amulets/HealtyAmulet.png new file mode 100644 index 0000000..642b1ec Binary files /dev/null and b/Items/Amulets/HealtyAmulet.png differ diff --git a/Items/Amulets/MarbleAmulet.cs b/Items/Amulets/MarbleAmulet.cs new file mode 100644 index 0000000..cda28b2 --- /dev/null +++ b/Items/Amulets/MarbleAmulet.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using Decimation.Core.Amulets; +using Decimation.Core.Amulets.Synergy; +using Decimation.Items.Accessories; +using Decimation.Synergies; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class MarbleAmulet : Amulet + { + protected override string ItemName => "Marble Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Throwing; + public override IAmuletsSynergy Synergy => new MarbleAmuletSynergy(); + + protected override void UpdateAmulet(Player player) + { + player.thrownDamage *= 1.03f; + player.thrownVelocity *= 1.03f; + player.thrownCrit += 3; + + DecimationPlayer modPlayer = player.GetModPlayer(); + modPlayer.amuletsBuff = BuffID.Confused; + modPlayer.amuletsBuffTime = 300; + modPlayer.amuletsBuffChances = 4; + modPlayer.amuletsBuffWhenAttacking = true; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.Marble, 6); + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ItemID.Shuriken, 2); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+3% throwing damages") + .AddEffect("+3% throwing velocity") + .AddEffect("+3% throwing critical strikes chances") + .AddEffect("+2% chances to not consume ammo on throwing attacks") + .AddEffect("+4% chances to inflict confusion to enemies on throwing attacks") + .AddSynergy( + "Javelins, Shurikens, Throwing Knives, Bone Throwing Knives, Star Anises, Bone Javelins,\nPoisoned Throwing Knives and Frost Daggerfish to have 25% chance to throw a second projectile."); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/MarbleAmulet.png b/Items/Amulets/MarbleAmulet.png new file mode 100644 index 0000000..b6297d6 Binary files /dev/null and b/Items/Amulets/MarbleAmulet.png differ diff --git a/Items/Amulets/MinersAmulet.cs b/Items/Amulets/MinersAmulet.cs new file mode 100644 index 0000000..222b079 --- /dev/null +++ b/Items/Amulets/MinersAmulet.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using Decimation.Core.Amulets; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class MinersAmulet : Amulet + { + protected override string ItemName => "Miner's Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Miner; + + protected override void InitAmulet() + { + height = 32; + } + + protected override void UpdateAmulet(Player player) + { + player.pickSpeed *= 1.03f; + player.meleeSpeed *= 1.04f; + player.blockRange += 1; + Lighting.AddLight((int) (player.position.X + player.width / 2f) / 16, + (int) (player.position.Y + player.height / 2f) / 16, 1, 1, 1); + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.TinkerersWorkbench}, true); + + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ItemID.Torch, 10); + recipe.AddIngredient(ItemID.CopperPickaxe); + recipe.AddIngredient(ItemID.IronOre, 2); + + return new List {recipe}; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("+3% mining speed") + .AddEffect("+4% melee speed") + .AddEffect("+1 block interaction range") + .AddEffect("Provides light"); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/MinersAmulet.png b/Items/Amulets/MinersAmulet.png new file mode 100644 index 0000000..d4abb80 Binary files /dev/null and b/Items/Amulets/MinersAmulet.png differ diff --git a/Items/Amulets/SlimeAmulet.cs b/Items/Amulets/SlimeAmulet.cs new file mode 100644 index 0000000..edd72d4 --- /dev/null +++ b/Items/Amulets/SlimeAmulet.cs @@ -0,0 +1,115 @@ +using System.Collections.Generic; +using Decimation.Buffs.Debuffs; +using Decimation.Items.Accessories; +using Decimation.Core.Amulets; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Amulets +{ + internal class SlimeAmulet : Amulet + { + protected override string ItemName => "Slime Amulet"; + public override AmuletClasses AmuletClass => AmuletClasses.Summoner; + + protected override void InitAmulet() + { + width = 24; + height = 24; + } + + protected override void UpdateAmulet(Player player) + { + player.minionDamage *= 0.03f; + player.minionKB *= 0.03f; + player.npcTypeNoAggro[1] = true; + player.npcTypeNoAggro[16] = true; + player.npcTypeNoAggro[59] = true; + player.npcTypeNoAggro[71] = true; + player.npcTypeNoAggro[81] = true; + player.npcTypeNoAggro[121] = true; + player.npcTypeNoAggro[122] = true; + player.npcTypeNoAggro[138] = true; + player.npcTypeNoAggro[147] = true; + player.npcTypeNoAggro[183] = true; + player.npcTypeNoAggro[184] = true; + player.npcTypeNoAggro[187] = true; + player.npcTypeNoAggro[204] = true; + player.npcTypeNoAggro[225] = true; + player.npcTypeNoAggro[244] = true; + player.npcTypeNoAggro[302] = true; + player.npcTypeNoAggro[304] = true; + player.npcTypeNoAggro[333] = true; + player.npcTypeNoAggro[334] = true; + player.npcTypeNoAggro[335] = true; + player.npcTypeNoAggro[336] = true; + player.npcTypeNoAggro[535] = true; + player.npcTypeNoAggro[537] = true; + + DecimationPlayer modPlayer = player.GetModPlayer(); + modPlayer.amuletsBuff = ModContent.BuffType(); + modPlayer.amuletsBuffChances = 4; + modPlayer.amuletsBuffTime = 300; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List { TileID.TinkerersWorkbench }, true); + + recipe.AddIngredient(ItemID.RoyalGel); + recipe.AddIngredient(ItemID.Gel, 10); + recipe.AddIngredient(ItemID.Chain, 2); + recipe.AddIngredient(ModContent.ItemType()); + + return new List { recipe }; + } + + protected override void GetAmuletTooltip(ref AmuletTooltip tooltip) + { + tooltip + .AddEffect("Makes slimes friendly") + .AddEffect("+3% minion damages") + .AddEffect("+3% minion knockback") + .AddEffect("+4% chances to inflict \"Slimed!\" debuff to enemies on strikes") + .AddSynergy("Causes summoned Baby Slimes to shoot two slime spikes in a V formation, each 5 seconds."); + } + } + + public class SlimeAmuletSynergy : GlobalProjectile + { + private const int SpikeInterval = 300; + + private int _spikeIntervalCounter; + public override bool InstancePerEntity => true; + + public override void AI(Projectile projectile) + { + if (projectile.type == ProjectileID.BabySlime) + { + if (Main.LocalPlayer.GetModPlayer().AmuletSlotItem.type == + ModContent.ItemType()) + { + if (_spikeIntervalCounter > SpikeInterval) + { + // Projectile + Projectile proj1 = Projectile.NewProjectileDirect(projectile.Center, new Vector2(-1, -2.5f), ProjectileID.JungleSpike, 10, 10); + proj1.friendly = true; + proj1.hostile = false; + + Projectile proj2 = Projectile.NewProjectileDirect(projectile.Center, new Vector2(1, -2.5f), ProjectileID.JungleSpike, 10, 10); + proj2.friendly = true; + proj2.hostile = false; + + _spikeIntervalCounter = 0; + } + + _spikeIntervalCounter++; + } + } + + base.AI(projectile); + } + } +} \ No newline at end of file diff --git a/Items/Amulets/SlimeAmulet.png b/Items/Amulets/SlimeAmulet.png new file mode 100644 index 0000000..c21976f Binary files /dev/null and b/Items/Amulets/SlimeAmulet.png differ diff --git a/Items/Armors/ScarabArmor/ScarabBody.cs b/Items/Armors/ScarabArmor/ScarabBody.cs new file mode 100644 index 0000000..bf378df --- /dev/null +++ b/Items/Armors/ScarabArmor/ScarabBody.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Decimation.Tiles; +using Decimation.Items.Misc.Souls; +using Decimation.Core.Items; +using Decimation.Core.Util; + +namespace Decimation.Items.Armors.ScarabArmor +{ + [AutoloadEquip(EquipType.Body)] + class ScarabBody : DecimationItem + { + protected override string ItemName => "Solar Scarab Shell"; + protected override string ItemTooltip => "Immunity to knockback" + + "\n25% increased melee damages" + + "\nEnemies are more likely to target you"; + + protected override void Init() + { + width = 38; + height = 22; + rarity = Rarity.Red; + + item.maxStack = 1; + item.defense = 45; + } + + public override void UpdateEquip(Player player) + { + player.meleeDamage *= 1.25f; + player.aggro += 250; + player.noKnockback = true; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List() { ModContent.TileType() }, false); + + recipe.AddIngredient(ItemID.SolarFlareBreastplate); + recipe.AddIngredient(ItemID.BeetleShell); + recipe.AddIngredient(ItemID.LunarOre, 20); + recipe.AddIngredient(ItemID.SoulofMight, 5); + recipe.AddIngredient(ItemID.SoulofFright, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.LavaBucket); + + return new List() { recipe }; + } + } +} diff --git a/Items/Armors/ScarabArmor/ScarabBody.png b/Items/Armors/ScarabArmor/ScarabBody.png new file mode 100644 index 0000000..df5b9b9 Binary files /dev/null and b/Items/Armors/ScarabArmor/ScarabBody.png differ diff --git a/Items/Armors/ScarabArmor/ScarabBody_Arms.png b/Items/Armors/ScarabArmor/ScarabBody_Arms.png new file mode 100644 index 0000000..fcb4bcb Binary files /dev/null and b/Items/Armors/ScarabArmor/ScarabBody_Arms.png differ diff --git a/Items/Armors/ScarabArmor/ScarabBody_Body.png b/Items/Armors/ScarabArmor/ScarabBody_Body.png new file mode 100644 index 0000000..6f1d654 Binary files /dev/null and b/Items/Armors/ScarabArmor/ScarabBody_Body.png differ diff --git a/Items/Armors/ScarabArmor/ScarabBody_FemaleBody.png b/Items/Armors/ScarabArmor/ScarabBody_FemaleBody.png new file mode 100644 index 0000000..ca9ffc4 Binary files /dev/null and b/Items/Armors/ScarabArmor/ScarabBody_FemaleBody.png differ diff --git a/Items/Armors/ScarabArmor/ScarabHelmet.cs b/Items/Armors/ScarabArmor/ScarabHelmet.cs new file mode 100644 index 0000000..6d0f53a --- /dev/null +++ b/Items/Armors/ScarabArmor/ScarabHelmet.cs @@ -0,0 +1,136 @@ +using System.Collections.Generic; +using Decimation.Buffs.Buffs; +using Decimation.Items.Misc.Souls; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Armors.ScarabArmor +{ + [AutoloadEquip(EquipType.Head)] + internal class ScarabHelmet : DecimationItem + { + protected override string ItemName => "Solar Scarab Helmet"; + + protected override string ItemTooltip => "25 % increased melee critical hit chances" + + "\nEnemis are more likely to target you"; + + protected override void Init() + { + width = 26; + height = 26; + rarity = Rarity.Red; + + this.item.maxStack = 1; + this.item.defense = 30; + } + + public override void UpdateEquip(Player player) + { + player.meleeCrit += 25; + player.aggro += 250; + Lighting.AddLight((int) (player.position.X + player.width / 2f) / 16, + (int) (player.position.Y + player.height / 2f) / 16, 1.05f, 0.95f, 0.55f); + } + + public override bool IsArmorSet(Item head, Item body, Item legs) + { + if (head.type == item.type && body.type == ModContent.ItemType() && + legs.type == ModContent.ItemType()) + return true; + return false; + } + + public override void UpdateArmorSet(Player player) + { + DecimationPlayer modPlayer = player.GetModPlayer(); + + player.AddBuff(ModContent.BuffType(), 1); + player.arrowDamage *= 1.05f; + player.bulletDamage *= 1.05f; + player.magicDamage *= 1.05f; + player.meleeDamage *= 1.05f; + player.minionDamage *= 1.05f; + player.rangedDamage *= 1.05f; + player.rocketDamage *= 1.05f; + player.thrownDamage *= 1.05f; + player.buffImmune[BuffID.OnFire] = true; + player.buffImmune[BuffID.CursedInferno] = true; + player.lavaImmune = true; + + player.setSolar = true; + player.setBonus = + "Summons scarabs to protect you, add 5% damages to each attacks, gives immunity to On Fire!, Cursed Inferno and Lava."; + modPlayer.solarCounter++; + int num11 = 240; + if (modPlayer.solarCounter >= num11) + { + if (player.solarShields > 0 && player.solarShields < 3) + for (int num12 = 0; num12 < 22; num12++) + if (player.buffType[num12] >= 170 && player.buffType[num12] <= 171) + player.DelBuff(num12); + if (player.solarShields < 3) + { + player.AddBuff(170 + player.solarShields, 5, false); + for (int num13 = 0; num13 < 16; num13++) + { + Dust dust = Main.dust[ + Dust.NewDust(player.position, player.width, player.height, 6, 0f, 0f, 100)]; + dust.noGravity = true; + dust.scale = 1.7f; + dust.fadeIn = 0.5f; + Dust dust2 = dust; + dust2.velocity *= 5f; + dust.shader = GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player); + } + + modPlayer.solarCounter = 0; + } + else + { + modPlayer.solarCounter = num11; + } + } + + for (int num14 = player.solarShields; num14 < 3; num14++) player.solarShieldPos[num14] = Vector2.Zero; + for (int num15 = 0; num15 < player.solarShields; num15++) + { + player.solarShieldPos[num15] += player.solarShieldVel[num15]; + Vector2 value = (player.miscCounter / 100f * 6.28318548f + num15 * (6.28318548f / player.solarShields)) + .ToRotationVector2() * 6f; + value.X = player.direction * 20; + player.solarShieldVel[num15] = (value - player.solarShieldPos[num15]) * 0.2f; + } + + if (player.dashDelay >= 0) + { + player.solarDashing = false; + player.solarDashConsumedFlare = false; + } + + bool flag = player.solarDashing && player.dashDelay < 0; + if ((player.solarShields > 0) | flag) player.dash = 3; + } + + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {ModContent.TileType()}); + + recipe.AddIngredient(ItemID.SolarFlareHelmet); + recipe.AddIngredient(ItemID.BeetleHelmet); + recipe.AddIngredient(ItemID.LunarOre, 15); + recipe.AddIngredient(ItemID.SoulofMight, 5); + recipe.AddIngredient(ItemID.SoulofFright, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.LavaBucket); + + return new List {recipe}; + } + } +} \ No newline at end of file diff --git a/Items/Armors/ScarabArmor/ScarabHelmet.png b/Items/Armors/ScarabArmor/ScarabHelmet.png new file mode 100644 index 0000000..60d8fae Binary files /dev/null and b/Items/Armors/ScarabArmor/ScarabHelmet.png differ diff --git a/Items/Armors/ScarabArmor/ScarabHelmet_Head.png b/Items/Armors/ScarabArmor/ScarabHelmet_Head.png new file mode 100644 index 0000000..01c1ee9 Binary files /dev/null and b/Items/Armors/ScarabArmor/ScarabHelmet_Head.png differ diff --git a/Items/Armors/ScarabArmor/ScarabLeggings.cs b/Items/Armors/ScarabArmor/ScarabLeggings.cs new file mode 100644 index 0000000..6c37901 --- /dev/null +++ b/Items/Armors/ScarabArmor/ScarabLeggings.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Decimation.Tiles; +using Decimation.Items.Misc.Souls; +using Decimation.Core.Items; +using Decimation.Core.Util; + +namespace Decimation.Items.Armors.ScarabArmor +{ + [AutoloadEquip(EquipType.Legs)] + class ScarabLeggings : DecimationItem + { + protected override string ItemName => "Solar Scarab Greaves"; + + protected override string ItemTooltip => "Immunity to fire blocks" + + "\n20% increased movement and melee speed" + + "\nEnemies are more likely to target you"; + + protected override void Init() + { + width = 26; + height = 18; + rarity = Rarity.Red; + + item.maxStack = 1; + item.defense = 30; + } + + public override void UpdateEquip(Player player) + { + player.meleeSpeed *= 1.20f; + player.moveSpeed *= 1.20f; + player.aggro += 250; + player.fireWalk = true; + } + + protected override List GetAdditionalRecipes() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List() { ModContent.TileType() }); + + recipe.AddIngredient(ItemID.SolarFlareLeggings); + recipe.AddIngredient(ItemID.BeetleLeggings); + recipe.AddIngredient(ItemID.LunarOre, 6); + recipe.AddIngredient(ItemID.SoulofMight, 5); + recipe.AddIngredient(ItemID.SoulofFright, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.LavaBucket); + + return new List() { recipe }; + } + } +} diff --git a/Items/Armors/ScarabArmor/ScarabLeggings.png b/Items/Armors/ScarabArmor/ScarabLeggings.png new file mode 100644 index 0000000..d3c3345 Binary files /dev/null and b/Items/Armors/ScarabArmor/ScarabLeggings.png differ diff --git a/Items/Armors/ScarabArmor/ScarabLeggings_Legs.png b/Items/Armors/ScarabArmor/ScarabLeggings_Legs.png new file mode 100644 index 0000000..1875a06 Binary files /dev/null and b/Items/Armors/ScarabArmor/ScarabLeggings_Legs.png differ diff --git a/Items/Boss/Arachnus/ArachnusTreasureBag.cs b/Items/Boss/Arachnus/ArachnusTreasureBag.cs new file mode 100644 index 0000000..92e66d8 --- /dev/null +++ b/Items/Boss/Arachnus/ArachnusTreasureBag.cs @@ -0,0 +1,47 @@ +using Decimation.Items.Accessories; +using Decimation.Items.Weapons.Arachnus; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Items.Boss.Arachnus +{ + internal class ArachnusTreasureBag : DecimationItem + { + protected override string ItemName => "Treasure Bag"; + protected override string ItemTooltip => "{$CommonItemTooltip.RightClickToOpen}"; + public override int BossBagNPC => ModContent.NPCType(); + + protected override void Init() + { + consumable = true; + width = 32; + height = 32; + rarity = Rarity.Cyan; + + this.item.expert = true; + this.item.maxStack = 999; + } + + public override bool CanRightClick() + { + return true; + } + + public override void OpenBossBag(Player player) + { + player.TryGettingDevArmor(); + + int rand = Main.rand.Next(3); + if (rand == 0) + player.QuickSpawnItem(ModContent.ItemType()); + else if (rand == 1) + player.QuickSpawnItem(ModContent.ItemType()); + else if (rand == 2) + player.QuickSpawnItem(ModContent.ItemType()); + + player.QuickSpawnItem(ModContent.ItemType()); + } + } +} \ No newline at end of file diff --git a/Items/Boss/Arachnus/ArachnusTreasureBag.png b/Items/Boss/Arachnus/ArachnusTreasureBag.png new file mode 100644 index 0000000..c25f17c Binary files /dev/null and b/Items/Boss/Arachnus/ArachnusTreasureBag.png differ diff --git a/Items/Boss/Arachnus/MoltenArachnidsAmulet.cs b/Items/Boss/Arachnus/MoltenArachnidsAmulet.cs new file mode 100644 index 0000000..e02ccb5 --- /dev/null +++ b/Items/Boss/Arachnus/MoltenArachnidsAmulet.cs @@ -0,0 +1,40 @@ +using Decimation.Items.Misc; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Boss.Arachnus +{ + internal class MoltenArachnidsAmulet : DecimationItem + { + protected override string ItemName => "Molten Arachnid's Amulet"; + protected override string ItemTooltip => "Infuriates the guardian of the planet's core."; + + protected override void Init() + { + width = 32; + height = 32; + value = Item.buyPrice(0, 45); + rarity = Rarity.Red; + consumable = true; + useStyle = 4; + useAnimation = 30; + useTime = 30; + + this.item.maxStack = 1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ItemID.FragmentSolar, 3); + recipe.AddIngredient(ModContent.ItemType()); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Boss/Arachnus/MoltenArachnidsAmulet.png b/Items/Boss/Arachnus/MoltenArachnidsAmulet.png new file mode 100644 index 0000000..cb9446f Binary files /dev/null and b/Items/Boss/Arachnus/MoltenArachnidsAmulet.png differ diff --git a/Items/Boss/Arachnus/MoltenKey.png b/Items/Boss/Arachnus/MoltenKey.png new file mode 100644 index 0000000..073534b Binary files /dev/null and b/Items/Boss/Arachnus/MoltenKey.png differ diff --git a/Items/Boss/Arachnus/Moltenkey.cs b/Items/Boss/Arachnus/Moltenkey.cs new file mode 100644 index 0000000..f607a7c --- /dev/null +++ b/Items/Boss/Arachnus/Moltenkey.cs @@ -0,0 +1,35 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Boss.Arachnus +{ + internal class MoltenKey : DecimationItem + { + protected override string ItemName => "Molten Key"; + protected override string ItemTooltip => "A strange key used to open a forbidden temple deep inside this world"; + + protected override void Init() + { + width = 20; + height = 20; + consumable = true; + value = Item.buyPrice(0, 45); + rarity = Rarity.Red; + + this.item.maxStack = 1; + } + + public class DropFromMoonLord : GlobalNPC + { + public override void NPCLoot(NPC npc) + { + if (npc.type == NPCID.MoonLordCore) + Item.NewItem((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height, + ModContent.ItemType()); + } + } + } +} \ No newline at end of file diff --git a/Items/Boss/Bloodshot/BloodiedMaw.cs b/Items/Boss/Bloodshot/BloodiedMaw.cs new file mode 100644 index 0000000..e822432 --- /dev/null +++ b/Items/Boss/Bloodshot/BloodiedMaw.cs @@ -0,0 +1,61 @@ +using Decimation.Items.Misc; +using Decimation.NPCs.Bloodshot; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Boss.Bloodshot +{ + internal class BloodiedMaw : DecimationItem + { + protected override string ItemName => "Bloodied Maw"; + protected override string ItemTooltip => "{$CommonItemTooltip.RightClickToOpen}"; + + protected override void Init() + { + width = 20; + height = 24; + consumable = true; + useStyle = 4; + useAnimation = 30; + useTime = 30; + + this.item.maxStack = 1; + } + + public override bool CanUseItem(Player player) + { + return !Main.dayTime || !NPC.AnyNPCs(ModContent.NPCType()); + } + + public override bool UseItem(Player player) + { + if (Main.netMode == 0) + { + Main.PlaySound(15, (int) player.position.X, (int) player.position.Y, 0); + NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + } + else + { + ModPacket packet = this.mod.GetPacket(); + packet.Write((byte) DecimationModMessageType.SpawnBoss); + packet.Write(ModContent.NPCType()); + packet.Write(player.whoAmI); + packet.Send(); + } + + return true; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.DemonAltar); + + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.Lens); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Boss/Bloodshot/BloodiedMaw.png b/Items/Boss/Bloodshot/BloodiedMaw.png new file mode 100644 index 0000000..a74a1c3 Binary files /dev/null and b/Items/Boss/Bloodshot/BloodiedMaw.png differ diff --git a/Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs b/Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs new file mode 100644 index 0000000..82c6205 --- /dev/null +++ b/Items/Boss/Bloodshot/TreasureBagBloodshotEye.cs @@ -0,0 +1,63 @@ +using Decimation.Items.Accessories; +using Decimation.Items.Misc; +using Decimation.Items.Weapons.Bloodshot; +using Decimation.NPCs.Bloodshot; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Items.Boss.Bloodshot +{ + internal class TreasureBagBloodshotEye : DecimationItem + { + protected override string ItemName => "Treasure Bag"; + protected override string ItemTooltip => "{$CommonItemTooltip.RightClickToOpen}"; + public override int BossBagNPC => ModContent.NPCType(); + + protected override void Init() + { + consumable = true; + width = 24; + height = 24; + rarity = Rarity.Rainbow; + + this.item.expert = true; + } + + public override bool CanRightClick() + { + return true; + } + + public override void OpenBossBag(Player player) + { + player.QuickSpawnItem(ModContent.ItemType(), Main.rand.Next(35, 51)); + player.QuickSpawnItem(ModContent.ItemType()); + + int random = Main.rand.Next(3); + int weapon = 0; + + switch (random) + { + case 0: + weapon = ModContent.ItemType(); + break; + case 1: + weapon = ModContent.ItemType(); + break; + case 2: + weapon = ModContent.ItemType(); + break; + default: + Main.NewText( + "Unexpected error in Bloodshot Eye drops: weapon drop random is out of range (" + random + ").", + Color.Red); + break; + } + + player.QuickSpawnItem(weapon); + } + } +} \ No newline at end of file diff --git a/Items/Boss/Bloodshot/TreasureBagBloodshotEye.png b/Items/Boss/Bloodshot/TreasureBagBloodshotEye.png new file mode 100644 index 0000000..ee2c018 Binary files /dev/null and b/Items/Boss/Bloodshot/TreasureBagBloodshotEye.png differ diff --git a/Items/Boss/DuneWorm/DesertDessert.cs b/Items/Boss/DuneWorm/DesertDessert.cs new file mode 100644 index 0000000..10e3d0e --- /dev/null +++ b/Items/Boss/DuneWorm/DesertDessert.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; +using Decimation.NPCs.AncientDuneWorm; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Boss.DuneWorm +{ + internal class DesertDessert : DecimationItem + { + protected override string ItemName => "Desert Dessert"; + protected override string ItemTooltip => "Summons the Ancient Dune Worm"; + + protected override void Init() + { + width = 32; + height = 32; + value = Item.buyPrice(0, 0, 13); + useStyle = 4; + useAnimation = 30; + useTime = 30; + consumable = true; + + this.item.maxStack = 20; + } + + public override bool UseItem(Player player) + { + if (player.ZoneDesert) + { + if (Main.netMode == 0) + { + Main.PlaySound(15, (int) player.position.X, (int) player.position.Y, 0); + NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + return true; + } + + ModPacket packet = this.mod.GetPacket(); + packet.Write((byte) DecimationModMessageType.SpawnBoss); + packet.Write(ModContent.NPCType()); + packet.Write(player.whoAmI); + packet.Send(); + } + + return false; + } + + protected override ModRecipe GetRecipe() //How to craft this item + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.Anvils}); + + recipe.AddIngredient(ItemID.SandBlock, 10); + recipe.AddIngredient(ItemID.WormTooth, 5); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Boss/DuneWorm/DesertDessert.png b/Items/Boss/DuneWorm/DesertDessert.png new file mode 100644 index 0000000..5130212 Binary files /dev/null and b/Items/Boss/DuneWorm/DesertDessert.png differ diff --git a/Items/Boss/DuneWorm/DuneWormTreasureBag.cs b/Items/Boss/DuneWorm/DuneWormTreasureBag.cs new file mode 100644 index 0000000..d63c0a3 --- /dev/null +++ b/Items/Boss/DuneWorm/DuneWormTreasureBag.cs @@ -0,0 +1,46 @@ +using Decimation.Items.Misc.Souls; +using Decimation.Items.Placeable.DuneWorm; +using Decimation.Items.Tools; +using Decimation.Items.Vanity.DuneWorm; +using Decimation.NPCs.AncientDuneWorm; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Boss.DuneWorm +{ + internal class DuneWormTreasureBag : DecimationItem + { + protected override string ItemName => "Treasure Bag"; + protected override string ItemTooltip => "Right click to open"; + public override int BossBagNPC => ModContent.NPCType(); + + protected override void Init() + { + consumable = true; + width = 24; + height = 24; + rarity = Rarity.Rainbow; + + this.item.expert = true; + } + + public override bool CanRightClick() + { + return true; + } + + public override void OpenBossBag(Player player) + { + player.QuickSpawnItem(ModContent.ItemType(), Main.rand.Next(20, 35)); + player.QuickSpawnItem(ItemID.FossilOre, Main.rand.Next(10, 15)); + player.QuickSpawnItem(ModContent.ItemType()); + if (Main.rand.Next(7) == 0) + player.QuickSpawnItem(ModContent.ItemType()); + if (Main.rand.NextBool(13)) + player.QuickSpawnItem(ModContent.ItemType()); + } + } +} \ No newline at end of file diff --git a/Items/Boss/DuneWorm/DuneWormTreasureBag.png b/Items/Boss/DuneWorm/DuneWormTreasureBag.png new file mode 100644 index 0000000..eb2b76f Binary files /dev/null and b/Items/Boss/DuneWorm/DuneWormTreasureBag.png differ diff --git a/Items/CursedItem.cs b/Items/CursedItem.cs new file mode 100644 index 0000000..48c357b --- /dev/null +++ b/Items/CursedItem.cs @@ -0,0 +1,283 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Decimation.NPCs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ModLoader.IO; +using Terraria.UI.Chat; + +namespace Decimation.Items +{ + internal class CursedItem : GlobalItem + { + private string _originalName; + public bool Cursed { get; set; } + public CurseType Type { get; set; } + + public override bool InstancePerEntity => true; + + public void Curse(Item item) + { + this.Cursed = true; + this.Type = CurseType.GetRandomType(); + _originalName = item.Name; + + item.SetNameOverride($"{item.Name} {this.Type.Name}"); + } + + public void RemoveCurse(Item item) + { + this.Cursed = false; + this.Type = null; + + item.SetNameOverride(_originalName); + } + + public override GlobalItem Clone(Item item, Item itemClone) + { + CursedItem clone = (CursedItem) base.Clone(item, itemClone); + clone.Cursed = this.Cursed; + clone.Type = this.Type; + clone._originalName = _originalName; + + return clone; + } + + public override bool OnPickup(Item item, Player player) + { + if (item.accessory && Main.rand.NextBool(200)) Curse(item); + + return base.OnPickup(item, player); + } + + public override void ModifyTooltips(Item item, List tooltips) + { + if (this.Cursed) + { + tooltips.Add(new TooltipLine(Decimation.Instance, "DecimationCursed", "Cursed") + { + overrideColor = ChatManager.WaveColor(Color.DarkViolet) + }); + + tooltips.Add(new TooltipLine(Decimation.Instance, "DecimationCursedAdvantageTooltip", + this.Type.Advantage) + { + overrideColor = ChatManager.WaveColor(Color.Violet), + isModifier = true + }); + + tooltips.Add(new TooltipLine(Decimation.Instance, "DecimationCursedDisadvantageTooltip", + this.Type.Disadvantage) + { + overrideColor = ChatManager.WaveColor(Color.DarkViolet), + isModifierBad = true + }); + } + } + + public override void Load(Item item, TagCompound tag) + { + this.Cursed = tag.GetBool("Cursed"); + this.Type = CurseType.GetTypeFromName(tag.GetString("CurseType")); + _originalName = tag.GetString("originalName"); + + item.SetNameOverride($"{item.Name} {this.Type.Name}"); + } + + public override bool NeedsSaving(Item item) + { + return this.Cursed; + } + + public override TagCompound Save(Item item) + { + return new TagCompound + { + ["Cursed"] = this.Cursed, + ["CurseType"] = this.Type, + ["originalName"] = _originalName + }; + } + + public override void UpdateAccessory(Item item, Player player, bool hideVisual) + { + DecimationPlayer modPlayer = player.GetModPlayer(); + + if (this.Cursed) + { + modPlayer.hasCursedAccessory = true; + + // Effects on player for each type of curse + if (this.Type == CurseType.Cursed) + { + player.magicDamage *= 1.08f; + player.meleeDamage *= 1.08f; + player.rangedDamage *= 1.08f; + player.thrownDamage *= 1.08f; + + CursedNPC.LifeBonus = 10; + } + else if (this.Type == CurseType.Sacrilegious) + { + player.manaCost *= 0.95f; + + CursedNPC.ManaLeech = 5; + CursedNPC.DamageBonus = 5; + } + else if (this.Type == CurseType.Blasphemous) + { + player.maxMinions += 1; + player.minionDamage *= 0.95f; + + CursedNPC.ManaLeech = 5; + CursedNPC.DamageBonus = 7; + } + else if (this.Type == CurseType.Heretic) + { + player.statLifeMax2 += 10; + + CursedNPC.DamageBonus = 7; + } + } + } + + public override bool CanEquipAccessory(Item item, Player player, int slot) + { + // Maximize to one cursed item at once + DecimationPlayer modPlayer = player.GetModPlayer(); + return !modPlayer.hasCursedAccessory || + modPlayer.hasCursedAccessory && !item.GetGlobalItem().Cursed; + } + + public override void NetSend(Item item, BinaryWriter writer) + { + writer.Write(this.Cursed); + } + + public override void NetReceive(Item item, BinaryReader reader) + { + this.Cursed = reader.ReadBoolean(); + } + + public class CurseType + { + public static readonly CurseType Cursed = + new CurseType("The Cursed", "+8% damage", "Enemies have 10% more life."); + + public static readonly CurseType Sacrilegious = new CurseType("The Sacrilegious", "-5% mana usage", + "Enemies leech mana and deal 5% more damages."); + + public static readonly CurseType Blasphemous = new CurseType("The Blasphemous", "+1 extra minion", + "-5% minion damages \nEnemies leech mana and deal 7% more damage."); + + public static readonly CurseType Heretic = + new CurseType("Of the Heretic", "+10 maximum life", "Enemies deal 7% more damage."); + + public CurseType(string name, string advantage, string disadvantage) + { + this.Name = name; + this.Advantage = advantage; + this.Disadvantage = disadvantage; + } + + public static IEnumerable Values + { + get + { + yield return Cursed; + yield return Sacrilegious; + yield return Blasphemous; + yield return Heretic; + } + } + + public string Name { get; } + public string Advantage { get; } + public string Disadvantage { get; } + + public static CurseType GetTypeFromName(string name) + { + foreach (CurseType type in Values) + if (name == type.Name) + return type; + + return null; + } + + public static CurseType GetRandomType() + { + switch (Main.rand.Next(4)) + { + case 0: + return Cursed; + case 1: + return Sacrilegious; + case 2: + return Blasphemous; + case 3: + return Heretic; + default: + return Cursed; + } + } + } + } + + public class PixieDustCurseRemover : GlobalItem + { + public override void SetDefaults(Item item) + { + if (item.type == ItemID.PixieDust) + { + item.useStyle = 1; + item.useTime = 20; + item.useAnimation = 20; + item.consumable = true; + } + + base.SetDefaults(item); + } + + public override bool UseItem(Item item, Player player) + { + if (item.type == ItemID.PixieDust) + { + int index = Array.IndexOf(player.inventory, item); + + Item itemUp = player.inventory[index + 1]; + Item itemDown = player.inventory[index - 1]; + + if (!itemUp.IsAir) + { + CursedItem cursedItemUp = itemUp.GetGlobalItem(); + if (cursedItemUp.Cursed) + { + Main.PlaySound(SoundID.Item29, new Vector2(player.Center.X, player.Center.Y)); + cursedItemUp.RemoveCurse(itemUp); + return true; + } + } + else if (!itemDown.IsAir) + { + CursedItem cursedItemDown = itemDown.GetGlobalItem(); + if (cursedItemDown.Cursed) + { + Main.PlaySound(SoundID.Item29, new Vector2(player.Center.X, player.Center.Y)); + cursedItemDown.RemoveCurse(itemDown); + return true; + } + } + } + + return false; + } + + public override bool ConsumeItem(Item item, Player player) + { + return true; + } + } +} \ No newline at end of file diff --git a/Items/Misc/BloodiedEssence.cs b/Items/Misc/BloodiedEssence.cs new file mode 100644 index 0000000..760a70c --- /dev/null +++ b/Items/Misc/BloodiedEssence.cs @@ -0,0 +1,19 @@ +using Decimation.Core.Items; + +namespace Decimation.Items.Misc +{ + internal class BloodiedEssence : DecimationItem + { + protected override string ItemName => "Bloodied Essence"; + protected override string ItemTooltip => "It molds more and more as time resumes."; + + protected override void Init() + { + width = 16; + height = 16; + value = 100; + + this.item.maxStack = 999; + } + } +} \ No newline at end of file diff --git a/Items/Misc/BloodiedEssence.png b/Items/Misc/BloodiedEssence.png new file mode 100644 index 0000000..9311a77 Binary files /dev/null and b/Items/Misc/BloodiedEssence.png differ diff --git a/Items/Misc/BloodyLunarTablet.cs b/Items/Misc/BloodyLunarTablet.cs new file mode 100644 index 0000000..7b2a47f --- /dev/null +++ b/Items/Misc/BloodyLunarTablet.cs @@ -0,0 +1,37 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Items.Misc +{ + internal class BloodyLunarTablet : DecimationItem + { + protected override string ItemName => "Bloody Lunar Tablet"; + protected override string ItemTooltip => "Summon blood moon."; + + protected override void Init() + { + width = 30; + height = 40; + rarity = Rarity.Green; + value = Item.buyPrice(gold: 5); + useStyle = 1; + useTime = 20; + useAnimation = 20; + consumable = true; + + this.item.maxStack = 1; + } + + public override bool CanUseItem(Player player) + { + return !Main.bloodMoon; + } + + public override bool UseItem(Player player) + { + Main.bloodMoon = true; + return true; + } + } +} \ No newline at end of file diff --git a/Items/Misc/BloodyLunarTablet.png b/Items/Misc/BloodyLunarTablet.png new file mode 100644 index 0000000..fa06246 Binary files /dev/null and b/Items/Misc/BloodyLunarTablet.png differ diff --git a/Items/Misc/CondensedSouls/CondensedSpite.cs b/Items/Misc/CondensedSouls/CondensedSpite.cs new file mode 100644 index 0000000..2a35662 --- /dev/null +++ b/Items/Misc/CondensedSouls/CondensedSpite.cs @@ -0,0 +1,42 @@ +using Decimation.Items.Misc.Souls; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Misc.CondensedSouls +{ + internal class CondensedSpite : DecimationItem + { + protected override string ItemName => "Condensed Spite"; + protected override string ItemTooltip => "his soul emanates a primal sense of hatred"; + protected override bool IsClone => true; + protected override DrawAnimation Animation => new DrawAnimationVertical(5, 4); + + protected override void Init() + { + this.item.CloneDefaults(ItemID.SoulofSight); + + width = 44; + height = 44; + value = Item.buyPrice(0, 50); + rarity = Rarity.Red; + + ItemID.Sets.AnimatesAsSoul[this.item.type] = true; + ItemID.Sets.ItemIconPulse[this.item.type] = true; + ItemID.Sets.ItemNoGravity[this.item.type] = true; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ModContent.ItemType(), 50); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Misc/CondensedSouls/CondensedSpite.gif b/Items/Misc/CondensedSouls/CondensedSpite.gif new file mode 100644 index 0000000..5e1f1b1 Binary files /dev/null and b/Items/Misc/CondensedSouls/CondensedSpite.gif differ diff --git a/Items/Misc/CondensedSouls/CondensedSpite.png b/Items/Misc/CondensedSouls/CondensedSpite.png new file mode 100644 index 0000000..6f30b94 Binary files /dev/null and b/Items/Misc/CondensedSouls/CondensedSpite.png differ diff --git a/Items/Misc/CondensedSouls/CondensedSpiteWiki.png b/Items/Misc/CondensedSouls/CondensedSpiteWiki.png new file mode 100644 index 0000000..25031df Binary files /dev/null and b/Items/Misc/CondensedSouls/CondensedSpiteWiki.png differ diff --git a/Items/Misc/EnchantedHeart.cs b/Items/Misc/EnchantedHeart.cs new file mode 100644 index 0000000..213309f --- /dev/null +++ b/Items/Misc/EnchantedHeart.cs @@ -0,0 +1,39 @@ +using Decimation.Items.Amulets; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Misc +{ + internal class EnchantedHeart : DecimationItem + { + private const int HealAmount = 25; + private const int ManaAmount = 5; + + protected override string ItemName => "Enchanted Heart"; + protected override bool IsClone => true; + public override string Texture => "Terraria/Item_" + ItemID.Heart; + + protected override void Init() + { + this.item.CloneDefaults(ItemID.Heart); + } + + public override bool OnPickup(Player player) + { + player.statLife += HealAmount; + player.HealEffect(HealAmount); + + player.statMana += ManaAmount; + player.ManaEffect(ManaAmount); + + return false; + } + + public override bool CanPickup(Player player) + { + return player.GetModPlayer().AmuletSlotItem.type != ModContent.ItemType(); + } + } +} \ No newline at end of file diff --git a/Items/Misc/HyperStar.cs b/Items/Misc/HyperStar.cs new file mode 100644 index 0000000..fa2ca29 --- /dev/null +++ b/Items/Misc/HyperStar.cs @@ -0,0 +1,47 @@ +using Decimation.Core.Items; +using Decimation.Core.Util.Builder; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Misc +{ + internal class HyperStar : DecimationItem + { + public static readonly int ManaHealAmount = 10; + + protected override string ItemName => "Hyper Star"; + protected override bool IsClone => true; + protected override string ItemTooltip => "Adds 10 to maximum mana"; + + protected override void Init() + { + this.item.CloneDefaults(ItemID.ManaCrystal); + } + + public override bool CanUseItem(Player player) + { + return player.statManaMax >= 200 && player.GetModPlayer().hyperStars < 10; + } + + public override bool UseItem(Player player) + { + player.statManaMax2 += ManaHealAmount; + player.GetModPlayer().hyperStars++; + + if (Main.myPlayer == player.whoAmI) player.ManaEffect(ManaHealAmount); + + return true; + } + + protected override ModRecipe GetRecipe() + { + return new RecipeBuilder(this.mod, this) + .WithIngredient(ItemID.ManaCrystal) + .WithIngredient(ItemID.SoulofMight) + .WithIngredient(ItemID.SoulofLight) + .WithStation(TileID.MythrilAnvil) + .Build(); + } + } +} \ No newline at end of file diff --git a/Items/Misc/HyperStar.png b/Items/Misc/HyperStar.png new file mode 100644 index 0000000..0cc98e9 Binary files /dev/null and b/Items/Misc/HyperStar.png differ diff --git a/Items/Misc/LunarTablet.cs b/Items/Misc/LunarTablet.cs new file mode 100644 index 0000000..6655aa2 --- /dev/null +++ b/Items/Misc/LunarTablet.cs @@ -0,0 +1,39 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Items.Misc +{ + internal class LunarTablet : DecimationItem + { + protected override string ItemName => "Lunar Tablet"; + protected override string ItemTooltip => "Summons the full moon."; + + protected override void Init() + { + width = 30; + height = 40; + consumable = true; + value = Item.buyPrice(gold: 2, silver: 50); + rarity = Rarity.Green; + useStyle = 1; + useTime = 20; + useAnimation = 20; + + this.item.maxStack = 1; + } + + public override bool CanUseItem(Player player) + { + return Main.dayTime; + } + + public override bool UseItem(Player player) + { + Main.moonPhase = 0; + Main.dayTime = false; + + return true; + } + } +} \ No newline at end of file diff --git a/Items/Misc/LunarTablet.png b/Items/Misc/LunarTablet.png new file mode 100644 index 0000000..c07a28c Binary files /dev/null and b/Items/Misc/LunarTablet.png differ diff --git a/Items/Misc/RedThread.cs b/Items/Misc/RedThread.cs new file mode 100644 index 0000000..26f629b --- /dev/null +++ b/Items/Misc/RedThread.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Misc +{ + internal class RedThread : DecimationItem + { + protected override string ItemName => "Red Thread"; + + protected override void Init() + { + width = 28; + height = 20; + rarity = Rarity.Gray; + value = Item.buyPrice(0, 2); + + this.item.maxStack = 99; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, new List {TileID.Tables, TileID.Chairs}); + + recipe.AddIngredient(ItemID.RedDye); + recipe.AddIngredient(ItemID.PinkThread, 5); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Misc/RedThread.png b/Items/Misc/RedThread.png new file mode 100644 index 0000000..99087cd Binary files /dev/null and b/Items/Misc/RedThread.png differ diff --git a/Items/Misc/SoulFruit.cs b/Items/Misc/SoulFruit.cs new file mode 100644 index 0000000..01a6350 --- /dev/null +++ b/Items/Misc/SoulFruit.cs @@ -0,0 +1,48 @@ +using Decimation.Core.Items; +using Decimation.Core.Util.Builder; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Misc +{ + internal class SoulFruit : DecimationItem + { + public static readonly int LifeHealAmount = 5; + + protected override string ItemName => "Soul Fruit"; + protected override bool IsClone => true; + protected override string ItemTooltip => "Adds 5 to maximum life"; + + protected override void Init() + { + this.item.CloneDefaults(ItemID.LifeFruit); + this.item.width = 34; + this.item.height = 46; + } + + public override bool CanUseItem(Player player) + { + return player.statLifeMax >= 500 && player.GetModPlayer().soulFruits < 10; + } + + public override bool UseItem(Player player) + { + player.statLifeMax2 += LifeHealAmount; + player.GetModPlayer().soulFruits++; + + if (Main.myPlayer == player.whoAmI) player.HealEffect(LifeHealAmount); + + return true; + } + + protected override ModRecipe GetRecipe() + { + return new RecipeBuilder(this.mod, this) + .WithIngredient(ItemID.LifeFruit) + .WithIngredient(ItemID.Ectoplasm, 5) + .WithStation(TileID.MythrilAnvil) + .Build(); + } + } +} \ No newline at end of file diff --git a/Items/Misc/SoulFruit.png b/Items/Misc/SoulFruit.png new file mode 100644 index 0000000..16553ba Binary files /dev/null and b/Items/Misc/SoulFruit.png differ diff --git a/Items/Misc/Souls/SoulofLife.cs b/Items/Misc/Souls/SoulofLife.cs new file mode 100644 index 0000000..2afe693 --- /dev/null +++ b/Items/Misc/Souls/SoulofLife.cs @@ -0,0 +1,42 @@ +using Decimation.Core.Items; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Misc.Souls +{ + internal class SoulofLife : DecimationItem + { + protected override string ItemName => "Soul of Life"; + protected override string ItemTooltip => "The essence of living cells."; + protected override DrawAnimation Animation => new DrawAnimationVertical(5, 4); + + protected override void Init() + { + Item refItem = new Item(); + refItem.SetDefaults(ItemID.SoulofSight); + + width = refItem.width; + height = refItem.height; + width = 20; + height = 20; + + this.item.maxStack = 999; + + ItemID.Sets.AnimatesAsSoul[this.item.type] = true; + ItemID.Sets.ItemIconPulse[this.item.type] = true; + ItemID.Sets.ItemNoGravity[this.item.type] = true; + } + + public class SoulGlobalNPC : GlobalNPC + { + public override void NPCLoot(NPC npc) + { + if (npc.type == NPCID.Plantera) + Item.NewItem((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height, + ModContent.ItemType(), Main.rand.Next(12, 25)); + } + } + } +} \ No newline at end of file diff --git a/Items/Misc/Souls/SoulofLife.png b/Items/Misc/Souls/SoulofLife.png new file mode 100644 index 0000000..66dfc67 Binary files /dev/null and b/Items/Misc/Souls/SoulofLife.png differ diff --git a/Items/Misc/Souls/SoulofSpite.cs b/Items/Misc/Souls/SoulofSpite.cs new file mode 100644 index 0000000..c2e5160 --- /dev/null +++ b/Items/Misc/Souls/SoulofSpite.cs @@ -0,0 +1,41 @@ +using Decimation.Core.Items; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Decimation.Items.Misc.Souls +{ + internal class SoulofSpite : DecimationItem + { + protected override string ItemName => "Soul of Spite"; + protected override string ItemTooltip => "The essence of malice."; + protected override DrawAnimation Animation => new DrawAnimationVertical(5, 4); + + protected override void Init() + { + Item refItem = new Item(); + refItem.SetDefaults(ItemID.SoulofSight); + + width = refItem.width; + height = refItem.height; + this.item.maxStack = 999; + value = 50000; + + ItemID.Sets.AnimatesAsSoul[this.item.type] = true; + ItemID.Sets.ItemIconPulse[this.item.type] = true; + ItemID.Sets.ItemNoGravity[this.item.type] = true; + } + + // Uncomment when Slime Prince will be done + /**public class SoulGlobalNPC : GlobalNPC + { + public override void NPCLoot(NPC npc) + { + if (npc.type == mod.NPCType()) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType(), Main.rand.Next(12, 25)); + } + } + }**/ + } +} \ No newline at end of file diff --git a/Items/Misc/Souls/SoulofSpite.png b/Items/Misc/Souls/SoulofSpite.png new file mode 100644 index 0000000..3e976f4 Binary files /dev/null and b/Items/Misc/Souls/SoulofSpite.png differ diff --git a/Items/Misc/Souls/SoulofTime.cs b/Items/Misc/Souls/SoulofTime.cs new file mode 100644 index 0000000..574b962 --- /dev/null +++ b/Items/Misc/Souls/SoulofTime.cs @@ -0,0 +1,27 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Decimation.Items.Misc.Souls +{ + internal class SoulofTime : DecimationItem + { + protected override string ItemName => "Soul of Time"; + protected override string ItemTooltip => "The essence of fate."; + protected override DrawAnimation Animation => new DrawAnimationVertical(5, 4); + + protected override void Init() + { + width = 22; + height = 24; + value = Item.buyPrice(0, 0, 1); + rarity = Rarity.Orange; + + this.item.maxStack = 999; + + ItemID.Sets.ItemNoGravity[this.item.type] = true; + } + } +} \ No newline at end of file diff --git a/Items/Misc/Souls/SoulofTime.png b/Items/Misc/Souls/SoulofTime.png new file mode 100644 index 0000000..87da79b Binary files /dev/null and b/Items/Misc/Souls/SoulofTime.png differ diff --git a/Items/Misc/Thermoplasm.cs b/Items/Misc/Thermoplasm.cs new file mode 100644 index 0000000..e45512d --- /dev/null +++ b/Items/Misc/Thermoplasm.cs @@ -0,0 +1,31 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Items.Misc +{ + internal class Thermoplasm : DecimationItem + { + protected override string ItemName => "Thermoplasm"; + protected override string ItemTooltip => "It resonates with the heat of the planet's core"; + + protected override void Init() + { + width = 26; + height = 36; + value = Item.buyPrice(silver: 50); + rarity = Rarity.Yellow; + } + } + + public class ThermoplasmDrop : GlobalNPC + { + public override void NPCLoot(NPC npc) + { + if (Main.LocalPlayer.ZoneUnderworldHeight && Main.rand.NextBool(20)) + Item.NewItem((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height, + ModContent.ItemType()); + } + } +} \ No newline at end of file diff --git a/Items/Misc/Thermoplasm.png b/Items/Misc/Thermoplasm.png new file mode 100644 index 0000000..7eb4978 Binary files /dev/null and b/Items/Misc/Thermoplasm.png differ diff --git a/Items/Ores/DenziumBar.cs b/Items/Ores/DenziumBar.cs new file mode 100644 index 0000000..7fc1f6c --- /dev/null +++ b/Items/Ores/DenziumBar.cs @@ -0,0 +1,31 @@ +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Ores +{ + internal class DenziumBar : DecimationItem + { + protected override string ItemName => "Denzium Bar"; + protected override string ItemTooltip => "It pulsates with sheer density"; + + protected override void Init() + { + width = 20; + height = 20; + rarity = Rarity.Cyan; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ItemID.AdamantiteBar); + recipe.AddIngredient(ItemID.TitaniumBar); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Ores/DenziumBar.png b/Items/Ores/DenziumBar.png new file mode 100644 index 0000000..bbbf375 Binary files /dev/null and b/Items/Ores/DenziumBar.png differ diff --git a/Items/Ores/TitaniteBar.cs b/Items/Ores/TitaniteBar.cs new file mode 100644 index 0000000..3e8a8b2 --- /dev/null +++ b/Items/Ores/TitaniteBar.cs @@ -0,0 +1,31 @@ +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Ores +{ + internal class TitaniteBar : DecimationItem + { + protected override string ItemName => "Titanite Bar"; + protected override string ItemTooltip => "Pulsating with titan-like strength."; + + protected override void Init() + { + width = 20; + height = 20; + rarity = Rarity.Orange; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ItemID.AdamantiteBar); + recipe.AddIngredient(ItemID.TitaniumBar); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Ores/TitaniteBar.png b/Items/Ores/TitaniteBar.png new file mode 100644 index 0000000..ac32625 Binary files /dev/null and b/Items/Ores/TitaniteBar.png differ diff --git a/Items/Placeable/Basalt.cs b/Items/Placeable/Basalt.cs new file mode 100644 index 0000000..acc4cf6 --- /dev/null +++ b/Items/Placeable/Basalt.cs @@ -0,0 +1,16 @@ +using Decimation.Core.Items; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable +{ + internal class Basalt : DecimationPlaceableItem + { + protected override string ItemName => "Basalt"; + protected override string ItemTooltip => "Volcanic stone"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + } + } +} \ No newline at end of file diff --git a/Items/Placeable/Basalt.png b/Items/Placeable/Basalt.png new file mode 100644 index 0000000..4ef93a4 Binary files /dev/null and b/Items/Placeable/Basalt.png differ diff --git a/Items/Placeable/ChlorophyteAnvil.cs b/Items/Placeable/ChlorophyteAnvil.cs new file mode 100644 index 0000000..2270338 --- /dev/null +++ b/Items/Placeable/ChlorophyteAnvil.cs @@ -0,0 +1,37 @@ +using Decimation.Items.Misc.Souls; +using Decimation.Core.Items; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable +{ + internal class ChlorophyteAnvil : DecimationPlaceableItem + { + protected override string ItemName => "Chlorophyte Anvil"; + protected override string ItemTooltip => "It reacts to the light."; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 20; + height = 20; + this.item.maxStack = 1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge); + + recipe.AddIngredient(ModContent.TileType()); + recipe.AddIngredient(ItemID.ChlorophyteBar, 5); + recipe.AddIngredient(ItemID.Vine, 5); + recipe.AddIngredient(ItemID.JungleSpores, 16); + recipe.AddIngredient(ItemID.SoulofSight, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.SoulofFlight, 5); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Placeable/ChlorophyteAnvil.png b/Items/Placeable/ChlorophyteAnvil.png new file mode 100644 index 0000000..c6dd7a2 Binary files /dev/null and b/Items/Placeable/ChlorophyteAnvil.png differ diff --git a/Items/Placeable/DenziumOre.cs b/Items/Placeable/DenziumOre.cs new file mode 100644 index 0000000..c787d0e --- /dev/null +++ b/Items/Placeable/DenziumOre.cs @@ -0,0 +1,18 @@ +using Decimation.Core.Items; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable +{ + internal class DenziumOre : DecimationPlaceableItem + { + protected override string ItemName => "Denzium Ore"; + protected override string ItemTooltip => "A substance created from intense pressure and heat."; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 12; + height = 12; + } + } +} \ No newline at end of file diff --git a/Items/Placeable/DenziumOre.png b/Items/Placeable/DenziumOre.png new file mode 100644 index 0000000..0d89c82 Binary files /dev/null and b/Items/Placeable/DenziumOre.png differ diff --git a/Items/Placeable/DenziumWall.cs b/Items/Placeable/DenziumWall.cs new file mode 100644 index 0000000..3362694 --- /dev/null +++ b/Items/Placeable/DenziumWall.cs @@ -0,0 +1,17 @@ +using Decimation.Core.Items; + +namespace Decimation.Items.Placeable +{ + internal class DenziumWall : DecimationPlaceableItem + { + protected override string ItemName => "Denzium Wall"; + protected override int Tile => -1; + + protected override void InitPlaceable() + { + width = 32; + height = 32; + this.item.createWall = this.mod.WallType("DenziumWall"); + } + } +} \ No newline at end of file diff --git a/Items/Placeable/DenziumWall.png b/Items/Placeable/DenziumWall.png new file mode 100644 index 0000000..09e7107 Binary files /dev/null and b/Items/Placeable/DenziumWall.png differ diff --git a/Items/Placeable/DuneWorm/DuneWormTrophy.cs b/Items/Placeable/DuneWorm/DuneWormTrophy.cs new file mode 100644 index 0000000..41d4f16 --- /dev/null +++ b/Items/Placeable/DuneWorm/DuneWormTrophy.cs @@ -0,0 +1,21 @@ +using Decimation.Core.Items; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable.DuneWorm +{ + internal class DuneWormTrophy : DecimationPlaceableItem + { + protected override string ItemName => "Ancient Dune Worm Trophy"; + protected override string ItemTooltip => "Achievement get!"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 30; + height = 30; + this.item.maxStack = 99; + this.item.value = Item.buyPrice(0, 5); + } + } +} \ No newline at end of file diff --git a/Items/Placeable/DuneWorm/DuneWormTrophy.png b/Items/Placeable/DuneWorm/DuneWormTrophy.png new file mode 100644 index 0000000..cd6e53b Binary files /dev/null and b/Items/Placeable/DuneWorm/DuneWormTrophy.png differ diff --git a/Items/Placeable/EnchantedAnvil.cs b/Items/Placeable/EnchantedAnvil.cs new file mode 100644 index 0000000..c170e9f --- /dev/null +++ b/Items/Placeable/EnchantedAnvil.cs @@ -0,0 +1,34 @@ +using Decimation.Items.Misc.Souls; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Decimation.Core.Items; + +namespace Decimation.Items.Placeable +{ + internal class EnchantedAnvil : DecimationPlaceableItem + { + protected override string ItemName => "Enchanted Anvil"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 20; + height = 20; + item.maxStack = 1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AdamantiteForge, true); + + recipe.AddIngredient(ItemID.MythrilAnvil, 1); + recipe.AddIngredient(ItemID.IronAnvil, 1); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.SoulofNight, 5); + recipe.AddIngredient(ItemID.SoulofMight, 5); + + return recipe; + } + } +} diff --git a/Items/Placeable/EnchantedAnvil.png b/Items/Placeable/EnchantedAnvil.png new file mode 100644 index 0000000..982e462 Binary files /dev/null and b/Items/Placeable/EnchantedAnvil.png differ diff --git a/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs b/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs new file mode 100644 index 0000000..d8dc887 --- /dev/null +++ b/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.cs @@ -0,0 +1,17 @@ +using Decimation.Core.Items; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +{ + internal class DeadEarth : DecimationPlaceableItem + { + protected override string ItemName => "Dead Earth"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 12; + height = 12; + } + } +} \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.png b/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.png new file mode 100644 index 0000000..7410ba5 Binary files /dev/null and b/Items/Placeable/ShrineoftheMoltenOne/DeadEarth.png differ diff --git a/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs b/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs new file mode 100644 index 0000000..119b577 --- /dev/null +++ b/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.cs @@ -0,0 +1,17 @@ +using Decimation.Core.Items; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +{ + internal class RedHotSpike : DecimationPlaceableItem + { + protected override string ItemName => "Red Hot Spike"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 12; + height = 12; + } + } +} \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.png b/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.png new file mode 100644 index 0000000..52105d7 Binary files /dev/null and b/Items/Placeable/ShrineoftheMoltenOne/RedHotSpike.png differ diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs b/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs new file mode 100644 index 0000000..521bf71 --- /dev/null +++ b/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.cs @@ -0,0 +1,17 @@ +using Decimation.Core.Items; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +{ + internal class ShrineAltar : DecimationPlaceableItem + { + protected override string ItemName => "Shrine Altar"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 66; + height = 32; + } + } +} \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png b/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png new file mode 100644 index 0000000..51f496c Binary files /dev/null and b/Items/Placeable/ShrineoftheMoltenOne/ShrineAltar.png differ diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs b/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs new file mode 100644 index 0000000..1b1adaa --- /dev/null +++ b/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.cs @@ -0,0 +1,17 @@ +using Decimation.Core.Items; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +{ + internal class ShrineBrick : DecimationPlaceableItem + { + protected override string ItemName => "Shrine Brick"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 12; + height = 12; + } + } +} \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.png b/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.png new file mode 100644 index 0000000..7386f51 Binary files /dev/null and b/Items/Placeable/ShrineoftheMoltenOne/ShrineBrick.png differ diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs b/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs new file mode 100644 index 0000000..fd68114 --- /dev/null +++ b/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.cs @@ -0,0 +1,21 @@ +using Decimation.Tiles.ShrineoftheMoltenOne; +using Decimation.Core.Items; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable.ShrineoftheMoltenOne +{ + internal class ShrineDoor : DecimationPlaceableItem + { + protected override string ItemName => "Shrine Door"; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 14; + height = 28; + this.item.maxStack = 99; + value = Item.buyPrice(0, 0, 1, 50); + } + } +} \ No newline at end of file diff --git a/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.png b/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.png new file mode 100644 index 0000000..c378856 Binary files /dev/null and b/Items/Placeable/ShrineoftheMoltenOne/ShrineDoor.png differ diff --git a/Items/Placeable/TalonianPillar.cs b/Items/Placeable/TalonianPillar.cs new file mode 100644 index 0000000..a4a2f33 --- /dev/null +++ b/Items/Placeable/TalonianPillar.cs @@ -0,0 +1,16 @@ +using Decimation.Core.Items; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable +{ + internal class TalonianPillar : DecimationPlaceableItem + { + protected override string ItemName => "Talonian Pillar"; + protected override string ItemTooltip => "A heavenly pillar created by powerful Talonian warlocks."; + protected override int Tile => ModContent.TileType(); // The tile doesn't exist yet + + protected override void InitPlaceable() + { + } + } +} \ No newline at end of file diff --git a/Items/Placeable/TalonianPillar.png b/Items/Placeable/TalonianPillar.png new file mode 100644 index 0000000..5833b24 Binary files /dev/null and b/Items/Placeable/TalonianPillar.png differ diff --git a/Items/Placeable/TitanForge.cs b/Items/Placeable/TitanForge.cs new file mode 100644 index 0000000..4850b38 --- /dev/null +++ b/Items/Placeable/TitanForge.cs @@ -0,0 +1,39 @@ +using Decimation.Items.Misc.Souls; +using Decimation.Core.Items; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Placeable +{ + internal class TitanForge : DecimationPlaceableItem + { + protected override string ItemName => "Titan Forge"; + protected override string ItemTooltip => "Used to craft powerful weapons and armor."; + protected override int Tile => ModContent.TileType(); + + protected override void InitPlaceable() + { + width = 20; + height = 20; + this.item.maxStack = 1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType(), true); + + recipe.AddIngredient(ItemID.AdamantiteForge); + recipe.AddIngredient(ItemID.Autohammer); + recipe.AddIngredient(ItemID.AdamantiteBar, 5); + recipe.AddIngredient(ItemID.TitaniumBar, 5); + recipe.AddIngredient(ItemID.LavaBucket); + recipe.AddIngredient(ItemID.SoulofMight, 5); + recipe.AddIngredient(ItemID.SoulofFright, 5); + recipe.AddIngredient(ItemID.SoulofSight, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.SoulofFlight, 5); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Placeable/TitanForge.png b/Items/Placeable/TitanForge.png new file mode 100644 index 0000000..d7a8ec3 Binary files /dev/null and b/Items/Placeable/TitanForge.png differ diff --git a/Items/Potions/Antidote.cs b/Items/Potions/Antidote.cs new file mode 100644 index 0000000..c69c049 --- /dev/null +++ b/Items/Potions/Antidote.cs @@ -0,0 +1,44 @@ +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Potions +{ + // Not an actual potion, since it doesn't give the player any buff. + internal class Antidote : DecimationItem + { + protected override string ItemName => "Antidote"; + protected override string ItemTooltip => "Cure poison and venom."; + + protected override void Init() + { + width = 20; + height = 20; + this.item.maxStack = 30; + consumable = true; + useAnimation = 17; + useTime = 17; + this.item.useTurn = true; + useStyle = 2; + } + + public override bool UseItem(Player player) + { + player.ClearBuff(BuffID.Poisoned); + player.ClearBuff(BuffID.Venom); + return true; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AlchemyTable); + + recipe.AddIngredient(ItemID.Waterleaf); + recipe.AddIngredient(ItemID.Moonglow); + recipe.AddIngredient(ItemID.BottledHoney); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Potions/Antidote.png b/Items/Potions/Antidote.png new file mode 100644 index 0000000..14ed7de Binary files /dev/null and b/Items/Potions/Antidote.png differ diff --git a/Items/Potions/CommanderPotion.cs b/Items/Potions/CommanderPotion.cs new file mode 100644 index 0000000..1ac05a4 --- /dev/null +++ b/Items/Potions/CommanderPotion.cs @@ -0,0 +1,37 @@ +using Decimation.Buffs.Buffs; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Potions +{ + internal class CommanderPotion : DecimationPotion + { + protected override string ItemName => "Commander Potion"; + + protected override string ItemTooltip => + "Increases your max number of minions by 1 \nMinions damages +10% \nMinions knockback +10%"; + + protected override int BuffType => ModContent.BuffType(); + protected override int BuffTime => 36000; + + protected override void InitPotion() + { + value = Item.buyPrice(0, 1); + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AlchemyTable); + + recipe.AddIngredient(ItemID.SummoningPotion); + recipe.AddIngredient(ItemID.SoulofFlight, 20); + recipe.AddIngredient(ItemID.VariegatedLardfish); + recipe.AddIngredient(ItemID.MagicPowerPotion, 2); + recipe.AddIngredient(ItemID.RottenChunk, 2); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Potions/CommanderPotion.png b/Items/Potions/CommanderPotion.png new file mode 100644 index 0000000..19929e4 Binary files /dev/null and b/Items/Potions/CommanderPotion.png differ diff --git a/Items/Potions/EnchantedMushroom.cs b/Items/Potions/EnchantedMushroom.cs new file mode 100644 index 0000000..1aa7f19 --- /dev/null +++ b/Items/Potions/EnchantedMushroom.cs @@ -0,0 +1,39 @@ +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Potions +{ + internal class EnchantedMushroom : DecimationPotion + { + protected override string ItemName => "Enchanted Mushroom"; + protected override string ItemTooltip => "Cures poison \nGives Happy! buff"; + protected override int BuffType => BuffID.Sunflower; + protected override int BuffTime => 7200; + protected override int HealLife => 90; + + protected override void InitPotion() + { + value = Item.buyPrice(0, 0, 15); + } + + public override bool UseItem(Player player) + { + player.ClearBuff(BuffID.Poisoned); + return true; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AlchemyTable); + + recipe.AddIngredient(ItemID.Mushroom); + recipe.AddIngredient(ItemID.GlowingMushroom); + recipe.AddIngredient(ItemID.BottledHoney); + recipe.AddIngredient(ItemID.FallenStar); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Potions/EnchantedMushroom.png b/Items/Potions/EnchantedMushroom.png new file mode 100644 index 0000000..5ad4d02 Binary files /dev/null and b/Items/Potions/EnchantedMushroom.png differ diff --git a/Items/Potions/WarlockPotion.cs b/Items/Potions/WarlockPotion.cs new file mode 100644 index 0000000..b39dd83 --- /dev/null +++ b/Items/Potions/WarlockPotion.cs @@ -0,0 +1,36 @@ +using Decimation.Buffs.Buffs; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Potions +{ + internal class WarlockPotion : DecimationPotion + { + protected override string ItemName => "Warlock Potion"; + + protected override string ItemTooltip => + "Increased Mana Regeneration \nIncreased max mana \n10% increased magic damage"; + + protected override int BuffType => ModContent.BuffType(); + protected override int BuffTime => 36000; + + protected override void InitPotion() + { + value = Item.buyPrice(0, 0, 80); + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.AlchemyTable); + + recipe.AddIngredient(ItemID.ManaRegenerationPotion); + recipe.AddIngredient(ItemID.ManaCrystal); + recipe.AddIngredient(ItemID.SoulofMight, 10); + recipe.AddIngredient(ItemID.BottledHoney); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Potions/WarlockPotion.png b/Items/Potions/WarlockPotion.png new file mode 100644 index 0000000..63455f2 Binary files /dev/null and b/Items/Potions/WarlockPotion.png differ diff --git a/Items/Tools/GildedSickle.cs b/Items/Tools/GildedSickle.cs new file mode 100644 index 0000000..506f262 --- /dev/null +++ b/Items/Tools/GildedSickle.cs @@ -0,0 +1,38 @@ +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Tools +{ + internal class GildedSickle : DecimationTool + { + protected override string ItemName => "The Gilded Sickle"; + protected override string ItemTooltip => "Allows the collection of hay from grass"; + protected override bool IsClone => true; + protected override int MeleeDamages => 10; + + protected override void InitTool() + { + this.item.CloneDefaults(ItemID.Sickle); + + width = 16; + height = 16; + value = Item.buyPrice(0, 0, 1); + this.item.knockBack = 5; + useTime = 14; + useAnimation = 14; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Anvils); + + recipe.AddIngredient(ItemID.Sickle); + recipe.AddIngredient(ItemID.GoldBar, 5); + recipe.AddIngredient(null, "SoulofTime", 10); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Tools/GildedSickle.png b/Items/Tools/GildedSickle.png new file mode 100644 index 0000000..d473ce4 Binary files /dev/null and b/Items/Tools/GildedSickle.png differ diff --git a/Items/Tools/GreatwoodHammer.cs b/Items/Tools/GreatwoodHammer.cs new file mode 100644 index 0000000..2ca6481 --- /dev/null +++ b/Items/Tools/GreatwoodHammer.cs @@ -0,0 +1,40 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Tools +{ + internal class GreatwoodHammer : DecimationTool + { + protected override string ItemName => "Greatwood Mallet"; + protected override string ItemTooltip => "Who needs metal?"; + protected override int MeleeDamages => 20; + protected override int HammerPower => 55; + + protected override void InitTool() + { + width = 40; + height = 40; + useTime = 10; + useAnimation = 25; + this.item.knockBack = 5; + value = Item.buyPrice(0, 0, 10); + rarity = Rarity.Green; + useSound = SoundID.Item1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.WorkBenches, true); + + recipe.AddIngredient(ItemID.WoodenHammer); + recipe.AddIngredient(ItemID.BorealWoodHammer); + recipe.AddIngredient(ItemID.ShadewoodHammer); + recipe.AddIngredient(ItemID.PalmWoodHammer); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Tools/GreatwoodHammer.png b/Items/Tools/GreatwoodHammer.png new file mode 100644 index 0000000..4c5df27 Binary files /dev/null and b/Items/Tools/GreatwoodHammer.png differ diff --git a/Items/Tools/MultigrainHammer.cs b/Items/Tools/MultigrainHammer.cs new file mode 100644 index 0000000..d8b00ce --- /dev/null +++ b/Items/Tools/MultigrainHammer.cs @@ -0,0 +1,42 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Tools +{ + internal class MultigrainHammer : DecimationTool + { + protected override string ItemName => "Multigrain Hamaxe"; + protected override string ItemTooltip => "Smells like honeysuckle"; + protected override int MeleeDamages => 20; + protected override int HammerPower => 67; + protected override int AxePower => 13; + + protected override void InitTool() + { + width = 32; + height = 32; + useTime = 20; + useAnimation = 20; + this.item.knockBack = 5; + value = Item.buyPrice(0, 0, 10); + rarity = Rarity.Green; + this.item.crit = 3; + useSound = SoundID.Item1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Loom); + + recipe.AddIngredient(null, "GreatwoodHammer"); + recipe.AddIngredient(ItemID.CactusPickaxe); + recipe.AddIngredient(ItemID.Pumpkin, 10); + recipe.AddIngredient(ItemID.Vine, 2); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Tools/MultigrainHammer.png b/Items/Tools/MultigrainHammer.png new file mode 100644 index 0000000..9df47ee Binary files /dev/null and b/Items/Tools/MultigrainHammer.png differ diff --git a/Items/Tools/TheHourGlass.cs b/Items/Tools/TheHourGlass.cs new file mode 100644 index 0000000..c9cd0d5 --- /dev/null +++ b/Items/Tools/TheHourGlass.cs @@ -0,0 +1,32 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Items.Tools +{ + internal class TheHourGlass : DecimationTool + { + protected override string ItemName => "The Hour Glass"; + protected override string ItemTooltip => "Costs 50 mana."; + + protected override void InitTool() + { + this.item.mana = 50; + width = 22; + height = 36; + useTime = 16; + useAnimation = 16; + useStyle = 4; + rarity = Rarity.Purple; + this.item.expert = true; + } + + public override bool UseItem(Player player) + { + if (Main.dayTime) + Main.dayTime = false; + else if (!Main.dayTime) Main.dayTime = true; + return true; + } + } +} \ No newline at end of file diff --git a/Items/Tools/TheHourGlass.png b/Items/Tools/TheHourGlass.png new file mode 100644 index 0000000..1cae386 Binary files /dev/null and b/Items/Tools/TheHourGlass.png differ diff --git a/Items/Tools/TitanitePax.cs b/Items/Tools/TitanitePax.cs new file mode 100644 index 0000000..276f117 --- /dev/null +++ b/Items/Tools/TitanitePax.cs @@ -0,0 +1,38 @@ +using Decimation.Items.Ores; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Tools +{ + internal class TitanitePax : DecimationTool + { + protected override string ItemName => "Titanite Pax"; + protected override int MeleeDamages => 64; + protected override int PickaxePower => 250; + protected override int AxePower => 27; + + protected override void InitTool() + { + width = 48; + height = 52; + this.item.crit = 14; + useTime = 5; + useAnimation = 15; + this.item.knockBack = 7; + rarity = Rarity.LightRed; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ItemID.SoulofMight, 15); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Tools/TitanitePax.png b/Items/Tools/TitanitePax.png new file mode 100644 index 0000000..00d76e0 Binary files /dev/null and b/Items/Tools/TitanitePax.png differ diff --git a/Items/Vanity/DuneWorm/DuneWormMask.cs b/Items/Vanity/DuneWorm/DuneWormMask.cs new file mode 100644 index 0000000..f68a74a --- /dev/null +++ b/Items/Vanity/DuneWorm/DuneWormMask.cs @@ -0,0 +1,26 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria.ModLoader; + +namespace Decimation.Items.Vanity.DuneWorm +{ + [AutoloadEquip(EquipType.Head)] + internal class DuneWormMask : DecimationItem + { + protected override string ItemName => "Ancient Dune Worm Mask"; + protected override string ItemTooltip => "A bit dusty"; + + protected override void Init() + { + width = 36; + height = 32; + rarity = Rarity.Orange; + this.item.vanity = true; + } + + public override bool DrawHead() + { + return false; + } + } +} \ No newline at end of file diff --git a/Items/Vanity/DuneWorm/DuneWormMask.png b/Items/Vanity/DuneWorm/DuneWormMask.png new file mode 100644 index 0000000..db61a24 Binary files /dev/null and b/Items/Vanity/DuneWorm/DuneWormMask.png differ diff --git a/Items/Vanity/DuneWorm/DuneWormMask_Head.png b/Items/Vanity/DuneWorm/DuneWormMask_Head.png new file mode 100644 index 0000000..44f8c0b Binary files /dev/null and b/Items/Vanity/DuneWorm/DuneWormMask_Head.png differ diff --git a/Items/Weapons/Arachnus/ChainStynger.cs b/Items/Weapons/Arachnus/ChainStynger.cs new file mode 100644 index 0000000..4a952b6 --- /dev/null +++ b/Items/Weapons/Arachnus/ChainStynger.cs @@ -0,0 +1,34 @@ +using Decimation.Buffs.Debuffs; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons.Arachnus +{ + internal class ChainStynger : DecimationWeapon + { + protected override string ItemName => "Chain Stynger"; + protected override string ItemTooltip => "Unleashe molten ashes upon your foes."; + protected override bool IsClone => true; + protected override DamageType DamagesType => DamageType.RANGED; + protected override int Damages => 800; + protected override string Projectile => "MoltenStyngerBolt"; + + protected override void InitWeapon() + { + this.item.CloneDefaults(ItemID.Stynger); + + shootSpeed = 9f; + this.item.crit *= 2; + this.item.knockBack *= 2; + this.item.rare = 10; + this.item.value = Item.buyPrice(0, 45); + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) + { + target.AddBuff(ModContent.BuffType(), 480); + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Arachnus/ChainStynger.png b/Items/Weapons/Arachnus/ChainStynger.png new file mode 100644 index 0000000..a1fd320 Binary files /dev/null and b/Items/Weapons/Arachnus/ChainStynger.png differ diff --git a/Items/Weapons/Arachnus/GlaiveWeaver.cs b/Items/Weapons/Arachnus/GlaiveWeaver.cs new file mode 100644 index 0000000..cee26fc --- /dev/null +++ b/Items/Weapons/Arachnus/GlaiveWeaver.cs @@ -0,0 +1,28 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Items.Weapons.Arachnus +{ + internal class GlaiveWeaver : DecimationWeapon + { + protected override string ItemName => "Glaive Weaver"; + protected override string ItemTooltip => "Your palm burns as you wield this godly weapon."; + protected override int Damages => 850; + protected override string Projectile => "ArchingSolarBlade"; + + protected override void InitWeapon() + { + width = 42; + height = 46; + value = Item.buyPrice(0, 45); + rarity = Rarity.Red; + useTime = 15; + useAnimation = 15; + shootSpeed = 15; + criticalStrikeChance = 10; + autoReuse = true; + knockBack = 4; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Arachnus/GlaiveWeaver.png b/Items/Weapons/Arachnus/GlaiveWeaver.png new file mode 100644 index 0000000..81e4798 Binary files /dev/null and b/Items/Weapons/Arachnus/GlaiveWeaver.png differ diff --git a/Items/Weapons/Arachnus/Infernolizer.cs b/Items/Weapons/Arachnus/Infernolizer.cs new file mode 100644 index 0000000..bae1b26 --- /dev/null +++ b/Items/Weapons/Arachnus/Infernolizer.cs @@ -0,0 +1,40 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; + +namespace Decimation.Items.Weapons.Arachnus +{ + internal class Infernolizer : DecimationWeapon + { + protected override string ItemName => "Infernolizer"; + protected override string ItemTooltip => "Releases flares upon your foes"; + protected override bool IsClone => true; + protected override int Damages => 880; + protected override DamageType DamagesType => DamageType.MAGIC; + protected override bool VanillaProjectile => true; + protected override string Projectile => "HeatRay"; + + protected override void InitWeapon() + { + this.item.CloneDefaults(ItemID.HeatRay); + + criticalStrikeChance *= 2; + knockBack *= 2; + useTime /= 2; + useAnimation /= 2; + value = Item.buyPrice(0, 45); + rarity = Rarity.Red; + shootSpeed = 15f; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, + ref int type, ref int damage, ref float knockBack) + { + Terraria.Projectile.NewProjectile(new Vector2(position.X, position.Y - 8), new Vector2(speedX, speedY), + type, damage, knockBack); + return true; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Arachnus/Infernolizer.png b/Items/Weapons/Arachnus/Infernolizer.png new file mode 100644 index 0000000..054b5ec Binary files /dev/null and b/Items/Weapons/Arachnus/Infernolizer.png differ diff --git a/Items/Weapons/Bloodshot/BloodStream.cs b/Items/Weapons/Bloodshot/BloodStream.cs new file mode 100644 index 0000000..89302d8 --- /dev/null +++ b/Items/Weapons/Bloodshot/BloodStream.cs @@ -0,0 +1,44 @@ +using Decimation.Buffs.Debuffs; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons.Bloodshot +{ + internal class BloodStream : DecimationWeapon + { + protected override string ItemName => "Blood Stream"; + protected override string ItemTooltip => "Bathe your enemies in boiling blood."; + protected override DamageType DamagesType => DamageType.MAGIC; + protected override int Damages => 14; + protected override string Projectile => "BloodBeamFriendly"; + + + protected override void InitWeapon() + { + width = 20; + height = 20; + value = Item.buyPrice(0, 2); + rarity = Rarity.Green; + useStyle = 5; + shootSpeed = 5f; + this.item.mana = 1; + useTime = 5; + useAnimation = 5; + autoReuse = true; + useSound = SoundID.Item34; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + + public override void OnHitPvp(Player player, Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Bloodshot/BloodStream.png b/Items/Weapons/Bloodshot/BloodStream.png new file mode 100644 index 0000000..291e2bc Binary files /dev/null and b/Items/Weapons/Bloodshot/BloodStream.png differ diff --git a/Items/Weapons/Bloodshot/Umbra.cs b/Items/Weapons/Bloodshot/Umbra.cs new file mode 100644 index 0000000..c62639e --- /dev/null +++ b/Items/Weapons/Bloodshot/Umbra.cs @@ -0,0 +1,41 @@ +using Decimation.Projectiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons.Bloodshot +{ + internal class Umbra : DecimationWeapon + { + protected override string ItemName => "Umbra"; + protected override string ItemTooltip => "Turns wooden arrows into siphon arrows."; + protected override DamageType DamagesType => DamageType.RANGED; + protected override int Damages => 18; + protected override string Projectile => "WoodenArrowFriendly"; + protected override bool VanillaProjectile => true; + + protected override void InitWeapon() + { + width = 20; + height = 20; + value = Item.buyPrice(0, 2); + rarity = Rarity.Green; + this.item.useAmmo = AmmoID.Arrow; + shootSpeed = 6.8f; + useTime = 26; + useAnimation = 26; + useStyle = 5; + useSound = SoundID.Item5; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, + ref int type, ref int damage, ref float knockBack) + { + type = ModContent.ProjectileType(); + return true; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Bloodshot/Umbra.png b/Items/Weapons/Bloodshot/Umbra.png new file mode 100644 index 0000000..36996cb Binary files /dev/null and b/Items/Weapons/Bloodshot/Umbra.png differ diff --git a/Items/Weapons/Bloodshot/VampiricShiv.cs b/Items/Weapons/Bloodshot/VampiricShiv.cs new file mode 100644 index 0000000..fbc7320 --- /dev/null +++ b/Items/Weapons/Bloodshot/VampiricShiv.cs @@ -0,0 +1,42 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; + +namespace Decimation.Items.Weapons.Bloodshot +{ + internal class VampiricShiv : DecimationWeapon + { + protected override string ItemName => "Vampiric Shiv"; + protected override string ItemTooltip => "Heal 10% of damages inflicted"; + protected override int Damages => 12; + + protected override void InitWeapon() + { + width = 20; + height = 20; + criticalStrikeChance = 4; + useStyle = 3; + useTime = 12; + useAnimation = 12; + rarity = Rarity.Green; + knockBack = 5; + value = Item.buyPrice(0, 2); + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) + { + int lifeSteal = (int) (damage * 0.1f); + + player.lifeSteal += lifeSteal; + player.HealEffect(lifeSteal); + } + + public override void OnHitPvp(Player player, Player target, int damage, bool crit) + { + int lifeSteal = (int) (damage * 0.1f); + + player.lifeSteal += lifeSteal; + player.HealEffect(lifeSteal); + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Bloodshot/VampiricShiv.png b/Items/Weapons/Bloodshot/VampiricShiv.png new file mode 100644 index 0000000..e7fc299 Binary files /dev/null and b/Items/Weapons/Bloodshot/VampiricShiv.png differ diff --git a/Items/Weapons/CelestialEdge.png b/Items/Weapons/CelestialEdge.png new file mode 100644 index 0000000..35efb48 Binary files /dev/null and b/Items/Weapons/CelestialEdge.png differ diff --git a/Items/Weapons/MultigrainSword.cs b/Items/Weapons/MultigrainSword.cs new file mode 100644 index 0000000..7bed5c6 --- /dev/null +++ b/Items/Weapons/MultigrainSword.cs @@ -0,0 +1,44 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons +{ + internal class MultigrainSword : DecimationWeapon + { + protected override string ItemName => "Multigrain Sword"; + protected override string ItemTooltip => "Smells like honeysuckle"; + protected override int Damages => 30; + protected override string Projectile => "Stinger"; + + protected override void InitWeapon() + { + width = 36; + height = 37; + useTime = 26; + useAnimation = 26; + knockBack = 5; + value = Item.buyPrice(0, 0, 40); + rarity = Rarity.Green; + criticalStrikeChance = 4; + autoReuse = true; + this.item.expert = false; + shootSpeed = 10f; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Anvils, true); + + recipe.AddIngredient(ItemID.CactusSword); + recipe.AddIngredient(ItemID.Pumpkin, 15); + recipe.AddIngredient(ItemID.Acorn, 5); + recipe.AddIngredient(ItemID.Hay, 15); + recipe.AddIngredient(ModContent.ItemType()); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/MultigrainSword.png b/Items/Weapons/MultigrainSword.png new file mode 100644 index 0000000..7db78bb Binary files /dev/null and b/Items/Weapons/MultigrainSword.png differ diff --git a/Items/Weapons/RodofLightning.cs b/Items/Weapons/RodofLightning.cs new file mode 100644 index 0000000..8d2db70 --- /dev/null +++ b/Items/Weapons/RodofLightning.cs @@ -0,0 +1,23 @@ +using Decimation.Core.Items; + +namespace Decimation.Items.Weapons +{ + internal class RodofLightning : DecimationWeapon + { + protected override string ItemName => "Rod of Lightning"; + protected override int Damages => 90; + protected override DamageType DamagesType => DamageType.MAGIC; + protected override string Projectile => "LightningSphere"; + + protected override void InitWeapon() + { + this.item.mana = 17; + knockBack = 7; + criticalStrikeChance = 15; + useStyle = 3; + useTime = 15; + useAnimation = 15; + shootSpeed = 15f; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/RodofLightning.png b/Items/Weapons/RodofLightning.png new file mode 100644 index 0000000..12437aa Binary files /dev/null and b/Items/Weapons/RodofLightning.png differ diff --git a/Items/Weapons/Sling.cs b/Items/Weapons/Sling.cs new file mode 100644 index 0000000..89c7b58 --- /dev/null +++ b/Items/Weapons/Sling.cs @@ -0,0 +1,28 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria.ID; + +namespace Decimation.Items.Weapons +{ + internal class Sling : DecimationWeapon + { + protected override string ItemName => "Sling"; + protected override string ItemTooltip => "Uses pebbles and marbles as ammo"; + protected override DamageType DamagesType => DamageType.RANGED; + protected override int Damages => 9; + protected override string Ammo => "Pebble"; + + protected override void InitWeapon() + { + width = 30; + height = 22; + useTime = 16; + useAnimation = 16; + knockBack = 6; + rarity = Rarity.Orange; + useSound = SoundID.Item5; + shootSpeed = 10f; + criticalStrikeChance = 10; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Sling.png b/Items/Weapons/Sling.png new file mode 100644 index 0000000..c36078b Binary files /dev/null and b/Items/Weapons/Sling.png differ diff --git a/Items/Weapons/SlingshotWood.cs b/Items/Weapons/SlingshotWood.cs new file mode 100644 index 0000000..ad8c2ae --- /dev/null +++ b/Items/Weapons/SlingshotWood.cs @@ -0,0 +1,43 @@ +using Decimation.Items.Ammo; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons +{ + internal class SlingshotWood : DecimationWeapon + { + protected override string ItemName => "Slingshot"; + protected override string ItemTooltip => "Uses pebbles and marbles as ammo"; + protected override DamageType DamagesType => DamageType.THROW; + protected override int Damages => 7; + + protected override void InitWeapon() + { + this.item.noMelee = true; + width = 32; + height = 32; + useTime = 16; + useAnimation = 16; + useStyle = 5; + this.item.shoot = 1; + item.useAmmo = ModContent.ItemType(); + knockBack = 6; + rarity = Rarity.Orange; + useSound = SoundID.Item5; + shootSpeed = 10f; + criticalStrikeChance = 10; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.WorkBenches); + + recipe.AddIngredient(ItemID.Wood, 12); + // recipe.AddIngredient(null,"CrimsoniteBar", 10); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/SlingshotWood.png b/Items/Weapons/SlingshotWood.png new file mode 100644 index 0000000..8270338 Binary files /dev/null and b/Items/Weapons/SlingshotWood.png differ diff --git a/Items/Weapons/TheGreatwoodSword.cs b/Items/Weapons/TheGreatwoodSword.cs new file mode 100644 index 0000000..984d5d9 --- /dev/null +++ b/Items/Weapons/TheGreatwoodSword.cs @@ -0,0 +1,40 @@ +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons +{ + internal class TheGreatwoodSword : DecimationWeapon + { + protected override string ItemName => "The Greatwood Sword"; + protected override string ItemTooltip => "Who needs metal?"; + protected override int Damages => 20; + + protected override void InitWeapon() + { + width = 44; + height = 44; + useTime = 25; + useAnimation = 25; + knockBack = 5; + this.item.value = Item.buyPrice(silver: 40); + rarity = Rarity.Green; + autoReuse = true; + this.item.expert = false; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Anvils, true); + + recipe.AddIngredient(ItemID.WoodenSword); + recipe.AddIngredient(ItemID.BorealWoodSword); + recipe.AddIngredient(ItemID.ShadewoodSword); + recipe.AddIngredient(ItemID.PalmWoodSword); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/TheGreatwoodSword.png b/Items/Weapons/TheGreatwoodSword.png new file mode 100644 index 0000000..ba21a49 Binary files /dev/null and b/Items/Weapons/TheGreatwoodSword.png differ diff --git a/Items/Weapons/TitanicGatliStynger.cs b/Items/Weapons/TitanicGatliStynger.cs new file mode 100644 index 0000000..075d6d4 --- /dev/null +++ b/Items/Weapons/TitanicGatliStynger.cs @@ -0,0 +1,58 @@ +using Decimation.Items.Ores; +using Decimation.Items.Weapons.Arachnus; +using Decimation.Projectiles; +using Decimation.Tiles; +using Decimation.Core.Items; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons +{ + internal class TitanicGatliStynger : DecimationWeapon + { + protected override string ItemName => "Titanic Gatli Stynger"; + protected override string ItemTooltip => "Feel the rage of Kronos by your side."; + protected override bool IsClone => true; + protected override DamageType DamagesType => DamageType.RANGED; + protected override int Damages => 950; + protected override string Projectile => "TitanicStyngerBolt"; + + protected override void InitWeapon() + { + this.item.CloneDefaults(ItemID.Stynger); + + knockBack = 11; + shootSpeed = 9f; + criticalStrikeChance = 8; + + this.item.width = 52; + this.item.height = 26; + this.item.useTime = 10; + this.item.useAnimation = 10; + this.item.rare = 10; + this.item.autoReuse = true; + this.item.value = Item.buyPrice(0, 60); + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 15); + // TODO recipe.AddIngredient(null, "CondensedMight", 5); + recipe.AddIngredient(ModContent.ItemType()); + + return recipe; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, + ref int type, ref int damage, ref float knockBack) + { + type = ModContent.ProjectileType(); + return true; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/TitanicGatliStynger.png b/Items/Weapons/TitanicGatliStynger.png new file mode 100644 index 0000000..22925c1 Binary files /dev/null and b/Items/Weapons/TitanicGatliStynger.png differ diff --git a/Items/Weapons/TitanicLongsword.cs b/Items/Weapons/TitanicLongsword.cs new file mode 100644 index 0000000..d7ef25f --- /dev/null +++ b/Items/Weapons/TitanicLongsword.cs @@ -0,0 +1,45 @@ +using Decimation.Buffs.Debuffs; +using Decimation.Items.Ores; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons +{ + internal class TitanicLongsword : DecimationWeapon + { + protected override string ItemName => "Titanic Longsword"; + protected override int Damages => 145; + + protected override void InitWeapon() + { + useTime = 21; + useAnimation = 21; + criticalStrikeChance = 14; + knockBack = 7; + this.item.value = Item.buyPrice(gold: 45); + rarity = Rarity.LightPurple; + width = 84; + height = 84; + autoReuse = true; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool criticalStrikeChance) + { + target.AddBuff(ModContent.BuffType(), 480); + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ItemID.SoulofMight, 15); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/TitanicLongsword.png b/Items/Weapons/TitanicLongsword.png new file mode 100644 index 0000000..24cf759 Binary files /dev/null and b/Items/Weapons/TitanicLongsword.png differ diff --git a/Items/Weapons/TitanicPike.cs b/Items/Weapons/TitanicPike.cs new file mode 100644 index 0000000..f7f5c91 --- /dev/null +++ b/Items/Weapons/TitanicPike.cs @@ -0,0 +1,50 @@ +using Decimation.Items.Ores; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons +{ + internal class TitanicPike : DecimationWeapon + { + protected override string ItemName => "Titanic Pike"; + protected override int Damages => 120; + protected override string Projectile => "TitanicPikeProjectile"; + + protected override void InitWeapon() + { + criticalStrikeChance = 14; + knockBack = 12; + useStyle = 5; + this.item.value = Item.buyPrice(gold: 45); + rarity = Rarity.LightPurple; + this.item.noUseGraphic = true; + this.item.useTurn = true; + autoReuse = true; + width = 94; + height = 94; + useAnimation = 18; + useTime = 24; + shootSpeed = 3.7f; + } + + public override bool CanUseItem(Player player) + { + // Ensures no more than one spear can be thrown out, use this when using autoReuse + return player.ownedProjectileCounts[this.item.shoot] < 1; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ItemID.SoulofMight, 15); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/TitanicPike.png b/Items/Weapons/TitanicPike.png new file mode 100644 index 0000000..c4cf410 Binary files /dev/null and b/Items/Weapons/TitanicPike.png differ diff --git a/Items/Weapons/TitanicRepeater.cs b/Items/Weapons/TitanicRepeater.cs new file mode 100644 index 0000000..4452e78 --- /dev/null +++ b/Items/Weapons/TitanicRepeater.cs @@ -0,0 +1,45 @@ +using Decimation.Items.Ores; +using Decimation.Tiles; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons +{ + internal class TitanicRepeater : DecimationWeapon + { + protected override string ItemName => "Titanic Repeater"; + protected override DamageType DamagesType => DamageType.RANGED; + protected override int Damages => 120; + + protected override void InitWeapon() + { + width = 56; + height = 36; + criticalStrikeChance = 20; + useStyle = 5; + useTime = 12; + useAnimation = 12; + knockBack = 7; + this.item.shoot = 1; + this.item.useAmmo = AmmoID.Arrow; + useSound = SoundID.Item5; + shootSpeed = 25; + autoReuse = true; + this.item.value = Item.buyPrice(gold: 45); + rarity = Rarity.LightPurple; + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType()); + + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ItemID.SoulofMight, 15); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/TitanicRepeater.png b/Items/Weapons/TitanicRepeater.png new file mode 100644 index 0000000..0ec9249 Binary files /dev/null and b/Items/Weapons/TitanicRepeater.png differ diff --git a/Items/Weapons/VampiricEdge.cs b/Items/Weapons/VampiricEdge.cs new file mode 100644 index 0000000..c900e52 --- /dev/null +++ b/Items/Weapons/VampiricEdge.cs @@ -0,0 +1,62 @@ +using Decimation.Items.Misc.Souls; +using Decimation.Items.Weapons.Bloodshot; +using Decimation.Core.Items; +using Decimation.Core.Util; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Items.Weapons +{ + internal class VampiricEdge : DecimationWeapon + { + private readonly int shootDelay = 72; + private int _timeToShoot = 72; + + protected override string ItemName => "Vampiric Edge"; + protected override int Damages => 54; + protected override string Projectile => "Tooth"; + + protected override void InitWeapon() + { + width = 46; + height = 52; + criticalStrikeChance = 6; + knockBack = 4.5f; + useTime = 20; + useAnimation = 20; + shootSpeed = 5f; + this.item.value = Item.buyPrice(0, 3); + rarity = Rarity.Green; + autoReuse = true; + } + + public override void UpdateInventory(Player player) + { + if (_timeToShoot > 0) _timeToShoot--; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, + ref int type, ref int damage, ref float knockBack) + { + if (_timeToShoot > 0) return false; + + _timeToShoot = shootDelay; + + return base.Shoot(player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack); + } + + protected override ModRecipe GetRecipe() + { + ModRecipe recipe = GetNewModRecipe(this, 1, TileID.MythrilAnvil, true); + + recipe.AddIngredient(ItemID.BloodButcherer); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.SoulofNight, 10); + + return recipe; + } + } +} \ No newline at end of file diff --git a/Items/Weapons/VampiricEdge.png b/Items/Weapons/VampiricEdge.png new file mode 100644 index 0000000..a407257 Binary files /dev/null and b/Items/Weapons/VampiricEdge.png differ diff --git a/NPCs/AncientDuneWorm/AncientDuneWorm.cs b/NPCs/AncientDuneWorm/AncientDuneWorm.cs new file mode 100644 index 0000000..0384831 --- /dev/null +++ b/NPCs/AncientDuneWorm/AncientDuneWorm.cs @@ -0,0 +1,246 @@ +using System.IO; +using System.Linq; +using Decimation.Buffs.Debuffs; +using Decimation.Core.NPCs; +using Decimation.Projectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs.AncientDuneWorm +{ + [AutoloadBossHead] + internal class AncientDuneWormHead : AncientDuneWorm + { + private int _attackCounter; + private int _previousTile = -1; + private bool _spawnedAncientTombCrawler; + + public override void SetDefaults() + { + this.npc.lifeMax = 11000; + this.npc.damage = 65; + this.npc.defense = 15; + this.npc.knockBackResist = 0f; + this.npc.width = 160; + this.npc.height = 154; + this.npc.boss = true; + this.npc.lavaImmune = true; + this.npc.noGravity = true; + this.npc.noTileCollide = true; + this.npc.behindTiles = true; + this.npc.DeathSound = SoundID.NPCDeath18; + this.npc.HitSound = SoundID.NPCHit1; + Main.npcFrameCount[this.npc.type] = 1; + this.npc.value = Item.buyPrice(0, 2); + this.npc.npcSlots = 1f; + this.npc.netAlways = true; + this.npc.aiStyle = -1; + music = this.mod.GetSoundSlot(SoundType.Music, "Sounds/Music/The_Deserts_Call"); + } + + public override void Init() + { + base.Init(); + head = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(5) || !Main.expertMode && Main.rand.NextBool(2)) + target.AddBuff(ModContent.BuffType(), Main.expertMode ? 600 : 300); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (Main.rand.NextBool(5) || !Main.expertMode && Main.rand.NextBool(2)) + target.AddBuff(ModContent.BuffType(), Main.expertMode ? 600 : 300); + } + + public override void BossLoot(ref string name, ref int potionType) + { + name = "The Ancient Dune Worm"; + DecimationWorld.downedDuneWorm = true; + + potionType = ItemID.HealingPotion; + base.BossLoot(ref name, ref potionType); + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(_attackCounter); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + _attackCounter = reader.ReadInt32(); + } + + public override void CustomBehavior() + { + if (this.npc.life < this.npc.lifeMax / 2f) ComputeSpeed(); + if (Main.expertMode) SummonSandnado(); + if (Main.tile[(int) this.npc.Center.X / 16, (int) this.npc.Center.Y / 16].type != 0 && _previousTile == 0) + ShootAmmonite(); + + if (this.npc.life <= this.npc.lifeMax * 0.15f && + !_spawnedAncientTombCrawler && !NPC.AnyNPCs(ModContent.NPCType())) + { + if (Main.netMode != 1) + NPC.SpawnOnPlayer(this.npc.target, ModContent.NPCType()); + _spawnedAncientTombCrawler = true; + } + + _previousTile = Main.tile[(int) this.npc.Center.X / 16, (int) this.npc.Center.Y / 16].type; + } + + public override bool ShouldRun() + { + bool playersActive = Main.player.Any(p => p.active); + bool playersDead = Main.player.Any(p => p.dead); + + return !Main.player[this.npc.target].ZoneDesert || !playersActive || playersDead; + } + + private void ComputeSpeed() + { + const float ratio = 0.4545454f; + float deltaLife = this.npc.lifeMax / 2f - this.npc.life; + float addedSpeed = deltaLife * ratio / 1000f; + speed = BaseSpeed + addedSpeed; + } + + private void SummonSandnado() + { + int tile = Main.tile[(int) this.npc.Center.X / 16, (int) this.npc.Center.Y / 16].type; + + if (tile == 0 && + _previousTile != 0 && Main.netMode != 1) + Projectile.NewProjectile(this.npc.Center, new Vector2(0, 0), ProjectileID.SandnadoHostile, 15, 10f); + } + + private void ShootAmmonite() + { + Main.PlaySound(SoundID.Item14, this.npc.Center); + + // Smoke + for (int i = 0; i < 50; i++) + { + int dustIndex = Dust.NewDust(new Vector2(this.npc.position.X, this.npc.position.Y), this.npc.width, + this.npc.height, 31, 0f, 0f, 100, default, 2f); + Main.dust[dustIndex].velocity *= 1.4f; + } + + float x = this.npc.position.X + this.npc.width / 2f - 24f; + float y = this.npc.position.Y + this.npc.height / 2f - 24f; + + for (int g = 0; g < 2; g++) + { + int goreIndex = + Gore.NewGore( + new Vector2(x, y), default, Main.rand.Next(61, 64)); + Main.gore[goreIndex].scale = 1.5f; + Main.gore[goreIndex].velocity.X += 1.5f; + Main.gore[goreIndex].velocity.Y += 1.5f; + goreIndex = Gore.NewGore( + new Vector2(x, y), default, Main.rand.Next(61, 64)); + Main.gore[goreIndex].scale = 1.5f; + Main.gore[goreIndex].velocity.X -= 1.5f; + Main.gore[goreIndex].velocity.Y += 1.5f; + goreIndex = Gore.NewGore( + new Vector2(x, y), default, Main.rand.Next(61, 64)); + Main.gore[goreIndex].scale = 1.5f; + Main.gore[goreIndex].velocity.X += 1.5f; + Main.gore[goreIndex].velocity.Y -= 1.5f; + goreIndex = Gore.NewGore( + new Vector2(x, y), default, Main.rand.Next(61, 64)); + Main.gore[goreIndex].scale = 1.5f; + Main.gore[goreIndex].velocity.X -= 1.5f; + Main.gore[goreIndex].velocity.Y -= 1.5f; + } + + // Ammonite + int ammoniteNbr = Main.rand.Next(5, 9); + + if (Main.netMode != 1) + for (int i = 0; i < ammoniteNbr; i++) + Projectile.NewProjectile(this.npc.Center, + new Vector2(Main.rand.Next(-8, 9), Main.rand.Next(8, 15)), + ModContent.ProjectileType(), 15, 5f); + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 1.9f; //this make the NPC Health Bar bigger + return null; + } + } + + internal class AncientDuneWormBody : AncientDuneWorm + { + public override void SetDefaults() + { + this.npc.width = 92; + this.npc.height = 92; + this.npc.damage = 45; + this.npc.defense = 5; + this.npc.lifeMax = 1; + this.npc.knockBackResist = 0.0f; + this.npc.behindTiles = true; + this.npc.noTileCollide = true; + this.npc.netAlways = true; + this.npc.noGravity = true; + this.npc.dontCountMe = true; + this.npc.DeathSound = SoundID.NPCDeath18; + this.npc.HitSound = SoundID.NPCHit1; + } + } + + internal class AncientDuneWormTail : AncientDuneWorm + { + public override void SetDefaults() + { + this.npc.width = 136; + this.npc.height = 128; + this.npc.damage = 45; + this.npc.defense = 14; + this.npc.lifeMax = 1; + this.npc.knockBackResist = 0.0f; + this.npc.behindTiles = true; + this.npc.noTileCollide = true; + this.npc.netAlways = true; + this.npc.noGravity = true; + this.npc.dontCountMe = true; + this.npc.DeathSound = SoundID.NPCDeath18; + this.npc.HitSound = SoundID.NPCHit1; + } + + public override void Init() + { + base.Init(); + tail = true; + } + } + + public abstract class AncientDuneWorm : Worm + { + protected const float BaseSpeed = 10f; + + public override void SetStaticDefaults() + { + this.DisplayName.SetDefault("Ancient Dune Worm"); + } + + public override void Init() + { + minLength = 16; + maxLength = 16; + tailType = ModContent.NPCType(); + bodyType = ModContent.NPCType(); + headType = ModContent.NPCType(); + speed = BaseSpeed; + turnSpeed = 0.045f; + } + } +} \ No newline at end of file diff --git a/NPCs/AncientDuneWorm/AncientDuneWormBody.png b/NPCs/AncientDuneWorm/AncientDuneWormBody.png new file mode 100644 index 0000000..7db32a9 Binary files /dev/null and b/NPCs/AncientDuneWorm/AncientDuneWormBody.png differ diff --git a/NPCs/AncientDuneWorm/AncientDuneWormHead.png b/NPCs/AncientDuneWorm/AncientDuneWormHead.png new file mode 100644 index 0000000..e94e05e Binary files /dev/null and b/NPCs/AncientDuneWorm/AncientDuneWormHead.png differ diff --git a/NPCs/AncientDuneWorm/AncientDuneWormHead_Head_Boss.png b/NPCs/AncientDuneWorm/AncientDuneWormHead_Head_Boss.png new file mode 100644 index 0000000..68d3e1a Binary files /dev/null and b/NPCs/AncientDuneWorm/AncientDuneWormHead_Head_Boss.png differ diff --git a/NPCs/AncientDuneWorm/AncientDuneWormTail.png b/NPCs/AncientDuneWorm/AncientDuneWormTail.png new file mode 100644 index 0000000..8109526 Binary files /dev/null and b/NPCs/AncientDuneWorm/AncientDuneWormTail.png differ diff --git a/NPCs/AncientTombCrawlerBody.cs b/NPCs/AncientTombCrawlerBody.cs new file mode 100644 index 0000000..2a2dbf6 --- /dev/null +++ b/NPCs/AncientTombCrawlerBody.cs @@ -0,0 +1,93 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs +{ + public class AncientTombCrawlerBody : ModNPC + { + public override void SetStaticDefaults() + { + this.DisplayName.SetDefault("Ancient Tomb Crawler"); + } + + public override void SetDefaults() + { + this.npc.scale = 0.7f; + this.npc.width = 62; + this.npc.height = 62; + this.npc.damage = 20; + this.npc.defense = 1; + this.npc.lifeMax = 1; + this.npc.knockBackResist = 0.0f; + this.npc.behindTiles = true; + this.npc.noTileCollide = true; + this.npc.netAlways = true; + this.npc.noGravity = true; + this.npc.dontCountMe = true; + this.npc.HitSound = SoundID.NPCHit1; + } + + public override bool PreAI() + { + if (this.npc.ai[3] > 0) this.npc.realLife = (int) this.npc.ai[3]; + if (this.npc.target < 0 || this.npc.target == byte.MaxValue || Main.player[this.npc.target].dead) + this.npc.TargetClosest(); + if (Main.player[this.npc.target].dead && this.npc.timeLeft > 300) this.npc.timeLeft = 300; + + if (Main.netMode != 1) + if (!Main.npc[(int) this.npc.ai[1]].active) + { + this.npc.life = 0; + this.npc.HitEffect(); + this.npc.active = false; + NetMessage.SendData(28, -1, -1, null, this.npc.whoAmI, -1f); + } + + if (this.npc.ai[1] < (double) Main.npc.Length) + { + // We're getting the center of this NPC. + Vector2 npcCenter = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + // Then using that center, we calculate the direction towards the 'parent NPC' of this NPC. + float dirX = Main.npc[(int) this.npc.ai[1]].position.X + Main.npc[(int) this.npc.ai[1]].width / 2f - + npcCenter.X; + float dirY = Main.npc[(int) this.npc.ai[1]].position.Y + Main.npc[(int) this.npc.ai[1]].height / 2f - + npcCenter.Y; + // We then use Atan2 to get a correct rotation towards that parent NPC. + this.npc.rotation = (float) Math.Atan2(dirY, dirX) + 1.57f; + // We also get the length of the direction vector. + float length = (float) Math.Sqrt(dirX * dirX + dirY * dirY); + // We calculate a new, correct distance. + float dist = (length - this.npc.width) / length; + float posX = dirX * dist; + float posY = dirY * dist; + + // Reset the velocity of this NPC, because we don't want it to move on its own + this.npc.velocity = Vector2.Zero; + // And set this NPCs position accordingly to that of this NPCs parent NPC. + this.npc.position.X = this.npc.position.X + posX; + this.npc.position.Y = this.npc.position.Y + posY; + } + + return false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + Texture2D texture = Main.npcTexture[this.npc.type]; + Vector2 origin = new Vector2(texture.Width * 0.5f, texture.Height * 0.5f); + Main.spriteBatch.Draw(texture, this.npc.Center - Main.screenPosition, new Rectangle?(), drawColor, + this.npc.rotation, origin, this.npc.scale, SpriteEffects.None, 0); + return false; + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + return false; //this make that the npc does not have a health bar + } + } +} \ No newline at end of file diff --git a/NPCs/AncientTombCrawlerBody.png b/NPCs/AncientTombCrawlerBody.png new file mode 100644 index 0000000..004eaa4 Binary files /dev/null and b/NPCs/AncientTombCrawlerBody.png differ diff --git a/NPCs/AncientTombCrawlerHead.cs b/NPCs/AncientTombCrawlerHead.cs new file mode 100644 index 0000000..17a8686 --- /dev/null +++ b/NPCs/AncientTombCrawlerHead.cs @@ -0,0 +1,319 @@ +using System; +using Decimation.Items.Misc.Souls; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs +{ + public class AncientTombCrawlerHead : ModNPC + { + public override void SetStaticDefaults() + { + this.DisplayName.SetDefault("Ancient Tomb Crawler"); + } + + public override void SetDefaults() + { + this.npc.lifeMax = 2500; //this is the npc health + this.npc.damage = 50; //this is the npc damage + this.npc.defense = 1; //this is the npc defense + this.npc.knockBackResist = 0f; + this.npc.scale = 0.7f; + this.npc.width = 83; //this is where you put the npc sprite width. important + this.npc.height = 83; //this is where you put the npc sprite height. important + this.npc.lavaImmune = true; //this make the npc immune to lava + this.npc.noGravity = true; //this make the npc float + this.npc.noTileCollide = true; //this make the npc go tru walls + this.npc.HitSound = SoundID.NPCHit1; + this.npc.behindTiles = true; + this.npc.DeathSound = SoundID.NPCDeath1; + Main.npcFrameCount[this.npc.type] = 1; + this.npc.value = Item.buyPrice(0, 0, 1); + this.npc.npcSlots = 1f; + this.npc.netAlways = true; + this.npc.boss = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(20)) target.AddBuff(BuffID.Darkness, 600); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (Main.rand.NextBool(20)) target.AddBuff(BuffID.Darkness, 600); + } + + public override void NPCLoot() + { + Item.NewItem(npc.Center, ModContent.ItemType(), Main.rand.Next(5, 11)); + } + + public override void BossLoot(ref string name, ref int potionType) + { + name = "An Ancient Tomb Crawler"; + potionType = ItemID.HealingPotion; + + base.BossLoot(ref name, ref potionType); + } + + public override bool PreAI() + { + if (Main.netMode != 1) + // So, we start the AI off by checking if npc.ai[0] is 0. + // This is practically ALWAYS the case with a freshly spawned NPC, so this means this is the first update. + // Since this is the first update, we can safely assume we need to spawn the rest of the worm (bodies + tail). + if (this.npc.ai[0] == 0) + { + // So, here we assing the npc.realLife value. + // The npc.realLife value is mainly used to determine which NPC loses life when we hit this NPC. + // We don't want every single piece of the worm to have its own HP pool, so this is a neat way to fix that. + this.npc.realLife = this.npc.whoAmI; + // LatestNPC is going to be used later on and I'll explain it there. + int latestNPC = this.npc.whoAmI; + + // Here we determine the length of the worm. + // In this case the worm will have a length of 10 to 14 body parts. + int wormLength = 20; + for (int i = 0; i < wormLength; ++i) + { + // We spawn a new NPC, setting latestNPC to the newer NPC, whilst also using that same variable + // to set the parent of this new NPC. The parent of the new NPC (may it be a tail or body part) + // will determine the movement of this new NPC. + // Under there, we also set the realLife value of the new NPC, because of what is explained above. + latestNPC = NPC.NewNPC((int) this.npc.Center.X, (int) this.npc.Center.Y, + ModContent.NPCType(), this.npc.whoAmI, 0, latestNPC); + Main.npc[latestNPC].realLife = this.npc.whoAmI; + Main.npc[latestNPC].ai[3] = this.npc.whoAmI; + } + + // When we're out of that loop, we want to 'close' the worm with a tail part! + latestNPC = NPC.NewNPC((int) this.npc.Center.X, (int) this.npc.Center.Y, + ModContent.NPCType(), this.npc.whoAmI, 0, latestNPC); + Main.npc[latestNPC].realLife = this.npc.whoAmI; + Main.npc[latestNPC].ai[3] = this.npc.whoAmI; + + // We're setting npc.ai[0] to 1, so that this 'if' is not triggered again. + this.npc.ai[0] = 1; + this.npc.netUpdate = true; + } + + int minTilePosX = (int) (this.npc.position.X / 16.0) - 1; + int maxTilePosX = (int) ((this.npc.position.X + this.npc.width) / 16.0) + 2; + int minTilePosY = (int) (this.npc.position.Y / 16.0) - 1; + int maxTilePosY = (int) ((this.npc.position.Y + this.npc.height) / 16.0) + 2; + if (minTilePosX < 0) + minTilePosX = 0; + if (maxTilePosX > Main.maxTilesX) + maxTilePosX = Main.maxTilesX; + if (minTilePosY < 0) + minTilePosY = 0; + if (maxTilePosY > Main.maxTilesY) + maxTilePosY = Main.maxTilesY; + + bool collision = false; + // This is the initial check for collision with tiles. + for (int i = minTilePosX; i < maxTilePosX; ++i) + for (int j = minTilePosY; j < maxTilePosY; ++j) + if (Main.tile[i, j] != null && + (Main.tile[i, j].nactive() && (Main.tileSolid[Main.tile[i, j].type] || + Main.tileSolidTop[Main.tile[i, j].type] && + Main.tile[i, j].frameY == 0) || Main.tile[i, j].liquid > 64)) + { + Vector2 vector2; + vector2.X = i * 16; + vector2.Y = j * 16; + if (this.npc.position.X + this.npc.width > vector2.X && this.npc.position.X < vector2.X + 16.0 && + this.npc.position.Y + this.npc.height > (double) vector2.Y && + this.npc.position.Y < vector2.Y + 16.0) + { + collision = true; + if (Main.rand.Next(100) == 0 && Main.tile[i, j].nactive()) + WorldGen.KillTile(i, j, true, true); + } + } + + // If there is no collision with tiles, we check if the distance between this NPC and its target is too large, so that we can still trigger 'collision'. + if (!collision) + { + Rectangle rectangle1 = new Rectangle((int) this.npc.position.X, (int) this.npc.position.Y, + this.npc.width, this.npc.height); + int maxDistance = 1000; + bool playerCollision = true; + for (int index = 0; index < 255; ++index) + if (Main.player[index].active) + { + Rectangle rectangle2 = new Rectangle((int) Main.player[index].position.X - maxDistance, + (int) Main.player[index].position.Y - maxDistance, maxDistance * 2, maxDistance * 2); + if (rectangle1.Intersects(rectangle2)) + { + playerCollision = false; + break; + } + } + + if (playerCollision) + collision = true; + } + + // speed determines the max speed at which this NPC can move. + // Higher value = faster speed. + float speed = 15f; + // acceleration is exactly what it sounds like. The speed at which this NPC accelerates. + float acceleration = 0.12f; + + Vector2 npcCenter = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + float targetXPos = Main.player[this.npc.target].position.X + Main.player[this.npc.target].width / 2f; + float targetYPos = Main.player[this.npc.target].position.Y + Main.player[this.npc.target].height / 2f; + + float targetRoundedPosX = (int) (targetXPos / 16.0) * 16; + float targetRoundedPosY = (int) (targetYPos / 16.0) * 16; + npcCenter.X = (int) (npcCenter.X / 16.0) * 16; + npcCenter.Y = (int) (npcCenter.Y / 16.0) * 16; + float dirX = targetRoundedPosX - npcCenter.X; + float dirY = targetRoundedPosY - npcCenter.Y; + + float length = (float) Math.Sqrt(dirX * dirX + dirY * dirY); + // If we do not have any type of collision, we want the NPC to fall down and de-accelerate along the X axis. + if (!collision) + { + this.npc.TargetClosest(); + this.npc.velocity.Y = this.npc.velocity.Y + 0.11f; + if (this.npc.velocity.Y > speed) this.npc.velocity.Y = speed; + if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < speed * 0.4) + { + if (this.npc.velocity.X < 0.0) + this.npc.velocity.X = this.npc.velocity.X - acceleration * 1.1f; + else + this.npc.velocity.X = this.npc.velocity.X + acceleration * 1.1f; + } + else if (this.npc.velocity.Y == speed) + { + if (this.npc.velocity.X < dirX) + this.npc.velocity.X = this.npc.velocity.X + acceleration; + else if (this.npc.velocity.X > dirX) this.npc.velocity.X = this.npc.velocity.X - acceleration; + } + else if (this.npc.velocity.Y > 4.0) + { + if (this.npc.velocity.X < 0.0) + this.npc.velocity.X = this.npc.velocity.X + acceleration * 0.9f; + else + this.npc.velocity.X = this.npc.velocity.X - acceleration * 0.9f; + } + } + // Else we want to play some audio (soundDelay) and move towards our target. + else + { + if (this.npc.soundDelay == 0) + { + this.npc.soundDelay = 120; + Main.PlaySound(this.mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/Earthquake"), + this.npc.Center); + } + + float absDirX = Math.Abs(dirX); + float absDirY = Math.Abs(dirY); + float newSpeed = speed / length; + dirX = dirX * newSpeed; + dirY = dirY * newSpeed; + if (this.npc.velocity.X > 0.0 && dirX > 0.0 || this.npc.velocity.X < 0.0 && dirX < 0.0 || + this.npc.velocity.Y > 0.0 && dirY > 0.0 || this.npc.velocity.Y < 0.0 && dirY < 0.0) + { + if (this.npc.velocity.X < dirX) + this.npc.velocity.X = this.npc.velocity.X + acceleration; + else if (this.npc.velocity.X > dirX) this.npc.velocity.X = this.npc.velocity.X - acceleration; + if (this.npc.velocity.Y < dirY) + this.npc.velocity.Y = this.npc.velocity.Y + acceleration; + else if (this.npc.velocity.Y > dirY) this.npc.velocity.Y = this.npc.velocity.Y - acceleration; + if (Math.Abs(dirY) < speed * 0.2 && + (this.npc.velocity.X > 0.0 && dirX < 0.0 || this.npc.velocity.X < 0.0 && dirX > 0.0)) + { + if (this.npc.velocity.Y > 0.0) + this.npc.velocity.Y = this.npc.velocity.Y + acceleration * 2f; + else + this.npc.velocity.Y = this.npc.velocity.Y - acceleration * 2f; + } + + if (Math.Abs(dirX) < speed * 0.2 && + (this.npc.velocity.Y > 0.0 && dirY < 0.0 || this.npc.velocity.Y < 0.0 && dirY > 0.0)) + { + if (this.npc.velocity.X > 0.0) + this.npc.velocity.X = this.npc.velocity.X + acceleration * 2f; + else + this.npc.velocity.X = this.npc.velocity.X - acceleration * 2f; + } + } + else if (absDirX > absDirY) + { + if (this.npc.velocity.X < dirX) + this.npc.velocity.X = this.npc.velocity.X + acceleration * 1.1f; + else if (this.npc.velocity.X > dirX) + this.npc.velocity.X = this.npc.velocity.X - acceleration * 1.1f; + if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < speed * 0.5) + { + if (this.npc.velocity.Y > 0.0) + this.npc.velocity.Y = this.npc.velocity.Y + acceleration; + else + this.npc.velocity.Y = this.npc.velocity.Y - acceleration; + } + } + else + { + if (this.npc.velocity.Y < dirY) + this.npc.velocity.Y = this.npc.velocity.Y + acceleration * 1.1f; + else if (this.npc.velocity.Y > dirY) + this.npc.velocity.Y = this.npc.velocity.Y - acceleration * 1.1f; + if (Math.Abs(this.npc.velocity.X) + Math.Abs(this.npc.velocity.Y) < speed * 0.5) + { + if (this.npc.velocity.X > 0.0) + this.npc.velocity.X = this.npc.velocity.X + acceleration; + else + this.npc.velocity.X = this.npc.velocity.X - acceleration; + } + } + } + + // Set the correct rotation for this NPC. + this.npc.rotation = (float) Math.Atan2(this.npc.velocity.Y, this.npc.velocity.X) + 1.57f; + + // Some netupdate stuff (multiplayer compatibility). + if (collision) + { + if (this.npc.localAI[0] != 1) this.npc.netUpdate = true; + this.npc.localAI[0] = 1f; + } + else + { + if (this.npc.localAI[0] != 0.0) this.npc.netUpdate = true; + this.npc.localAI[0] = 0.0f; + } + + if ((this.npc.velocity.X > 0.0 && this.npc.oldVelocity.X < 0.0 || + this.npc.velocity.X < 0.0 && this.npc.oldVelocity.X > 0.0 || + this.npc.velocity.Y > 0.0 && this.npc.oldVelocity.Y < 0.0 || + this.npc.velocity.Y < 0.0 && this.npc.oldVelocity.Y > 0.0) && + !this.npc.justHit) this.npc.netUpdate = true; + + return false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + Texture2D texture = Main.npcTexture[this.npc.type]; + Vector2 origin = new Vector2(texture.Width * 0.5f, texture.Height * 0.5f); + Main.spriteBatch.Draw(texture, this.npc.Center - Main.screenPosition, new Rectangle?(), drawColor, + this.npc.rotation, origin, this.npc.scale, SpriteEffects.None, 0); + return false; + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 1.9f; //this make the NPC Health Bar biger + return null; + } + } +} \ No newline at end of file diff --git a/NPCs/AncientTombCrawlerHead.png b/NPCs/AncientTombCrawlerHead.png new file mode 100644 index 0000000..57fe0d8 Binary files /dev/null and b/NPCs/AncientTombCrawlerHead.png differ diff --git a/NPCs/AncientTombCrawlerTail.cs b/NPCs/AncientTombCrawlerTail.cs new file mode 100644 index 0000000..3f1ca66 --- /dev/null +++ b/NPCs/AncientTombCrawlerTail.cs @@ -0,0 +1,91 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs +{ + class AncientTombCrawlerTail : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ancient Tomb Crawler"); + } + + public override void SetDefaults() + { + npc.scale = 0.7f; + npc.width = 67; //this is where you put the npc sprite width. important + npc.height = 67; //this is where you put the npc sprite height. important + npc.damage = 20; + npc.defense = 1; + npc.lifeMax = 1; + npc.knockBackResist = 0.0f; + npc.behindTiles = true; + npc.noTileCollide = true; + npc.netAlways = true; + npc.noGravity = true; + npc.dontCountMe = true; + npc.HitSound = SoundID.NPCHit1; + } + + public override bool PreAI() + { + if (npc.ai[3] > 0) + npc.realLife = (int)npc.ai[3]; + if (npc.target < 0 || npc.target == byte.MaxValue || Main.player[npc.target].dead) + npc.TargetClosest(true); + if (Main.player[npc.target].dead && npc.timeLeft > 300) + npc.timeLeft = 300; + + if (Main.netMode != 1) + { + if (!Main.npc[(int)npc.ai[1]].active) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.active = false; + NetMessage.SendData(28, -1, -1, null, npc.whoAmI, -1f, 0.0f, 0.0f, 0, 0, 0); + } + } + + if (npc.ai[1] < (double)Main.npc.Length) + { + // We're getting the center of this NPC. + Vector2 npcCenter = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + // Then using that center, we calculate the direction towards the 'parent NPC' of this NPC. + float dirX = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - npcCenter.X; + float dirY = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - npcCenter.Y; + // We then use Atan2 to get a correct rotation towards that parent NPC. + npc.rotation = (float)Math.Atan2(dirY, dirX) + 1.57f; + // We also get the length of the direction vector. + float length = (float)Math.Sqrt(dirX * dirX + dirY * dirY); + // We calculate a new, correct distance. + float dist = (length - (float)npc.width) / length; + float posX = dirX * dist; + float posY = dirY * dist; + + // Reset the velocity of this NPC, because we don't want it to move on its own + npc.velocity = Vector2.Zero; + // And set this NPCs position accordingly to that of this NPCs parent NPC. + npc.position.X = npc.position.X + posX; + npc.position.Y = npc.position.Y + posY; + } + return false; + } + + public override bool PreDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Color drawColor) + { + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 origin = new Vector2(texture.Width * 0.5f, texture.Height * 0.5f); + Main.spriteBatch.Draw(texture, npc.Center - Main.screenPosition, new Rectangle?(), drawColor, npc.rotation, origin, npc.scale, SpriteEffects.None, 0); + return false; + } + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + return false; //this make that the npc does not have a health bar + } + } +} diff --git a/NPCs/AncientTombCrawlerTail.png b/NPCs/AncientTombCrawlerTail.png new file mode 100644 index 0000000..4bfffa2 Binary files /dev/null and b/NPCs/AncientTombCrawlerTail.png differ diff --git a/NPCs/Arachnus/Arachnus.cs b/NPCs/Arachnus/Arachnus.cs new file mode 100644 index 0000000..0a87bf9 --- /dev/null +++ b/NPCs/Arachnus/Arachnus.cs @@ -0,0 +1,359 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Decimation.Buffs.Debuffs; +using Decimation.Items.Boss.Arachnus; +using Decimation.Items.Misc.Souls; +using Decimation.Items.Weapons.Arachnus; +using Decimation.Projectiles; +using Decimation.Tiles.ShrineoftheMoltenOne; + +namespace Decimation.NPCs.Arachnus +{ + [AutoloadBossHead] + class Arachnus : ModNPC + { + private int counter = 0; + private int counterMax = 1320; + private float speed = 2; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arachnus"); + Main.npcFrameCount[npc.type] = 4; + } + + public override void SetDefaults() + { + npc.aiStyle = -1; + npc.lifeMax = 80000; + npc.damage = 100; + npc.defense = 25; + npc.knockBackResist = 0f; + npc.width = 200; + npc.height = 200; + npc.value = 50000; + npc.npcSlots = 1f; + npc.boss = true; + npc.lavaImmune = true; + npc.noGravity = true; + npc.noTileCollide = false; // When not enraged + npc.HitSound = SoundID.NPCHit6; + npc.DeathSound = SoundID.NPCDeath10; + music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Drums_of_hell"); + bossBag = ModContent.ItemType(); + + npc.lavaImmune = true; + npc.buffImmune[BuffID.OnFire] = true; + npc.buffImmune[BuffID.Burning] = true; + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.625f * bossLifeScale); + npc.damage = (int)(npc.damage * 0.6f); + npc.defense = (int)(npc.defense + numPlayers * 2); + } + + private bool CheckDispawn() + { + bool playersActive = false; + bool playersDead = true; + + foreach (Player player in Main.player) + { + if (player.active) playersActive = true; + if (!player.dead) playersDead = false; + } + + return playersDead || !playersActive; + } + + private void Move() + { + // Rotate to player + Vector2 moveTo = Main.player[npc.target].Center - npc.Center; + float angle = (float)Math.Atan2(moveTo.Y, moveTo.X); + npc.rotation = (float)(angle + Math.PI * 0.5f); + + // Move + Vector2 move = moveTo; + float magnitude = (float)Math.Sqrt(move.X * move.X + move.Y * move.Y); + if (magnitude > speed) + { + move *= speed / magnitude; + } + float turnResistance = 50f; + move = (npc.velocity * turnResistance + move) / (turnResistance + 1f); + magnitude = (float)Math.Sqrt(move.X * move.X + move.Y * move.Y); + if (magnitude > speed) + { + move *= speed / magnitude; + } + + npc.velocity = npc.ai[1] != 99 ? move : new Vector2(0, 0); + } + + private bool CheckForShrine() + { + bool tooFarFromShrine = true; + if (counter % 60 == 0) + { + int validBlockCount = 0; + for (int i = (int)(-50 + npc.Center.X / 16f); i <= (int)(50 + npc.Center.X / 16f); i++) + { + for (int j = (int)(-50 + npc.Center.Y / 16f); j <= (int)(50 + npc.Center.Y / 16f); j++) + { + if (i >= 0 && i <= Main.maxTilesX && j >= 0 && j <= Main.maxTilesY) + { + if (Main.tile[i, j].type == ModContent.TileType() || (Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType()) || Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType()) + validBlockCount++; + } + } + } + if (validBlockCount < 15) + tooFarFromShrine = true; + else + tooFarFromShrine = false; + } + else + { + return npc.ai[2] == 1; + } + + return tooFarFromShrine; + } + + private void CheckEnraged() + { + npc.ai[2] = !Main.player[npc.target].ZoneUnderworldHeight || !Collision.CanHit(npc.Center, 0, 0, Main.player[npc.target].Center, 0, 0) || CheckForShrine() ? 1 : 0; + } + + public override void AI() + { + if (CheckDispawn()) + { + npc.velocity = new Vector2(0, 10f); + npc.noTileCollide = true; + if (npc.timeLeft > 10) + { + npc.timeLeft = 10; + } + } + + npc.TargetClosest(true); + + CheckEnraged(); + + // Normal ai + if (npc.ai[0] == 0) + { + float mouthX = (float)(((npc.height) / 2) * Math.Cos(npc.rotation - Math.PI * 0.5f)) + npc.Center.X; + float mouthY = (float)(((npc.height) / 2) * Math.Sin(npc.rotation - Math.PI * 0.5f)) + npc.Center.Y; + + //Counter + if (npc.life <= npc.lifeMax / 2) counterMax = 1500; + if (counter >= counterMax && Main.netMode != 1) + { + counter = 0; + npc.netUpdate = true; + } + + // Fireballs + if (counter <= 600) npc.ai[1] = 0; + else if (counter > 600 && counter < 800) npc.ai[1] = 98; + // Blast of Heat + else if (counter >= 800 && counter <= 1100) + { + npc.ai[1] = 1; + } + // Increase speed + else if (counter > 1320 && counter <= 1500 || (Main.expertMode && counter > 600 && counter < 800 && npc.life <= npc.lifeMax / 4)) + { + if (counter == 1321) + { + Main.PlaySound(SoundID.Roar, (int)npc.position.X, (int)npc.position.Y, 0); + if (Main.netMode == 2) + GetPacket(ArachnusMessageType.RoarSound).Send(); + } + npc.ai[1] = 2; + } + else npc.ai[1] = 99; + + if (counter % 40 == 0 && npc.ai[1] == 0 && Main.netMode != 1) + { + float speedX = (float)(6 * Math.Cos(npc.rotation - Math.PI * 0.5f)) * 2; + float speedY = (float)(6 * Math.Sin(npc.rotation - Math.PI * 0.5f)) * 2; + Projectile.NewProjectile(new Vector2(mouthX, mouthY), new Vector2(speedX, speedY), ModContent.ProjectileType(), 30, 0f); + } + else if (counter % 5 == 0 && npc.ai[1] == 1) + { + if (Main.netMode != 1) + { + float speedX = (float)(7 * Math.Cos(npc.rotation - Math.PI * 0.5f)); + float speedY = (float)(7 * Math.Sin(npc.rotation - Math.PI * 0.5f)); + Projectile.NewProjectile(new Vector2(mouthX, mouthY), new Vector2(speedX, speedY), npc.ai[2] == 1 ? ModContent.ProjectileType() : ModContent.ProjectileType(), 30, 0f, 255); + } + Main.PlaySound(SoundID.Item34, npc.position); + if (Main.netMode == 2) + GetPacket(ArachnusMessageType.FlamesSound).Send(); + } + else if (npc.ai[1] == 2) + { + speed = 20f; + if (Main.expertMode) + { + speed = (npc.lifeMax - npc.life) / 500; + if (npc.ai[2] == 1) + speed += 20; + } + else if (npc.ai[2] == 1) + speed = 40f; + } + + if (npc.ai[1] != 2) + { + speed = 2f; + } + + // Enraged + if (npc.ai[2] == 1) + { + npc.noTileCollide = true; + Dust.NewDust(npc.position, npc.width, npc.height, DustID.Shadowflame); + + if (npc.ai[1] != 2) + { + speed = 6f; + npc.defense = 300; + } + } + + counter++; + } + + Move(); + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(counter); + writer.Write(counterMax); + writer.Write(speed); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + counter = reader.ReadInt32(); + counterMax = reader.ReadInt32(); + speed = reader.ReadSingle(); + } + + private ModPacket GetPacket(ArachnusMessageType type) + { + ModPacket packet = mod.GetPacket(); + packet.Write((byte)DecimationModMessageType.Arachnus); + packet.Write(npc.whoAmI); + packet.Write((byte)type); + return packet; + } + public void HandlePacket(BinaryReader reader) + { + ArachnusMessageType type = (ArachnusMessageType)reader.ReadByte(); + switch (type) + { + case ArachnusMessageType.RoarSound: + Main.PlaySound(SoundID.Roar, (int)npc.position.X, (int)npc.position.Y, 0); + break; + case ArachnusMessageType.FlamesSound: + Main.PlaySound(SoundID.Item34, npc.position); + break; + } + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (npc.ai[1] == 2 && Main.expertMode) + { + target.AddBuff(ModContent.BuffType(), 900); + } + base.OnHitPlayer(target, damage, crit); + } + + public override void FindFrame(int frameHeight) + { + npc.frameCounter += 3f; + if (npc.frameCounter >= 40) + npc.frameCounter = 0; + npc.frame.Y = ((int)npc.frameCounter / 10) * frameHeight; + } + + public override void NPCLoot() + { + Item.NewItem(npc.Center, ModContent.ItemType(), Main.rand.Next(15, 31)); + + if (!Main.expertMode) + { + int rand = Main.rand.Next(3); + if (rand == 0) + Item.NewItem(npc.Center, ModContent.ItemType()); + else if (rand == 1) + Item.NewItem(npc.Center, ModContent.ItemType()); + else if (rand == 2) + Item.NewItem(npc.Center, ModContent.ItemType()); + } + else + { + npc.DropBossBags(); + } + } + + public override void BossLoot(ref string name, ref int potionType) + { + name = "Arachnus"; + // Maybe better + potionType = ItemID.SuperHealingPotion; + + DecimationWorld.downedArachnus = true; + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 1.5f; + return null; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + Vector2 frameSize = new Vector2(298, 318); + Texture2D texture = mod.GetTexture("NPCs/Arachnus/Arachnus"); + + spriteBatch.Draw + ( + texture, + new Vector2 + ( + npc.position.X - Main.screenPosition.X + frameSize.X * 0.34f, + npc.position.Y - Main.screenPosition.Y + frameSize.Y * 0.31f + ), + npc.frame, + drawColor, + npc.rotation, + frameSize * 0.5f, + npc.scale, + SpriteEffects.None, + 0f + ); + return false; + } + + public enum ArachnusMessageType + { + RoarSound, + FlamesSound + } + } +} diff --git a/NPCs/Arachnus/Arachnus.png b/NPCs/Arachnus/Arachnus.png new file mode 100644 index 0000000..dc328b9 Binary files /dev/null and b/NPCs/Arachnus/Arachnus.png differ diff --git a/NPCs/Arachnus/Arachnus_Head_Boss.png b/NPCs/Arachnus/Arachnus_Head_Boss.png new file mode 100644 index 0000000..3638456 Binary files /dev/null and b/NPCs/Arachnus/Arachnus_Head_Boss.png differ diff --git a/NPCs/Bloodshot/BloodshotEye.cs b/NPCs/Bloodshot/BloodshotEye.cs new file mode 100644 index 0000000..1750f67 --- /dev/null +++ b/NPCs/Bloodshot/BloodshotEye.cs @@ -0,0 +1,793 @@ +using System; +using System.IO; +using Decimation.Items.Boss.Bloodshot; +using Decimation.Items.Misc; +using Decimation.Items.Weapons.Bloodshot; +using Decimation.Projectiles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs.Bloodshot +{ + [AutoloadBossHead] + internal class BloodshotEye : ModNPC + { + private bool _hasSpawnedMinions; + + public override void SetStaticDefaults() + { + this.DisplayName.SetDefault("The Bloodshot Eye"); + Main.npcFrameCount[this.npc.type] = 3; + } + + public override void SetDefaults() + { + this.npc.width = 110; + this.npc.height = 110; + this.npc.value = 70000; + this.npc.aiStyle = -1; + this.npc.defense = 18; + this.npc.damage = 54; + this.npc.lifeMax = 8500; + this.npc.noGravity = true; + this.npc.noTileCollide = true; + this.npc.boss = true; + this.npc.aiStyle = -1; + this.npc.knockBackResist = 0; + this.npc.dontTakeDamage = true; + bossBag = ModContent.ItemType(); + } + + public override void AI() + { + // Minions + if (!_hasSpawnedMinions) + { + if (Main.netMode != 1) + for (int i = 0; i < (Main.expertMode ? 14 : 10); i++) + NPC.NewNPC((int) npc.Center.X, (int) this.npc.Center.Y, ModContent.NPCType(), + 0, 0, this.npc.whoAmI); + + _hasSpawnedMinions = true; + this.npc.dontTakeDamage = true; + } + + if (!NPC.AnyNPCs(ModContent.NPCType())) this.npc.dontTakeDamage = false; + + // --> EoC phase 1 + if (this.npc.ai[0] == 0f) + { + // --> Custom + // Blood + + if (Main.rand.NextBool(10) && Main.netMode != 1) + { + Vector2 cloudPosition = this.npc.position; + cloudPosition.X += Main.rand.Next(this.npc.width / 2) + this.npc.width / 4; + cloudPosition.Y += this.npc.height / 2; + int proj = Projectile.NewProjectile(cloudPosition, new Vector2(0, 10), ProjectileID.BloodRain, + Main.expertMode ? 20 : 12, 0); + Main.projectile[proj].hostile = true; + Main.projectile[proj].friendly = false; + } + // <-- Custom + + float num11; + Color newColor; + Vector2 vector; + bool flag2 = false; + if (Main.expertMode && this.npc.life < this.npc.lifeMax * 0.12) flag2 = true; + bool flag3 = false; + if (Main.expertMode && this.npc.life < this.npc.lifeMax * 0.04) flag3 = true; + float num8 = 20f; + if (flag3) num8 = 10f; + if (this.npc.target < 0 || this.npc.target == 255 || Main.player[this.npc.target].dead || + !Main.player[this.npc.target].active) this.npc.TargetClosest(); + float num9 = this.npc.position.X + this.npc.width / 2 - Main.player[this.npc.target].position.X - + Main.player[this.npc.target].width / 2; + float num10 = this.npc.position.Y + this.npc.height - 59f - Main.player[this.npc.target].position.Y - + Main.player[this.npc.target].height / 2; + num11 = (float) Math.Atan2(num10, num9) + 1.57f; + if (num11 < 0f) + num11 += 6.283f; + else if (num11 > 6.283) num11 -= 6.283f; + float num12 = 0f; + if (this.npc.ai[0] == 0f && this.npc.ai[1] == 0f) num12 = 0.02f; + if (this.npc.ai[0] == 0f && this.npc.ai[1] == 2f && this.npc.ai[2] > 40f) num12 = 0.05f; + if (this.npc.ai[0] == 3f && this.npc.ai[1] == 0f) num12 = 0.05f; + if (this.npc.ai[0] == 3f && this.npc.ai[1] == 2f && this.npc.ai[2] > 40f) num12 = 0.08f; + if (this.npc.ai[0] == 3f && this.npc.ai[1] == 4f && this.npc.ai[2] > num8) num12 = 0.15f; + if (this.npc.ai[0] == 3f && this.npc.ai[1] == 5f) num12 = 0.05f; + if (Main.expertMode) num12 *= 1.5f; + if (flag3 && Main.expertMode) num12 = 0f; + if (this.npc.rotation < num11) + { + if (num11 - this.npc.rotation > 3.1415) + this.npc.rotation -= num12; + else + this.npc.rotation += num12; + } + else if (this.npc.rotation > num11) + { + if (this.npc.rotation - num11 > 3.1415) + this.npc.rotation += num12; + else + this.npc.rotation -= num12; + } + + if (this.npc.rotation > num11 - num12 && this.npc.rotation < num11 + num12) this.npc.rotation = num11; + if (this.npc.rotation < 0f) + this.npc.rotation += 6.283f; + else if (this.npc.rotation > 6.283) this.npc.rotation -= 6.283f; + if (this.npc.rotation > num11 - num12 && this.npc.rotation < num11 + num12) this.npc.rotation = num11; + if (Main.rand.Next(5) == 0) + { + Vector2 position = new Vector2(this.npc.position.X, this.npc.position.Y + this.npc.height * 0.25f); + int width = this.npc.width; + int height = (int) (this.npc.height * 0.5f); + float x = this.npc.velocity.X; + newColor = default; + int num13 = Dust.NewDust(position, width, height, 5, x, 2f, 0, newColor); + Dust dust = Main.dust[num13]; + dust.velocity.X = dust.velocity.X * 0.5f; + Dust dust2 = Main.dust[num13]; + dust2.velocity.Y = dust2.velocity.Y * 0.1f; + } + + bool dead = Main.player[this.npc.target].dead; + if (Main.dayTime | dead) + { + this.npc.velocity.Y = this.npc.velocity.Y - 0.04f; + if (this.npc.timeLeft > 10) this.npc.timeLeft = 10; + } + else + { + if (this.npc.ai[1] == 0f) + { + float num14 = 5f; + float num15 = 0.04f; + if (Main.expertMode) + { + num15 = 0.15f; + num14 = 7f; + } + + vector = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + float num16 = Main.player[this.npc.target].position.X + Main.player[this.npc.target].width / 2 - + vector.X; + float num17 = Main.player[this.npc.target].position.Y + + Main.player[this.npc.target].height / 2 - 200f - vector.Y; + float num18 = (float) Math.Sqrt(num16 * num16 + num17 * num17); + float num19 = num18; + num18 = num14 / num18; + num16 *= num18; + num17 *= num18; + if (this.npc.velocity.X < num16) + { + this.npc.velocity.X = this.npc.velocity.X + num15; + if (this.npc.velocity.X < 0f && num16 > 0f) + this.npc.velocity.X = this.npc.velocity.X + num15; + } + else if (this.npc.velocity.X > num16) + { + this.npc.velocity.X = this.npc.velocity.X - num15; + if (this.npc.velocity.X > 0f && num16 < 0f) + this.npc.velocity.X = this.npc.velocity.X - num15; + } + + if (this.npc.velocity.Y < num17) + { + this.npc.velocity.Y = this.npc.velocity.Y + num15; + if (this.npc.velocity.Y < 0f && num17 > 0f) + this.npc.velocity.Y = this.npc.velocity.Y + num15; + } + else if (this.npc.velocity.Y > num17) + { + this.npc.velocity.Y = this.npc.velocity.Y - num15; + if (this.npc.velocity.Y > 0f && num17 < 0f) + this.npc.velocity.Y = this.npc.velocity.Y - num15; + } + + if (this.npc.ai[2] % 60 == 0) + { + float num416 = 6f; + int num417 = 30; + if (Main.expertMode) num417 = 27; + int num418 = ModContent.ProjectileType(); + Vector2 vector41 = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + float num413 = Main.player[this.npc.target].position.X + + Main.player[this.npc.target].width / 2 - vector41.X; + float num414 = Main.player[this.npc.target].position.Y + + Main.player[this.npc.target].height / 2 - vector41.Y; + float num415 = (float) Math.Sqrt(num413 * num413 + num414 * num414); + num415 = num416 / num415; + num413 *= num415; + num414 *= num415; + num414 += Main.rand.Next(-40, 41) * 0.01f; + num413 += Main.rand.Next(-40, 41) * 0.01f; + num414 += this.npc.velocity.Y * 0.5f; + num413 += this.npc.velocity.X * 0.5f; + vector41.X -= num413 * 2f; + vector41.Y -= num414 * 1f; + Projectile.NewProjectile(vector41.X, vector41.Y, num413, num414, num418, num417, 0f); + + if (Main.expertMode) + { + num418 = ModContent.ProjectileType(); + num414 += (float) (Math.PI * (1 / 6f)); + Projectile.NewProjectile(vector41.X, vector41.Y, num413, num414, num418, num417, 1f); + } + } + + this.npc.ai[2] += 1f; + float num20 = 600f; + if (Main.expertMode) num20 *= 0.35f; + if (this.npc.ai[2] >= num20) + { + this.npc.ai[1] = 1f; + this.npc.ai[2] = 0f; + this.npc.ai[3] = 0f; + this.npc.target = 255; + this.npc.netUpdate = true; + } + else + { + if (this.npc.position.Y + this.npc.height < Main.player[this.npc.target].position.Y && + num19 < 500f) + { + if (!Main.player[this.npc.target].dead) this.npc.ai[3] += 1f; + float num1449 = 110f; + if (Main.expertMode) num1449 *= 0.4f; + if (this.npc.ai[3] >= num1449) + { + this.npc.ai[3] = 0f; + this.npc.rotation = num11; + } + + float num1461 = 0.5f; + if (Main.expertMode) num1461 = 0.65f; + if (this.npc.life < this.npc.lifeMax * num1461) + { + // 2nd phase + this.npc.ai[0] = 1f; + this.npc.ai[1] = 0f; + this.npc.ai[2] = 0f; + this.npc.ai[3] = 0f; + this.npc.netUpdate = true; + if (this.npc.netSpam > 10) this.npc.netSpam = 10; + } + } + + if (Main.expertMode && num19 < 500f) + { + if (!Main.player[this.npc.target].dead) this.npc.ai[3] += 1f; + float num1449 = 110f; + if (Main.expertMode) num1449 *= 0.4f; + if (this.npc.ai[3] >= num1449) + { + this.npc.ai[3] = 0f; + this.npc.rotation = num11; + float num1450 = 5f; + if (Main.expertMode) num1450 = 6f; + float num1451 = Main.player[this.npc.target].position.X + + Main.player[this.npc.target].width / 2 - vector.X; + float num1452 = Main.player[this.npc.target].position.Y + + Main.player[this.npc.target].height / 2 - vector.Y; + float num1453 = (float) Math.Sqrt(num1451 * num1451 + num1452 * num1452); + num1453 = num1450 / num1453; + Vector2 vector252 = vector; + Vector2 vector253 = default; + vector253.X = num1451 * num1453; + vector253.Y = num1452 * num1453; + vector252.X += vector253.X * 10f; + vector252.Y += vector253.Y * 10f; + Main.PlaySound(3, (int) vector252.X, (int) vector252.Y); + int num2; + for (int num1455 = 0; num1455 < 10; num1455 = num2 + 1) + { + Vector2 position102 = vector252; + float speedX31 = vector253.X * 0.4f; + float speedY30 = vector253.Y * 0.4f; + newColor = default; + Dust.NewDust(position102, 20, 20, 5, speedX31, speedY30, 0, newColor); + num2 = num1455; + } + } + + float num1461 = 0.5f; + if (Main.expertMode) num1461 = 0.65f; + if (this.npc.life < this.npc.lifeMax * num1461) + { + // 2nd phase + this.npc.ai[0] = 1f; + this.npc.ai[1] = 0f; + this.npc.ai[2] = 0f; + this.npc.ai[3] = 0f; + this.npc.netUpdate = true; + if (this.npc.netSpam > 10) this.npc.netSpam = 10; + } + } + } + } + else if (this.npc.ai[1] == 1f) + { + this.npc.rotation = num11; + float num21 = 6f; + if (Main.expertMode) num21 = 7f; + Vector2 vector2 = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + float num22 = Main.player[this.npc.target].position.X + Main.player[this.npc.target].width / 2 - + vector2.X; + float num23 = Main.player[this.npc.target].position.Y + + Main.player[this.npc.target].height / 2 - vector2.Y; + float num24 = (float) Math.Sqrt(num22 * num22 + num23 * num23); + num24 = num21 / num24; + this.npc.velocity.X = num22 * num24; + this.npc.velocity.Y = num23 * num24; + this.npc.ai[1] = 2f; + this.npc.netUpdate = true; + if (this.npc.netSpam > 10) this.npc.netSpam = 10; + + if (Main.expertMode) + this.npc.velocity *= 1 + (this.npc.lifeMax - this.npc.life) / + (this.npc.lifeMax * (Main.expertMode ? 0.65f : 0.5f)) * 2f; + } + else if (this.npc.ai[1] == 2f) + { + this.npc.ai[2] += 1f; + if (this.npc.ai[2] >= 40f) + { + this.npc.velocity *= 0.98f; + if (Main.expertMode) this.npc.velocity *= 0.985f; + if (this.npc.velocity.X > -0.1 && this.npc.velocity.X < 0.1) this.npc.velocity.X = 0f; + if (this.npc.velocity.Y > -0.1 && this.npc.velocity.Y < 0.1) this.npc.velocity.Y = 0f; + } + else + { + this.npc.rotation = (float) Math.Atan2(this.npc.velocity.Y, this.npc.velocity.X) - 1.57f; + } + + int num25 = 150; + if (Main.expertMode) num25 = 100; + if (this.npc.ai[2] >= num25) + { + this.npc.ai[3] += 1f; + this.npc.ai[2] = 0f; + this.npc.target = 255; + this.npc.rotation = num11; + if (this.npc.ai[3] >= 3f) + { + this.npc.ai[1] = 0f; + this.npc.ai[3] = 0f; + } + else + { + this.npc.ai[1] = 1f; + } + } + } + + float num1460 = 0.5f; + if (Main.expertMode) num1460 = 0.65f; + if (this.npc.life < this.npc.lifeMax * num1460) + { + // 2nd phase + this.npc.ai[0] = 1f; + this.npc.ai[1] = 0f; + this.npc.ai[2] = 0f; + this.npc.ai[3] = 0f; + this.npc.netUpdate = true; + if (this.npc.netSpam > 10) this.npc.netSpam = 10; + } + } + } // <-- EoC phase 1 + // --> Spazmatism phase 2 + else if (this.npc.ai[0] == 2) + { + if (Main.expertMode) + this.npc.damage = 57; + else + this.npc.damage = 36; + + Color newColor; + if (this.npc.target < 0 || this.npc.target == 255 || Main.player[this.npc.target].dead || + !Main.player[this.npc.target].active) this.npc.TargetClosest(); + bool dead3 = Main.player[this.npc.target].dead; + float num389 = this.npc.position.X + this.npc.width / 2 - Main.player[this.npc.target].position.X - + Main.player[this.npc.target].width / 2; + float num390 = this.npc.position.Y + this.npc.height - 59f - Main.player[this.npc.target].position.Y - + Main.player[this.npc.target].height / 2; + float num391 = (float) Math.Atan2(num390, num389) + 1.57f; + if (num391 < 0f) + num391 += 6.283f; + else if (num391 > 6.283) num391 -= 6.283f; + float num392 = 0.15f; + if (this.npc.rotation < num391) + { + if (num391 - this.npc.rotation > 3.1415) + this.npc.rotation -= num392; + else + this.npc.rotation += num392; + } + else if (this.npc.rotation > num391) + { + if (this.npc.rotation - num391 > 3.1415) + this.npc.rotation += num392; + else + this.npc.rotation -= num392; + } + + if (this.npc.rotation > num391 - num392 && this.npc.rotation < num391 + num392) + this.npc.rotation = num391; + if (this.npc.rotation < 0f) + this.npc.rotation += 6.283f; + else if (this.npc.rotation > 6.283) this.npc.rotation -= 6.283f; + if (this.npc.rotation > num391 - num392 && this.npc.rotation < num391 + num392) + this.npc.rotation = num391; + if (Main.rand.Next(5) == 0) + { + Vector2 position42 = + new Vector2(this.npc.position.X, this.npc.position.Y + this.npc.height * 0.25f); + int width40 = this.npc.width; + int height38 = (int) (this.npc.height * 0.5f); + float x4 = this.npc.velocity.X; + newColor = default; + int num393 = Dust.NewDust(position42, width40, height38, 5, x4, 2f, 0, newColor); + Dust dust29 = Main.dust[num393]; + dust29.velocity.X = dust29.velocity.X * 0.5f; + Dust dust30 = Main.dust[num393]; + dust30.velocity.Y = dust30.velocity.Y * 0.1f; + } + + if (Main.netMode != 1 && !Main.dayTime && !dead3 && this.npc.timeLeft < 10) + { + int num2; + for (int num394 = 0; num394 < 200; num394 = num2 + 1) + { + if (num394 != this.npc.whoAmI && Main.npc[num394].active && + (Main.npc[num394].type == 125 || Main.npc[num394].type == 126) && + Main.npc[num394].timeLeft - 1 > this.npc.timeLeft) + this.npc.timeLeft = Main.npc[num394].timeLeft - 1; + num2 = num394; + } + } + + if (Main.dayTime | dead3) + { + this.npc.velocity.Y = this.npc.velocity.Y - 0.04f; + if (this.npc.timeLeft > 10) this.npc.timeLeft = 10; + } + else + { + this.npc.defense = this.npc.defDefense + 6; + if (this.npc.ai[1] == 0f) + { + float num410 = 4f; + float num411 = 0.1f; + int num412 = 1; + if (this.npc.position.X + this.npc.width / 2 < Main.player[this.npc.target].position.X + + Main.player[this.npc.target].width) num412 = -1; + Vector2 vector41 = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + float num413 = Main.player[this.npc.target].position.X + + Main.player[this.npc.target].width / 2 + num412 * 180 - vector41.X; + float num414 = Main.player[this.npc.target].position.Y + + Main.player[this.npc.target].height / 2 - vector41.Y; + float num415 = (float) Math.Sqrt(num413 * num413 + num414 * num414); + if (Main.expertMode) + { + if (num415 > 300f) num410 += 0.5f; + if (num415 > 400f) num410 += 0.5f; + if (num415 > 500f) num410 += 0.55f; + if (num415 > 600f) num410 += 0.55f; + if (num415 > 700f) num410 += 0.6f; + if (num415 > 800f) num410 += 0.6f; + } + + num415 = num410 / num415; + num413 *= num415; + num414 *= num415; + if (this.npc.velocity.X < num413) + { + this.npc.velocity.X = this.npc.velocity.X + num411; + if (this.npc.velocity.X < 0f && num413 > 0f) + this.npc.velocity.X = this.npc.velocity.X + num411; + } + else if (this.npc.velocity.X > num413) + { + this.npc.velocity.X = this.npc.velocity.X - num411; + if (this.npc.velocity.X > 0f && num413 < 0f) + this.npc.velocity.X = this.npc.velocity.X - num411; + } + + if (this.npc.velocity.Y < num414) + { + this.npc.velocity.Y = this.npc.velocity.Y + num411; + if (this.npc.velocity.Y < 0f && num414 > 0f) + this.npc.velocity.Y = this.npc.velocity.Y + num411; + } + else if (this.npc.velocity.Y > num414) + { + this.npc.velocity.Y = this.npc.velocity.Y - num411; + if (this.npc.velocity.Y > 0f && num414 < 0f) + this.npc.velocity.Y = this.npc.velocity.Y - num411; + } + + this.npc.ai[2] += 1f; + if (this.npc.ai[2] >= 400f) + { + this.npc.ai[1] = 1f; + this.npc.ai[2] = 0f; + this.npc.ai[3] = 0f; + this.npc.target = 255; + this.npc.netUpdate = true; + } + + if (Collision.CanHit(this.npc.position, this.npc.width, this.npc.height, + Main.player[this.npc.target].position, Main.player[this.npc.target].width, + Main.player[this.npc.target].height)) + { + this.npc.localAI[2] += 1f; + if (this.npc.localAI[2] > 22f) + { + this.npc.localAI[2] = 0f; + Main.PlaySound(SoundID.Item34, this.npc.position); + } + + if (Main.netMode != 1) + { + this.npc.localAI[1] += 1f; + if (this.npc.life < this.npc.lifeMax * 0.75) this.npc.localAI[1] += 1f; + if (this.npc.life < this.npc.lifeMax * 0.5) this.npc.localAI[1] += 1f; + if (this.npc.life < this.npc.lifeMax * 0.25) this.npc.localAI[1] += 1f; + if (this.npc.life < this.npc.lifeMax * 0.1) this.npc.localAI[1] += 2f; + if (this.npc.localAI[1] > 8f) + { + this.npc.localAI[1] = 0f; + float num416 = 6f; + int num417 = 30; + if (Main.expertMode) num417 = 27; + int num418 = ModContent.ProjectileType(); + vector41 = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + num413 = Main.player[this.npc.target].position.X + + Main.player[this.npc.target].width / 2 - vector41.X; + num414 = Main.player[this.npc.target].position.Y + + Main.player[this.npc.target].height / 2 - vector41.Y; + num415 = (float) Math.Sqrt(num413 * num413 + num414 * num414); + num415 = num416 / num415; + num413 *= num415; + num414 *= num415; + num414 += Main.rand.Next(-40, 41) * 0.01f; + num413 += Main.rand.Next(-40, 41) * 0.01f; + num414 += this.npc.velocity.Y * 0.5f; + num413 += this.npc.velocity.X * 0.5f; + vector41.X -= num413 * 2f; + vector41.Y -= num414 * 1f; + Projectile.NewProjectile(vector41.X, vector41.Y, num413, num414, num418, num417, 0f, + Main.myPlayer, this.npc.whoAmI); + } + } + } + } + else if (this.npc.ai[1] == 1f) + { + Main.PlaySound(15, (int) this.npc.position.X, (int) this.npc.position.Y, 0); + this.npc.rotation = num391; + float num419 = 14f; + if (Main.expertMode) num419 += 2.5f; + Vector2 vector42 = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + float num420 = Main.player[this.npc.target].position.X + + Main.player[this.npc.target].width / 2 - vector42.X; + float num421 = Main.player[this.npc.target].position.Y + + Main.player[this.npc.target].height / 2 - vector42.Y; + float num422 = (float) Math.Sqrt(num420 * num420 + num421 * num421); + num422 = num419 / num422; + this.npc.velocity.X = num420 * num422; + this.npc.velocity.Y = num421 * num422; + this.npc.ai[1] = 2f; + } + else if (this.npc.ai[1] == 2f) + { + this.npc.ai[2] += 1f; + if (Main.expertMode) this.npc.ai[2] += 0.5f; + if (this.npc.ai[2] >= 50f || this.npc.life <= this.npc.lifeMax * 0.25f && this.npc.ai[2] >= 20f) + { + this.npc.velocity.X = this.npc.velocity.X * 0.93f; + this.npc.velocity.Y = this.npc.velocity.Y * 0.93f; + if (this.npc.velocity.X > -0.1 && this.npc.velocity.X < 0.1) this.npc.velocity.X = 0f; + if (this.npc.velocity.Y > -0.1 && this.npc.velocity.Y < 0.1) this.npc.velocity.Y = 0f; + } + else + { + this.npc.rotation = (float) Math.Atan2(this.npc.velocity.Y, this.npc.velocity.X) - 1.57f; + } + + if (this.npc.ai[2] >= 80f || this.npc.life <= this.npc.lifeMax * 0.25f && this.npc.ai[2] >= 50f) + { + this.npc.ai[3] += 1f; + this.npc.ai[2] = 0f; + this.npc.target = 255; + this.npc.rotation = num391; + if (this.npc.ai[3] >= 6f) + { + this.npc.ai[1] = 0f; + this.npc.ai[3] = 0f; + } + else + { + this.npc.ai[1] = 1f; + } + } + } + } + } + // <-- Spazmatism phase 2 + + // --> EoC between phases + // Rotation between phases + if (this.npc.ai[0] == 1f) + { + Color newColor; + if (this.npc.ai[0] == 1f) + { + this.npc.ai[2] += 0.005f; + if (this.npc.ai[2] > 0.5) this.npc.ai[2] = 0.5f; + } + else + { + this.npc.ai[2] -= 0.005f; + if (this.npc.ai[2] < 0f) this.npc.ai[2] = 0f; + } + + this.npc.rotation += this.npc.ai[2]; + this.npc.ai[1] += 1f; + if (Main.expertMode && this.npc.ai[1] % 20f == 0f) + { + float num26 = 5f; + Vector2 vector3 = new Vector2(this.npc.position.X + this.npc.width * 0.5f, + this.npc.position.Y + this.npc.height * 0.5f); + float num27 = Main.rand.Next(-200, 200); + float num28 = Main.rand.Next(-200, 200); + float num29 = (float) Math.Sqrt(num27 * num27 + num28 * num28); + num29 = num26 / num29; + Vector2 vector4 = vector3; + Vector2 vector5 = default; + vector5.X = num27 * num29; + vector5.Y = num28 * num29; + vector4.X += vector5.X * 10f; + vector4.Y += vector5.Y * 10f; + int num2; + for (int num31 = 0; num31 < 10; num31 = num2 + 1) + { + Vector2 position2 = vector4; + float speedX = vector5.X * 0.4f; + float speedY = vector5.Y * 0.4f; + newColor = default; + Dust.NewDust(position2, 20, 20, 5, speedX, speedY, 0, newColor); + num2 = num31; + } + } + + if (this.npc.ai[1] == 100f) + { + if (Main.expertMode) + _hasSpawnedMinions = false; + this.npc.ai[0] += 1f; + this.npc.ai[1] = 0f; + if (this.npc.ai[0] == 3f) + this.npc.ai[2] = 0f; + else + Main.PlaySound(15, (int) this.npc.position.X, (int) this.npc.position.Y, 0); + } + + Vector2 position4 = this.npc.position; + int width3 = this.npc.width; + int height3 = this.npc.height; + float speedX3 = Main.rand.Next(-30, 31) * 0.2f; + float speedY3 = Main.rand.Next(-30, 31) * 0.2f; + newColor = default; + Dust.NewDust(position4, width3, height3, 5, speedX3, speedY3, 0, newColor); + this.npc.velocity.X = this.npc.velocity.X * 0.98f; + this.npc.velocity.Y = this.npc.velocity.Y * 0.98f; + if (this.npc.velocity.X > -0.1 && this.npc.velocity.X < 0.1) this.npc.velocity.X = 0f; + if (this.npc.velocity.Y > -0.1 && this.npc.velocity.Y < 0.1) this.npc.velocity.Y = 0f; + // <-- EoC rotation between phases + } + } + + public override void NPCLoot() + { + if (!Main.expertMode) + { + int random = Main.rand.Next(3); + int weapon = 0; + + switch (random) + { + case 0: + //weapon = ModContent.ItemType(); + break; + case 1: + //weapon = ModContent.ItemType(); + break; + case 2: + weapon = ModContent.ItemType(); + break; + default: + Main.NewText( + "Unexpected error in Bloodshot Eye drops: weapon drop random is out of range (" + random + + ").", Color.Red); + break; + } + + Item.NewItem(this.npc.Center, weapon); + + Item.NewItem(npc.Center, ModContent.ItemType(), Main.rand.Next(35, 51)); + } + else + { + this.npc.DropBossBags(); + } + } + + public override void BossLoot(ref string name, ref int potionType) + { + DecimationWorld.downedArachnus = true; + + name = "The Bloodshot Eye"; + potionType = ItemID.HealingPotion; + base.BossLoot(ref name, ref potionType); + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(_hasSpawnedMinions); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + _hasSpawnedMinions = reader.ReadBoolean(); + } + + public override void ScaleExpertStats(int numPlayers, float bosslifeScale) + { + this.npc.damage = 73; + this.npc.lifeMax = 9600; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + Vector2 frameSize = new Vector2(110, 110); + Texture2D texture = this.mod.GetTexture("NPCs/Bloodshot/BloodshotEye"); + + spriteBatch.Draw + ( + texture, + new Vector2 + (this.npc.position.X - Main.screenPosition.X + frameSize.X / 2, + this.npc.position.Y - Main.screenPosition.Y + frameSize.Y / 2 + ), this.npc.frame, + drawColor, this.npc.rotation - (float) (Math.PI * 0.5f), + frameSize * 0.5f, this.npc.scale, + SpriteEffects.None, + 0f + ); + + return false; + } + + public override void FindFrame(int frameHeight) + { + this.npc.frameCounter += 1.5f; + if (this.npc.frameCounter >= 30) this.npc.frameCounter = 0; + this.npc.frame.Y = (int) this.npc.frameCounter / 10 * frameHeight; + } + } +} \ No newline at end of file diff --git a/NPCs/Bloodshot/BloodshotEye.png b/NPCs/Bloodshot/BloodshotEye.png new file mode 100644 index 0000000..49b27be Binary files /dev/null and b/NPCs/Bloodshot/BloodshotEye.png differ diff --git a/NPCs/Bloodshot/BloodshotEye_Head_Boss.png b/NPCs/Bloodshot/BloodshotEye_Head_Boss.png new file mode 100644 index 0000000..82bacf9 Binary files /dev/null and b/NPCs/Bloodshot/BloodshotEye_Head_Boss.png differ diff --git a/NPCs/Bloodshot/MangledServant.cs b/NPCs/Bloodshot/MangledServant.cs new file mode 100644 index 0000000..133e332 --- /dev/null +++ b/NPCs/Bloodshot/MangledServant.cs @@ -0,0 +1,134 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs.Bloodshot +{ + class MangledServant : ModNPC + { + public override void SetDefaults() + { + npc.CloneDefaults(NPCID.Creeper); + npc.width = 52; + npc.height = 64; + npc.damage = 24; + npc.defense = 1; + npc.lifeMax = 35; + npc.knockBackResist = 0.2f; + npc.aiStyle = -1; + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = 55; + npc.knockBackResist = 0.35f; + npc.damage = 36; + } + + public override void AI() + { + int bloodshotEye = (int)npc.ai[1]; + + if (Main.GameUpdateCount % 60 == 0 && Main.expertMode) + { + if (Main.rand.NextBool(21)) + { + npc.ai[3] = npc.ai[0]; + npc.ai[2] = 0; + npc.ai[0] = 2f; + } + } + + if (bloodshotEye < 0) + { + npc.active = false; + npc.netUpdate = true; + } + else if (npc.ai[0] == 0f) + { + Vector2 npcCenter = npc.Center; + float diffX = Main.npc[bloodshotEye].Center.X - npcCenter.X; + float diffY = Main.npc[bloodshotEye].Center.Y - npcCenter.Y; + float magnitude = (float)Math.Sqrt((double)(diffX * diffX + diffY * diffY)); + if (magnitude > 90f) + { + magnitude = 8f / magnitude; + diffX *= magnitude; + diffY *= magnitude; + npc.velocity.X = (npc.velocity.X * 15f + diffX) / 16f; + npc.velocity.Y = (npc.velocity.Y * 15f + diffY) / 16f; + } + else + { + if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < 8f) + { + npc.velocity.Y = npc.velocity.Y * 1.05f; + npc.velocity.X = npc.velocity.X * 1.05f; + } + if (Main.netMode != 1) + { + if ((!Main.expertMode || Main.rand.Next(100) != 0) && Main.rand.Next(200) != 0) + { + return; + } + npc.TargetClosest(true); + npcCenter = new Vector2(npc.Center.X, npc.Center.Y); + diffX = Main.player[npc.target].Center.X - npcCenter.X; + diffY = Main.player[npc.target].Center.Y - npcCenter.Y; + magnitude = (float)Math.Sqrt((double)(diffX * diffX + diffY * diffY)); + magnitude = 8f / magnitude; + npc.velocity.X = diffX * magnitude; + npc.velocity.Y = diffY * magnitude; + npc.ai[0] = 1f; + npc.netUpdate = true; + } + } + } + else if (npc.ai[0] == 1f) + { + if (Main.expertMode) + { + Vector2 diff = Main.player[npc.target].Center - npc.Center; + diff.Normalize(); + diff *= 9f; + npc.velocity = (npc.velocity * 99f + diff) / 100f; + } + Vector2 npcCenter = npc.Center; + float diffX = Main.npc[bloodshotEye].Center.X - npcCenter.X; + float diffY = Main.npc[bloodshotEye].Center.Y - npcCenter.Y; + float magnitude = (float)Math.Sqrt((double)(diffX * diffX + diffY * diffY)); + if (!(magnitude > 700f) && !npc.justHit) + { + return; + } + npc.ai[0] = 0f; + } + else + { + if (npc.ai[2] >= 300) + { + npc.ai[0] = npc.ai[3]; + npc.ai[3] = 0f; + return; + } + + npc.velocity *= 0; + + // Blood + if (Main.rand.NextBool(10) && Main.netMode != 1) + { + Vector2 cloudPosition = npc.position; + cloudPosition.X += Main.rand.Next(npc.width / 2) + npc.width / 4; + cloudPosition.Y += npc.height / 2; + int proj = Projectile.NewProjectile(cloudPosition, new Vector2(0, 10), ProjectileID.BloodRain, Main.expertMode ? 14 : 7, 0); + Main.projectile[proj].hostile = true; + Main.projectile[proj].friendly = false; + } + + npc.ai[2]++; + } + } + } +} diff --git a/NPCs/Bloodshot/MangledServant.png b/NPCs/Bloodshot/MangledServant.png new file mode 100644 index 0000000..d64c84d Binary files /dev/null and b/NPCs/Bloodshot/MangledServant.png differ diff --git a/NPCs/CoreSpider.cs b/NPCs/CoreSpider.cs new file mode 100644 index 0000000..f9efcee --- /dev/null +++ b/NPCs/CoreSpider.cs @@ -0,0 +1,98 @@ +using System; +using Decimation.Tiles.ShrineoftheMoltenOne; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs +{ + // Check line 43861 of NPC.cs + internal class CoreSpider : ModNPC + { + private int _frame; + private readonly int shootFrame = 120; + + public override void SetStaticDefaults() + { + this.DisplayName.SetDefault("Core Spider"); + Main.npcFrameCount[this.npc.type] = 8; + } + + public override void SetDefaults() + { + this.npc.CloneDefaults(NPCID.BlackRecluse); + this.npc.width = 84; + this.npc.height = 24; + this.npc.lifeMax = 750; + animationType = NPCID.BlackRecluse; + + this.npc.lavaImmune = true; + this.npc.buffImmune[BuffID.OnFire] = true; + this.npc.buffImmune[BuffID.Burning] = true; + } + + public override void AI() + { + int x = (int) this.npc.Center.X / 16; + int y = (int) this.npc.Center.Y / 16; + bool onWall = false; + for (int i = x - 1; i <= x + 1; i++) + for (int j = y - 1; j <= y + 1; j++) + if (Main.tile[i, j].wall > 0) + onWall = true; + + if (Main.expertMode) + { + if (_frame >= shootFrame) + { + if (Main.rand.Next(4) == 0) + { + float mouthX = (float) (this.npc.height / 2f * Math.Cos(this.npc.rotation - Math.PI * 0.5f)) + + this.npc.Center.X; + float mouthY = (float) (this.npc.height / 2f * Math.Sin(this.npc.rotation - Math.PI * 0.5f)) + + this.npc.Center.Y; + float speedX = (float) (3 * Math.Cos(this.npc.rotation - Math.PI)) * 2; + float speedY = (float) (3 * Math.Sin(this.npc.rotation - Math.PI)) * 2; + + Projectile.NewProjectile(new Vector2(mouthX, mouthY), new Vector2(speedX, speedY), + ProjectileID.Fireball, 130, 30); + } + + _frame = 0; + } + else + { + _frame++; + } + } + + if (onWall) + this.npc.Transform(ModContent.NPCType()); + else + base.AI(); + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + int x = (int) Main.LocalPlayer.position.X / 16; + int y = (int) Main.LocalPlayer.position.Y / 16; + + int validBlockCount = 0; + for (int i = -50 + x; i <= 50 + x; i++) + for (int j = -50 + y; j <= 50 + y; j++) + if (i >= 0 && i <= Main.maxTilesX && j >= 0 && j <= Main.maxTilesY) + if (Main.tile[i, j].type == ModContent.TileType() || + Main.tile[i, j].type == ModContent.TileType() || + Main.tile[i, j].type == ModContent.TileType() || + Main.tile[i, j].type == ModContent.TileType() || + Main.tile[i, j].type == ModContent.TileType()) + validBlockCount++; + + + if (validBlockCount >= 15 && Main.hardMode) + return SpawnCondition.Underworld.Chance * 2; + return 0; + } + } +} \ No newline at end of file diff --git a/NPCs/CoreSpider.png b/NPCs/CoreSpider.png new file mode 100644 index 0000000..bd4479c Binary files /dev/null and b/NPCs/CoreSpider.png differ diff --git a/NPCs/CoreSpiderWall.cs b/NPCs/CoreSpiderWall.cs new file mode 100644 index 0000000..18fd5b3 --- /dev/null +++ b/NPCs/CoreSpiderWall.cs @@ -0,0 +1,104 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using System; +using Decimation.Tiles.ShrineoftheMoltenOne; +using Microsoft.Xna.Framework; + +namespace Decimation.NPCs +{ + // Check line 43861 of NPC.cs + class CoreSpiderWall : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Core Spider"); + Main.npcFrameCount[npc.type] = 4; + } + + public override void SetDefaults() + { + npc.CloneDefaults(NPCID.BlackRecluseWall); + npc.width = 60; + npc.height = 62; + npc.lifeMax = 750; + animationType = NPCID.BlackRecluseWall; + + npc.lavaImmune = true; + npc.buffImmune[BuffID.OnFire] = true; + npc.buffImmune[BuffID.Burning] = true; + } + + int frame = 0; + int shootFrame = 120; + + public override void AI() + { + int x = (int)npc.Center.X / 16; + int y = (int)npc.Center.Y / 16; + bool onWall = true; + for (int i = x - 1; i <= x + 1; i++) + { + for (int j = y - 1; j <= y + 1; j++) + { + if (Main.tile[i, j].wall <= 0) + { + onWall = false; + } + } + } + + if (Main.expertMode) + { + if (frame >= shootFrame) + { + if (Main.rand.Next(3) == 0) + { + float mouthX = (float)(((npc.height) / 2) * Math.Cos(npc.rotation - Math.PI * 0.5f)) + npc.Center.X; + float mouthY = (float)(((npc.height) / 2) * Math.Sin(npc.rotation - Math.PI * 0.5f)) + npc.Center.Y; + float speedX = (float)(3 * Math.Cos(npc.rotation - Math.PI)) * 2; + float speedY = (float)(3 * Math.Sin(npc.rotation - Math.PI)) * 2; + + Projectile.NewProjectile(new Vector2(mouthX, mouthY), new Vector2(speedX, speedY), ProjectileID.Fireball, 130, 30); + } + + frame = 0; + } + else + { + frame++; + } + } + + if (!onWall) + { + npc.Transform(ModContent.NPCType()); + } + else + { + base.AI(); + } + } + + public override bool CheckConditions(int left, int right, int top, int bottom) + { + int x = (int)Main.LocalPlayer.position.X / 16; + int y = (int)Main.LocalPlayer.position.Y / 16; + + int validBlockCount = 0; + for (int i = (int)(-50 + x / 16f); i <= (int)(50 + x / 16f); i++) + { + for (int j = (int)(-50 + y / 16f); j <= (int)(50 + y / 16f); j++) + { + if (i >= 0 && i <= Main.maxTilesX && j >= 0 && j <= Main.maxTilesY) + { + if (Main.tile[i, j].type == ModContent.TileType() || (Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType()) || Main.tile[i, j].type == ModContent.TileType()) + validBlockCount++; + } + } + } + + return validBlockCount >= 15 && Main.hardMode; + } + } +} diff --git a/NPCs/CoreSpiderWall.png b/NPCs/CoreSpiderWall.png new file mode 100644 index 0000000..86febc5 Binary files /dev/null and b/NPCs/CoreSpiderWall.png differ diff --git a/NPCs/CursedNPC.cs b/NPCs/CursedNPC.cs new file mode 100644 index 0000000..66cbdd2 --- /dev/null +++ b/NPCs/CursedNPC.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria; +using Terraria.ModLoader; + +namespace Decimation.NPCs +{ + internal class CursedNPC : GlobalNPC + { + // Life bonus in percents + public static int LifeBonus { get; set; } + + // Damage bonus in percents + public static int DamageBonus { get; set; } + + // Mana leech in percents + public static int ManaLeech { get; set; } + + public override void SetDefaults(NPC npc) + { + if (!npc.friendly) + npc.lifeMax = (int)(npc.lifeMax * (1 + LifeBonus / 100f)); + + base.SetDefaults(npc); + } + + public override void AI(NPC npc) + { + // Should be moved in future + if (!Main.LocalPlayer.GetModPlayer().hasCursedAccessory) + { + LifeBonus = 0; + DamageBonus = 0; + ManaLeech = 0; + } + + base.AI(npc); + } + + public override void ModifyHitPlayer(NPC npc, Player target, ref int damage, ref bool crit) + { + if (!npc.friendly && target.GetModPlayer().hasCursedAccessory) + damage *= (int)(1 + DamageBonus / 100f); + } + + public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit) + { + if (!npc.friendly && target.GetModPlayer().hasCursedAccessory) + target.statMana *= (int)(1 - ManaLeech / 100f); + } + } +} diff --git a/NPCs/LivingMagma.cs b/NPCs/LivingMagma.cs new file mode 100644 index 0000000..a1e226d --- /dev/null +++ b/NPCs/LivingMagma.cs @@ -0,0 +1,78 @@ +using Decimation.Buffs.Debuffs; +using Decimation.Tiles.ShrineoftheMoltenOne; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs +{ + class LivingMagma : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Living Magma"); + Main.npcFrameCount[npc.type] = 3; + } + + public override void SetDefaults() + { + npc.width = 34; + npc.height = 28; + npc.aiStyle = 1; + npc.damage = 50; + npc.defense = 18; + npc.lifeMax = 630; + npc.HitSound = SoundID.NPCHit1; + npc.DeathSound = SoundID.NPCDeath1; + npc.alpha = 55; + npc.value = 400f; + npc.scale = 1.1f; + npc.buffImmune[24] = true; + npc.buffImmune[74] = true; + npc.lavaImmune = true; + npc.knockBackResist = 0.8f; + aiType = NPCID.ToxicSludge; + animationType = NPCID.ToxicSludge; + + npc.lavaImmune = true; + npc.buffImmune[BuffID.OnFire] = true; + npc.buffImmune[BuffID.Burning] = true; + } + + public override void AI() + { + Dust.NewDust(npc.position, npc.width, npc.height, DustID.Fire); + base.AI(); + } + + public override void HitEffect(int hitDirection, double damage) + { + Main.LocalPlayer.AddBuff(ModContent.BuffType(), 600); + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + int x = (int)Main.LocalPlayer.position.X / 16; + int y = (int)Main.LocalPlayer.position.Y / 16; + + int validBlockCount = 0; + for (int i = -50 + x; i <= 50 + x; i++) + { + for (int j = -50 + y; j <= 50 + y; j++) + { + if (i >= 0 && i <= Main.maxTilesX && j >= 0 && j <= Main.maxTilesY) + { + if (Main.tile[i, j].type == ModContent.TileType() || (Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType() || Main.tile[i, j].type == ModContent.TileType()) || Main.tile[i, j].type == ModContent.TileType()) + { + validBlockCount++; + } + } + } + } + + if (validBlockCount >= 15 && Main.hardMode) + return SpawnCondition.Underworld.Chance * 2; + return 0; + } + } +} diff --git a/NPCs/LivingMagma.png b/NPCs/LivingMagma.png new file mode 100644 index 0000000..507f704 Binary files /dev/null and b/NPCs/LivingMagma.png differ diff --git a/NPCs/NecroCaster.cs b/NPCs/NecroCaster.cs new file mode 100644 index 0000000..1710b6a --- /dev/null +++ b/NPCs/NecroCaster.cs @@ -0,0 +1,229 @@ +using Decimation.Items.Misc; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.NPCs +{ + class NecroCaster : ModNPC + { + public static int numberKilled = 0; + + public override void SetStaticDefaults() + { + Main.npcFrameCount[npc.type] = 3; + } + + public override void SetDefaults() + { + npc.width = 40; + npc.height = 56; + npc.aiStyle = -1; + npc.lifeMax = 100; + npc.knockBackResist = 0.46f; + npc.defense = 2; + npc.buffImmune[BuffID.Poisoned] = true; + npc.buffImmune[BuffID.Confused] = true; + npc.buffImmune[BuffID.Venom] = true; + npc.buffImmune[BuffID.ShadowFlame] = true; + npc.value = 10000; + npc.damage = 15; + npc.HitSound = SoundID.NPCHit1; + npc.DeathSound = SoundID.NPCDeath1; + + animationType = NPCID.Necromancer; + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = 220; + npc.knockBackResist = 0.51f; + npc.defDamage = 5; + npc.damage = 23; + } + + public override void NPCLoot() + { + Item.NewItem(npc.getRect(), ItemID.Bone, Main.rand.Next(10, 16)); + + if (Main.rand.NextBool(2)) + Item.NewItem(npc.getRect(), ModContent.ItemType(), Main.rand.Next(4, 9)); + } + + public override void AI() + { + Color newColor; + Dust dust3; + + npc.TargetClosest(true); + npc.velocity.X = npc.velocity.X * 0.93f; + if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1) + { + npc.velocity.X = 0f; + } + if (npc.ai[0] == 0f) + { + npc.ai[0] = 500f; + } + if (npc.ai[2] != 0f && npc.ai[3] != 0f) + { + Main.PlaySound(SoundID.Item8, npc.position); + int num2; + for (int num65 = 0; num65 < 50; num65 = num2 + 1) + { + Vector2 position12 = new Vector2(npc.position.X, npc.position.Y); + int width11 = npc.width; + int height11 = npc.height; + newColor = default(Color); + int num73 = Dust.NewDust(position12, width11, height11, ModContent.DustType(), 0f, 0f, 100, newColor, 2.5f); + dust3 = Main.dust[num73]; + dust3.velocity *= 3f; + Main.dust[num73].noGravity = true; + num2 = num65; + } + npc.position.X = npc.ai[2] * 16f - (float)(npc.width / 2) + 8f; + npc.position.Y = npc.ai[3] * 16f - (float)npc.height; + npc.velocity.X = 0f; + npc.velocity.Y = 0f; + npc.ai[2] = 0f; + npc.ai[3] = 0f; + Main.PlaySound(SoundID.Item8, npc.position); + for (int num74 = 0; num74 < 50; num74 = num2 + 1) + { + Vector2 position20 = new Vector2(npc.position.X, npc.position.Y); + int width19 = npc.width; + int height19 = npc.height; + newColor = default(Color); + int num82 = Dust.NewDust(position20, width19, height19, ModContent.DustType(), 0f, 0f, 100, newColor, 2.5f); + dust3 = Main.dust[num82]; + dust3.velocity *= 3f; + Main.dust[num82].noGravity = true; + num2 = num74; + } + } + npc.ai[0] += 1f; + if (npc.ai[0] == 100f || npc.ai[0] == 200f || npc.ai[0] == 300f) + { + npc.ai[1] = 30f; + npc.netUpdate = true; + } + if (npc.ai[0] >= 650f && Main.netMode != 1) + { + npc.ai[0] = 1f; + int num83 = (int)Main.player[npc.target].position.X / 16; + int num84 = (int)Main.player[npc.target].position.Y / 16; + int num85 = (int)npc.position.X / 16; + int num86 = (int)npc.position.Y / 16; + int num87 = 20; + int num88 = 0; + bool flag4 = false; + if (Math.Abs(npc.position.X - Main.player[npc.target].position.X) + Math.Abs(npc.position.Y - Main.player[npc.target].position.Y) > 2000f) + { + num88 = 100; + flag4 = true; + } + while (!flag4 && num88 < 100) + { + int num2 = num88; + num88 = num2 + 1; + int num89 = Main.rand.Next(num83 - num87, num83 + num87); + int num90 = Main.rand.Next(num84 - num87, num84 + num87); + for (int num91 = num90; num91 < num84 + num87; num2 = num91, num91 = num2 + 1) + { + bool flag5; + if ((num91 < num84 - 4 || num91 > num84 + 4 || num89 < num83 - 4 || num89 > num83 + 4) && (num91 < num86 - 1 || num91 > num86 + 1 || num89 < num85 - 1 || num89 > num85 + 1) && Main.tile[num89, num91].nactive()) + { + flag5 = true; + if (Main.tile[num89, num91 - 1].lava()) + { + flag5 = false; + } + goto IL_3b70; + } + continue; + IL_3b70: + if (flag5 && Main.tileSolid[Main.tile[num89, num91].type] && !Collision.SolidTiles(num89 - 1, num89 + 1, num91 - 4, num91 - 1)) + { + npc.ai[1] = 20f; + npc.ai[2] = (float)num89; + npc.ai[3] = (float)num91; + flag4 = true; + break; + } + } + } + npc.netUpdate = true; + } + if (npc.ai[1] > 0f) + { + npc.ai[1] -= 1f; + if (npc.ai[1] == 25f) + { + if (Main.netMode != 1) + { + float speedX = Main.rand.NextFloat(-1, 2); + float speedY = Main.rand.NextFloat(-1, 2); + + Projectile.NewProjectile(new Vector2(npc.Center.X + npc.direction * 8, npc.position.Y), new Vector2(speedX, speedY), ModContent.ProjectileType(), 1, 0, npc.target); + } + } + } + + if (Main.rand.Next(2) == 0) + { + Vector2 position27 = new Vector2(npc.position.X, npc.position.Y + 2f); + int width26 = npc.width; + int height26 = npc.height; + float speedX9 = npc.velocity.X * 0.2f; + float speedY9 = npc.velocity.Y * 0.2f; + newColor = default(Color); + int num121 = Dust.NewDust(position27, width26, height26, ModContent.DustType(), speedX9, speedY9, 100, newColor, 2f); + Main.dust[num121].noGravity = true; + Dust dust13 = Main.dust[num121]; + dust13.velocity.X = dust13.velocity.X * 1f; + Dust dust14 = Main.dust[num121]; + dust14.velocity.Y = dust14.velocity.Y * 1f; + } + + Lighting.AddLight(npc.Center, new Vector3(0.8f, 0f, 0.2f)); + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + if (!Main.bloodMoon) return 0; + return SpawnCondition.OverworldNightMonster.Chance * 0.02f; + } + + public override bool CheckDead() + { + numberKilled++; + for (int i = 0; i < 10; i++) + Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType(), npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f); + + if(numberKilled >= 3) + { + Player player = Main.player[npc.target]; + + if (Main.netMode == 0) + { + Main.PlaySound(15, (int)player.position.X, (int)player.position.Y, 0); + NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + } + else + { + ModPacket packet = mod.GetPacket(); + packet.Write((byte)DecimationModMessageType.SpawnBoss); + packet.Write(ModContent.NPCType()); + packet.Write(player.whoAmI); + packet.Send(); + } + + numberKilled = 0; + } + + return base.CheckDead(); + } + } +} diff --git a/NPCs/NecroCaster.png b/NPCs/NecroCaster.png new file mode 100644 index 0000000..0a144b9 Binary files /dev/null and b/NPCs/NecroCaster.png differ diff --git a/NPCs/TownNPCs/Skeleton.cs b/NPCs/TownNPCs/Skeleton.cs new file mode 100644 index 0000000..4ccf50e --- /dev/null +++ b/NPCs/TownNPCs/Skeleton.cs @@ -0,0 +1,242 @@ +using System.Collections.Generic; +using Decimation.Items.Boss.DuneWorm; +using Decimation.Items.Misc; +using Decimation.Items.Misc.Souls; +using Decimation.Projectiles; +using Decimation.UI; +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.Utilities; + +namespace Decimation.NPCs.TownNPCs +{ + [AutoloadHead] + public class Skeleton : ModNPC + { + private readonly List names = new List + { + "Tommy", + "Johnny", + "Comet Sands", + "Skeletor", + "Jeff Skullingtin" + }; + + public override bool Autoload(ref string name) + { + name = "Skeleton"; + return this.mod.Properties.Autoload; + } + + public override void SetStaticDefaults() + { + Main.npcFrameCount[this.npc.type] = 26; + NPCID.Sets.ExtraFramesCount[this.npc.type] = NPCID.Sets.ExtraFramesCount[NPCID.Guide]; + NPCID.Sets.AttackFrameCount[this.npc.type] = NPCID.Sets.AttackFrameCount[NPCID.Guide]; + NPCID.Sets.DangerDetectRange[this.npc.type] = 400; + NPCID.Sets.AttackType[this.npc.type] = 0; + NPCID.Sets.AttackTime[this.npc.type] = 60; + NPCID.Sets.AttackAverageChance[this.npc.type] = 30; + NPCID.Sets.HatOffsetY[this.npc.type] = 4; + } + + public override void SetDefaults() + { + NPCID.Sets.AttackType[this.npc.type] = 0; + this.npc.CloneDefaults(NPCID.Guide); + this.npc.townNPC = true; + this.npc.friendly = true; + this.npc.aiStyle = 7; + this.npc.damage = 10; + this.npc.defense = 15; + this.npc.lifeMax = 250; + this.npc.HitSound = SoundID.DD2_SkeletonHurt; + this.npc.DeathSound = SoundID.DD2_SkeletonDeath; + this.npc.knockBackResist = 0.5f; + animationType = NPCID.Guide; + } + + public override bool CanTownNPCSpawn(int numTownNPCs, int money) + { + return NPC.downedAncientCultist || + NPC.downedBoss1 || + NPC.downedBoss2 || + NPC.downedBoss3 || + NPC.downedFishron || + NPC.downedGolemBoss || + NPC.downedMechBossAny || + NPC.downedMoonlord || + NPC.downedPlantBoss || + NPC.downedQueenBee || + NPC.downedSlimeKing; + } + + public override bool CheckConditions(int left, int right, int top, int bottom) + { + int score = 0; + for (int x = left; x <= right; x++) + for (int y = top; y <= bottom; y++) + { + int type = Main.tile[x, y].type; + if (type == TileID.Tables || type == TileID.Chairs || type == TileID.WorkBenches || + type == TileID.Beds || type == TileID.OpenDoor || type == TileID.ClosedDoor || + type == TileID.Torches) score++; + } + + return score >= (right - left) * (bottom - top) / 2; + } + + public override string TownNPCName() + { + return names[Main.rand.Next(5)]; + } + + public override string GetChat() + { + WeightedRandom chat = new WeightedRandom(); + chat.Add("The skeletons underground are kinda stupid, they use themselves as ammunition!"); + chat.Add("I used to know a girl named Lisa, she tore me apart!"); + chat.Add( + "I did not hit her it is not true I did not hit her I did not!.....oh, hi " + Main.LocalPlayer.name); + + if (Main.bloodMoon) + { + chat.Add("I feel like I'm going to have a bad time"); + chat.Add("I've got a bone to pick with this \"Cthulhu\" guy!"); + chat.Add("Please don't rattle my bones! It took me a long time to arrange them like this"); + chat.Add("Everybody betrayed me! I'm fed up with this world..."); + } + + return chat; + } + + public override void SetChatButtons(ref string button, ref string button2) + { + button = Language.GetTextValue("LegacyInterface.28"); + button2 = "Curse"; + } + + public override void OnChatButtonClicked(bool firstButton, ref bool shop) + { + if (firstButton) + { + shop = true; + } + else + { + Main.playerInventory = true; + Main.npcChatText = ""; + Decimation.Instance.skeletonUserInterface.SetState(new SkeletonUI()); + } + } + + public override void SetupShop(Chest shop, ref int nextSlot) + { + shop.item[nextSlot].SetDefaults(ItemID.Bone); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.Skull); + nextSlot++; + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + nextSlot++; + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + nextSlot++; + + if (Main.hardMode) + { + shop.item[nextSlot].SetDefaults(ItemID.SoulofLight); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.SoulofNight); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.GuideVoodooDoll); + nextSlot++; + } + + if (DecimationWorld.downedWyvern) + { + shop.item[nextSlot].SetDefaults(ItemID.SoulofFlight); + nextSlot++; + } + + if (DecimationWorld.downedDuneWorm) + { + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + nextSlot++; + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + nextSlot++; + } + + if (NPC.downedMechBoss1) + { + shop.item[nextSlot].SetDefaults(ItemID.SoulofMight); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.MechanicalWorm); + nextSlot++; + } + + if (NPC.downedMechBoss2) + { + shop.item[nextSlot].SetDefaults(ItemID.SoulofSight); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.MechanicalEye); + nextSlot++; + } + + if (NPC.downedMechBoss3) + { + shop.item[nextSlot].SetDefaults(ItemID.SoulofFright); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.MechanicalSkull); + nextSlot++; + } + + if (NPC.downedPlantBoss) + { + shop.item[nextSlot].SetDefaults(ModContent.ItemType()); + nextSlot++; + + if (Main.bloodMoon) + { + shop.item[nextSlot].SetDefaults(ItemID.Ectoplasm); + nextSlot++; + } + } + } + + public override void TownNPCAttackStrength(ref int damage, ref float knockback) + { + damage = 20; + knockback = 4f; + } + + public override void TownNPCAttackCooldown(ref int cooldown, ref int randExtraCooldown) + { + cooldown = 30; + randExtraCooldown = 30; + } + + public override void TownNPCAttackProj(ref int projType, ref int attackDelay) + { + projType = ModContent.ProjectileType(); + attackDelay = 1; + } + + public override void TownNPCAttackProjSpeed(ref float multiplier, ref float gravityCorrection, + ref float randomOffset) + { + multiplier = 5f; + randomOffset = 2f; + } + } + + public class DownedWyvern : GlobalNPC + { + public override bool CheckDead(NPC npc) + { + if (npc.type == NPCID.WyvernHead) DecimationWorld.downedWyvern = true; + + return base.CheckDead(npc); + } + } +} \ No newline at end of file diff --git a/NPCs/TownNPCs/Skeleton.png b/NPCs/TownNPCs/Skeleton.png new file mode 100644 index 0000000..720a0b1 Binary files /dev/null and b/NPCs/TownNPCs/Skeleton.png differ diff --git a/NPCs/TownNPCs/Skeleton_Head.png b/NPCs/TownNPCs/Skeleton_Head.png new file mode 100644 index 0000000..e4e61c0 Binary files /dev/null and b/NPCs/TownNPCs/Skeleton_Head.png differ diff --git a/Projectiles/Ammonite.cs b/Projectiles/Ammonite.cs new file mode 100644 index 0000000..0533d02 --- /dev/null +++ b/Projectiles/Ammonite.cs @@ -0,0 +1,19 @@ +using Terraria.ID; + +namespace Decimation.Projectiles +{ + internal class Ammonite : DecimationProjectile + { + protected override bool IsClone => true; + + protected override void Init() + { + this.projectile.CloneDefaults(ProjectileID.SpikyBall); + this.projectile.damage = 30; + this.projectile.width = 10; + this.projectile.height = 16; + this.projectile.friendly = false; + this.projectile.hostile = true; + } + } +} \ No newline at end of file diff --git a/Projectiles/Ammonite.png b/Projectiles/Ammonite.png new file mode 100644 index 0000000..58cf7df Binary files /dev/null and b/Projectiles/Ammonite.png differ diff --git a/Projectiles/ArachnusFireball.cs b/Projectiles/ArachnusFireball.cs new file mode 100644 index 0000000..363b927 --- /dev/null +++ b/Projectiles/ArachnusFireball.cs @@ -0,0 +1,29 @@ +using Decimation.Buffs.Debuffs; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class ArachnusFireball : DecimationProjectile + { + public override string Texture => "Terraria/Projectile_" + ProjectileID.Fireball; + protected override bool IsClone => true; + + protected override void Init() + { + this.projectile.CloneDefaults(ProjectileID.Fireball); + this.projectile.light = 1f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + } +} \ No newline at end of file diff --git a/Projectiles/ArchingSolarBlade.cs b/Projectiles/ArchingSolarBlade.cs new file mode 100644 index 0000000..1d52f26 --- /dev/null +++ b/Projectiles/ArchingSolarBlade.cs @@ -0,0 +1,28 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class ArchingSolarBlade : DecimationProjectile + { + //public override void SetStaticDefaults() + //{ + // DisplayName.SetDefault("Arching Solar Blade"); + //} + + protected override void Init() + { + width = 42; + height = 46; + tileCollide = false; + penetrate = 30; + ignoreWater = true; + aiStyle = 3; + aiType = ProjectileID.BloodyMachete; + light = 1f; + + projectile.extraUpdates = 1; + } + } +} diff --git a/Projectiles/ArchingSolarBlade.png b/Projectiles/ArchingSolarBlade.png new file mode 100644 index 0000000..6615f47 Binary files /dev/null and b/Projectiles/ArchingSolarBlade.png differ diff --git a/Projectiles/BlastofHeat.cs b/Projectiles/BlastofHeat.cs new file mode 100644 index 0000000..fde6b82 --- /dev/null +++ b/Projectiles/BlastofHeat.cs @@ -0,0 +1,42 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class BlastofHeat : DecimationProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blast of Heat"); + } + + protected override void Init() + { + width = 6; + height = 6; + aiStyle = 23; + hostile = true; + projectile.alpha = 255; + penetrate = -1; + projectile.extraUpdates = 3; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.Next(2) == 0) + target.AddBuff(BuffID.OnFire, 600); + base.OnHitNPC(target, damage, knockback, crit); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (Main.rand.Next(2) == 0) + target.AddBuff(BuffID.OnFire, 600); + base.OnHitPlayer(target, damage, crit); + } + } +} diff --git a/Projectiles/BlastofHeat.png b/Projectiles/BlastofHeat.png new file mode 100644 index 0000000..f612815 Binary files /dev/null and b/Projectiles/BlastofHeat.png differ diff --git a/Projectiles/BlastofShadowFlame.cs b/Projectiles/BlastofShadowFlame.cs new file mode 100644 index 0000000..f434ede --- /dev/null +++ b/Projectiles/BlastofShadowFlame.cs @@ -0,0 +1,104 @@ +using System; +using Terraria.ModLoader; +using Terraria; +using Terraria.ID; +using Microsoft.Xna.Framework; + +namespace Decimation.Projectiles +{ + internal class BlastofShadowFlame : DecimationProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blast of Shadowflame"); + } + + protected override void Init() + { + width = 6; + height = 6; + aiStyle = -1; + hostile = true; + projectile.alpha = 255; + penetrate = -1; + projectile.extraUpdates = 3; + light = 0.8f; + } + + public override void AI() + { + int num4; + + if (timeLeft > 60) + { + timeLeft = 60; + } + if (projectile.ai[0] > 7f) + { + float scale = 0.5f; + if (projectile.ai[0] == 8f) + { + scale = 0.175f; + } + else if (projectile.ai[0] == 9f) + { + scale = 0.25f; + } + else if (projectile.ai[0] == 10f) + { + scale = 0.375f; + } + projectile.ai[0] += 1f; + int dustType = 27; + if (dustType == 6 || Main.rand.Next(2) == 0) + { + for (int i = 0; i < 2; i = num4 + 1) + { + Vector2 position = new Vector2(projectile.position.X, projectile.position.Y); + //int num300 = dustType; + float speedX = projectile.velocity.X * 0.2f; + float speedY = projectile.velocity.Y * 0.2f; + Color newColor = default(Color); + int dustID = Dust.NewDust(position, width, height, dustType, speedX, speedY, 100, newColor, 1f); + Dust dust = Main.dust[dustID]; + if (Main.rand.Next(3) != 0 || (dustType == 75 && Main.rand.Next(3) == 0)) + { + dust.noGravity = true; + dust.scale *= 3f; + dust.velocity.X = dust.velocity.X * 2f; + dust.velocity.Y = dust.velocity.Y * 2f; + } + dust.scale *= 1.5f; + dust.velocity.X = dust.velocity.X * 1.2f; + dust.velocity.Y = dust.velocity.Y * 1.2f; + dust.scale *= scale; + if (dustType == 75) + { + dust.velocity += projectile.velocity; + if (!dust.noGravity) + { + dust.velocity *= 0.5f; + } + } + num4 = i; + } + } + } + else + { + projectile.ai[0] += 1f; + } + projectile.rotation += 0.3f * (float)projectile.direction; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.ShadowFlame, Main.expertMode ? 360 : 600); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.ShadowFlame, Main.expertMode ? 360 : 600); + } + } +} diff --git a/Projectiles/BlastofShadowFlame.png b/Projectiles/BlastofShadowFlame.png new file mode 100644 index 0000000..08f3f4f Binary files /dev/null and b/Projectiles/BlastofShadowFlame.png differ diff --git a/Projectiles/BloodBeam.cs b/Projectiles/BloodBeam.cs new file mode 100644 index 0000000..f6433ec --- /dev/null +++ b/Projectiles/BloodBeam.cs @@ -0,0 +1,53 @@ +using Decimation.Buffs.Debuffs; +using Decimation.Dusts; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class BloodBeam : DecimationProjectile + { + public override string Texture => "Terraria/Projectile_" + ProjectileID.CursedFlameHostile; + + protected override void Init() + { + width = 26; + height = 26; + aiStyle = -1; + penetrate = -1; + projectile.alpha = 255; + timeLeft = 40; + tileCollide = false; + ignoreWater = true; + damages = 25; + hostile = true; + } + + public override void AI() + { + projectile.velocity.Y += (60 - timeLeft) * 0.005f; + + Dust.NewDust(projectile.position, 26, 26, ModContent.DustType()); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (Main.expertMode) + target.AddBuff(ModContent.BuffType(), 600); + + int damages = Main.rand.Next(5, 11); + target.Hurt(PlayerDeathReason.LegacyDefault(), damages, 0); + + NPC bloodshotEye = Main.npc[(int)projectile.ai[0]]; + bloodshotEye.life += damages; + bloodshotEye.HealEffect(damages); + } + } +} diff --git a/Projectiles/BloodBeamFriendly.cs b/Projectiles/BloodBeamFriendly.cs new file mode 100644 index 0000000..6dd04b2 --- /dev/null +++ b/Projectiles/BloodBeamFriendly.cs @@ -0,0 +1,33 @@ +using Decimation.Dusts; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class BloodBeamFriendly : DecimationProjectile + { + public override string Texture =>"Terraria/Projectile_" + ProjectileID.CursedFlameFriendly; + + protected override void Init() + { + width = 26; + height = 26; + aiStyle = -1; + penetrate = -1; + projectile.alpha = 255; + timeLeft = 40; + tileCollide = true; + ignoreWater = true; + damages = 15; + hostile = false; + } + + public override void AI() + { + projectile.velocity.Y += (60 - timeLeft) * 0.005f; + + Dust.NewDust(projectile.position, 26, 26, ModContent.DustType()); + } + } +} diff --git a/Projectiles/BloodClot.cs b/Projectiles/BloodClot.cs new file mode 100644 index 0000000..8a1fbbe --- /dev/null +++ b/Projectiles/BloodClot.cs @@ -0,0 +1,50 @@ +using System; +using Decimation.Items.Weapons; +using Decimation.Core.Items; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class BloodClot : DecimationProjectile + { + protected override void Init() + { + width = 24; + height = 24; + damages = 22; + damageType = DecimationWeapon.DamageType.RANGED; + tileCollide = true; + projectile.knockBack = 7f; + aiStyle = -1; + penetrate = 1; + timeLeft = 600; + hostile = true; + } + + public override void AI() + { + projectile.velocity.Y += (600 - timeLeft) * 0.002f; + + Dust.NewDust(projectile.position, 26, 26, DustID.SomethingRed); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + for (int i = 0; i < width; i++) + { + for (int j = 0; j < height; j++) + { + Dust.NewDust(new Vector2(projectile.position.X + i, projectile.position.Y + j), width, height, DustID.Blood); + } + } + + Main.PlaySound(SoundID.NPCDeath1, projectile.Center); + + return true; + } + } +} diff --git a/Projectiles/BloodClot.png b/Projectiles/BloodClot.png new file mode 100644 index 0000000..22e5efb Binary files /dev/null and b/Projectiles/BloodClot.png differ diff --git a/Projectiles/BloodClotSmall.cs b/Projectiles/BloodClotSmall.cs new file mode 100644 index 0000000..bbfd707 --- /dev/null +++ b/Projectiles/BloodClotSmall.cs @@ -0,0 +1,48 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class BloodClotSmall : DecimationProjectile + { + protected override void Init() + { + width = 18; + height = 18; + damages = 16; + projectile.ranged = true; + tileCollide = true; + projectile.knockBack = 5f; + aiStyle = -1; + penetrate = 1; + timeLeft = 600; + hostile = true; + } + + public override void AI() + { + projectile.velocity.Y += (600 - timeLeft) * 0.002f; + + Dust.NewDust(projectile.position, 26, 26, DustID.SomethingRed); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + for (int i = 0; i < width; i++) + { + for (int j = 0; j < height; j++) + { + Dust.NewDust(new Vector2(projectile.position.X + i, projectile.position.Y + j), width, height, DustID.Blood); + } + } + + Main.PlaySound(SoundID.NPCDeath1, projectile.Center); + + return true; + } + } +} diff --git a/Projectiles/BloodClotSmall.png b/Projectiles/BloodClotSmall.png new file mode 100644 index 0000000..56fd552 Binary files /dev/null and b/Projectiles/BloodClotSmall.png differ diff --git a/Projectiles/Bone.cs b/Projectiles/Bone.cs new file mode 100644 index 0000000..fa0da91 --- /dev/null +++ b/Projectiles/Bone.cs @@ -0,0 +1,97 @@ +using Microsoft.Xna.Framework; +using System; +using System.IO; +using Decimation.Items.Weapons; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class Bone : DecimationProjectile + { + private float maxSpeed = 5f; + + protected override void Init() + { + width = 14; + height = 34; + aiStyle = -1; + ignoreWater = true; + tileCollide = false; + damageType = DecimationWeapon.DamageType.RANGED; + hostile = true; + penetrate = 2; + timeLeft = 60; + + damages = Main.expertMode ? 57 : 20; + projectile.localAI[0] = 15; + } + + // ai 0: target, ai 1: state, localAI 0: rotation + + private int counter = 0; + + public override void AI() + { + if (projectile.ai[1] == 0) + { + projectile.localAI[0] = 15; + + if (timeLeft < 10) + { + projectile.ai[1]++; + timeLeft = 600; + projectile.velocity *= 0; + } + } + else if (projectile.ai[1] == 1) + { + if (Main.netMode != 1) + counter++; + + projectile.localAI[0] += 4; + + if (counter >= 60) + { + projectile.ai[1]++; + counter = 0; + } + } + else if (projectile.ai[1] == 2) + { + Player target = Main.player[(int)projectile.ai[0]]; + Vector2 velocity = target.position - projectile.position; + + float magnitude = (float)Math.Sqrt(velocity.X * velocity.X + velocity.Y * velocity.Y); + if (magnitude > maxSpeed) + { + float ratio = maxSpeed / magnitude; + velocity.X *= ratio; + velocity.Y *= ratio; + } + + projectile.velocity = velocity; + projectile.ai[1]++; + } + + projectile.rotation += (float)(Math.PI / projectile.localAI[0]); + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(counter); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + counter = reader.ReadInt32(); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (Main.expertMode && Main.rand.Next(100) < 35) target.AddBuff(BuffID.Confused, 600); + } + } +} diff --git a/Projectiles/Bone.png b/Projectiles/Bone.png new file mode 100644 index 0000000..6ff2fcd Binary files /dev/null and b/Projectiles/Bone.png differ diff --git a/Projectiles/DecimationProjectile.cs b/Projectiles/DecimationProjectile.cs new file mode 100644 index 0000000..34efebf --- /dev/null +++ b/Projectiles/DecimationProjectile.cs @@ -0,0 +1,62 @@ +using Decimation.Core.Items; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal abstract class DecimationProjectile : ModProjectile + { + protected int aiStyle = -1; + protected int damages = 0; + protected DecimationWeapon.DamageType damageType = DecimationWeapon.DamageType.MELEE; + protected int height = 16; + protected bool hostile = false; + protected bool ignoreWater = false; + protected float light = 0f; + protected int penetrate = 0; + protected bool tileCollide = true; + protected int timeLeft = 180; + protected int width = 16; + + protected virtual bool IsClone { get; } = false; + + protected abstract void Init(); + + public sealed override void SetDefaults() + { + Init(); + + if (this.IsClone) return; + + this.projectile.width = width; + this.projectile.height = height; + this.projectile.damage = damages; + this.projectile.penetrate = penetrate; + this.projectile.timeLeft = timeLeft; + this.projectile.hostile = hostile; + this.projectile.friendly = !hostile; + this.projectile.tileCollide = tileCollide; + this.projectile.ignoreWater = ignoreWater; + this.projectile.aiStyle = aiStyle; + this.projectile.light = light; + + switch (damageType) + { + case DecimationWeapon.DamageType.MELEE: + this.projectile.melee = true; + break; + case DecimationWeapon.DamageType.MAGIC: + this.projectile.magic = true; + break; + case DecimationWeapon.DamageType.RANGED: + this.projectile.ranged = true; + break; + case DecimationWeapon.DamageType.THROW: + this.projectile.thrown = true; + break; + default: + this.projectile.melee = true; + break; + } + } + } +} \ No newline at end of file diff --git a/Projectiles/Ember.cs b/Projectiles/Ember.cs new file mode 100644 index 0000000..ec23040 --- /dev/null +++ b/Projectiles/Ember.cs @@ -0,0 +1,48 @@ +using System; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Decimation.Buffs.Debuffs; +using Microsoft.Xna.Framework; + +namespace Decimation.Projectiles +{ + internal class Ember : DecimationProjectile + { + public override string Texture => "Terraria/Projectile_" + ProjectileID.Flames; + + protected override void Init() + { + width = 20; + height = 20; + aiStyle = -1; + projectile.alpha = 255; + penetrate = 1; + light = 0.8f; + damages = 25; + timeLeft = 60; + tileCollide = false; + ignoreWater = true; + } + + public override void AI() + { + Dust.NewDust(projectile.position, width, height, 6, 0, 0, 0, new Microsoft.Xna.Framework.Color(240, 94, 27)); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + } +} diff --git a/Projectiles/LightningSphere.cs b/Projectiles/LightningSphere.cs new file mode 100644 index 0000000..d4aeeba --- /dev/null +++ b/Projectiles/LightningSphere.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class LightningSphere : DecimationProjectile + { + public override void SetStaticDefaults() + { + Main.projFrames[projectile.type] = 5; + } + + protected override void Init() + { + this.projectile.CloneDefaults(ProjectileID.MagnetSphereBall); + this.timeLeft = 600; + } + } +} diff --git a/Projectiles/LightningSphere.png b/Projectiles/LightningSphere.png new file mode 100644 index 0000000..83204f5 Binary files /dev/null and b/Projectiles/LightningSphere.png differ diff --git a/Projectiles/MoltenStyngerBolt.cs b/Projectiles/MoltenStyngerBolt.cs new file mode 100644 index 0000000..4e74a92 --- /dev/null +++ b/Projectiles/MoltenStyngerBolt.cs @@ -0,0 +1,141 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Decimation.Items.Weapons; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class MoltenStyngerBolt : DecimationProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Molten Stynger Bolt"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + protected override void Init() + { + width = 10; + height = 10; + aiStyle = 1; + damageType = DecimationWeapon.DamageType.RANGED; + penetrate = 1; + timeLeft = 600; + projectile.alpha = 255; + light = 0.5f; + ignoreWater = false; + tileCollide = true; + projectile.extraUpdates = 1; + aiType = ProjectileID.Bullet; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (timeLeft > 3) + timeLeft = 3; + + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (timeLeft > 3) + timeLeft = 3; + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + if (timeLeft > 3) + timeLeft = 3; + } + + public override void Kill(int timeLeft) + { + penetrate = -1; + tileCollide = false; + projectile.alpha = 255; + projectile.position.X = projectile.position.X + (float)(width / 2); + projectile.position.Y = projectile.position.Y + (float)(height / 2); + width = 100; + height = 100; + projectile.position.X = projectile.position.X - (float)(width / 2); + projectile.position.Y = projectile.position.Y - (float)(height / 2); + damages = 250; + projectile.knockBack = 10f; + + SpawnDust(); + int fragNbre = Main.rand.Next(8, 12); + for (int i = 0; i < fragNbre; i++) + { + float velocityX = (float)Main.rand.Next(-100, 101); + velocityX += 0.01f; + float velocityY = (float)Main.rand.Next(-100, 101); + velocityX -= 0.01f; + float sqrt = (float)Math.Sqrt((double)(velocityX * velocityX + velocityY * velocityY)); + sqrt = 8f / sqrt; + velocityX *= sqrt; + velocityY *= sqrt; + Projectile.NewProjectile(projectile.Center.X - projectile.oldVelocity.X, projectile.Center.Y - projectile.oldVelocity.Y, velocityX, velocityY, ProjectileID.StyngerShrapnel, damages, projectile.knockBack, projectile.owner, 0f, 0f); + } + } + + private void SpawnDust() + { + + // Play explosion sound + Main.PlaySound(SoundID.Item14, projectile.position); + // Smoke Dust spawn + for (int i = 0; i < 50; i++) + { + int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), width, height, 31, 0f, 0f, 100, default(Color), 2f); + Main.dust[dustIndex].velocity *= 1.4f; + } + // Fire Dust spawn + for (int i = 0; i < 80; i++) + { + int dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), width, height, 6, 0f, 0f, 100, default(Color), 3f); + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].velocity *= 5f; + dustIndex = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2f); + Main.dust[dustIndex].velocity *= 3f; + } + // Large Smoke Gore spawn + for (int g = 0; g < 2; g++) + { + int goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(width / 2) - 24f, projectile.position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); + Main.gore[goreIndex].scale = 1.5f; + Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X + 1.5f; + Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y + 1.5f; + goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(width / 2) - 24f, projectile.position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); + Main.gore[goreIndex].scale = 1.5f; + Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X - 1.5f; + Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y + 1.5f; + goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(width / 2) - 24f, projectile.position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); + Main.gore[goreIndex].scale = 1.5f; + Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X + 1.5f; + Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y - 1.5f; + goreIndex = Gore.NewGore(new Vector2(projectile.position.X + (float)(width / 2) - 24f, projectile.position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); + Main.gore[goreIndex].scale = 1.5f; + Main.gore[goreIndex].velocity.X = Main.gore[goreIndex].velocity.X - 1.5f; + Main.gore[goreIndex].velocity.Y = Main.gore[goreIndex].velocity.Y - 1.5f; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, height * 0.5f); + for (int k = 0; k < projectile.oldPos.Length; k++) + { + Vector2 drawPos = projectile.oldPos[k] - Main.screenPosition + drawOrigin + new Vector2(0f, projectile.gfxOffY); + Color color = projectile.GetAlpha(lightColor) * ((float)(projectile.oldPos.Length - k) / (float)projectile.oldPos.Length); + spriteBatch.Draw(Main.projectileTexture[projectile.type], drawPos, null, color, projectile.rotation, drawOrigin, projectile.scale, SpriteEffects.None, 0f); + } + return true; + } + } +} diff --git a/Projectiles/MoltenStyngerBolt.png b/Projectiles/MoltenStyngerBolt.png new file mode 100644 index 0000000..b344406 Binary files /dev/null and b/Projectiles/MoltenStyngerBolt.png differ diff --git a/Projectiles/Pebble.cs b/Projectiles/Pebble.cs new file mode 100644 index 0000000..f17b9fe --- /dev/null +++ b/Projectiles/Pebble.cs @@ -0,0 +1,36 @@ +using Decimation.Items.Weapons; +using Decimation.Core.Items; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class Pebble : DecimationProjectile + { + public override string Texture => "Decimation/Items/Ammo/Pebble"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pebble"); //The English name of the projectile + } + protected override void Init() + { + width = 10; + height = 10; + projectile.scale = 0.625f; + aiStyle = 1; + damageType = DecimationWeapon.DamageType.RANGED; + penetrate = 5; + timeLeft = 600; + projectile.alpha = 0; + light = 0.5f; + projectile.extraUpdates = 1; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + aiType = ProjectileID.WoodenArrowFriendly; + } + } +} \ No newline at end of file diff --git a/Projectiles/Scarab.cs b/Projectiles/Scarab.cs new file mode 100644 index 0000000..e5357a4 --- /dev/null +++ b/Projectiles/Scarab.cs @@ -0,0 +1,81 @@ +using Decimation.Buffs.Buffs; +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class Scarab : DecimationProjectile + { + public override void SetStaticDefaults() + { + Main.projFrames[projectile.type] = 2; + } + + protected override void Init() + { + damages = 0; + width = 22; + height = 22; + aiStyle = -1; + ignoreWater = true; + tileCollide = false; + penetrate = -1; + timeLeft = int.MaxValue; + } + + public override void AI() + { + Player player = Main.player[(int)(projectile.ai[0])]; + if (!player.HasBuff(ModContent.BuffType())) + projectile.Kill(); + + // Loop through the 2 animation frames, spending 5 ticks on each. + if (++projectile.frameCounter >= 5) + { + projectile.frameCounter = 0; + if (++projectile.frame >= 2) + { + projectile.frame = 0; + } + } + + projectile.velocity.X += (float)Main.rand.Next(-75, 76) * 0.005f; + projectile.velocity.Y += (float)Main.rand.Next(-75, 76) * 0.005f; + + if (projectile.velocity.X > 0.5f) + projectile.velocity.X = 0.5f; + if (projectile.velocity.Y > 0.5f) + projectile.velocity.Y = 0.5f; + + float x = projectile.position.X; + float y = projectile.position.Y; + + if (x < player.Center.X - 60 || x > player.Center.X + 60) + projectile.velocity.X *= -1; + if (y < player.Center.Y - 60 || y > player.Center.Y + 60) + projectile.velocity.Y *= -1; + + // Follow the player + Vector2 velocity = projectile.velocity; + float diffX = projectile.Center.X - player.Center.X; + float diffY = projectile.Center.Y - player.Center.Y; + + if (diffX > 70) + projectile.position.X -= diffX / 60; + else if (diffX < -70) + projectile.position.X -= diffX / 60; + + if (diffY > 70) + projectile.position.Y -= diffY / 60; + else if (diffY < -70) + projectile.position.Y -= diffY / 60; + } + } +} diff --git a/Projectiles/Scarab.png b/Projectiles/Scarab.png new file mode 100644 index 0000000..a3534da Binary files /dev/null and b/Projectiles/Scarab.png differ diff --git a/Projectiles/SiphonArrow.cs b/Projectiles/SiphonArrow.cs new file mode 100644 index 0000000..fa65ebe --- /dev/null +++ b/Projectiles/SiphonArrow.cs @@ -0,0 +1,56 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Decimation.Items.Weapons; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class SiphonArrow : DecimationProjectile + { + protected override void Init() + { + width = 14; + height = 32; + aiStyle = 1; + damageType = DecimationWeapon.DamageType.RANGED; + penetrate = 1; + timeLeft = 600; + tileCollide = true; + projectile.arrow = true; + aiType = ProjectileID.WoodenArrowFriendly; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Heal(damage); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + Heal(damage); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + Heal(damage); + } + + private void Heal(int damage) + { + int healAmount = (int)(damage * (Main.rand.Next(26) / 100f)); + + Player player = Main.player[projectile.owner]; + player.statLife += healAmount; + player.HealEffect(healAmount); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + return true; + } + } +} diff --git a/Projectiles/SiphonArrow.png b/Projectiles/SiphonArrow.png new file mode 100644 index 0000000..9e5820b Binary files /dev/null and b/Projectiles/SiphonArrow.png differ diff --git a/Projectiles/SkeletonBone.cs b/Projectiles/SkeletonBone.cs new file mode 100644 index 0000000..7dbc66a --- /dev/null +++ b/Projectiles/SkeletonBone.cs @@ -0,0 +1,95 @@ +using System; +using System.IO; +using Decimation.Items.Weapons; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class SkeletonBone : DecimationProjectile + { + private float maxSpeed = 5f; + + protected override void Init() + { + width = 14; + height = 34; + aiStyle = -1; + ignoreWater = true; + tileCollide = false; + damageType = DecimationWeapon.DamageType.RANGED; + penetrate = 2; + timeLeft = 60; + + damages = Main.expertMode ? 57 : 20; + projectile.localAI[0] = 15; + } + + // ai 0: target, ai 1: state, localAI 0: rotation + + private int counter = 0; + + public override void AI() + { + /*if (projectile.ai[1] == 0) + { + projectile.localAI[0] = 15; + + if (timeLeft < 10) + { + projectile.ai[1]++; + timeLeft = 600; + projectile.velocity *= 0; + } + } + else if (projectile.ai[1] == 1) + { + if (Main.netMode != 1) + counter++; + + projectile.localAI[0] += 4; + + if (counter >= 60) + { + projectile.ai[1]++; + counter = 0; + } + } + else if (projectile.ai[1] == 2) + { + NPC target = NPC.get + Vector2 velocity = target.position - projectile.position; + + float magnitude = (float)Math.Sqrt(velocity.X * velocity.X + velocity.Y * velocity.Y); + if (magnitude > maxSpeed) + { + float ratio = maxSpeed / magnitude; + velocity.X *= ratio; + velocity.Y *= ratio; + } + + projectile.velocity = velocity; + projectile.ai[1]++; + }*/ + + projectile.rotation += (float)(Math.PI / projectile.localAI[0]); + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(counter); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + counter = reader.ReadInt32(); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (Main.expertMode && Main.rand.Next(100) < 35) target.AddBuff(BuffID.Confused, 600); + } + } +} diff --git a/Projectiles/SkeletonBone.png b/Projectiles/SkeletonBone.png new file mode 100644 index 0000000..cf78ad5 Binary files /dev/null and b/Projectiles/SkeletonBone.png differ diff --git a/Projectiles/Stinger.cs b/Projectiles/Stinger.cs new file mode 100644 index 0000000..5bb5f3c --- /dev/null +++ b/Projectiles/Stinger.cs @@ -0,0 +1,37 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + + internal class Stinger : DecimationProjectile + { + protected override void Init() + { + width = 10; + height = 18; + tileCollide = true; + penetrate = 2; + timeLeft = 200; + projectile.extraUpdates = 1; + ignoreWater = false; + } + public override void AI() //this make that the projectile will face the corect way + { // | + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.Next(2) == 0) + { + target.AddBuff(BuffID.Poisoned, 100); + } + } + + } +} \ No newline at end of file diff --git a/Projectiles/Stinger.png b/Projectiles/Stinger.png new file mode 100644 index 0000000..b01e9ec Binary files /dev/null and b/Projectiles/Stinger.png differ diff --git a/Projectiles/TitanicPikeProjectile.cs b/Projectiles/TitanicPikeProjectile.cs new file mode 100644 index 0000000..6ca43a2 --- /dev/null +++ b/Projectiles/TitanicPikeProjectile.cs @@ -0,0 +1,77 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class TitanicPikeProjectile : DecimationProjectile + { + protected override void Init() + { + width = 18; + height = 18; + aiStyle = 19; + penetrate = -1; + projectile.scale = 1.3f; + projectile.alpha = 0; + + projectile.hide = true; + projectile.ownerHitCheck = true; + tileCollide = false; + } + + public float movementFactor // Change this value to alter how fast the spear moves + { + get { return projectile.ai[0]; } + set { projectile.ai[0] = value; } + } + + public override void AI() + { + // Since we access the owner player instance so much, it's useful to create a helper local variable for this + // Sadly, Projectile/ModProjectile does not have its own + Player projOwner = Main.player[projectile.owner]; + // Here we set some of the projectile's owner properties, such as held item and itemtime, along with projectile direction and position based on the player + Vector2 ownerMountedCenter = projOwner.RotatedRelativePoint(projOwner.MountedCenter, true); + projectile.direction = projOwner.direction; + projOwner.heldProj = projectile.whoAmI; + projOwner.itemTime = projOwner.itemAnimation; + projectile.position.X = ownerMountedCenter.X - (float)(width / 2); + projectile.position.Y = ownerMountedCenter.Y - (float)(height / 2); + // As long as the player isn't frozen, the spear can move + if (!projOwner.frozen) + { + if (movementFactor == 0f) // When initially thrown out, the ai0 will be 0f + { + movementFactor = 3f; // Make sure the spear moves forward when initially thrown out + projectile.netUpdate = true; // Make sure to netUpdate this spear + } + if (projOwner.itemAnimation < projOwner.itemAnimationMax / 3) // Somewhere along the item animation, make sure the spear moves back + { + movementFactor -= 2.4f; + } + else // Otherwise, increase the movement factor + { + movementFactor += 2.1f; + } + } + // Change the spear position based off of the velocity and the movementFactor + projectile.position += projectile.velocity * movementFactor; + // When we reach the end of the animation, we can kill the spear projectile + if (projOwner.itemAnimation == 0) + { + projectile.Kill(); + } + // Apply proper rotation, with an offset of 135 degrees due to the sprite's rotation, notice the usage of MathHelper, use this class! + // MathHelper.ToRadians(xx degrees here) + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.ToRadians(135f); + // Offset by 90 degrees here + if (projectile.spriteDirection == -1) + { + projectile.rotation -= MathHelper.ToRadians(90f); + } + } + } +} diff --git a/Projectiles/TitanicPikeProjectile.png b/Projectiles/TitanicPikeProjectile.png new file mode 100644 index 0000000..c31e898 Binary files /dev/null and b/Projectiles/TitanicPikeProjectile.png differ diff --git a/Projectiles/TitanicStyngerBolt.cs b/Projectiles/TitanicStyngerBolt.cs new file mode 100644 index 0000000..e2b2306 --- /dev/null +++ b/Projectiles/TitanicStyngerBolt.cs @@ -0,0 +1,66 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Decimation.Items.Weapons; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class TitanicStyngerBolt : DecimationProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titanic Stynger Bolt"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + protected override void Init() + { + width = 40; + height = 10; + aiStyle = 1; + damageType = DecimationWeapon.DamageType.RANGED; + penetrate = 5; + timeLeft = 600; + projectile.alpha = 255; + light = 0.1f; + ignoreWater = true; + tileCollide = true; + projectile.extraUpdates = 1; + aiType = ProjectileID.Bullet; + } + + public override void Kill(int timeLeft) + { + int fragNbre = Main.rand.Next(2, 6); + for (int i = 0; i < fragNbre; i++) + { + float velocityX = (float)Main.rand.Next(-100, 101); + velocityX += 0.01f; + float velocityY = (float)Main.rand.Next(-100, 101); + velocityX -= 0.01f; + float sqrt = (float)Math.Sqrt((double)(velocityX * velocityX + velocityY * velocityY)); + sqrt = 8f / sqrt; + velocityX *= sqrt; + velocityY *= sqrt; + Projectile.NewProjectile(projectile.Center.X - projectile.oldVelocity.X, projectile.Center.Y - projectile.oldVelocity.Y, velocityX, velocityY, ProjectileID.StyngerShrapnel, damages, projectile.knockBack, projectile.owner, 0f, 0f); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, height * 0.5f); + for (int k = 0; k < projectile.oldPos.Length; k++) + { + Vector2 drawPos = projectile.oldPos[k] - Main.screenPosition + drawOrigin + new Vector2(0f, projectile.gfxOffY); + Color color = projectile.GetAlpha(lightColor) * ((float)(projectile.oldPos.Length - k) / (float)projectile.oldPos.Length); + spriteBatch.Draw(Main.projectileTexture[projectile.type], drawPos, null, color, projectile.rotation, drawOrigin, projectile.scale, SpriteEffects.None, 0f); + } + return true; + } + } +} diff --git a/Projectiles/TitanicStyngerBolt.png b/Projectiles/TitanicStyngerBolt.png new file mode 100644 index 0000000..eae7bb6 Binary files /dev/null and b/Projectiles/TitanicStyngerBolt.png differ diff --git a/Projectiles/Tooth.cs b/Projectiles/Tooth.cs new file mode 100644 index 0000000..dccf22f --- /dev/null +++ b/Projectiles/Tooth.cs @@ -0,0 +1,53 @@ +using System; +using Decimation.Items.Weapons; +using Decimation.Core.Items; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Projectiles +{ + internal class Tooth : DecimationProjectile + { + protected override void Init() + { + width = 10; + height = 18; + aiStyle = 1; + damages = 20; + tileCollide = true; + ignoreWater = false; + penetrate = 1; + timeLeft = 600; + + damageType = DecimationWeapon.DamageType.RANGED; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + int regen = (int)(damage * 0.08f); + Player owner = Main.player[projectile.owner]; + + owner.statLife += regen; + owner.HealEffect(regen); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + int regen = (int)(damage * 0.08f); + Player owner = Main.player[projectile.owner]; + + owner.statLife += regen; + owner.HealEffect(regen); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + int regen = (int)(damage * 0.08f); + Player owner = Main.player[projectile.owner]; + + owner.statLife += regen; + owner.HealEffect(regen); + } + } +} diff --git a/Projectiles/Tooth.png b/Projectiles/Tooth.png new file mode 100644 index 0000000..4c2b4f0 Binary files /dev/null and b/Projectiles/Tooth.png differ diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fa021fc --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Decimation")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Decimation")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0827514F-8B33-478D-82E2-67F4D4E07F3B")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b3a2e1 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Decimation +Terraria Modification diff --git a/Sounds/Custom/Earthquake.mp3 b/Sounds/Custom/Earthquake.mp3 new file mode 100644 index 0000000..bced20b Binary files /dev/null and b/Sounds/Custom/Earthquake.mp3 differ diff --git a/Sounds/Music/Drums_of_hell.mp3 b/Sounds/Music/Drums_of_hell.mp3 new file mode 100644 index 0000000..09a1fef Binary files /dev/null and b/Sounds/Music/Drums_of_hell.mp3 differ diff --git a/Sounds/Music/Slimy_Showdown.mp3 b/Sounds/Music/Slimy_Showdown.mp3 new file mode 100644 index 0000000..0873754 Binary files /dev/null and b/Sounds/Music/Slimy_Showdown.mp3 differ diff --git a/Sounds/Music/The_Deserts_Call.mp3 b/Sounds/Music/The_Deserts_Call.mp3 new file mode 100644 index 0000000..f103130 Binary files /dev/null and b/Sounds/Music/The_Deserts_Call.mp3 differ diff --git a/Structures/ShrineoftheMoltenOne.cs b/Structures/ShrineoftheMoltenOne.cs new file mode 100644 index 0000000..24257ac --- /dev/null +++ b/Structures/ShrineoftheMoltenOne.cs @@ -0,0 +1,479 @@ +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Decimation.Tiles; +using Decimation.Tiles.ShrineoftheMoltenOne; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Structures +{ + class ShrineoftheMoltenOne + { + private int X; + private int Y; + private int a; + private int b; + + private readonly Dictionary _tileSet = new Dictionary() + { + {1, 0}, + {2, ModContent.TileType()}, + {3, ModContent.TileType()}, + {5, ModContent.TileType()}, + {4, TileID.Platforms}, + {6, ModContent.TileType()} + }; + + private readonly Dictionary _wallSet = new Dictionary() + { + {1, WallID.None}, + {2, WallID.ObsidianBrick}, + {3, WallID.MudstoneBrick}, + {4, WallID.MudstoneBrick}, + {5, WallID.Lavafall} + }; + + private readonly Dictionary _styleSet = new Dictionary() + { + {1, 0}, + {2, 0}, + {3, 0}, + {5, 0}, + {4, 9}, + {6, 0} + }; + + private readonly byte[,] _tiles = + { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, +}; + + public Dictionary TileSet + { + get { return _tileSet; } + } + + public Dictionary WallSet + { + get { return _wallSet; } + } + + public Dictionary StyleSet + { + get { return _styleSet; } + } + + public byte[,] Tiles + { + get { return _tiles; } + } + + public byte[,] Slopes + { + get { return _slopes; } + } + + public byte[,] Walls + { + get { return _walls; } + } + + private void GenerateStructure() + { + int px = X - (Tiles.GetLength(1) / 2); + int py = Y + (Tiles.GetLength(0) / 2) + 63; + + for (int x = 0; x < Tiles.GetLength(1); x++) + { + for (int y = 0; y < Tiles.GetLength(0); y++) + { + byte tile = Tiles[Tiles.GetLength(0) - 1 - y, x]; + short style = StyleSet[tile]; + byte wall = Walls[Tiles.GetLength(0) - 1 - y, x]; + byte slope = Slopes[Tiles.GetLength(0) - 1 - y, x]; + + if (tile != 1) + WorldGen.PlaceTile(px + x, py - 46 - y, TileSet[tile], false, true, -1, style); + WorldGen.PlaceWall(px + x, py - 46 - y, WallSet[wall]); + + Framing.GetTileSafely(px + x, py - 46 - y).slope(slope); + } + } + + WorldGen.PlaceTile(px + 46, py - 117 + 19, TileID.WorkBenches, false, false, -1, 14); + WorldGen.PlaceTile(px + 151, py - 117 + 19, TileID.WorkBenches, false, false, -1, 14); + WorldGen.PlaceTile(px + 98, py - 117 + 53, ModContent.TileType()); + WorldGen.PlaceObject(px + 60, py - 117 - 16, ModContent.TileType()); + WorldGen.PlaceObject(px + 139, py - 117 - 16, ModContent.TileType()); + WorldGen.PlaceObject(px + 63, py - 117 + 26, ModContent.TileType()); + WorldGen.PlaceObject(px + 135, py - 117 + 26, ModContent.TileType()); + WorldGen.PlaceBanner(px + 53, py - 117 + 21, TileID.Banners, 21); + WorldGen.PlaceBanner(px + 145, py - 117 + 21, TileID.Banners, 21); + WorldGen.PlaceBanner(px + 158, py - 117 + 21, TileID.Banners, 21); + WorldGen.PlaceBanner(px + 40, py - 117 + 21, TileID.Banners, 21); + WorldGen.PlaceBanner(px + 28, py - 117 - 13, TileID.Banners, 21); + WorldGen.PlaceBanner(px + 170, py - 117 - 13, TileID.Banners, 21); + WorldGen.PlaceObject(px + 31, py - 117 + 5, TileID.Tables, false, 13); + WorldGen.PlaceObject(px + 167, py - 117 + 5, TileID.Tables, false, 13); + WorldGen.PlaceObject(px + 33, py - 117 + 5, TileID.Chairs, false, 16); + WorldGen.PlaceObject(px + 165, py - 117 + 5, TileID.Chairs, false, 16, 0, -1, 1); + WorldGen.PlaceObject(px + 54, py - 117 + 5, 105, false, 49); + WorldGen.PlaceObject(px + 145, py - 117 + 5, 105, false, 49); + WorldGen.PlaceObject(px + 39, py - 117 + 19, TileID.Bookcases, false, 4); + WorldGen.PlaceObject(px + 54, py - 117 + 19, TileID.Bookcases, false, 4); + WorldGen.PlaceObject(px + 144, py - 117 + 19, TileID.Bookcases, false, 4); + WorldGen.PlaceObject(px + 159, py - 117 + 19, TileID.Bookcases, false, 4); + WorldGen.PlaceObject(px + 76, py - 117 + 21, TileID.Painting6X4, false, 14); + WorldGen.PlaceObject(px + 121, py - 117 + 21, TileID.Painting6X4, false, 14); + WorldGen.PlaceObject(px + 92, py - 117 + 41, TileID.Painting3X3, false, 30); + WorldGen.PlaceObject(px + 106, py - 117 + 41, TileID.Painting3X3, false, 30); + } + + public void Generate() + { + X = Main.maxTilesX / 2; + + do + { + Y = Main.maxTilesY - 160 + Main.rand.Next(20); + } while (Y + 160 < Main.maxTilesY); + + a = 120; + b = 70; + float c = (float)(Math.Sqrt(Math.Pow(a, 2) - Math.Pow(b, 2))); // Pythagore + + for (int x = -a - 10; x <= a + 10; x++) + { + for (int y = -b - 10; y <= b + 10; y++) + { + double d1 = Vector2.Distance(new Vector2(-c, 0), new Vector2(x, y)); + double d2 = Vector2.Distance(new Vector2(c, 0), new Vector2(x, y)); + + if (d1 + d2 >= 2 * a - 10 && d1 + d2 <= 2 * a + 10) + { + WorldGen.PlaceTile(X + x, Y + y, ModContent.TileType(), false, true); + if (Main.rand.Next(60) == 0) + WorldGen.TileRunner(X + x, Y + y, 5, 2, TileID.Obsidian); + + Framing.GetTileSafely(X + x, Y + y).slope(0); + } + else if (d1 + d2 < 2 * a - 10) + { + Framing.GetTileSafely(X + x, Y + y).ClearEverything(); + } + } + } + + GenerateStructure(); + } + } +} diff --git a/Structures/shrine.piskel b/Structures/shrine.piskel new file mode 100644 index 0000000..8659ec4 --- /dev/null +++ b/Structures/shrine.piskel @@ -0,0 +1 @@ +{"modelVersion":2,"piskel":{"name":"shrine","description":"","fps":0,"height":100,"width":199,"layers":["{\"name\":\"Layer 3\",\"opacity\":1,\"frameCount\":1,\"chunks\":[{\"layout\":[[0]],\"base64PNG\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMcAAABkCAYAAAAyjSSGAAACoklEQVR4Xu3VsRGAQAwEMei/6KcAINj4ROzE8u9wn3PO5SNA4CVwi8OrIPAtIA4vg8CPgDg8DQLi8AYINAF/juZlekhAHEPHtmoTEEfzMj0kII6hY1u1CYijeZkeEhDH0LGt2gTE0bxMDwmIY+jYVm0C4mhepocExDF0bKs2AXE0L9NDAuIYOrZVm4A4mpfpIQFxDB3bqk1AHM3L9JCAOIaObdUmII7mZXpIQBxDx7ZqExBH8zI9JCCOoWNbtQmIo3mZHhIQx9CxrdoExNG8TA8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n+WSZOao1fOEihye9A84trcc5dOE6cUMe3Js1TsAkbhJ5BCj6qNgRDnKPcbm79mz4FtvOzkzC8hxJu0TjhVRjuVMFDPHCcl/8RCcyn0R3CvVnu057tc1svdSpdO47Dleoa2vgxx6hqoW8jeVrN8HWHw3h6rxgyqzrDoIrFez3suqZ/3Ol1bRr3Es/UAOr1F80HGRww4sctixDNESctilATnsWIZoCTns0oAcdixDtIQcdmlADjuWIVpCDrs0IIcdyxAtIYddGpDDjmWIlpDDLg3IYccyREvIYZcG5LBjGaKlHuRIoNYr5QGfAEzxIUeIIW0XRGQ57Hp5TkvIcQ7n046CHHaokcOOZYiWkMMuDchhxzJES8hhlwbksGMZoiXksEsDctixDNESctilATnsWIZoCTns0oAcdixDtIQcdmlADjuWtASBLglM8wx5l9khaFcCyOGKn4NHJoAckbNDbK4EkMMVPwePTAA5ImeH2FwJIIcrfg4emQByRM4OsbkSQA5X/Bw8MoF/CltNEZoruIUAAAAASUVORK5CYII=\"}]}","{\"name\":\"Layer 2\",\"opacity\":1,\"frameCount\":1,\"chunks\":[{\"layout\":[[0]],\"base64PNG\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMcAAABkCAYAAAAyjSSGAAAGaUlEQVR4Xu2dS3bcIBBFpWEmyY7a+0jWl+zD3lEy8bBz2rLcajWIAgpUwM0spxGCV+9SfCR5vl6v10nh3zzPCrWcX8Xfn+e34awW/Phz1p1176tk6WkGjiUwWoLqhvmc2lof6LRiCRyf/tMS9Bw7694VOBY9gYOs4SSrZUC0BjrgAA7g8CTe4eHQGmV0JzY2ams1e2jFFDh0NutsuFm5FcChhFmLQip1XdmStqobOa7VMsdZRjwK7lltsmX/49ZY1C8ErFZcgaMlp57QVuBQEL0WzSlNdbVNa3RJaU9r11jTr5bXus8crRmR9oYVAI6wRpQYVAHgGDTwdDusQHdwbLvsevK1lydCw6GlREiBXH9orSerrTlWQY4aHhoRQqLye/sKaPgDONr3AT1wKDAsHBKiyR7jMqPlD0k9E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M3BwzrF1qXQrdwg4bq/Jvry8mKc4p4FkDrl6wLFo9fr6unyaBzgWQXh8ZJqAYwfH7b89A0LmIHPIFViyxu3fwzlHr4AAh9wao2eOFYwnOHrNIMABHBIFtmAAx6dibOWylbsuwrcQOR8f6W16ReaQjJtLmVGnVfus4cwcq4w9AQIcwHGkgAuMQzh6Wn8AB3D4FPCBEYSjF0CAAzhcChyBIYKjB0CAAzj2CoTAEMPR+joEOIBjVUACxVo2+mWnFhfqwAEcrq3akCrRcLQ4zQKOkA3uv/e6lRuTMZIzx1bmVrIIcIwLRwoUKnC0kkWAY0w4csCIXpAfSWw5i1iHw/WFyBJf8JMg0sO0KhcKtcyxF9wiJMAhwWIp0zIcWlAUg8Pitm8IDrl1KLkqYOk1WW0oisNhCRLg0IfaAhyloKgGhwVIgKMvOEpDUR2OMyEBjj7gqAXFaXCccU4CHO3CURuIrVJJJ+TaUpfe4QIO7YhNU+k1x5lQmMgcrpCVAAU42oDDAhDmMocvdFqgAIddOKwB0QwcLRww6tuu7xotw7BX3sSaI8cOWtklpw1c61agJRBcPWgejtJTMowfVqB1CHw97BaOWov9sHX6KtErCENlDqklmZb5lRoJBOCQEtP5h7X3MowOAdOqCDBCRVvMNgAQiurz70OtOeLlyb+iJEgYPj8+RzX8B3blbZriXfHHAAAAAElFTkSuQmCC\"}]}"]}} \ No newline at end of file diff --git a/Synergies/FireAmuletSynergy.cs b/Synergies/FireAmuletSynergy.cs new file mode 100644 index 0000000..dd5eb73 --- /dev/null +++ b/Synergies/FireAmuletSynergy.cs @@ -0,0 +1,15 @@ +using Decimation.Core; +using Decimation.Core.Amulets.Synergy; + +namespace Decimation.Synergies +{ + internal class FireAmuletSynergy : AmuletSynergyAdapter + { + private const int AddedLavaTime = 500; + + public override void Update(DecimationModPlayer modPlayer) + { + if (modPlayer.HasLavaCharm) modPlayer.player.lavaMax += AddedLavaTime; + } + } +} \ No newline at end of file diff --git a/Synergies/GraniteAmuletSynergy.cs b/Synergies/GraniteAmuletSynergy.cs new file mode 100644 index 0000000..a5dc805 --- /dev/null +++ b/Synergies/GraniteAmuletSynergy.cs @@ -0,0 +1,19 @@ +using Decimation.Core; +using Decimation.Core.Amulets.Synergy; +using Microsoft.Xna.Framework; +using Terraria; + +namespace Decimation.Synergies +{ + internal class GraniteAmuletSynergy : AmuletSynergyAdapter + { + public override void OnHitPlayer(DecimationModPlayer modPlayer, ref int damages) + { + if (modPlayer.HasShield && Main.rand.NextBool(10)) + { + damages = 0; + CombatText.NewText(modPlayer.player.getRect(), Color.MediumPurple, "Blocked"); + } + } + } +} diff --git a/Synergies/MarbleAmuletSynergy.cs b/Synergies/MarbleAmuletSynergy.cs new file mode 100644 index 0000000..1c2bbfd --- /dev/null +++ b/Synergies/MarbleAmuletSynergy.cs @@ -0,0 +1,33 @@ +using System; +using Decimation.Core; +using Decimation.Core.Amulets.Synergy; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; + +namespace Decimation.Synergies +{ + internal class MarbleAmuletSynergy : AmuletSynergyAdapter + { + + public override void OnShoot(DecimationModPlayer modPlayer, Item item, ref Vector2 position, ref float speedX, ref float speedY, + ref int projectileType, ref int damages, ref float knockBack) + { + int itemType = modPlayer.player.HeldItem.type; + + if (Main.rand.NextBool(4)) + { + if (itemType == ItemID.Javelin || itemType == ItemID.Shuriken || itemType == ItemID.ThrowingKnife || itemType == ItemID.StarAnise || itemType == ItemID.BoneJavelin || itemType == ItemID.PoisonedKnife || itemType == ItemID.FrostDaggerfish) + { + // Creation of the second projectile, with 10 degrees (0.174533 rad) rotation + const double angle = 0.174533d; + float x2 = (float)(Math.Cos(angle) * speedX - Math.Sin(angle) * speedY); + float y2 = (float)(Math.Sin(angle) * speedX + Math.Cos(angle) * speedY); + + Projectile.NewProjectile(position, new Vector2(x2, y2), projectileType, damages, knockBack); + } + } + } + + } +} diff --git a/Tiles/Basalt.cs b/Tiles/Basalt.cs new file mode 100644 index 0000000..31cf1f8 --- /dev/null +++ b/Tiles/Basalt.cs @@ -0,0 +1,27 @@ +using System; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework; + +namespace Decimation.Tiles +{ + class Basalt : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileMergeDirt[Type] = true; + minPick = 20; + mineResist = 1; + dustType = DustID.Stone; + drop = ModContent.ItemType(); + AddMapEntry(new Color(192, 57, 85)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/Basalt.png b/Tiles/Basalt.png new file mode 100644 index 0000000..8eb77ce Binary files /dev/null and b/Tiles/Basalt.png differ diff --git a/Tiles/ChlorophyteAnvil.cs b/Tiles/ChlorophyteAnvil.cs new file mode 100644 index 0000000..f7fc21a --- /dev/null +++ b/Tiles/ChlorophyteAnvil.cs @@ -0,0 +1,46 @@ +using Decimation.Buffs.Buffs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Tiles +{ + class ChlorophyteAnvil : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.CoordinateHeights = new int[] { 16 }; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Chlorophyte Anvil"); + AddMapEntry(new Color(108, 239, 64), name); + dustType = DustID.Iron; + disableSmartCursor = true; + adjTiles = new int[] { TileID.Anvils, TileID.MythrilAnvil, ModContent.TileType() }; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 16, ModContent.ItemType()); + } + + public override void NearbyEffects(int i, int j, bool closer) + { + if (closer) + { + Main.LocalPlayer.AddBuff(ModContent.BuffType(), 5); + } + } + } +} diff --git a/Tiles/ChlorophyteAnvil.png b/Tiles/ChlorophyteAnvil.png new file mode 100644 index 0000000..776b9e0 Binary files /dev/null and b/Tiles/ChlorophyteAnvil.png differ diff --git a/Tiles/DenziumOre.cs b/Tiles/DenziumOre.cs new file mode 100644 index 0000000..6979286 --- /dev/null +++ b/Tiles/DenziumOre.cs @@ -0,0 +1,27 @@ +using System; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework; + +namespace Decimation.Tiles +{ + class DenziumOre : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileMergeDirt[Type] = true; + minPick = 200; + mineResist = 10; + dustType = DustID.Stone; + drop = ModContent.ItemType(); + AddMapEntry(new Color(192, 57, 85)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/DenziumOre.png b/Tiles/DenziumOre.png new file mode 100644 index 0000000..69ee20a Binary files /dev/null and b/Tiles/DenziumOre.png differ diff --git a/Tiles/DuneWormTrophy.cs b/Tiles/DuneWormTrophy.cs new file mode 100644 index 0000000..27201bf --- /dev/null +++ b/Tiles/DuneWormTrophy.cs @@ -0,0 +1,31 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Tiles +{ + class DuneWormTrophy : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileLavaDeath[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.addTile(Type); + dustType = 7; + disableSmartCursor = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Dune Worm Trophy"); + AddMapEntry(new Color(120, 85, 60), name); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 48, 48, ModContent.ItemType()); + } + } +} diff --git a/Tiles/DuneWormTrophy.png b/Tiles/DuneWormTrophy.png new file mode 100644 index 0000000..4dbce51 Binary files /dev/null and b/Tiles/DuneWormTrophy.png differ diff --git a/Tiles/EnchantedAnvil.cs b/Tiles/EnchantedAnvil.cs new file mode 100644 index 0000000..50bf305 --- /dev/null +++ b/Tiles/EnchantedAnvil.cs @@ -0,0 +1,176 @@ +using Decimation.Buffs.Buffs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Tiles +{ + public class EnchantedAnvil : ModTile + { + + public override void SetDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = false; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Enchanted Anvil"); + AddMapEntry(new Color(108, 239, 64), name); + dustType = DustID.Iron; + disableSmartCursor = true; + adjTiles = new int[] { TileID.Anvils, TileID.MythrilAnvil }; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 48, 32, ModContent.ItemType()); + } + + public override void NearbyEffects(int i, int j, bool closer) + { + if (closer) + { + Main.LocalPlayer.AddBuff(ModContent.BuffType(), 60); + Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil = true; + } + else + { + Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil = false; + } + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + r = 1f; + g = 1f; + b = 1f; + } + + public class EnchantedAnvilGlobalItem : GlobalItem + { + public override void OnCraft(Item item, Recipe recipe) + { + //Work only on prefix, not on effects + if (Main.LocalPlayer.GetModPlayer().closeToEnchantedAnvil) + { + // Damages + if (item.melee && item.useStyle != 1 && item.pick == 0 && item.axe == 0 && item.hammer == 0) + { + if (Main.rand.Next(0, 21) == 5) + { + item.Prefix(PrefixID.Godly); + return; + } + } + else if (item.melee && (item.pick != 0 || item.axe != 0 || item.hammer != 0)) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Light); + return; + } + } + else if (item.melee) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Legendary); + return; + } + } + else if (item.summon) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Ruthless); + return; + } + } + else if ((item.magic || item.ranged) && item.knockBack == 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Demonic); + return; + } + } + else if (item.ranged) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Unreal); + return; + } + } + else if (item.summon) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Mythical); + return; + } + // Accessories + } + else if (item.accessory && item.defense != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Warding); + return; + } + } + else if (item.accessory && item.mana != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Arcane); + return; + } + } + else if (item.accessory && item.crit != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Lucky); + return; + } + } + else if (item.accessory && item.damage != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Menacing); + return; + } + } + else if (item.accessory && (item.velocity.X != 0 || item.velocity.Y != 0)) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Quick2); + return; + } + } + else if (item.accessory && item.shootSpeed != 0) + { + if (Main.rand.Next(0, 11) == 5) + { + item.Prefix(PrefixID.Violent); + return; + } + } + } + } + } + } +} diff --git a/Tiles/EnchantedAnvil.png b/Tiles/EnchantedAnvil.png new file mode 100644 index 0000000..12a7f72 Binary files /dev/null and b/Tiles/EnchantedAnvil.png differ diff --git a/Tiles/ShrineoftheMoltenOne/DeadEarth.cs b/Tiles/ShrineoftheMoltenOne/DeadEarth.cs new file mode 100644 index 0000000..f2694dc --- /dev/null +++ b/Tiles/ShrineoftheMoltenOne/DeadEarth.cs @@ -0,0 +1,32 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Tiles.ShrineoftheMoltenOne +{ + class DeadEarth : ModTile + { + + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileMergeDirt[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileLighted[Type] = true; + dustType = DustID.Sandnado; + drop = ModContent.ItemType(); + AddMapEntry(new Color(33, 28, 25)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override bool CanKillTile(int i, int j, ref bool blockDamaged) + { + return DecimationWorld.downedArachnus; + } + } +} diff --git a/Tiles/ShrineoftheMoltenOne/DeadEarth.png b/Tiles/ShrineoftheMoltenOne/DeadEarth.png new file mode 100644 index 0000000..e9fe3b3 Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/DeadEarth.png differ diff --git a/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs b/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs new file mode 100644 index 0000000..961be64 --- /dev/null +++ b/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.cs @@ -0,0 +1,91 @@ +using Decimation.Items; +using Decimation.Items.Boss.Arachnus; +using Microsoft.Xna.Framework; +using System; +using Decimation.Items.Placeable.ShrineoftheMoltenOne; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Tiles.ShrineoftheMoltenOne +{ + class LockedShrineDoor : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileSolid[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileLavaDeath[Type] = false; + TileID.Sets.NotReallySolid[Type] = true; + TileID.Sets.DrawsWalls[Type] = true; + TileID.Sets.HasOutlines[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 1); + TileObjectData.addAlternate(0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 2); + TileObjectData.addAlternate(0); + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Shrine Door"); + AddMapEntry(new Color(33, 28, 25), name); + dustType = DustID.Stone; + disableSmartCursor = true; + } + + public override bool HasSmartInteract() + { + return true; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = 1; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType()); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = ModContent.ItemType(); + } + + public override bool CanKillTile(int i, int j, ref bool blockDamaged) + { + return DecimationWorld.downedArachnus; + } + + public override void RightClick(int i, int j) + { + bool inventoryContainKey = false; + + foreach (Item item in Main.LocalPlayer.inventory) + if (item.type == ModContent.ItemType()) + inventoryContainKey = true; + + if (inventoryContainKey) + Main.tile[i, j].type = (ushort)ModContent.TileType(); + } + } +} diff --git a/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.png b/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.png new file mode 100644 index 0000000..fa8898c Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/LockedShrineDoor.png differ diff --git a/Tiles/ShrineoftheMoltenOne/LockedShrineDoor_Highlight.png b/Tiles/ShrineoftheMoltenOne/LockedShrineDoor_Highlight.png new file mode 100644 index 0000000..51b9e40 Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/LockedShrineDoor_Highlight.png differ diff --git a/Tiles/ShrineoftheMoltenOne/RedHotSpike.cs b/Tiles/ShrineoftheMoltenOne/RedHotSpike.cs new file mode 100644 index 0000000..95f6e6d --- /dev/null +++ b/Tiles/ShrineoftheMoltenOne/RedHotSpike.cs @@ -0,0 +1,54 @@ +using Decimation.Buffs.Debuffs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.DataStructures; + +namespace Decimation.Tiles.ShrineoftheMoltenOne +{ + class RedHotSpike : ModTile + { + + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileMergeDirt[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileLighted[Type] = true; + TileID.Sets.DrawsWalls[Type] = true; + TileID.Sets.NotReallySolid[Type] = true; + dustType = DustID.Stone; + drop = ModContent.ItemType(); + AddMapEntry(new Color(196, 35, 0)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override bool Dangersense(int i, int j, Player player) + { + return true; + } + + public override void NearbyEffects(int i, int j, bool closer) + { + Player player = Main.LocalPlayer; + + float playerX = player.position.X; + float playerY = player.position.Y; + + if (playerX / 16 - i <= 2 && playerX / 16 - i >= -2 && playerY / 16 - j <= 2 && playerY / 16 - j >= -4.3f) + player.AddBuff(ModContent.BuffType(), 300); + if (playerX / 16 - i <= 1 && playerX / 16 - i >= -1.25f && playerY / 16 - j <= 1.1f && playerY / 16 - j >= -3.3f) + player.Hurt(PlayerDeathReason.LegacyDefault(), 100, 0); + } + + public override bool CanKillTile(int i, int j, ref bool blockDamaged) + { + return DecimationWorld.downedArachnus; + } + } +} diff --git a/Tiles/ShrineoftheMoltenOne/RedHotSpike.png b/Tiles/ShrineoftheMoltenOne/RedHotSpike.png new file mode 100644 index 0000000..4ef8254 Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/RedHotSpike.png differ diff --git a/Tiles/ShrineoftheMoltenOne/ShrineAltar.cs b/Tiles/ShrineoftheMoltenOne/ShrineAltar.cs new file mode 100644 index 0000000..f5f0fdc --- /dev/null +++ b/Tiles/ShrineoftheMoltenOne/ShrineAltar.cs @@ -0,0 +1,85 @@ +using Decimation.Items; +using Decimation.Items.Boss.Arachnus; +using Decimation.NPCs.Arachnus; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.World.Generation; + +namespace Decimation.Tiles.ShrineoftheMoltenOne +{ + class ShrineAltar : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = false; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style5x4); + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Shrine Altar"); + AddMapEntry(new Color(33, 28, 25), name); + dustType = DustID.LavaMoss; + disableSmartCursor = true; + } + + public override void RightClick(int i, int j) + { + Player player = Main.LocalPlayer; + Item[] inventory = player.inventory; + + bool inventoryContainAmulet = false; + + for (int k = 0; k < inventory.Length; k++) + if (inventory[k].type == ModContent.ItemType()) + { + inventoryContainAmulet = true; + inventory[k].TurnToAir(); + break; + } + + if (inventoryContainAmulet) + { + if (Main.netMode == 1) + { + ModPacket packet = mod.GetPacket(); + packet.Write((byte)DecimationModMessageType.SpawnBoss); + packet.Write(ModContent.NPCType()); + packet.Write(player.whoAmI); + packet.Send(); + } + else if (Main.netMode == 0) + { + Main.PlaySound(15, (int)player.position.X, (int)player.position.Y, 0); + NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + } + } + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = ModContent.ItemType(); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 80, 32, ModContent.ItemType()); + } + + public override bool CanKillTile(int i, int j, ref bool blockDamaged) + { + return DecimationWorld.downedArachnus; + } + } +} diff --git a/Tiles/ShrineoftheMoltenOne/ShrineAltar.png b/Tiles/ShrineoftheMoltenOne/ShrineAltar.png new file mode 100644 index 0000000..8f1e64a Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/ShrineAltar.png differ diff --git a/Tiles/ShrineoftheMoltenOne/ShrineBrick.cs b/Tiles/ShrineoftheMoltenOne/ShrineBrick.cs new file mode 100644 index 0000000..7fad26d --- /dev/null +++ b/Tiles/ShrineoftheMoltenOne/ShrineBrick.cs @@ -0,0 +1,33 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Tiles.ShrineoftheMoltenOne +{ + class ShrineBrick : ModTile + { + + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileMergeDirt[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileLighted[Type] = true; + dustType = DustID.Stone; + drop = ModContent.ItemType(); + AddMapEntry(new Color(33, 28, 25)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override bool CanKillTile(int i, int j, ref bool blockDamaged) + { + return DecimationWorld.downedArachnus; + } + } +} diff --git a/Tiles/ShrineoftheMoltenOne/ShrineBrick.png b/Tiles/ShrineoftheMoltenOne/ShrineBrick.png new file mode 100644 index 0000000..3dfbf8d Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/ShrineBrick.png differ diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs b/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs new file mode 100644 index 0000000..5361c42 --- /dev/null +++ b/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.cs @@ -0,0 +1,80 @@ +using Microsoft.Xna.Framework; +using System; +using Decimation.Items.Placeable.ShrineoftheMoltenOne; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Tiles.ShrineoftheMoltenOne +{ + class ShrineDoorClosed : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileSolid[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileLavaDeath[Type] = false; + TileID.Sets.NotReallySolid[Type] = true; + TileID.Sets.DrawsWalls[Type] = true; + TileID.Sets.HasOutlines[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.newTile.CoordinateWidth = 18; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 1); + TileObjectData.addAlternate(0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 2); + TileObjectData.addAlternate(0); + TileObjectData.addTile(Type); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsDoor); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Shrine Door"); + AddMapEntry(new Color(33, 28, 25), name); + dustType = DustID.Stone; + disableSmartCursor = true; + adjTiles = new int[] { TileID.ClosedDoor }; + openDoorID = ModContent.TileType(); + } + + public override bool HasSmartInteract() + { + return true; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = 1; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 20, 48, ModContent.ItemType()); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = ModContent.ItemType(); + } + + public override bool CanKillTile(int i, int j, ref bool blockDamaged) + { + return DecimationWorld.downedArachnus; + } + } +} diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.png b/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.png new file mode 100644 index 0000000..1494756 Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed.png differ diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed_Highlight.png b/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed_Highlight.png new file mode 100644 index 0000000..c8773ea Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/ShrineDoorClosed_Highlight.png differ diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs b/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs new file mode 100644 index 0000000..892a7e0 --- /dev/null +++ b/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.cs @@ -0,0 +1,100 @@ +using Microsoft.Xna.Framework; +using System; +using Decimation.Items.Placeable.ShrineoftheMoltenOne; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Tiles.ShrineoftheMoltenOne +{ + class ShrineDoorOpened : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileSolid[Type] = false; + Main.tileLavaDeath[Type] = false; + Main.tileNoSunLight[Type] = true; + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newTile.StyleWrapLimit = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceRight; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 1); + TileObjectData.addAlternate(0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 2); + TileObjectData.addAlternate(0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 0); + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 1); + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 2); + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.addAlternate(1); + TileObjectData.addTile(Type); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsDoor); + TileID.Sets.HousingWalls[Type] = true; //needed for non-solid blocks to count as walls + TileID.Sets.HasOutlines[Type] = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Shrine Door"); + AddMapEntry(new Color(33, 28, 25), name); + dustType = DustID.Stone; + disableSmartCursor = true; + adjTiles = new int[] { TileID.OpenDoor }; + closeDoorID = ModContent.TileType(); + } + + public override bool HasSmartInteract() + { + return true; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = 1; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 48, ModContent.ItemType()); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = ModContent.ItemType(); + } + + public override bool CanKillTile(int i, int j, ref bool blockDamaged) + { + return DecimationWorld.downedArachnus; + } + } +} diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.png b/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.png new file mode 100644 index 0000000..7392394 Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened.png differ diff --git a/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened_Highlight.png b/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened_Highlight.png new file mode 100644 index 0000000..cd5bc84 Binary files /dev/null and b/Tiles/ShrineoftheMoltenOne/ShrineDoorOpened_Highlight.png differ diff --git a/Tiles/TalonianPillar.cs b/Tiles/TalonianPillar.cs new file mode 100644 index 0000000..8d4a83d --- /dev/null +++ b/Tiles/TalonianPillar.cs @@ -0,0 +1,27 @@ +using System; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework; + +namespace Decimation.Tiles +{ + class TalonianPillar : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileMergeDirt[Type] = true; + minPick = 200; + mineResist = 10; + dustType = DustID.Stone; + drop = ModContent.ItemType(); + AddMapEntry(new Color(101, 195, 242)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/TalonianPillar.png b/Tiles/TalonianPillar.png new file mode 100644 index 0000000..f1bc8e2 Binary files /dev/null and b/Tiles/TalonianPillar.png differ diff --git a/Tiles/TitanForge.cs b/Tiles/TitanForge.cs new file mode 100644 index 0000000..4b88cb6 --- /dev/null +++ b/Tiles/TitanForge.cs @@ -0,0 +1,51 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace Decimation.Tiles +{ + class TitanForge : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = false; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Titan Forge"); + AddMapEntry(new Color(104, 140, 183), name); + dustType = DustID.Iron; + disableSmartCursor = true; + animationFrameHeight = 54; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 48, 48, ModContent.ItemType()); + } + + public override void AnimateTile(ref int frame, ref int frameCounter) + { + frameCounter++; + if (frameCounter > 5) + { + frameCounter = 0; + frame++; + if (frame > 4) + { + frame = 0; + } + } + } + } +} diff --git a/Tiles/TitanForge.png b/Tiles/TitanForge.png new file mode 100644 index 0000000..8886fc7 Binary files /dev/null and b/Tiles/TitanForge.png differ diff --git a/UI/AmuletSlot.cs b/UI/AmuletSlot.cs new file mode 100644 index 0000000..2619d6a --- /dev/null +++ b/UI/AmuletSlot.cs @@ -0,0 +1,71 @@ +using System; +using Decimation.Core.Collections; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.GameInput; +using Terraria.UI; + +namespace Decimation.UI +{ + public class AmuletSlot : UIElement + { + public Item item; + private readonly int _context; + private readonly float _scale; + private bool _newItem; + internal Func validItem; + + public AmuletSlot(int context = ItemSlot.Context.BankItem, float scale = 1f) + { + this._context = context; + this._scale = scale; + this.item = new Item(); + this.item.SetDefaults(0); + + this.validItem = selectedItem => selectedItem.IsAir || (!selectedItem.IsAir && AmuletList.Instance.Contains(selectedItem)); + + Width.Set(Main.inventoryBack9Texture.Width * scale, 0f); + Height.Set(Main.inventoryBack9Texture.Height * scale, 0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + float oldScale = Main.inventoryScale; + Main.inventoryScale = _scale; + Rectangle rectangle = GetDimensions().ToRectangle(); + + if (ContainsPoint(Main.MouseScreen) && !PlayerInput.IgnoreMouseInterface) + { + Main.LocalPlayer.mouseInterface = true; + if (validItem == null || validItem(Main.mouseItem)) + { + _newItem = true; + ItemSlot.Handle(ref item, _context); + } + } + + ItemSlot.Draw(spriteBatch, ref item, _context, rectangle.TopLeft()); + Main.inventoryScale = oldScale; + + if (IsMouseHovering && item.IsAir) + Main.hoverItemName = "Amulets"; + } + + public void UpdateAmulet(DecimationPlayer player) + { + if (!item.IsAir) + item.modItem.UpdateAccessory(Main.LocalPlayer, false); + + if (!_newItem) + { + item = player.AmuletSlotItem; + } + else + { + _newItem = false; + player.AmuletSlotItem = item; + } + } + } +} diff --git a/UI/AmuletSlot.png b/UI/AmuletSlot.png new file mode 100644 index 0000000..3e9ff68 Binary files /dev/null and b/UI/AmuletSlot.png differ diff --git a/UI/AmuletSlotState.cs b/UI/AmuletSlotState.cs new file mode 100644 index 0000000..1bb237d --- /dev/null +++ b/UI/AmuletSlotState.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria.UI; +using Terraria; +using Microsoft.Xna.Framework; + +namespace Decimation.UI +{ + public class AmuletSlotState : UIState + { + public AmuletSlot slot; + + public AmuletSlotState() + { + slot = new AmuletSlot(scale: Main.inventoryScale); + + slot.SetPadding(0); + + Append(slot); + } + + public void UpdateAmulet(DecimationPlayer player) + { + slot.UpdateAmulet(player); + } + + public override void Update(GameTime gameTime) + { + base.Update(gameTime); + + // TODO to improve + if (Main.screenHeight > 660 && (Main.mapStyle != 1 || Main.screenHeight > 900)) + { + slot.Left.Set(Main.screenWidth - 91f, 0f); + slot.Top.Set(Main.screenHeight - 100f, 0f); + } + else + { + slot.Left.Set(Main.screenWidth - 234f, 0f); + slot.Top.Set(Main.screenHeight - 152f, 0f); + } + } + } +} diff --git a/UI/SkeletonUI.cs b/UI/SkeletonUI.cs new file mode 100644 index 0000000..a3cd74a --- /dev/null +++ b/UI/SkeletonUI.cs @@ -0,0 +1,135 @@ +using Decimation.Items; +using Decimation.NPCs.TownNPCs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.UI; +using Terraria.UI.Chat; + +namespace Decimation.UI +{ + class SkeletonUI : UIState + { + private VanillaItemSlotWrapper vanillaItemSlot; + + public override void OnInitialize() + { + vanillaItemSlot = new VanillaItemSlotWrapper(ItemSlot.Context.BankItem, 0.85f) + { + Left = { Pixels = 50 }, + Top = { Pixels = 270 }, + ValidItemFunc = item => item.IsAir || (!item.IsAir && item.accessory) + }; + + Append(vanillaItemSlot); + } + + public override void OnDeactivate() + { + if (!vanillaItemSlot.Item.IsAir) + { + Main.LocalPlayer.QuickSpawnClonedItem(vanillaItemSlot.Item, vanillaItemSlot.Item.stack); + + vanillaItemSlot.Item.TurnToAir(); + } + } + + public override void Update(GameTime gameTime) + { + base.Update(gameTime); + + if (Main.LocalPlayer.talkNPC == -1 || + Main.npc[Main.LocalPlayer.talkNPC].type != ModContent.NPCType()) + { + Decimation.Instance.skeletonUserInterface.SetState(null); + } + } + + private bool tickPlayed; + protected override void DrawSelf(SpriteBatch spriteBatch) + { + base.DrawSelf(spriteBatch); + + const int slotX = 50; + const int slotY = 270; + if (!vanillaItemSlot.Item.IsAir) + { + int itemValue = vanillaItemSlot.Item.value; + int cursePrice = (int)(itemValue * (1 / 3f)); + + string costText = Language.GetTextValue("LegacyInterface.46") + ": "; + string coinsText = ""; + int[] coins = Terraria.Utils.CoinsSplit(cursePrice); + if (coins[3] > 0) + { + coinsText = coinsText + "[c/" + Colors.AlphaDarken(Colors.CoinPlatinum).Hex3() + ":" + coins[3] + " " + Language.GetTextValue("LegacyInterface.15") + "] "; + } + if (coins[2] > 0) + { + coinsText = coinsText + "[c/" + Colors.AlphaDarken(Colors.CoinGold).Hex3() + ":" + coins[2] + " " + Language.GetTextValue("LegacyInterface.16") + "] "; + } + if (coins[1] > 0) + { + coinsText = coinsText + "[c/" + Colors.AlphaDarken(Colors.CoinSilver).Hex3() + ":" + coins[1] + " " + Language.GetTextValue("LegacyInterface.17") + "] "; + } + if (coins[0] > 0) + { + coinsText = coinsText + "[c/" + Colors.AlphaDarken(Colors.CoinCopper).Hex3() + ":" + coins[0] + " " + Language.GetTextValue("LegacyInterface.18") + "] "; + } + ItemSlot.DrawSavings(Main.spriteBatch, slotX + 130, Main.instance.invBottom, true); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, costText, new Vector2(slotX + 50, slotY), new Color(Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor), 0f, Vector2.Zero, Vector2.One, -1f, 2f); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, coinsText, new Vector2(slotX + 50 + Main.fontMouseText.MeasureString(costText).X, (float)slotY), Color.White, 0f, Vector2.Zero, Vector2.One, -1f, 2f); + int reforgeX = slotX + 70; + int reforgeY = slotY + 40; + bool hoveringOverReforgeButton = Main.mouseX > reforgeX - 15 && Main.mouseX < reforgeX + 15 && Main.mouseY > reforgeY - 15 && Main.mouseY < reforgeY + 15 && !PlayerInput.IgnoreMouseInterface; + Texture2D reforgeTexture = Main.reforgeTexture[hoveringOverReforgeButton ? 1 : 0]; + Main.spriteBatch.Draw(reforgeTexture, new Vector2(reforgeX, reforgeY), null, Color.White, 0f, reforgeTexture.Size() / 2f, 0.8f, SpriteEffects.None, 0f); + if (hoveringOverReforgeButton) + { + Main.hoverItemName = Language.GetTextValue("LegacyInterface.19"); + if (!tickPlayed) + { + Main.PlaySound(12, -1, -1, 1, 1f, 0f); + } + tickPlayed = true; + Main.LocalPlayer.mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft && Main.LocalPlayer.CanBuyItem(cursePrice, -1) && ItemLoader.PreReforge(vanillaItemSlot.Item)) + { + Main.LocalPlayer.BuyItem(cursePrice, -1); + bool favorited = vanillaItemSlot.Item.favorited; + int stack = vanillaItemSlot.Item.stack; + Item reforgeItem = new Item(); + reforgeItem.netDefaults(vanillaItemSlot.Item.netID); + reforgeItem = reforgeItem.CloneWithModdedDataFrom(vanillaItemSlot.Item); + + // This is the main effect of this slot. + reforgeItem.GetGlobalItem().Curse(reforgeItem); + + vanillaItemSlot.Item = reforgeItem.Clone(); + vanillaItemSlot.Item.position.X = Main.LocalPlayer.position.X + (Main.LocalPlayer.width / 2f) - (vanillaItemSlot.Item.width / 2f); + vanillaItemSlot.Item.position.Y = Main.LocalPlayer.position.Y + (Main.LocalPlayer.height / 2f) - (vanillaItemSlot.Item.height / 2f); + vanillaItemSlot.Item.favorited = favorited; + vanillaItemSlot.Item.stack = stack; + ItemLoader.PostReforge(vanillaItemSlot.Item); + ItemText.NewText(vanillaItemSlot.Item, vanillaItemSlot.Item.stack, true); + Main.PlaySound(SoundID.Item37, -1, -1); + } + } + else + { + tickPlayed = false; + } + } + else + { + // TODO change message after implementing the item + string message = "Place an item here to curse\nWarning: This action can't be undone."; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontMouseText, message, new Vector2(slotX + 50, slotY), new Color(Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor), 0f, Vector2.Zero, Vector2.One, -1f, 2f); + } + } + } +} diff --git a/UI/VanillaItemSlotWrapper.cs b/UI/VanillaItemSlotWrapper.cs new file mode 100644 index 0000000..3e4409e --- /dev/null +++ b/UI/VanillaItemSlotWrapper.cs @@ -0,0 +1,55 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.GameInput; +using Terraria.UI; + +// This class is from Example Mod +namespace Decimation.UI +{ + // This class wraps the vanilla ItemSlot class into a UIElement. The ItemSlot class was made before the UI system was made, so it can't be used normally with UIState. + // By wrapping the vanilla ItemSlot class, we can easily use ItemSlot. + // ItemSlot isn't very modder friendly and operates based on a "Context" number that dictates how the slot behaves when left, right, or shift clicked and the background used when drawn. + // If you want more control, you might need to write your own UIElement. + // I've added basic functionality for validating the item attempting to be placed in the slot via the validItem Func. + // See ExamplePersonUI for usage and use the Awesomify chat option of Example Person to see in action. + internal class VanillaItemSlotWrapper : UIElement + { + internal Item Item; + private readonly int _context; + private readonly float _scale; + internal Func ValidItemFunc; + + public VanillaItemSlotWrapper(int context = ItemSlot.Context.BankItem, float scale = 1f) + { + _context = context; + _scale = scale; + Item = new Item(); + Item.SetDefaults(0); + + Width.Set(Main.inventoryBack9Texture.Width * scale, 0f); + Height.Set(Main.inventoryBack9Texture.Height * scale, 0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + float oldScale = Main.inventoryScale; + Main.inventoryScale = _scale; + Rectangle rectangle = GetDimensions().ToRectangle(); + + if (ContainsPoint(Main.MouseScreen) && !PlayerInput.IgnoreMouseInterface) + { + Main.LocalPlayer.mouseInterface = true; + if (ValidItemFunc == null || ValidItemFunc(Main.mouseItem)) + { + // Handle handles all the click and hover actions based on the context. + ItemSlot.Handle(ref Item, _context); + } + } + // Draw draws the slot itself and Item. Depending on context, the color will change, as will drawing other things like stack counts. + ItemSlot.Draw(spriteBatch, ref Item, _context, rectangle.TopLeft()); + Main.inventoryScale = oldScale; + } + } +} \ No newline at end of file diff --git a/Walls/DenziumWall.cs b/Walls/DenziumWall.cs new file mode 100644 index 0000000..35784a7 --- /dev/null +++ b/Walls/DenziumWall.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Walls +{ + internal class DenziumWall : ModWall + { + public override void SetDefaults() + { + Main.wallHouse[this.Type] = true; + dustType = DustID.Stone; + drop = ModContent.ItemType(); + AddMapEntry(new Color(5, 7, 22)); + } + } +} \ No newline at end of file diff --git a/Walls/DenziumWall.png b/Walls/DenziumWall.png new file mode 100644 index 0000000..03332d1 Binary files /dev/null and b/Walls/DenziumWall.png differ diff --git a/build.txt b/build.txt new file mode 100644 index 0000000..186e423 --- /dev/null +++ b/build.txt @@ -0,0 +1,10 @@ +author = =FFR= Osiris +version = 0.1 +displayName = Decimation +homepage = +hideCode = true +hideResources = true +includeSource = false +buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\* +includePDB = true +languageVersion = 6 diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..a0da136 --- /dev/null +++ b/description.txt @@ -0,0 +1,14 @@ +Decimation mod description for first release: + +Decimation Mod V1.0 + +Welcome to the Decimation mod! + +This mod Currently adds the following: +3 bosses +1 new structire/mini biome +and a new class based accesory type with its own unique acessory slot: Amulets! + +Future updates will expand the endgame and include two new biomes and 1 new structure + +This mod would not have been possible if it werent for the time and effort FyloZ has put into it