diff --git a/Backgrounds/ExampleBiomeSurfaceClose.png b/Backgrounds/ExampleBiomeSurfaceClose.png new file mode 100644 index 0000000..146dc24 Binary files /dev/null and b/Backgrounds/ExampleBiomeSurfaceClose.png differ diff --git a/Backgrounds/ExampleBiomeSurfaceFar.png b/Backgrounds/ExampleBiomeSurfaceFar.png new file mode 100644 index 0000000..c5c1344 Binary files /dev/null and b/Backgrounds/ExampleBiomeSurfaceFar.png differ diff --git a/Backgrounds/ExampleBiomeSurfaceMid0.png b/Backgrounds/ExampleBiomeSurfaceMid0.png new file mode 100644 index 0000000..3396f45 Binary files /dev/null and b/Backgrounds/ExampleBiomeSurfaceMid0.png differ diff --git a/Backgrounds/ExampleBiomeSurfaceMid1.png b/Backgrounds/ExampleBiomeSurfaceMid1.png new file mode 100644 index 0000000..e5218a1 Binary files /dev/null and b/Backgrounds/ExampleBiomeSurfaceMid1.png differ diff --git a/Backgrounds/ExampleBiomeSurfaceMid2.png b/Backgrounds/ExampleBiomeSurfaceMid2.png new file mode 100644 index 0000000..9850611 Binary files /dev/null and b/Backgrounds/ExampleBiomeSurfaceMid2.png differ diff --git a/Backgrounds/ExampleBiomeSurfaceMid3.png b/Backgrounds/ExampleBiomeSurfaceMid3.png new file mode 100644 index 0000000..026dd34 Binary files /dev/null and b/Backgrounds/ExampleBiomeSurfaceMid3.png differ diff --git a/Buffs/TV.png b/Buffs/TV.png index 778e3d7..330c5ae 100644 Binary files a/Buffs/TV.png and b/Buffs/TV.png differ diff --git a/Dusts/Etherial.cs b/Dusts/Etherial.cs new file mode 100644 index 0000000..d41aaa3 --- /dev/null +++ b/Dusts/Etherial.cs @@ -0,0 +1,29 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Dusts +{ + public class Etherial : ModDust + { + public override void OnSpawn(Dust dust) + { + dust.velocity *= 0.2f; + dust.noGravity = true; + dust.noLight = true; + dust.scale *= 2.0f; + } + + public override bool Update(Dust dust) + { + dust.position += dust.velocity; + dust.rotation += dust.velocity.X * 0.15f; + dust.scale *= 0.99f; + if (dust.scale < 1f) + { + dust.active = false; + } + return false; + } + } +} \ No newline at end of file diff --git a/Dusts/Etherial.png b/Dusts/Etherial.png new file mode 100644 index 0000000..467f3e4 Binary files /dev/null and b/Dusts/Etherial.png differ diff --git a/Etherial/EtherialBkg.cs b/Etherial/EtherialBkg.cs new file mode 100644 index 0000000..5aa80ca --- /dev/null +++ b/Etherial/EtherialBkg.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Laugicality; + +namespace Laugicality.Etherial +{ + public class EtherialBkg : ModNPC + { + public int id = 0; + public int life = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault(""); + } + + public override void SetDefaults() + { + life = 16; + //npc.frameWidth = 40; + //npc.frameHeight = 34; + npc.width = 40; + npc.height = 34; + npc.damage = 0; + npc.defense = 12; + npc.lifeMax = 99999; + npc.value = 60f; + npc.knockBackResist = 0f; + npc.aiStyle = 0; + npc.lavaImmune = true; + npc.noGravity = true; + npc.noTileCollide = true; + npc.friendly = true; + npc.dontTakeDamage = true; + music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Etherial"); + } + + public override void AI() + { + life -= 1; + if (life == 0) + npc.life = 0; + } + + } +} diff --git a/Etherial/EtherialBkg.png b/Etherial/EtherialBkg.png new file mode 100644 index 0000000..9f86e7b Binary files /dev/null and b/Etherial/EtherialBkg.png differ diff --git a/Etherial/EtherialVisuals.cs b/Etherial/EtherialVisuals.cs new file mode 100644 index 0000000..7688f45 --- /dev/null +++ b/Etherial/EtherialVisuals.cs @@ -0,0 +1,145 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Laugicality; +using Laugicality.NPCs; +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework.Graphics; +using Terraria.Graphics.Effects; +using Terraria.Graphics.Shaders; + +namespace Laugicality.Etherial +{ + public class EtherialShader : ScreenShaderData + { + private int YIndex; + + public EtherialShader(string passName) + : base(passName) + { + } + + private void UpdateYIndex() + { + int YType = ModLoader.GetMod("Laugicality").NPCType("EtherialBkg"); + if (YIndex >= 0 && Main.npc[YIndex].active && Main.npc[YIndex].type == YType) + { + return; + } + YIndex = -1; + for (int i = 0; i < Main.npc.Length; i++) + { + if (Main.npc[i].active && Main.npc[i].type == YType) + { + YIndex = i; + break; + } + } + } + + public override void Apply() + { + UpdateYIndex(); + if (YIndex != -1) + { + UseTargetPosition(Main.npc[YIndex].Center); + } + base.Apply(); + } + } + + public class EtherialVisual : CustomSky + { + private bool isActive = false; + private float intensity = 0f; + private int YIndex = -1; + + public override void Update(GameTime gameTime) + { + if (isActive && intensity < 1f) + { + intensity += 0.01f; + } + else if (!isActive && intensity > 0f) + { + intensity -= 0.01f; + } + } + + private float GetIntensity() + { + if (this.UpdateYIndex()) + { + float x = 0f; + if (this.YIndex != -1) + { + x = Vector2.Distance(Main.player[Main.myPlayer].Center, Main.npc[this.YIndex].Center); + } + return (1f - Utils.SmoothStep(3000f, 6000f, x)) * 0.66f; + } + return 0.66f; + } + + public override Color OnTileColor(Color inColor) + { + float intensity = this.GetIntensity(); + return new Color(Vector4.Lerp(new Vector4(0.5f, 0.8f, 1f, 1f), inColor.ToVector4(), 1f - intensity)); + } + + private bool UpdateYIndex() + { + int YType = ModLoader.GetMod("Laugicality").NPCType("EtherialBkg"); + if (YIndex >= 0 && Main.npc[YIndex].active && Main.npc[YIndex].type == YType) + { + return true; + } + YIndex = -1; + for (int i = 0; i < Main.npc.Length; i++) + { + if (Main.npc[i].active && Main.npc[i].type == YType) + { + YIndex = i; + break; + } + } + //this.DoGIndex = DoGIndex; + return YIndex != -1; + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if (maxDepth >= 0 && minDepth < 0) + { + float intensity = this.GetIntensity(); + spriteBatch.Draw(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), new Color(77, 19, 0) * intensity); + } + } + + public override float GetCloudAlpha() + { + return 0f; + } + + public override void Activate(Vector2 position, params object[] args) + { + isActive = true; + } + + public override void Deactivate(params object[] args) + { + isActive = false; + } + + public override void Reset() + { + isActive = false; + } + + public override bool IsActive() + { + return isActive || intensity > 0f; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/GreaterHealingGem.cs b/Items/Accessories/GreaterHealingGem.cs index 7da902e..171fa1b 100644 --- a/Items/Accessories/GreaterHealingGem.cs +++ b/Items/Accessories/GreaterHealingGem.cs @@ -7,7 +7,7 @@ public class GreaterHealingGem : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("+150 Max Life"); + Tooltip.SetDefault("+150 Max Life \nGives 1 minute of Potion Sickness"); } public override void SetDefaults() diff --git a/Items/Accessories/HealingCrystal.cs b/Items/Accessories/HealingCrystal.cs index fc035df..5c72b16 100644 --- a/Items/Accessories/HealingCrystal.cs +++ b/Items/Accessories/HealingCrystal.cs @@ -7,7 +7,7 @@ public class HealingCrystal : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("+150 Max Life"); + Tooltip.SetDefault("+150 Max Life \nGives 1 minute of Potion Sickness"); } public override void SetDefaults() diff --git a/Items/Accessories/HealingGem.cs b/Items/Accessories/HealingGem.cs index bf84eff..a27f30e 100644 --- a/Items/Accessories/HealingGem.cs +++ b/Items/Accessories/HealingGem.cs @@ -7,7 +7,7 @@ public class HealingGem : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("+100 Max Life"); + Tooltip.SetDefault("+100 Max Life \nGives 1 minute of Potion Sickness"); } public override void SetDefaults() diff --git a/Items/Accessories/LesserHealingGem.cs b/Items/Accessories/LesserHealingGem.cs index 09fca78..1119545 100644 --- a/Items/Accessories/LesserHealingGem.cs +++ b/Items/Accessories/LesserHealingGem.cs @@ -7,7 +7,7 @@ public class LesserHealingGem : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("+50 Max Life"); + Tooltip.SetDefault("+50 Max Life \nGives 1 minute of Potion Sickness"); } public override void SetDefaults() diff --git a/Items/Accessories/MegaHealingStone.cs b/Items/Accessories/MegaHealingStone.cs index 74250f5..cf7ffc5 100644 --- a/Items/Accessories/MegaHealingStone.cs +++ b/Items/Accessories/MegaHealingStone.cs @@ -7,7 +7,7 @@ public class MegaHealingStone : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("+350 Max Life"); + Tooltip.SetDefault("+350 Max Life \nGives 1 minute of Potion Sickness"); } public override void SetDefaults() diff --git a/Items/Accessories/SuperHealingGem .cs b/Items/Accessories/SuperHealingGem .cs index 12e2ed5..8e9d09f 100644 --- a/Items/Accessories/SuperHealingGem .cs +++ b/Items/Accessories/SuperHealingGem .cs @@ -7,7 +7,7 @@ public class SuperHealingGem : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("+200 Max Life"); + Tooltip.SetDefault("+200 Max Life \nGives 1 minute of Potion Sickness"); } public override void SetDefaults() diff --git a/Items/Consumables/EtherialEnergy.cs b/Items/Consumables/EtherialEnergy.cs new file mode 100644 index 0000000..10e735b --- /dev/null +++ b/Items/Consumables/EtherialEnergy.cs @@ -0,0 +1,39 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.Items.Consumables +{ + public class EtherialEnergy : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("Imbues your body with Etherial energy"); + } + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.maxStack = 1; + item.rare = 1; + item.useAnimation = 45; + item.useTime = 45; + item.useStyle = 4; + item.UseSound = SoundID.Item4; + item.consumable = true; + } + + public override bool CanUseItem(Player player) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + return !modPlayer.etherialSlot; + } + + public override bool UseItem(Player player) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + modPlayer.etherialSlot = true; + return true; + } + } +} \ No newline at end of file diff --git a/Items/Consumables/EtherialEnergy.png b/Items/Consumables/EtherialEnergy.png new file mode 100644 index 0000000..0d54db6 Binary files /dev/null and b/Items/Consumables/EtherialEnergy.png differ diff --git a/Items/Loot/BrainOfEtheria.cs b/Items/Loot/BrainOfEtheria.cs new file mode 100644 index 0000000..01db764 --- /dev/null +++ b/Items/Loot/BrainOfEtheria.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class BrainOfEtheria : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+1 to all Mystic powers while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + modPlayer.conjurationPower += 1; + modPlayer.illusionPower += 1; + modPlayer.destructionPower += 1; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/BrainOfEtheria.png b/Items/Loot/BrainOfEtheria.png new file mode 100644 index 0000000..9889924 Binary files /dev/null and b/Items/Loot/BrainOfEtheria.png differ diff --git a/Items/Loot/CogOfEtheria.cs b/Items/Loot/CogOfEtheria.cs new file mode 100644 index 0000000..8550ce7 --- /dev/null +++ b/Items/Loot/CogOfEtheria.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class CogOfEtheria : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cog of Etheria"); + Tooltip.SetDefault("Increases your max number of minions by 4 while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 32; + item.height = 32; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if(modPlayer.etherial) + player.maxMinions += 4; + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/CogOfEtheria.png b/Items/Loot/CogOfEtheria.png new file mode 100644 index 0000000..e843948 Binary files /dev/null and b/Items/Loot/CogOfEtheria.png differ diff --git a/Items/Loot/EmblemOfEtheria.cs b/Items/Loot/EmblemOfEtheria.cs new file mode 100644 index 0000000..e09cfbd --- /dev/null +++ b/Items/Loot/EmblemOfEtheria.cs @@ -0,0 +1,49 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EmblemOfEtheria : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Emblem of Etheria"); + Tooltip.SetDefault("Calls Etheria\n\'This seems like a terrible idea.\'"); + } + public override void SetDefaults() + { + item.width = 32; + item.height = 32; + item.maxStack = 20; + item.rare = 1; + item.useAnimation = 45; + item.useTime = 45; + item.useStyle = 4; + item.UseSound = SoundID.Item44; + item.consumable = true; + item.shoot = mod.ProjectileType("EtheriaSpawn"); + } + + public override bool CanUseItem(Player player) + { + return !Main.dayTime; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SpookyWood, 100); + recipe.AddIngredient(ItemID.Ectoplasm, 25); + recipe.AddTile(26); + recipe.SetResult(this); + recipe.AddRecipe(); + + ModRecipe Arecipe = new ModRecipe(mod); + Arecipe.AddIngredient(null, "EtherialEssence", 15); + Arecipe.AddTile(26); + Arecipe.SetResult(this); + Arecipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Loot/EmblemOfEtheria.png b/Items/Loot/EmblemOfEtheria.png new file mode 100644 index 0000000..367aa93 Binary files /dev/null and b/Items/Loot/EmblemOfEtheria.png differ diff --git a/Items/Loot/EssenceOfEtheria.cs b/Items/Loot/EssenceOfEtheria.cs new file mode 100644 index 0000000..73f60e4 --- /dev/null +++ b/Items/Loot/EssenceOfEtheria.cs @@ -0,0 +1,42 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EssenceOfEtheria : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Essence of Etheria"); + Tooltip.SetDefault("Allows you to enter and leave the Etherial at will"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 1; + item.useAnimation = 45; + item.useTime = 45; + item.useStyle = 4; + item.accessory = true; + //item.defense = 1000; + item.lifeRegen = 1; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + modPlayer.etherable = true; + } + + public override bool UseItem(Player player) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + modPlayer.etherial = !modPlayer.etherial; + Main.PlaySound(SoundLoader.customSoundType, -1, -1, mod.GetSoundSlot(SoundType.Custom, "Sounds/EtherialChange")); + return true; + } + } +} \ No newline at end of file diff --git a/Items/Loot/EssenceOfEtheria.png b/Items/Loot/EssenceOfEtheria.png new file mode 100644 index 0000000..bf45607 Binary files /dev/null and b/Items/Loot/EssenceOfEtheria.png differ diff --git a/Items/Loot/Etheramind.cs b/Items/Loot/Etheramind.cs new file mode 100644 index 0000000..09ee02e --- /dev/null +++ b/Items/Loot/Etheramind.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class Etheramind : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("Increases your minion capacity by 2, +80 Mana, and -10% Mana usage while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.maxMinions += 2; + player.statManaMax2 += 80; + player.manaCost -= 10f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/Etheramind.png b/Items/Loot/Etheramind.png new file mode 100644 index 0000000..11158cb Binary files /dev/null and b/Items/Loot/Etheramind.png differ diff --git a/Items/Loot/EtherialEssence.cs b/Items/Loot/EtherialEssence.cs new file mode 100644 index 0000000..17af762 --- /dev/null +++ b/Items/Loot/EtherialEssence.cs @@ -0,0 +1,36 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialEssence : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("From the world beyond."); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = 1; + item.value = 0; + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(77); + recipe.AddIngredient(null, "ObsidiumOre", 3); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialEssence.png b/Items/Loot/EtherialEssence.png new file mode 100644 index 0000000..6180266 Binary files /dev/null and b/Items/Loot/EtherialEssence.png differ diff --git a/Items/Loot/EtherialFrost.cs b/Items/Loot/EtherialFrost.cs new file mode 100644 index 0000000..c94ab30 --- /dev/null +++ b/Items/Loot/EtherialFrost.cs @@ -0,0 +1,44 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialFrost : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+30% Melee and Ranged crit when in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.meleeCrit += 30; + player.rangedCrit += 30; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialFrost.png b/Items/Loot/EtherialFrost.png new file mode 100644 index 0000000..655d1fe Binary files /dev/null and b/Items/Loot/EtherialFrost.png differ diff --git a/Items/Loot/EtherialGel.cs b/Items/Loot/EtherialGel.cs new file mode 100644 index 0000000..2d50a6f --- /dev/null +++ b/Items/Loot/EtherialGel.cs @@ -0,0 +1,43 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialGel : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("Super Jump Boost while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.jumpSpeedBoost += 5.0f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialGel.png b/Items/Loot/EtherialGel.png new file mode 100644 index 0000000..7f9c536 Binary files /dev/null and b/Items/Loot/EtherialGel.png differ diff --git a/Items/Loot/EtherialGlobe.cs b/Items/Loot/EtherialGlobe.cs new file mode 100644 index 0000000..48878f0 --- /dev/null +++ b/Items/Loot/EtherialGlobe.cs @@ -0,0 +1,48 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialGlobe : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+30% Damage while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.thrownDamage += 0.3f; + player.rangedDamage += 0.3f; + player.magicDamage += 0.3f; + player.minionDamage += 0.3f; + player.meleeDamage += 0.3f; + modPlayer.mysticDamage += 0.3f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialGlobe.png b/Items/Loot/EtherialGlobe.png new file mode 100644 index 0000000..e666256 Binary files /dev/null and b/Items/Loot/EtherialGlobe.png differ diff --git a/Items/Loot/EtherialPack.cs b/Items/Loot/EtherialPack.cs new file mode 100644 index 0000000..a674a7e --- /dev/null +++ b/Items/Loot/EtherialPack.cs @@ -0,0 +1,44 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialPack : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+30% Movement Speed and Max Run Speed while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.maxRunSpeed += 3f; + player.moveSpeed += .3f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialPack.png b/Items/Loot/EtherialPack.png new file mode 100644 index 0000000..b762c77 Binary files /dev/null and b/Items/Loot/EtherialPack.png differ diff --git a/Items/Loot/EtherialSac.cs b/Items/Loot/EtherialSac.cs new file mode 100644 index 0000000..d20812f --- /dev/null +++ b/Items/Loot/EtherialSac.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialSac : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+30% Crit Chance while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.thrownCrit += 30; + player.rangedCrit += 30; + player.magicCrit += 30; + player.meleeCrit += 30; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialSac.png b/Items/Loot/EtherialSac.png new file mode 100644 index 0000000..7d18305 Binary files /dev/null and b/Items/Loot/EtherialSac.png differ diff --git a/Items/Loot/EtherialScarf.cs b/Items/Loot/EtherialScarf.cs new file mode 100644 index 0000000..10874a7 --- /dev/null +++ b/Items/Loot/EtherialScarf.cs @@ -0,0 +1,43 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialScarf : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("35% Damage Reduction while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.endurance += 0.35f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialScarf.png b/Items/Loot/EtherialScarf.png new file mode 100644 index 0000000..a1a20c7 Binary files /dev/null and b/Items/Loot/EtherialScarf.png differ diff --git a/Items/Loot/EtherialSkull.cs b/Items/Loot/EtherialSkull.cs new file mode 100644 index 0000000..2dbf40c --- /dev/null +++ b/Items/Loot/EtherialSkull.cs @@ -0,0 +1,48 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialSkull : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+20% Damage while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.thrownDamage += 0.2f; + player.rangedDamage += 0.2f; + player.magicDamage += 0.2f; + player.minionDamage += 0.2f; + player.meleeDamage += 0.2f; + modPlayer.mysticDamage += 0.2f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialSkull.png b/Items/Loot/EtherialSkull.png new file mode 100644 index 0000000..e28f029 Binary files /dev/null and b/Items/Loot/EtherialSkull.png differ diff --git a/Items/Loot/EtherialTank.cs b/Items/Loot/EtherialTank.cs new file mode 100644 index 0000000..5a45844 --- /dev/null +++ b/Items/Loot/EtherialTank.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialTank : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+20 Defense and 15% Damage Reduction while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.endurance += 0.15f; + item.defense = 20; + } + else + item.defense = 0; + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialTank.png b/Items/Loot/EtherialTank.png new file mode 100644 index 0000000..5a0ee11 Binary files /dev/null and b/Items/Loot/EtherialTank.png differ diff --git a/Items/Loot/EtherialTruffle.cs b/Items/Loot/EtherialTruffle.cs new file mode 100644 index 0000000..5c84344 --- /dev/null +++ b/Items/Loot/EtherialTruffle.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EtherialTruffle : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("Increased mobility while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.jumpSpeedBoost += 5.0f; + player.maxRunSpeed += .5f; + player.moveSpeed += .25f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/EtherialTruffle.png b/Items/Loot/EtherialTruffle.png new file mode 100644 index 0000000..8dc2019 Binary files /dev/null and b/Items/Loot/EtherialTruffle.png differ diff --git a/Items/Loot/Etherworks.cs b/Items/Loot/Etherworks.cs new file mode 100644 index 0000000..9f0936d --- /dev/null +++ b/Items/Loot/Etherworks.cs @@ -0,0 +1,44 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class Etherworks : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+30% Throwing damage and +50% Throwing Velocity while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + player.thrownDamage += .30f; + player.thrownVelocity += .5f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/Etherworks.png b/Items/Loot/Etherworks.png new file mode 100644 index 0000000..4dfda87 Binary files /dev/null and b/Items/Loot/Etherworks.png differ diff --git a/Items/Loot/EyeOfEtheria.cs b/Items/Loot/EyeOfEtheria.cs new file mode 100644 index 0000000..73fad94 --- /dev/null +++ b/Items/Loot/EyeOfEtheria.cs @@ -0,0 +1,32 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class EyeOfEtheria : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Eye of Etheria"); + Tooltip.SetDefault("Allows you to see all creatures, no matter which dimension you are in."); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 1; + item.accessory = true; + //item.defense = 1000; + item.lifeRegen = 1; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + modPlayer.etherVision = true; + } + + } +} \ No newline at end of file diff --git a/Items/Loot/EyeOfEtheria.png b/Items/Loot/EyeOfEtheria.png new file mode 100644 index 0000000..53bc206 Binary files /dev/null and b/Items/Loot/EyeOfEtheria.png differ diff --git a/Items/Loot/FrostEssence.cs b/Items/Loot/FrostEssence.cs index f96af6c..c31f8ef 100644 --- a/Items/Loot/FrostEssence.cs +++ b/Items/Loot/FrostEssence.cs @@ -7,7 +7,7 @@ public class FrostEssence : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("Unleashes Ice Shards when struck. +4% Melee and Ranged crit"); + Tooltip.SetDefault("Unleashes Ice Shards when struck. +8% Melee and Ranged crit"); } public override void SetDefaults() @@ -26,8 +26,8 @@ public override void UpdateAccessory(Player player, bool hideVisual) { var modPlayer = Main.LocalPlayer.GetModPlayer(mod); modPlayer.frigid = true; - player.meleeCrit += 4; - player.rangedCrit += 4; + player.meleeCrit += 8; + player.rangedCrit += 8; } /* public override void AddRecipes() diff --git a/Items/Loot/MechanicalMonitor.cs b/Items/Loot/MechanicalMonitor.cs index 023e30e..4cf5005 100644 --- a/Items/Loot/MechanicalMonitor.cs +++ b/Items/Loot/MechanicalMonitor.cs @@ -8,6 +8,7 @@ public class MechanicalMonitor : ModItem { public override void SetStaticDefaults() { + DisplayName.SetDefault("Steam-O-Vision"); Tooltip.SetDefault("Summons The Annihilator"); } public override void SetDefaults() diff --git a/Items/Loot/MechanicalMonitor.png b/Items/Loot/MechanicalMonitor.png index f843f57..f9d34a9 100644 Binary files a/Items/Loot/MechanicalMonitor.png and b/Items/Loot/MechanicalMonitor.png differ diff --git a/Items/Loot/MoltenEtheria.cs b/Items/Loot/MoltenEtheria.cs new file mode 100644 index 0000000..8c88cbc --- /dev/null +++ b/Items/Loot/MoltenEtheria.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class MoltenEtheria : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("+8 Defense, +60% Throwing Velocity and Mystic Duration while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + //item.lifeRegen = 19; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + modPlayer.mysticDuration += 0.6f; + player.statDefense += 8; + player.thrownVelocity += 0.6f; + } + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/MoltenEtheria.png b/Items/Loot/MoltenEtheria.png new file mode 100644 index 0000000..2d362fb Binary files /dev/null and b/Items/Loot/MoltenEtheria.png differ diff --git a/Items/Loot/Pyramind.cs b/Items/Loot/Pyramind.cs index f9751f9..9bca2bb 100644 --- a/Items/Loot/Pyramind.cs +++ b/Items/Loot/Pyramind.cs @@ -7,7 +7,7 @@ public class Pyramind : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("Increases your minion capacity \n+40 Mana"); + Tooltip.SetDefault("Increases your minion capacity \n+40 Mana \nUnleash a Sandstorm when struck"); } public override void SetDefaults() @@ -24,6 +24,8 @@ public override void SetDefaults() public override void UpdateAccessory(Player player, bool hideVisual) { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + modPlayer.sandy = true; player.maxMinions += 1; player.statManaMax2 += 40; } diff --git a/Items/Loot/SoulOfSought.cs b/Items/Loot/SoulOfSought.cs index a84f00a..6c5b5b6 100644 --- a/Items/Loot/SoulOfSought.cs +++ b/Items/Loot/SoulOfSought.cs @@ -11,7 +11,7 @@ public class SoulOfSought : ModItem public override void SetStaticDefaults() { DisplayName.SetDefault("Soul of Sought"); - Tooltip.SetDefault("'The essence of distant creatures'"); + Tooltip.SetDefault("'The essence of space creatures'"); // ticksperframe, frameCount Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 4)); ItemID.Sets.AnimatesAsSoul[item.type] = true; diff --git a/Items/Loot/StoneOfEtheria.cs b/Items/Loot/StoneOfEtheria.cs new file mode 100644 index 0000000..4b00f5b --- /dev/null +++ b/Items/Loot/StoneOfEtheria.cs @@ -0,0 +1,44 @@ +using Terraria; +using Terraria.ModLoader; + +namespace Laugicality.Items.Loot +{ + public class StoneOfEtheria : ModItem + { + public override void SetStaticDefaults() + { + Tooltip.SetDefault("Greatly increased life regeneration while in the Etherial"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100; + item.rare = 2; + item.accessory = true; + item.expert = true; + //item.defense = 1000; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + item.lifeRegen = 12; + } + else + item.lifeRegen = 0; + } + /* + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(2328, 4); + recipe.AddTile(null, "AlchemicalInfuser"); + recipe.SetResult(this); + recipe.AddRecipe(); + }*/ + } +} \ No newline at end of file diff --git a/Items/Loot/StoneOfEtheria.png b/Items/Loot/StoneOfEtheria.png new file mode 100644 index 0000000..8e58fa3 Binary files /dev/null and b/Items/Loot/StoneOfEtheria.png differ diff --git a/Items/Loot/SuspiciousTrainWhistle.cs b/Items/Loot/SuspiciousTrainWhistle.cs index 5798368..917ce98 100644 --- a/Items/Loot/SuspiciousTrainWhistle.cs +++ b/Items/Loot/SuspiciousTrainWhistle.cs @@ -28,9 +28,8 @@ public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(1225, 5); - recipe.AddIngredient(null, "SteamBar", 5); - recipe.AddIngredient(ItemID.Cog, 40); - recipe.AddIngredient(null, "SoulOfSought", 6); + recipe.AddIngredient(ItemID.Cog, 60); + recipe.AddIngredient(null, "SoulOfSought", 8); recipe.AddTile(134); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/EnginatorM.cs b/Items/Weapons/EnginatorM.cs index 8ab8074..f0cb1f3 100644 --- a/Items/Weapons/EnginatorM.cs +++ b/Items/Weapons/EnginatorM.cs @@ -17,7 +17,7 @@ public override void SetStaticDefaults() } public override void SetDefaults() { - item.damage = 110; //this is the item damage + item.damage = 110000; //this is the item damage item.melee = true; //this make the item do throwing damage item.noMelee = true; item.width = 106; diff --git a/Items/Weapons/FrostBlade.cs b/Items/Weapons/FrostBlade.cs index 0c3ff47..3c93553 100644 --- a/Items/Weapons/FrostBlade.cs +++ b/Items/Weapons/FrostBlade.cs @@ -18,7 +18,7 @@ public override void SetStaticDefaults() public override void SetDefaults() { - item.damage = 18; + item.damage = 20; item.melee = true; item.width = 34; item.height = 40; @@ -40,7 +40,7 @@ public override bool Shoot(Player player, ref Vector2 position, ref float speedX { position += muzzleOffset; } - int numberProjectiles = Main.rand.Next(2,5); + int numberProjectiles = Main.rand.Next(3,6); for (int i = 0; i < numberProjectiles; i++) { Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedByRandom(MathHelper.ToRadians(15)); // 30 degree spread. diff --git a/Items/Weapons/FrostCannon.cs b/Items/Weapons/FrostCannon.cs index 375c2f6..e5d091c 100644 --- a/Items/Weapons/FrostCannon.cs +++ b/Items/Weapons/FrostCannon.cs @@ -18,12 +18,12 @@ public override void SetStaticDefaults() public override void SetDefaults() { - item.damage = 7; + item.damage = 9; item.ranged = true; item.width = 62; item.height = 30; - item.useTime = 30; - item.useAnimation = 30; + item.useTime = 28; + item.useAnimation = 28; item.useStyle = 5; item.noMelee = true; //so the item's animation doesn't do damage item.knockBack = 8; @@ -42,7 +42,7 @@ public override bool Shoot(Player player, ref Vector2 position, ref float speedX { position += muzzleOffset; } - int numberProjectiles = Main.rand.Next(3,5); + int numberProjectiles = Main.rand.Next(3,6); for (int i = 0; i < numberProjectiles; i++) { Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedByRandom(MathHelper.ToRadians(15)); // 30 degree spread. diff --git a/Items/Weapons/Mystic/GaiasWorld.cs b/Items/Weapons/Mystic/GaiasWorld.cs index bac8117..e07b181 100644 --- a/Items/Weapons/Mystic/GaiasWorld.cs +++ b/Items/Weapons/Mystic/GaiasWorld.cs @@ -51,27 +51,27 @@ public override void HoldItem(Player player) if (modPlayer.mysticMode == 1) { player.AddBuff(mod.BuffType("Destruction"), 1, true); - item.damage = 35; + item.damage = 30 + 5 * modPlayer.destructionPower; item.damage = (int)(item.damage * modPlayer.mysticDamage * modPlayer.destructionDamage); item.mana = 6; - item.useTime = 26; - item.useAnimation = 30; - item.knockBack = 6; - item.shootSpeed = 10f; + item.useTime = 26 - (2 * modPlayer.destructionPower); + if (item.useTime <= 0) + item.useTime = 1; + item.useAnimation = item.useTime; + item.knockBack = 4 + (2 * modPlayer.destructionPower); + item.shootSpeed = 8f + (float)(2 * modPlayer.destructionPower); item.shoot = mod.ProjectileType("GaiaDestruction"); } else if(modPlayer.mysticMode == 2) { player.AddBuff(mod.BuffType("Illusion"), 1, true); - item.damage = 24 + 6 * modPlayer.destructionPower; + item.damage = 30; item.damage = (int)(item.damage * modPlayer.mysticDamage * modPlayer.illusionDamage); item.mana = 6; - item.useTime = 18 - (2 * modPlayer.destructionPower); - if (item.useTime <= 0) - item.useTime = 1; + item.useTime = 16; item.useAnimation = item.useTime; - item.knockBack = 2 + (2 * modPlayer.destructionPower); - item.shootSpeed = 10f + (float)(2 * modPlayer.destructionPower); + item.knockBack = 4; + item.shootSpeed = 12f; item.shoot = mod.ProjectileType("GaiaIllusion"); } else if (modPlayer.mysticMode == 3) diff --git a/Laugicality.cs b/Laugicality.cs index ed8b0c6..817e2f5 100644 --- a/Laugicality.cs +++ b/Laugicality.cs @@ -22,6 +22,7 @@ using Terraria.ID; using Terraria.UI.Chat; using Terraria.ModLoader; +using Laugicality.Etherial; namespace Laugicality //Laugicality.cs { @@ -30,6 +31,7 @@ class Laugicality : Mod internal static ModHotKey ToggleMystic; internal static ModHotKey ToggleSoulStoneV; internal static ModHotKey ToggleSoulStoneM; + internal static ModHotKey ToggleEtherial; private double pressedHotkeyTime; public Laugicality() @@ -78,35 +80,79 @@ public override void AddRecipeGroups() } + /* + protected void DrawNPC(int iNPCIndex, bool behindTiles){ + if (Main.player[Main.myPlayer].detectCreature && nPC.lifeMax > 1) + { + byte b; + byte b2; + byte b3; + if (nPC.friendly || nPC.catchItem > 0 || (nPC.damage == 0 && nPC.lifeMax == 5)) + { + b = 50; + b2 = 255; + b3 = 50; + } + else + { + b = 255; + b2 = 50; + b3 = 50; + } + if (color9.R < b) + { + color9.R = b; + } + if (color9.G < b2) + { + color9.G = b2; + } + if (color9.B < b3) + { + color9.B = b3; + } + } + } + */ //BossChecklist public override void PostSetupContent() { Mod bossChecklist = ModLoader.GetMod("BossChecklist"); if (bossChecklist != null) { - bossChecklist.Call("AddBossWithInfo", "The Annihilator", 9.2f, (Func)(() => LaugicalityWorld.downedAnnihilator), "The Mechanical Television will summon it at night"); - bossChecklist.Call("AddBossWithInfo", "Slybertron", 9.3f, (Func)(() => LaugicalityWorld.downedSlybertron), "The Steam Crown calls to its King"); - bossChecklist.Call("AddBossWithInfo", "Steam Train", 9.4f, (Func)(() => LaugicalityWorld.downedSteamTrain), "A Suspicious Train Whistle might get its attention."); - bossChecklist.Call("AddBossWithInfo", "Dune Sharkron", 2.3f, (Func)(() => LaugicalityWorld.downedDuneSharkron), "A tasty morsel in the daytime will attract this Shark's attention."); - bossChecklist.Call("AddBossWithInfo", "Hypothema", 2.4f, (Func)(() => LaugicalityWorld.downedHypothema), "There's a chill in the air..."); - bossChecklist.Call("AddBossWithInfo", "Ragnar", 2.5f, (Func)(() => LaugicalityWorld.downedRagnar), "This Molten Mess guards the underground."); + bossChecklist.Call("AddBossWithInfo", "The Annihilator", 9.2f, (Func)(() => LaugicalityWorld.downedAnnihilator), string.Format("The Steam-O-Vision [i:{0}] will summon it at night", ItemType("MechanicalMonitor"))); + bossChecklist.Call("AddBossWithInfo", "Slybertron", 9.3f, (Func)(() => LaugicalityWorld.downedSlybertron), string.Format("The Steam Crown [i:{0}] calls to its King", ItemType("SteamCrown"))); + bossChecklist.Call("AddBossWithInfo", "Steam Train", 9.4f, (Func)(() => LaugicalityWorld.downedSteamTrain), string.Format("A Suspicious Train Whistle [i:{0}] might get its attention.", ItemType("SuspiciousTrainWhistle"))); + bossChecklist.Call("AddBossWithInfo", "Dune Sharkron", 2.3f, (Func)(() => LaugicalityWorld.downedDuneSharkron), string.Format("A Tasty Morsel [i:{0}] in the daytime will attract this Shark's attention.", ItemType("TastyMorsel"))); + bossChecklist.Call("AddBossWithInfo", "Hypothema", 2.4f, (Func)(() => LaugicalityWorld.downedHypothema), string.Format("There's a chill in the air... [i:{0}]", ItemType("ChilledMesh"))); + bossChecklist.Call("AddBossWithInfo", "Ragnar", 2.5f, (Func)(() => LaugicalityWorld.downedRagnar), string.Format("This Molten Mess [i:{0}] guards the underground.", ItemType("MoltenMess"))); + bossChecklist.Call("AddBossWithInfo", "Etheria", 10.51f, (Func)(() => LaugicalityWorld.downedEtheria), string.Format("The guardian of the Etherial will consume its prey. [i:{0}]", ItemType("EmblemOfEtheria"))); } } //Hotkeys public override void Load() { - ToggleMystic = RegisterHotKey("Toggle Mysticism", "Mouse2"); + if (!Main.dedServ) + { + Filters.Scene["Laugicality:Etherial"] = new Filter(new EtherialShader("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh); + SkyManager.Instance["Laugicality:Etherial"] = new EtherialVisual(); + } + ToggleMystic = RegisterHotKey("Toggle Mysticism", "Mouse2"); + ToggleEtherial = RegisterHotKey("Toggle Etherial", "Mouse4"); ToggleSoulStoneV = RegisterHotKey("Toggle Soul Stone Visuals", "V"); ToggleSoulStoneM = RegisterHotKey("Toggle Soul Stone Mobility", "C"); } - public override void UpdateMusic(ref int music) { if(Main.myPlayer != -1 && !Main.gameMenu) { - if(Main.player[Main.myPlayer].active && Main.player[Main.myPlayer].GetModPlayer(this).ZoneObsidium) + if (Main.player[Main.myPlayer].active && Main.player[Main.myPlayer].GetModPlayer(this).etherial) + { + music = this.GetSoundSlot(SoundType.Music, "Sounds/Music/Etherial"); + } + if (Main.player[Main.myPlayer].active && Main.player[Main.myPlayer].GetModPlayer(this).ZoneObsidium) { music = this.GetSoundSlot(SoundType.Music, "Sounds/Music/Obsidium"); } diff --git a/LaugicalityPlayer.cs b/LaugicalityPlayer.cs index 40e3e8d..5d8a8f3 100644 --- a/LaugicalityPlayer.cs +++ b/LaugicalityPlayer.cs @@ -25,6 +25,7 @@ public class LaugicalityPlayer : ModPlayer public bool frost = false; public bool frigid = false; public bool rocks = false; + public bool sandy = false; //Summons public bool mCore = false; @@ -61,12 +62,21 @@ public class LaugicalityPlayer : ModPlayer public int destructionPower = 1; public int conjurationPower = 1; + public bool etherial = false; + public int etherialTrail = 0; + public bool etherable = false; + public int ethBkg = 0; + public bool etherialSlot = false; + public bool etherVision = false; public bool ZoneObsidium = false; public override void ResetEffects() { + etherVision = false; + etherable = false; rocks = false; + sandy = false; frost = false; obsidium = false; frigid = false; @@ -95,19 +105,47 @@ public override void ResetEffects() illusionPower = 1; destructionPower = 1; conjurationPower = 1; + + + if (player.extraAccessory) + { + player.extraAccessorySlots = 1; + if (etherialSlot) + { + player.extraAccessorySlots = 2; + } + } + else if (etherialSlot) + { + player.extraAccessorySlots = 2; + } + + if (!player.extraAccessory && !etherialSlot) + { + player.extraAccessorySlots = 0; + } } public override TagCompound Save() { return new TagCompound { - {"Class", Class } + {"Class", Class }, + {"Etherial", etherial }, + {"ESlot", etherialSlot } }; } + public override void UpdateBiomeVisuals() + { + bool useNebula = NPC.AnyNPCs(mod.NPCType("EtherialBkg")); + player.ManageSpecialBiomeVisuals("Laugicality:Etherial", useNebula); + } public override void Load(TagCompound tag) { Class = tag.GetInt("Class"); + etherial = tag.GetBool("Etherial"); + etherialSlot = tag.GetBool("ESlot"); } @@ -150,30 +188,7 @@ public override Texture2D GetMapBackgroundImage() } return null; } - /* - public override int GetWeaponDamage(Item sItem) - { - bool flag23 = false; - bool critTry = false; - int mCrit = this.inventory[this.selectedItem].crit; +this.mysticCrit; - Random mCritChance = new Random(); - int mCritTry = mCritChance.Next(1,100); - if (mCritTry < mCrit) { - critTry = true; - bool flag23 = true; - } - - int num = sItem.damage; - if (critTry == true) num *= 2; - if (num > 0) - { - if (sItem.mystic) - { - num = (int)((float)num * this.mysticDamage + 5E-06f); - } - } - return num; - }*/ + public override void UpdateDead() { @@ -229,10 +244,26 @@ public override void OnHitNPC(Item item, NPC target, int damage, float knockback target.AddBuff(mod.BuffType("Electrified"), (int)((120 + 60 * rand) * mysticDuration), false); } } + public bool etherialCheck() + { + return etherial; + } + + public override void PreUpdate() + { + etherial = LaugicalityWorld.etherial; + } public override void DrawEffects(PlayerDrawInfo drawInfo, ref float r, ref float g, ref float b, ref float a, ref bool fullBright) { + + if (etherialTrail > 0) + { + etherialTrail -= 1; + if(Main.rand.Next(0,4) == 0) + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + } if (eFied) { if (Main.rand.Next(4) == 0 && drawInfo.shadow == 0f) @@ -248,8 +279,23 @@ public override void DrawEffects(PlayerDrawInfo drawInfo, ref float r, ref float b *= 0.8f; fullBright = true; } - } + if (etherial) + { + r = 0.2f; + g = 0.9f; + b = 1f; + if(ethBkg <= 0) + { + ethBkg = 9; + NPC.NewNPC((int)player.position.X, (int)player.position.Y, mod.NPCType("EtherialBkg")); + } + else + { + ethBkg -= 1; + } + } + } //Hotkey public override void ProcessTriggers(TriggersSet triggersSet) { @@ -266,6 +312,25 @@ public override void ProcessTriggers(TriggersSet triggersSet) { SoulStoneM = !SoulStoneM; } + if (Laugicality.ToggleEtherial.JustPressed && etherable) + { + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + Dust.NewDust(player.position + player.velocity, player.width, player.height, mod.DustType("Etherial"), 0f, 0f); + if(LaugicalityWorld.etherial) + LaugicalityWorld.etherial = false; + else + LaugicalityWorld.etherial = true; + + etherialTrail = 45; + Main.PlaySound(SoundLoader.customSoundType, -1, -1, mod.GetSoundSlot(SoundType.Custom, "Sounds/EtherialChange")); + } } /* public override void OnHitByNPC(NPC npc, int damage, bool crit) @@ -290,6 +355,14 @@ public override void PostHurt(bool pvp, bool quiet, double damage, int hitDirect if (Main.rand.Next(0, 2) == 0) Projectile.NewProjectile(player.Center.X, player.Center.Y, 6 - Main.rand.Next(12), 6 - Main.rand.Next(12), mod.ProjectileType("MiniEye"), 16, 3f, player.whoAmI); } + if (sandy) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 4, 4, mod.ProjectileType("Sandball"), 18, 5, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 4, -4, mod.ProjectileType("Sandball"), 18, 5, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -4, -4, mod.ProjectileType("Sandball"), 18, 5, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -4, 4, mod.ProjectileType("Sandball"), 18, 5, Main.myPlayer); + } + if (frigid) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 6 - Main.rand.Next(12), 6 - Main.rand.Next(12), mod.ProjectileType("IceShardF"), 16, 3f, player.whoAmI); @@ -311,11 +384,11 @@ public override void PostHurt(bool pvp, bool quiet, double damage, int hitDirect Projectile.NewProjectile(player.Center.X, player.Center.Y, 8, 0, mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); Projectile.NewProjectile(player.Center.X, player.Center.Y, -8, 0, mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); Projectile.NewProjectile(player.Center.X, player.Center.Y, 0, 8, mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0, -8, mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); - Projectile.NewProjectile(player.Center.X, player.Center.Y, 4, 4, mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); - Projectile.NewProjectile(player.Center.X, player.Center.Y, 4, -4, mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); - Projectile.NewProjectile(player.Center.X, player.Center.Y, -4, -4, mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); - Projectile.NewProjectile(player.Center.X, player.Center.Y, -4, 4, mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -8 + Main.rand.Next(0, 17), -8 + Main.rand.Next(0, 17), mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -8 + Main.rand.Next(0, 17), -8 + Main.rand.Next(0, 17), mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -8 + Main.rand.Next(0, 17), -8 + Main.rand.Next(0, 17), mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -8 + Main.rand.Next(0, 17), -8 + Main.rand.Next(0, 17), mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -8 + Main.rand.Next(0, 17), -8 + Main.rand.Next(0, 17), mod.ProjectileType("RockShard"), 20, 3, Main.myPlayer); } } diff --git a/LaugicalityVars.cs b/LaugicalityVars.cs index 58605c3..d39bb9d 100644 --- a/LaugicalityVars.cs +++ b/LaugicalityVars.cs @@ -35,8 +35,21 @@ public enum ClassType Destructionist, //(Dmg) 16 Illusionist, //(BuffDur & Mobility) 17 Conjurer //(Util/Survivability) 18 - } - /* -------------- SLIMEKING -------------- */ + } + /* -------------- Etherial NPCs and Projectiles -------------- */ + public static readonly HashSet ENPCs = + new HashSet + { + 4, 50, 266, 267, 13, 14, 15, 222, 35, 36, 113, 114, 115, 116, 125, 126, 127, 128, 129, 130, 134, 135, 136, 139, 262, 263, 264, 265, 245, 246, 247, 248, 439, 440, 396, 397, 398, 400, 370, 371, 372, 373, 454, 455, 456, 457, 458, 459, 452, 454, 455, 456, 462, 422, 493, 507, 517 + }; + + public static readonly HashSet EProjectiles = + new HashSet + { + 270, 83, 100, 96, 605, 101, 102, 275, 276, 277, 262, 258, 259, 384, 385, 386, 464, 465, 466, 467, 468, 490, + }; + + /* -------------- SLIMEKING -------------- */ public static readonly HashSet SlimeThrow = new HashSet { (int)LaugicalityVars.ClassType.Assasin, (int)LaugicalityVars.ClassType.Ninja, (int)LaugicalityVars.ClassType.Thief }; public static readonly HashSet SlimeJump = diff --git a/LaugicalityWorld.cs b/LaugicalityWorld.cs index e48fe2f..7d05177 100644 --- a/LaugicalityWorld.cs +++ b/LaugicalityWorld.cs @@ -22,8 +22,10 @@ public class LaugicalityWorld : ModWorld public static bool downedDuneSharkron = false; public static bool downedHypothema = false; public static bool downedRagnar = false; + public static bool downedEtheria = false; public static int obsidiumTiles = 0; public static bool obEnf = false; //obsidiumEnfused + public static bool etherial = false; public override void Initialize() { @@ -33,7 +35,9 @@ public override void Initialize() downedDuneSharkron = false; downedHypothema = false; downedRagnar = false; - obEnf = false; + downedEtheria = false; + obEnf = false; + etherial = false; } public override void PostUpdate() @@ -49,17 +53,21 @@ public override TagCompound Save() { var downed = new List(); bool obs = false; + bool eth = false; if (downedAnnihilator) downed.Add("annihilator"); if (downedSlybertron) downed.Add("slybertron"); if (downedSteamTrain) downed.Add("steamtrain"); if (downedDuneSharkron) downed.Add("dunesharkron"); if (downedHypothema) downed.Add("hypothema"); if (downedRagnar) downed.Add("ragnar"); - if (obEnf) obs = true; + if (downedEtheria) downed.Add("etheria"); + if (obEnf) obs = true; + if (etherial) eth = true; return new TagCompound { {"downed", downed}, - {"obsidium", obs } + {"obsidium", obs }, + {"etherial", eth } }; } @@ -72,7 +80,37 @@ public override void Load(TagCompound tag) downedDuneSharkron = downed.Contains("dunesharkron"); downedHypothema = downed.Contains("hypothema"); downedRagnar = downed.Contains("ragnar"); + downedEtheria = downed.Contains("etheria"); obEnf = tag.GetBool("obsidium"); + etherial = tag.GetBool("etherial"); + } + + public override void NetSend(BinaryWriter writer) + { + BitsByte flags = new BitsByte(); + flags[0] = downedAnnihilator; + flags[1] = downedSlybertron; + flags[2] = downedSteamTrain; + flags[3] = downedDuneSharkron; + flags[4] = downedHypothema; + flags[5] = downedRagnar; + flags[6] = downedEtheria; + flags[7] = etherial; + writer.Write(flags); + + } + + public override void NetReceive(BinaryReader reader) + { + BitsByte flags = new BitsByte(); + downedAnnihilator = flags[0]; + downedSlybertron = flags[1]; + downedSteamTrain = flags[2]; + downedDuneSharkron = flags[3]; + downedHypothema = flags[4]; + downedRagnar = flags[5]; + downedEtheria = flags[6]; + etherial = flags[7]; } public override void ResetNearbyTileEffects() diff --git a/NPCs/Bosses/MechanicalCrawler.cs b/NPCs/Bosses/MechanicalCrawler.cs index ccdd0a1..7389f1b 100644 --- a/NPCs/Bosses/MechanicalCrawler.cs +++ b/NPCs/Bosses/MechanicalCrawler.cs @@ -14,14 +14,17 @@ public class MechanicalCrawler : ModNPC public static Random rnd = new Random(); public static int ai = rnd.Next(1, 6); public static bool despawn = false; + public bool bitherial = false; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Mechanical Charger"); } public override void SetDefaults() { + bitherial = true; despawn = false; npc.width = 48; npc.height = 48; @@ -32,7 +35,7 @@ public override void SetDefaults() npc.DeathSound = SoundID.NPCDeath14; npc.value = 60f; npc.knockBackResist = 0f; - npc.aiStyle = 74; + npc.aiStyle = 56; npc.lavaImmune = true; npc.noGravity = true; npc.noTileCollide = true; @@ -40,6 +43,8 @@ public override void SetDefaults() public override void AI() { + bitherial = true; + if (Main.rand.Next(0,14) == 0) Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } if (Main.dayTime) { npc.position.Y += 300; } if (despawn) { npc.position.Y += 300; } diff --git a/NPCs/Bosses/MechanicalCrawler.png b/NPCs/Bosses/MechanicalCrawler.png index e8ed99b..85725d5 100644 Binary files a/NPCs/Bosses/MechanicalCrawler.png and b/NPCs/Bosses/MechanicalCrawler.png differ diff --git a/NPCs/Bosses/MechanicalCreeper.png b/NPCs/Bosses/MechanicalCreeper.png index 3f7008a..d5a375f 100644 Binary files a/NPCs/Bosses/MechanicalCreeper.png and b/NPCs/Bosses/MechanicalCreeper.png differ diff --git a/NPCs/Bosses/MechanicalMimic.cs b/NPCs/Bosses/MechanicalMimic.cs index 312c1cf..2da795d 100644 --- a/NPCs/Bosses/MechanicalMimic.cs +++ b/NPCs/Bosses/MechanicalMimic.cs @@ -14,14 +14,17 @@ public class MechanicalMimic : ModNPC public static Random rnd = new Random(); public static int ai = rnd.Next(1, 6); public static bool despawn = false; + public bool bitherial = false; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Mechanical Mimic"); } public override void SetDefaults() { + bitherial = true; despawn = false; npc.width = 34; npc.height = 34; @@ -40,6 +43,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } if (Main.dayTime) { npc.position.Y += 300; } if (despawn) { npc.position.Y += 300; } diff --git a/NPCs/Bosses/MechanicalMimic.png b/NPCs/Bosses/MechanicalMimic.png index 18515b7..db67597 100644 Binary files a/NPCs/Bosses/MechanicalMimic.png and b/NPCs/Bosses/MechanicalMimic.png differ diff --git a/NPCs/Bosses/MechanicalShelly.cs b/NPCs/Bosses/MechanicalShelly.cs index a36dfc7..01e6ada 100644 --- a/NPCs/Bosses/MechanicalShelly.cs +++ b/NPCs/Bosses/MechanicalShelly.cs @@ -14,14 +14,17 @@ public class MechanicalShelly : ModNPC public static Random rnd = new Random(); public static int ai = rnd.Next(1, 6); public static bool despawn = false; + public bool bitherial = false; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Mechanical Copter"); } public override void SetDefaults() { + bitherial = true; despawn = false; npc.width = 34; npc.height = 34; @@ -40,6 +43,8 @@ public override void SetDefaults() public override void AI() { + bitherial = true; + npc.rotation = 0; if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } if (Main.dayTime) { npc.position.Y += 300; } if (despawn) { npc.position.Y += 300; } diff --git a/NPCs/Bosses/MechanicalShelly.png b/NPCs/Bosses/MechanicalShelly.png index cb097f4..e340ff0 100644 Binary files a/NPCs/Bosses/MechanicalShelly.png and b/NPCs/Bosses/MechanicalShelly.png differ diff --git a/NPCs/Bosses/MechanicalSlimer.cs b/NPCs/Bosses/MechanicalSlimer.cs index 4c3fa1b..c2db775 100644 --- a/NPCs/Bosses/MechanicalSlimer.cs +++ b/NPCs/Bosses/MechanicalSlimer.cs @@ -14,14 +14,17 @@ public class MechanicalSlimer : ModNPC public static Random rnd = new Random(); public static int ai = rnd.Next(1, 6); public static bool despawn = false; + public bool bitherial = false; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Mechanical Creeper"); } public override void SetDefaults() { + bitherial = true; despawn = false; npc.width = 34; npc.height = 34; @@ -40,6 +43,9 @@ public override void SetDefaults() public override void AI() { + bitherial = true; + npc.rotation = 0; + if (Main.rand.Next(0, 14) == 0) Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } if (Main.dayTime) { npc.position.Y += 300; } if (despawn) { npc.position.Y += 300; } diff --git a/NPCs/Bosses/MechanicalSlimer.png b/NPCs/Bosses/MechanicalSlimer.png index 7238a2b..c2f1b51 100644 Binary files a/NPCs/Bosses/MechanicalSlimer.png and b/NPCs/Bosses/MechanicalSlimer.png differ diff --git a/NPCs/Bosses/MehcanicalCreeper.cs b/NPCs/Bosses/MehcanicalCreeper.cs index bb9b1d4..b0a870e 100644 --- a/NPCs/Bosses/MehcanicalCreeper.cs +++ b/NPCs/Bosses/MehcanicalCreeper.cs @@ -14,14 +14,17 @@ public class MechanicalCreeper : ModNPC public static Random rnd = new Random(); public static int ai = rnd.Next(1, 6); public static bool despawn = false; + public bool bitherial = false; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Mechanical Spikinator"); } public override void SetDefaults() { + bitherial = true; despawn = false; npc.width = 34; npc.height = 34; @@ -40,6 +43,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } if (Main.dayTime) { npc.position.Y += 300; } if (despawn) { npc.position.Y += 300; } diff --git a/NPCs/Bosses/TheAnnihilator.cs b/NPCs/Bosses/TheAnnihilator.cs index 83abee1..b663ccd 100644 --- a/NPCs/Bosses/TheAnnihilator.cs +++ b/NPCs/Bosses/TheAnnihilator.cs @@ -18,15 +18,22 @@ public class TheAnnihilator : ModNPC public float vel = 1f; public int velMult = 1; public static bool on = false; + public bool poof = false; + public bool bitherial = true; + public int plays = 0; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("The Annihilator"); Main.npcFrameCount[npc.type] = 2; } public override void SetDefaults() { + plays = 1; + bitherial = true; + poof = false; on = true; spawn = 0; npc.width = 200; @@ -44,12 +51,14 @@ public override void SetDefaults() npc.lavaImmune = true; npc.noGravity = true; npc.noTileCollide = true; - music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Annihilator"); + music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Annihilator_balanced"); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { + plays = numPlayers; + bitherial = true; npc.lifeMax = 80000 + numPlayers * 8000; npc.damage = 140; } @@ -57,6 +66,8 @@ public override void ScaleExpertStats(int numPlayers, float bossLifeScale) public override void AI() { + npc.rotation = 0; + if (npc.active) on = true; else @@ -65,6 +76,7 @@ public override void AI() if (npc.velocity.Y > 12) npc.velocity.Y = 12; if (npc.life < npc.lifeMax && spawn < 1) { + poof = true; Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0); spawn = 1; NPC.NewNPC((int)npc.position.X + rnd.Next(0, npc.width), (int)npc.position.Y + rnd.Next(0, npc.height), mod.NPCType("MechanicalSlimer")); @@ -75,6 +87,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .9 && spawn < 2) { + poof = true; Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0); spawn = 2; NPC.NewNPC((int)npc.position.X + rnd.Next(0, npc.width), (int)npc.position.Y + rnd.Next(0, npc.height), mod.NPCType("MechanicalSlimer")); @@ -85,6 +98,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .8 && spawn < 3) { + poof = true; Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0); spawn = 3; NPC.NewNPC((int)npc.position.X + rnd.Next(0, npc.width), (int)npc.position.Y + rnd.Next(0, npc.height), mod.NPCType("MechanicalSlimer")); @@ -95,6 +109,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .7 && spawn < 4) { + poof = true; Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0); spawn = 4; NPC.NewNPC((int)npc.position.X + rnd.Next(0, npc.width), (int)npc.position.Y + rnd.Next(0, npc.height), mod.NPCType("MechanicalSlimer")); @@ -105,6 +120,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .6 && spawn < 5) { + poof = true; Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0); spawn = 5; NPC.NewNPC((int)npc.position.X + rnd.Next(0, npc.width), (int)npc.position.Y + rnd.Next(0, npc.height), mod.NPCType("MechanicalSlimer")); @@ -115,6 +131,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .5 && spawn < 6) { + poof = true; if (Main.expertMode) { npc.velocity *= 3; @@ -132,6 +149,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .4 && spawn < 7) { + poof = true; if (Main.expertMode) { npc.velocity *= 3; @@ -148,6 +166,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .3 && spawn < 8) { + poof = true; if (Main.expertMode) { npc.velocity *= 3; @@ -164,6 +183,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .2 && spawn < 9) { + poof = true; if (Main.expertMode) { npc.velocity *= 2; @@ -180,6 +200,7 @@ public override void AI() } if (npc.life < npc.lifeMax * .12 && spawn < 10) { + poof = true; if (Main.expertMode) { spawn = 10; @@ -200,6 +221,7 @@ public override void AI() { if (Main.expertMode) { + poof = true; spawn = 11; NPC.NewNPC((int)npc.position.X + rnd.Next(0, npc.width), (int)npc.position.Y + rnd.Next(0, npc.height), mod.NPCType("MechanicalSlimer")); NPC.NewNPC((int)npc.position.X + rnd.Next(0, npc.width), (int)npc.position.Y + rnd.Next(0, npc.height), mod.NPCType("MechanicalCreeper")); @@ -208,6 +230,20 @@ public override void AI() NPC.NewNPC((int)npc.position.X + rnd.Next(0, npc.width), (int)npc.position.Y + rnd.Next(0, npc.height), mod.NPCType("MechanicalMimic")); } } + + if (poof) + { + poof = false; + + Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); + Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); + Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); + Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); + Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); + Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); + Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); + Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Steam"), 0f, 0f); + } } @@ -231,7 +267,9 @@ public override void BossLoot(ref string name, ref int potionType) MechanicalMimic.despawn = true; MechanicalCrawler.despawn = true; - if (!Main.expertMode) + if (plays == 0) + plays = 1; + if (!Main.expertMode) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("SteamBar"), Main.rand.Next(15, 30)); potionType = 499; diff --git a/NPCs/Bosses/TheAnnihilator.png b/NPCs/Bosses/TheAnnihilator.png index 6c60e44..89b5cd9 100644 Binary files a/NPCs/Bosses/TheAnnihilator.png and b/NPCs/Bosses/TheAnnihilator.png differ diff --git a/NPCs/Bosses/TheAnnihilator_Head_Boss.png b/NPCs/Bosses/TheAnnihilator_Head_Boss.png index 871a36c..c20ba83 100644 Binary files a/NPCs/Bosses/TheAnnihilator_Head_Boss.png and b/NPCs/Bosses/TheAnnihilator_Head_Boss.png differ diff --git a/NPCs/Bosses/TheAnnihilator_bkup.png b/NPCs/Bosses/TheAnnihilator_bkup.png new file mode 100644 index 0000000..6c60e44 Binary files /dev/null and b/NPCs/Bosses/TheAnnihilator_bkup.png differ diff --git a/NPCs/Etheria/Etheria.cs b/NPCs/Etheria/Etheria.cs new file mode 100644 index 0000000..5738153 --- /dev/null +++ b/NPCs/Etheria/Etheria.cs @@ -0,0 +1,396 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + [AutoloadBossHead] + public class Etheria : ModNPC + { + public static int phase = 0; + public int delay = 0; + public bool bitherial = true; + public int plays = 0; + public int attack = 0; + public int attackRel = -1; + public int attackRelMax = 0; + public int attackDel = 0; + public int attackDelMax = 0; + public int moveType = 1; + public int hovDir = 1; + public int moveDelay = 600; + public int vDir = 2; + public int dir = 0; + public int vdir = 0; + public float accel = 0f; + public float maxAccel = 20f; + public float vaccel = 0f; + public float maxVaccel = 20f; + public int damage = 0; + public int Eattack = 0; + public int EattackDel = 0; + public int EattackDelMax = 0; + + + public override void SetStaticDefaults() + { + LaugicalityVars.ENPCs.Add(npc.type); + delay = 0; + DisplayName.SetDefault("Etheria"); + Main.npcFrameCount[npc.type] = 7; + } + + public override void SetDefaults() + { + plays = 1; + phase = 0; + Eattack = 0; + EattackDelMax = 280; + EattackDel = EattackDelMax; + damage = 30; + moveDelay = 600; + maxAccel = 22f; + maxVaccel = 20f; + accel = 0f; + vaccel = 0f; + hovDir = 1; + vDir = 1; + moveType = 1; + attackDelMax = 300; + attackDel = attackDelMax; + attackRel = -1; + attackRelMax = 0; + attack = 0; + bitherial = true; + npc.width = 128; + npc.height = 128; + npc.damage = 80; + npc.defense = 48; + npc.aiStyle = 0; + npc.lifeMax = 80000; + npc.HitSound = SoundID.NPCHit21; + npc.DeathSound = SoundID.NPCDeath6; + npc.npcSlots = 15f; + npc.value = 12f; + npc.knockBackResist = 0f; + npc.boss = true; + npc.lavaImmune = true; + npc.noGravity = true; + npc.noTileCollide = true; + music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Etheria"); + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + plays = numPlayers; + npc.lifeMax = 100000 + numPlayers * 10000; + npc.damage = 120; + attackDelMax = 280; + attackDel = attackDelMax; + damage = 40; + Eattack = 0; + EattackDelMax = 200; + EattackDel = EattackDelMax; + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + maxAccel = 26f; + } + } + + + public override void AI() + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + //Despawning + + if (Main.player[npc.target].statLife <= 0) { npc.position.Y -= 10; } + if (Main.dayTime == true) { npc.position.Y -= 20; } + + npc.spriteDirection = 0; + bitherial = true; + npc.rotation = 0; + npc.scale = 1.5f + (float)(phase)/10f; + npc.height = (int)(npc.scale * 128); + npc.width = (int)(npc.scale * 128); + //Setting Phases + if (npc.life < npc.lifeMax * .9 && phase == 0) + { + phase += 1; + if (Main.expertMode) + attackDelMax -= 20; + } + if (npc.life < npc.lifeMax * .75 && phase == 1) + { + phase += 1; + if (Main.expertMode) + attackDelMax -= 20; + if (modPlayer.etherial) + { + NPC.NewNPC((int)npc.position.X + Main.rand.Next(0, npc.width), (int)npc.position.Y + Main.rand.Next(0, npc.height), mod.NPCType("EtheriaDecoy")); + } + } + if (npc.life < npc.lifeMax * .5 && phase == 2) + { + phase += 1; + if (Main.expertMode) + attackDelMax -= 20; + } + if (npc.life < npc.lifeMax * .25 && phase == 3) + { + phase += 1; + if (Main.expertMode) + attackDelMax -= 20; + } + if (npc.life < npc.lifeMax * .10 && phase == 4 && Main.expertMode && modPlayer.etherial) + { + npc.life = (int)( npc.lifeMax * .33 ); + phase += 1; + attackDelMax -= 20; + if (modPlayer.etherial) + { + NPC.NewNPC((int)npc.position.X + Main.rand.Next(0, npc.width), (int)npc.position.Y + Main.rand.Next(0, npc.height), mod.NPCType("EtheriaDecoy")); + } + } + if (npc.life < npc.lifeMax * .20 && phase == 5 && Main.expertMode && modPlayer.etherial) + { + phase += 1; + attackDelMax -= 20; + } + + //Movement + Vector2 delta = Main.player[npc.target].Center - npc.Center; + float magnitude = (float)Math.Sqrt(delta.X * delta.X + delta.Y * delta.Y); + + //Hovering + if (moveType == 1) + { + moveDelay -= 1; + if (moveDelay <= 0) + { + moveDelay = 900; + moveType = 1; + } + //Horizontal Movement + npc.velocity.X = accel; + if (delta.X > 0) { hovDir = 1; } + if (delta.X < 0) { hovDir = -1; } + if (Math.Abs(accel) < maxAccel / 2) { accel += (float)hovDir / 5f; } + else { accel *= .98f; } + + //Vertical Movement + npc.velocity.Y = vaccel; + if (npc.position.Y - Main.player[npc.target].position.Y + 70 > 0) { vDir = -1; } + if (npc.position.Y - Main.player[npc.target].position.Y + 70 < 0) { vDir = 1; } + if (Math.Abs(vaccel) < maxVaccel / 4) { vaccel += (float)vDir / 3f; } + else { vaccel *= .98f; } + } + + //Floating + if (moveType == 2) + { + moveDelay -= 1; + if (moveDelay <= 0) + { + moveDelay = 750; + moveType = 1; + } + //Horizontal Movement + npc.velocity.X = accel; + if (npc.position.X < Main.player[npc.target].position.X - 200 && hovDir == -1) { hovDir = 1; } + if (npc.position.X > Main.player[npc.target].position.X + 200 && hovDir == 1) { hovDir = -1; } + if (Math.Abs(accel) < maxAccel) { accel += (float)hovDir / 3f; } + else { accel *= .98f; } + + //Vertical Movement + npc.velocity.Y = vaccel; + if (npc.position.Y - Main.player[npc.target].position.Y + 70 > 0) { vDir = -1; } + if (npc.position.Y - Main.player[npc.target].position.Y + 70 < 0) { vDir = 1; } + if (Math.Abs(vaccel) < maxVaccel / 6) { vaccel += (float)vDir / 6f; } + else { vaccel *= .98f; } + } + + + //Attack Delay + attackDel--; + if(attackDel <= 0) + { + attackDel = attackDelMax; + attack = Main.rand.Next(1,4); + if (phase > 4 && modPlayer.etherial) + { + Eattack = attack; + attack = 0; + } + } + + //Attacks + if(attack == 1) + { + if (attackRel == -1) + attackRel = 1; + attackRelMax = 4; + if(attackRel > 0) + { + attackRel--; + if(attackRel == 0) + { + attackRelMax--; + if (attackRelMax > 0) + { + attackRel = 45; + NPC.NewNPC((int)npc.position.X + Main.rand.Next(0, npc.width), (int)npc.position.Y + Main.rand.Next(0, npc.height), mod.NPCType("HomingEtherial")); + } + else + { + attackRel = -1; + attack = 0; + } + } + } + } + if(attack == 2) + { + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, 5, mod.ProjectileType("EtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, -5, mod.ProjectileType("EtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, -5, mod.ProjectileType("EtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, 5, mod.ProjectileType("EtherialPulsar"), damage, 3f, Main.myPlayer); + attack = 0; + } + if (attack == 3) + { + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 7, 0, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -7, 0, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -7, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 7, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, 5, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, -5, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, -5, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, 5, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + attack = 0; + } + + //Etherial Attacks + if (Eattack == 1) + { + if (attackRel == -1) + attackRel = 1; + attackRelMax = 6; + if (attackRel > 0) + { + attackRel--; + if (attackRel == 0) + { + attackRelMax--; + if (attackRelMax > 0) + { + attackRel = 45; + NPC.NewNPC((int)npc.position.X + Main.rand.Next(0, npc.width), (int)npc.position.Y + Main.rand.Next(0, npc.height), mod.NPCType("TrueHomingEtherial")); + } + else + { + attackRel = -1; + Eattack = 0; + } + } + } + } + if (Eattack == 2) + { + if (attackRel == -1) + attackRel = 1; + attackRelMax = 4; + if (attackRel > 0) + { + attackRel--; + if (attackRel == 0) + { + attackRelMax--; + if (attackRelMax > 0) + { + attackRel = 60; + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 7, 0, mod.ProjectileType("TrueEtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -7, 0, mod.ProjectileType("TrueEtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -7, mod.ProjectileType("TrueEtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 7, mod.ProjectileType("TrueEtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, 5, mod.ProjectileType("TrueEtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, -5, mod.ProjectileType("TrueEtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, -5, mod.ProjectileType("TrueEtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, 5, mod.ProjectileType("TrueEtherialPulsar"), damage, 3f, Main.myPlayer); + } + else + { + attackRel = -1; + Eattack = 0; + } + } + } + } + if (Eattack == 3) + { + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 7, 0, mod.ProjectileType("TrueEtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -7, 0, mod.ProjectileType("TrueEtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -7, mod.ProjectileType("TrueEtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 7, mod.ProjectileType("TrueEtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, 5, mod.ProjectileType("TrueEtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, -5, mod.ProjectileType("TrueEtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, -5, mod.ProjectileType("TrueEtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, 5, mod.ProjectileType("TrueEtherialWave"), damage, 3f, Main.myPlayer); + Eattack = 0; + } + } + + + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + + } + + public override void BossLoot(ref string name, ref int potionType) + { + HomingEtherial.despawn = true; + TrueHomingEtherial.despawn = true; + EtheriaDecoy.despawn = true; + if (plays == 0) + plays = 1; + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (!LaugicalityWorld.etherial) + { + LaugicalityWorld.etherial = true; + Main.PlaySound(SoundLoader.customSoundType, -1, -1, mod.GetSoundSlot(SoundType.Custom, "Sounds/EtherialChange")); + Main.NewText("You're trapped in my world now.", 0, 200, 255); + } + + LaugicalityWorld.downedEtheria = true; + + } + public override void FindFrame(int frameHeight) + { + npc.frame.Y = frameHeight * phase; + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 0f; + return null; + } + /* + public override void HitEffect(int hitDirection, double damage) + { + for (int i = 0; i < 10; i++) + { + int dustType = Main.rand.Next(139, 143); + int dustIndex = Dust.NewDust(npc.position, npc.width, npc.height, dustType); + Dust dust = Main.dust[dustIndex]; + dust.velocity.X = dust.velocity.X + Main.rand.Next(-50, 51) * 0.01f; + dust.velocity.Y = dust.velocity.Y + Main.rand.Next(-50, 51) * 0.01f; + dust.scale *= 1f + Main.rand.Next(-30, 31) * 0.01f; + } + }*/ + } +} diff --git a/NPCs/Etheria/Etheria.png b/NPCs/Etheria/Etheria.png new file mode 100644 index 0000000..6e0ef50 Binary files /dev/null and b/NPCs/Etheria/Etheria.png differ diff --git a/NPCs/Etheria/EtheriaDecoy.cs b/NPCs/Etheria/EtheriaDecoy.cs new file mode 100644 index 0000000..73e9e27 --- /dev/null +++ b/NPCs/Etheria/EtheriaDecoy.cs @@ -0,0 +1,309 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + [AutoloadBossHead] + public class EtheriaDecoy : ModNPC + { + public int phase = 0; + public int delay = 0; + public bool bitherial = true; + public int plays = 0; + public int attack = 0; + public int attackRel = -1; + public int attackRelMax = 0; + public int attackDel = 0; + public int attackDelMax = 0; + public int moveType = 1; + public int hovDir = 1; + public int moveDelay = 600; + public int vDir = 2; + public int dir = 0; + public int vdir = 0; + public float accel = 0f; + public float maxAccel = 20f; + public float vaccel = 0f; + public float maxVaccel = 20f; + public int damage = 0; + public int Eattack = 0; + public int EattackDel = 0; + public int EattackDelMax = 0; + public static bool despawn = false; + + public override void SetStaticDefaults() + { + LaugicalityVars.ENPCs.Add(npc.type); + delay = 0; + DisplayName.SetDefault("Etheria"); + Main.npcFrameCount[npc.type] = 7; + } + + public override void SetDefaults() + { + despawn = false; + phase = 0; + Eattack = 0; + EattackDelMax = 280; + EattackDel = EattackDelMax; + damage = 40; + moveDelay = 600; + maxAccel = 22f; + maxVaccel = 20f; + accel = 0f; + vaccel = 0f; + hovDir = 1; + vDir = 1; + moveType = 1; + attackDelMax = 260; + attackDel = attackDelMax; + attackRel = -1; + attackRelMax = 0; + attack = 0; + bitherial = true; + npc.width = 128; + npc.height = 128; + npc.damage = 80; + npc.defense = 48; + npc.aiStyle = 0; + npc.lifeMax = 8000; + npc.HitSound = SoundID.NPCHit21; + npc.DeathSound = SoundID.NPCDeath6; + npc.npcSlots = 15f; + npc.value = 12f; + npc.knockBackResist = 0f; + npc.boss = true; + npc.lavaImmune = true; + npc.noGravity = true; + npc.noTileCollide = true; + music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Etheria"); + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + plays = numPlayers; + npc.lifeMax = 10000 + numPlayers * 1950; + npc.damage = 80; + attackDelMax = 220; + attackDel = attackDelMax; + damage = 30; + Eattack = 0; + EattackDelMax = 200; + EattackDel = EattackDelMax; + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + { + maxAccel = 30f; + } + } + + + public override void AI() + { + //Despawning + if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } + if (Main.dayTime) { npc.position.Y += 300; } + if (despawn) { npc.position.Y += 300; } + + npc.spriteDirection = 0; + bitherial = true; + npc.rotation = 0; + npc.scale = 1.5f + (float)(phase / 2)/4f; + npc.height = (int)(npc.scale * 128); + npc.width = (int)(npc.scale * 128); + phase = Etheria.phase; + + //Movement + Vector2 delta = Main.player[npc.target].Center - npc.Center; + float magnitude = (float)Math.Sqrt(delta.X * delta.X + delta.Y * delta.Y); + + //Hovering + if (moveType == 1) + { + moveDelay -= 1; + if (moveDelay <= 0) + { + moveDelay = 900; + moveType = 2; + } + //Horizontal Movement + npc.velocity.X = accel; + if (delta.X > 0) { hovDir = 1; } + if (delta.X < 0) { hovDir = -1; } + if (Math.Abs(accel) < maxAccel / 2) { accel += (float)hovDir / 5f; } + else { accel *= .98f; } + + //Vertical Movement + npc.velocity.Y = vaccel; + if (npc.position.Y - Main.player[npc.target].position.Y + 70 > 0) { vDir = -1; } + if (npc.position.Y - Main.player[npc.target].position.Y + 70 < 0) { vDir = 1; } + if (Math.Abs(vaccel) < maxVaccel / 4) { vaccel += (float)vDir / 3f; } + else { vaccel *= .98f; } + } + + //Floating + if (moveType == 2) + { + moveDelay -= 1; + if (moveDelay <= 0) + { + moveDelay = 750; + moveType = 1; + } + //Horizontal Movement + npc.velocity.X = accel; + if (npc.position.X < Main.player[npc.target].position.X - 200 && hovDir == -1) { hovDir = 1; } + if (npc.position.X > Main.player[npc.target].position.X + 200 && hovDir == 1) { hovDir = -1; } + if (Math.Abs(accel) < maxAccel) { accel += (float)hovDir / 3f; } + else { accel *= .98f; } + + //Vertical Movement + npc.velocity.Y = vaccel; + if (npc.position.Y - Main.player[npc.target].position.Y + 70 > 0) { vDir = -1; } + if (npc.position.Y - Main.player[npc.target].position.Y + 70 < 0) { vDir = 1; } + if (Math.Abs(vaccel) < maxVaccel / 6) { vaccel += (float)vDir / 6f; } + else { vaccel *= .98f; } + } + + + //Attack Delay + attackDel--; + if(attackDel <= 0) + { + attackDel = attackDelMax; + attack = Main.rand.Next(1,4); + } + + //Attacks + if(attack == 1) + { + if (attackRel == -1) + attackRel = 1; + attackRelMax = 4; + if(attackRel > 0) + { + attackRel--; + if(attackRel == 0) + { + attackRelMax--; + if (attackRelMax > 0) + { + attackRel = 45; + NPC.NewNPC((int)npc.position.X + Main.rand.Next(0, npc.width), (int)npc.position.Y + Main.rand.Next(0, npc.height), mod.NPCType("HomingEtherial")); + } + else + { + attackRel = -1; + attack = 0; + } + } + } + } + if(attack == 2) + { + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, 5, mod.ProjectileType("EtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, -5, mod.ProjectileType("EtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, -5, mod.ProjectileType("EtherialPulsar"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, 5, mod.ProjectileType("EtherialPulsar"), damage, 3f, Main.myPlayer); + attack = 0; + } + if (attack == 3) + { + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 7, 0, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -7, 0, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -7, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 7, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, 5, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, -5, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, -5, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, 5, mod.ProjectileType("EtherialWave"), damage, 3f, Main.myPlayer); + attack = 0; + } + + } + + + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + + } + + public override void FindFrame(int frameHeight) + { + npc.frame.Y = frameHeight * phase; + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 0f; + return null; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + Microsoft.Xna.Framework.Color color9 = Lighting.GetColor((int)((double)npc.position.X + (double)npc.width * 0.5) / 16, (int)(((double)npc.position.Y + (double)npc.height * 0.5) / 16.0)); + float num66 = 0f; + Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Microsoft.Xna.Framework.Rectangle frame6 = npc.frame; + Microsoft.Xna.Framework.Color alpha15 = npc.GetAlpha(color9); + float num212 = 1f - (float)npc.life / (float)npc.lifeMax; + num212 *= num212; + alpha15.R = (byte)((float)alpha15.R * num212); + alpha15.G = (byte)((float)alpha15.G * num212); + alpha15.B = (byte)((float)alpha15.B * num212); + alpha15.A = (byte)((float)alpha15.A * num212); + for (int num213 = 0; num213 < 4; num213++) + { + Vector2 position9 = npc.position; + float num214 = Math.Abs(npc.Center.X - Main.player[Main.myPlayer].Center.X); + float num215 = Math.Abs(npc.Center.Y - Main.player[Main.myPlayer].Center.Y); + if (num213 == 0 || num213 == 2) + { + position9.X = Main.player[Main.myPlayer].Center.X + num214; + } + else + { + position9.X = Main.player[Main.myPlayer].Center.X - num214; + } + position9.X -= (float)(npc.width / 2); + if (num213 == 0 || num213 == 1) + { + position9.Y = Main.player[Main.myPlayer].Center.Y + num215; + } + else + { + position9.Y = Main.player[Main.myPlayer].Center.Y - num215; + } + position9.Y -= (float)(npc.height / 2); + Main.spriteBatch.Draw(Main.npcTexture[npc.type], new Vector2(position9.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)Main.npcTexture[npc.type].Width * npc.scale / 2f + vector11.X * npc.scale, position9.Y - Main.screenPosition.Y + (float)npc.height - (float)Main.npcTexture[npc.type].Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector11.Y * npc.scale + num66 + npc.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame6), alpha15, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + Main.spriteBatch.Draw(Main.npcTexture[npc.type], new Vector2(npc.position.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)Main.npcTexture[npc.type].Width * npc.scale / 2f + vector11.X * npc.scale, npc.position.Y - Main.screenPosition.Y + (float)npc.height - (float)Main.npcTexture[npc.type].Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector11.Y * npc.scale + num66 + npc.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame6), npc.GetAlpha(color9), npc.rotation, vector11, npc.scale, spriteEffects, 0f); + return false; + } + + /* + public override void HitEffect(int hitDirection, double damage) + { + for (int i = 0; i < 10; i++) + { + int dustType = Main.rand.Next(139, 143); + int dustIndex = Dust.NewDust(npc.position, npc.width, npc.height, dustType); + Dust dust = Main.dust[dustIndex]; + dust.velocity.X = dust.velocity.X + Main.rand.Next(-50, 51) * 0.01f; + dust.velocity.Y = dust.velocity.Y + Main.rand.Next(-50, 51) * 0.01f; + dust.scale *= 1f + Main.rand.Next(-30, 31) * 0.01f; + } + }*/ + } +} diff --git a/NPCs/Etheria/EtheriaDecoy.png b/NPCs/Etheria/EtheriaDecoy.png new file mode 100644 index 0000000..6e0ef50 Binary files /dev/null and b/NPCs/Etheria/EtheriaDecoy.png differ diff --git a/NPCs/Etheria/EtheriaDecoy_Head_Boss.png b/NPCs/Etheria/EtheriaDecoy_Head_Boss.png new file mode 100644 index 0000000..17a1fc0 Binary files /dev/null and b/NPCs/Etheria/EtheriaDecoy_Head_Boss.png differ diff --git a/NPCs/Etheria/Etheria_Head_Boss.png b/NPCs/Etheria/Etheria_Head_Boss.png new file mode 100644 index 0000000..17a1fc0 Binary files /dev/null and b/NPCs/Etheria/Etheria_Head_Boss.png differ diff --git a/NPCs/Etheria/EtherialPulsar.cs b/NPCs/Etheria/EtherialPulsar.cs new file mode 100644 index 0000000..6d89fd5 --- /dev/null +++ b/NPCs/Etheria/EtherialPulsar.cs @@ -0,0 +1,63 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + public class EtherialPulsar : ModProjectile + { + public int delay = 0; + public int damage = 0; + public bool bitherial = true; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Etherial Pulsar"); + //ProjectileID.Sets.Homing[projectile.type] = true; + //ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 44; + projectile.height = 44; + //projectile.alpha = 255; + projectile.timeLeft = 240; + projectile.friendly = false; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + delay = 0; + damage = 50; + } + + public override void AI() + { + bitherial = true; + if (Main.rand.Next(0, 14) == 0) Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Etherial"), 0f, 0f); + delay += 1; + if (delay > 50) + projectile.velocity *= .95f; + if(delay == 100) + { + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 7, 0, mod.ProjectileType("EtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -7, 0, mod.ProjectileType("EtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, -7, mod.ProjectileType("EtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, 7, mod.ProjectileType("EtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 5, 5, mod.ProjectileType("EtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 5, -5, mod.ProjectileType("EtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -5, -5, mod.ProjectileType("EtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -5, 5, mod.ProjectileType("EtherialPulse"), damage, 3f, Main.myPlayer); + projectile.Kill(); + } + } + + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + player.AddBuff(BuffID.Chilled, 90, true); + } + } +} \ No newline at end of file diff --git a/NPCs/Etheria/EtherialPulsar.png b/NPCs/Etheria/EtherialPulsar.png new file mode 100644 index 0000000..730c012 Binary files /dev/null and b/NPCs/Etheria/EtherialPulsar.png differ diff --git a/NPCs/Etheria/EtherialPulse.cs b/NPCs/Etheria/EtherialPulse.cs new file mode 100644 index 0000000..99dd213 --- /dev/null +++ b/NPCs/Etheria/EtherialPulse.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + public class EtherialPulse : ModProjectile + { + public bool bitherial = true; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Etherial Pulse"); + //ProjectileID.Sets.Homing[projectile.type] = true; + //ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 22; + projectile.height = 22; + //projectile.alpha = 255; + projectile.timeLeft = 80; + projectile.friendly = false; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + } + + public override void AI() + { + if (Main.rand.Next(0, 14) == 0) Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Etherial"), 0f, 0f); + + bitherial = true; + } + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + player.AddBuff(BuffID.Chilled, 90, true); + } + } +} \ No newline at end of file diff --git a/NPCs/Etheria/EtherialPulse.png b/NPCs/Etheria/EtherialPulse.png new file mode 100644 index 0000000..f085058 Binary files /dev/null and b/NPCs/Etheria/EtherialPulse.png differ diff --git a/NPCs/Etheria/EtherialWave.cs b/NPCs/Etheria/EtherialWave.cs new file mode 100644 index 0000000..b4c7959 --- /dev/null +++ b/NPCs/Etheria/EtherialWave.cs @@ -0,0 +1,46 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + public class EtherialWave : ModProjectile + { + public bool bitherial = true; + public float dAccel = 0f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Etherial Wave"); + //ProjectileID.Sets.Homing[projectile.type] = true; + //ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + dAccel = 0f; + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 22; + projectile.height = 22; + //projectile.alpha = 255; + projectile.timeLeft = 200; + projectile.friendly = false; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + } + + public override void AI() + { + if (Main.rand.Next(0, 14) == 0) Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Etherial"), 0f, 0f); + dAccel += 0.5f; + projectile.direction += (int)dAccel; + bitherial = true; + } + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + player.AddBuff(BuffID.Chilled, 90, true); + } + } +} \ No newline at end of file diff --git a/NPCs/Etheria/EtherialWave.png b/NPCs/Etheria/EtherialWave.png new file mode 100644 index 0000000..f085058 Binary files /dev/null and b/NPCs/Etheria/EtherialWave.png differ diff --git a/NPCs/Etheria/HomingEtherial.cs b/NPCs/Etheria/HomingEtherial.cs new file mode 100644 index 0000000..616a3eb --- /dev/null +++ b/NPCs/Etheria/HomingEtherial.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + public class HomingEtherial : ModNPC + { + public static Random rnd = new Random(); + public static int ai = rnd.Next(1, 6); + public static bool despawn = false; + public bool bitherial = false; + + public override void SetStaticDefaults() + { + LaugicalityVars.ENPCs.Add(npc.type); + DisplayName.SetDefault("Etherial Pulse"); + } + + public override void SetDefaults() + { + bitherial = true; + despawn = false; + npc.width = 22; + npc.height = 22; + npc.damage = 80; + npc.defense = 50; + npc.lifeMax = 4000; + npc.HitSound = SoundID.NPCHit54; + npc.DeathSound = SoundID.NPCDeath6; + npc.knockBackResist = 0f; + npc.aiStyle = 56; + npc.lavaImmune = true; + npc.noGravity = true; + npc.noTileCollide = true; + } + + public override void AI() + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if(modPlayer.etherial) + npc.life = (int)(npc.life * .99 -1); + bitherial = true; + npc.rotation = 0; + if (Main.rand.Next(0, 14) == 0) Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Etherial"), 0f, 0f); + if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } + if (Main.dayTime) { npc.position.Y += 300; } + if (despawn) { npc.position.Y += 300; } + if (Main.rand.Next(0, 90) == 0) npc.velocity *= 2f; + } + + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + if (Main.expertMode) + { + player.AddBuff(BuffID.Chilled, 90, true); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + Microsoft.Xna.Framework.Color color9 = Lighting.GetColor((int)((double)npc.position.X + (double)npc.width * 0.5) / 16, (int)(((double)npc.position.Y + (double)npc.height * 0.5) / 16.0)); + float num66 = 0f; + Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Microsoft.Xna.Framework.Rectangle frame6 = npc.frame; + Microsoft.Xna.Framework.Color alpha15 = npc.GetAlpha(color9); + float num212 = 1f - (float)npc.life / (float)npc.lifeMax; + num212 *= num212; + alpha15.R = (byte)((float)alpha15.R * num212); + alpha15.G = (byte)((float)alpha15.G * num212); + alpha15.B = (byte)((float)alpha15.B * num212); + alpha15.A = (byte)((float)alpha15.A * num212); + for (int num213 = 0; num213 < 4; num213++) + { + Vector2 position9 = npc.position; + float num214 = Math.Abs(npc.Center.X - Main.player[Main.myPlayer].Center.X); + float num215 = Math.Abs(npc.Center.Y - Main.player[Main.myPlayer].Center.Y); + if (num213 == 0 || num213 == 2) + { + position9.X = Main.player[Main.myPlayer].Center.X + num214; + } + else + { + position9.X = Main.player[Main.myPlayer].Center.X - num214; + } + position9.X -= (float)(npc.width / 2); + if (num213 == 0 || num213 == 1) + { + position9.Y = Main.player[Main.myPlayer].Center.Y + num215; + } + else + { + position9.Y = Main.player[Main.myPlayer].Center.Y - num215; + } + position9.Y -= (float)(npc.height / 2); + Main.spriteBatch.Draw(Main.npcTexture[npc.type], new Vector2(position9.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)Main.npcTexture[npc.type].Width * npc.scale / 2f + vector11.X * npc.scale, position9.Y - Main.screenPosition.Y + (float)npc.height - (float)Main.npcTexture[npc.type].Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector11.Y * npc.scale + num66 + npc.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame6), alpha15, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + Main.spriteBatch.Draw(Main.npcTexture[npc.type], new Vector2(npc.position.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)Main.npcTexture[npc.type].Width * npc.scale / 2f + vector11.X * npc.scale, npc.position.Y - Main.screenPosition.Y + (float)npc.height - (float)Main.npcTexture[npc.type].Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector11.Y * npc.scale + num66 + npc.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame6), npc.GetAlpha(color9), npc.rotation, vector11, npc.scale, spriteEffects, 0f); + return false; + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 0f; + return null; + } + /* + public override void HitEffect(int hitDirection, double damage) + { + for (int i = 0; i < 10; i++) + { + int dustType = Main.rand.Next(139, 143); + int dustIndex = Dust.NewDust(npc.position, npc.width, npc.height, dustType); + Dust dust = Main.dust[dustIndex]; + dust.velocity.X = dust.velocity.X + Main.rand.Next(-50, 51) * 0.01f; + dust.velocity.Y = dust.velocity.Y + Main.rand.Next(-50, 51) * 0.01f; + dust.scale *= 1f + Main.rand.Next(-30, 31) * 0.01f; + } + }*/ + } +} diff --git a/NPCs/Etheria/HomingEtherial.png b/NPCs/Etheria/HomingEtherial.png new file mode 100644 index 0000000..730c012 Binary files /dev/null and b/NPCs/Etheria/HomingEtherial.png differ diff --git a/NPCs/Etheria/TrueEtherialPulsar.cs b/NPCs/Etheria/TrueEtherialPulsar.cs new file mode 100644 index 0000000..4ea9039 --- /dev/null +++ b/NPCs/Etheria/TrueEtherialPulsar.cs @@ -0,0 +1,64 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + public class TrueEtherialPulsar : ModProjectile + { + public int delay = 0; + public int damage = 0; + public bool bitherial = true; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Etherial Pulsar"); + //ProjectileID.Sets.Homing[projectile.type] = true; + //ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 44; + projectile.height = 44; + //projectile.alpha = 255; + projectile.timeLeft = 240; + projectile.friendly = false; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + delay = 0; + damage = 50; + projectile.scale = 2f; + } + + public override void AI() + { + bitherial = true; + if (Main.rand.Next(0, 14) == 0) Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Etherial"), 0f, 0f); + delay += 1; + if (delay > 80) + projectile.velocity *= .95f; + if(delay == 140) + { + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 7, 0, mod.ProjectileType("TrueEtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -7, 0, mod.ProjectileType("TrueEtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, -7, mod.ProjectileType("TrueEtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, 7, mod.ProjectileType("TrueEtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 5, 5, mod.ProjectileType("TrueEtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 5, -5, mod.ProjectileType("TrueEtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -5, -5, mod.ProjectileType("TrueEtherialPulse"), damage, 3f, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -5, 5, mod.ProjectileType("TrueEtherialPulse"), damage, 3f, Main.myPlayer); + projectile.Kill(); + } + } + + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + player.AddBuff(BuffID.Chilled, 90, true); + } + } +} \ No newline at end of file diff --git a/NPCs/Etheria/TrueEtherialPulsar.png b/NPCs/Etheria/TrueEtherialPulsar.png new file mode 100644 index 0000000..230211d Binary files /dev/null and b/NPCs/Etheria/TrueEtherialPulsar.png differ diff --git a/NPCs/Etheria/TrueEtherialPulse.cs b/NPCs/Etheria/TrueEtherialPulse.cs new file mode 100644 index 0000000..913d620 --- /dev/null +++ b/NPCs/Etheria/TrueEtherialPulse.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + public class TrueEtherialPulse : ModProjectile + { + public bool bitherial = true; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Etherial Pulse"); + //ProjectileID.Sets.Homing[projectile.type] = true; + //ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 22; + projectile.height = 22; + //projectile.alpha = 255; + projectile.timeLeft = 80; + projectile.friendly = false; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.scale = 2f; + } + + public override void AI() + { + if (Main.rand.Next(0, 14) == 0) Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Etherial"), 0f, 0f); + if (projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref projectile.velocity); + projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 1400f; + bool target = false; + for (int k = 0; k < 8; k++) + { + if (Main.player[k].active) + { + Vector2 newMove = Main.player[k].Center - projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + } + } + if (target) + { + AdjustMagnitude(ref move); + projectile.velocity = (27 * projectile.velocity + move) / 5f; + AdjustMagnitude(ref projectile.velocity); + } + bitherial = true; + } + + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 6f) + { + vector *= 6f / magnitude; + } + } + + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + player.AddBuff(BuffID.Chilled, 90, true); + } + } +} \ No newline at end of file diff --git a/NPCs/Etheria/TrueEtherialPulse.png b/NPCs/Etheria/TrueEtherialPulse.png new file mode 100644 index 0000000..86c4ce4 Binary files /dev/null and b/NPCs/Etheria/TrueEtherialPulse.png differ diff --git a/NPCs/Etheria/TrueHomingEtherial.cs b/NPCs/Etheria/TrueHomingEtherial.cs new file mode 100644 index 0000000..168e1db --- /dev/null +++ b/NPCs/Etheria/TrueHomingEtherial.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Laugicality.NPCs.Etheria +{ + public class TrueHomingEtherial : ModNPC + { + public static Random rnd = new Random(); + public static int ai = rnd.Next(1, 6); + public static bool despawn = false; + public bool bitherial = false; + + public override void SetStaticDefaults() + { + LaugicalityVars.ENPCs.Add(npc.type); + DisplayName.SetDefault("True Etherial Pulse"); + } + + public override void SetDefaults() + { + bitherial = true; + despawn = false; + npc.width = 22; + npc.height = 22; + npc.damage = 80; + npc.defense = 50; + npc.lifeMax = 40000; + npc.HitSound = SoundID.NPCHit54; + npc.DeathSound = SoundID.NPCDeath6; + npc.knockBackResist = 0f; + npc.aiStyle = 56; + npc.lavaImmune = true; + npc.noGravity = true; + npc.noTileCollide = true; + npc.scale = 2f; + } + + public override void AI() + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (modPlayer.etherial) + npc.life = (int)(npc.life * .99 -1); + bitherial = true; + npc.rotation = 0; + if (Main.rand.Next(0, 14) == 0) Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, mod.DustType("Etherial"), 0f, 0f); + if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } + if (Main.dayTime) { npc.position.Y += 300; } + if (despawn) { npc.position.Y += 300; } + if (Main.rand.Next(0, 180) == 0) npc.velocity *= 2f; + } + + public override void OnHitPlayer(Player player, int dmgDealt, bool crit) + { + if (Main.expertMode) + { + player.AddBuff(BuffID.Chilled, 90, true); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + Microsoft.Xna.Framework.Color color9 = Lighting.GetColor((int)((double)npc.position.X + (double)npc.width * 0.5) / 16, (int)(((double)npc.position.Y + (double)npc.height * 0.5) / 16.0)); + float num66 = 0f; + Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Microsoft.Xna.Framework.Rectangle frame6 = npc.frame; + Microsoft.Xna.Framework.Color alpha15 = npc.GetAlpha(color9); + float num212 = 1f - (float)npc.life / (float)npc.lifeMax; + num212 *= num212; + alpha15.R = (byte)((float)alpha15.R * num212); + alpha15.G = (byte)((float)alpha15.G * num212); + alpha15.B = (byte)((float)alpha15.B * num212); + alpha15.A = (byte)((float)alpha15.A * num212); + for (int num213 = 0; num213 < 4; num213++) + { + Vector2 position9 = npc.position; + float num214 = Math.Abs(npc.Center.X - Main.player[Main.myPlayer].Center.X); + float num215 = Math.Abs(npc.Center.Y - Main.player[Main.myPlayer].Center.Y); + if (num213 == 0 || num213 == 2) + { + position9.X = Main.player[Main.myPlayer].Center.X + num214; + } + else + { + position9.X = Main.player[Main.myPlayer].Center.X - num214; + } + position9.X -= (float)(npc.width / 2); + if (num213 == 0 || num213 == 1) + { + position9.Y = Main.player[Main.myPlayer].Center.Y + num215; + } + else + { + position9.Y = Main.player[Main.myPlayer].Center.Y - num215; + } + position9.Y -= (float)(npc.height / 2); + Main.spriteBatch.Draw(Main.npcTexture[npc.type], new Vector2(position9.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)Main.npcTexture[npc.type].Width * npc.scale / 2f + vector11.X * npc.scale, position9.Y - Main.screenPosition.Y + (float)npc.height - (float)Main.npcTexture[npc.type].Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector11.Y * npc.scale + num66 + npc.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame6), alpha15, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + Main.spriteBatch.Draw(Main.npcTexture[npc.type], new Vector2(npc.position.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)Main.npcTexture[npc.type].Width * npc.scale / 2f + vector11.X * npc.scale, npc.position.Y - Main.screenPosition.Y + (float)npc.height - (float)Main.npcTexture[npc.type].Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector11.Y * npc.scale + num66 + npc.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame6), npc.GetAlpha(color9), npc.rotation, vector11, npc.scale, spriteEffects, 0f); + return false; + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 0f; + return null; + } + /* + public override void HitEffect(int hitDirection, double damage) + { + for (int i = 0; i < 10; i++) + { + int dustType = Main.rand.Next(139, 143); + int dustIndex = Dust.NewDust(npc.position, npc.width, npc.height, dustType); + Dust dust = Main.dust[dustIndex]; + dust.velocity.X = dust.velocity.X + Main.rand.Next(-50, 51) * 0.01f; + dust.velocity.Y = dust.velocity.Y + Main.rand.Next(-50, 51) * 0.01f; + dust.scale *= 1f + Main.rand.Next(-30, 31) * 0.01f; + } + }*/ + } +} diff --git a/NPCs/Etheria/TrueHomingEtherial.png b/NPCs/Etheria/TrueHomingEtherial.png new file mode 100644 index 0000000..230211d Binary files /dev/null and b/NPCs/Etheria/TrueHomingEtherial.png differ diff --git a/NPCs/LaugicalGlobalNPCs.cs b/NPCs/LaugicalGlobalNPCs.cs index e938a24..35c82dd 100644 --- a/NPCs/LaugicalGlobalNPCs.cs +++ b/NPCs/LaugicalGlobalNPCs.cs @@ -1,5 +1,7 @@ +using System; using System.Collections.Generic; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,15 +15,57 @@ public class LaugicalGlobalNPCs : GlobalNPC public bool hermes = false; public float mysticDamage = 1f; public int mysticCrit = 4; + public bool etherial = false; //if only etherial + public bool bitherial = false; //if both etherial and non etherial + public bool etherSpawn = false; //if spawned in etherial + public bool friend = false; + private int dmg = 0; + public int eDmg = 0; + public int eDef = 0; + public int eLife = 0; + public int eLifeMax = 0; + public int plays = 0; public override void ResetEffects(NPC npc) { + etherial = false; eFied = false; mFied = false; hermes = false; mysticCrit = 4; - } - + } + + public override void SetDefaults(NPC npc) + { + etherSpawn = false; + plays = 0; + eDmg = 0; + eDef = 0; + dmg = 0; + etherial = false; + if (npc.boss) + { + bitherial = true; + } + //bitherial = false; + if (LaugicalityVars.ENPCs.Contains(npc.type)) + { + bitherial = true; + } + etherSpawn = LaugicalityWorld.etherial; + } + + public override void ScaleExpertStats(NPC npc, int numPlayers, float bossLifeScale) + { + plays = numPlayers; + if (plays <= 0) + plays = 1; + + etherSpawn = LaugicalityWorld.etherial; + } + + + public override void UpdateLifeRegen(NPC npc, ref int damage) { if (eFied)//Electrified @@ -66,8 +110,125 @@ public override void UpdateLifeRegen(NPC npc, ref int damage) }*/ } + public override bool PreAI(NPC npc) + { + if(eDmg == 0) + eDmg = npc.damage; + if (eDef == 0) + eDef = npc.defense; + if (eLife == 0) + eLife = npc.life; + if (eLifeMax == 0) + eLifeMax = npc.lifeMax; + + if (LaugicalityWorld.etherial) + { + npc.damage = (int)(eDmg * 1.5 + 30); + npc.defense = (int)(eDef / 2); + if (npc.lifeMax == eLifeMax) + { + npc.lifeMax += 60000; + npc.lifeMax = (int)(npc.lifeMax * 1.5); + npc.life = npc.lifeMax; + } + } + else + { + npc.damage = eDmg; + npc.defense = eDef; + if (npc.lifeMax != eLifeMax) + { + npc.lifeMax = (int)(npc.lifeMax / 1.5); + npc.lifeMax -= 60000; + npc.life = npc.lifeMax; + } + } + return true; + } + + public override bool PreDraw(NPC npc, SpriteBatch spriteBatch, Color drawColor) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (bitherial) + { + return true; + } + else + { + if (dmg == 0) + { + dmg = npc.damage; + friend = npc.friendly; + } + if (!friend) + { + if (etherial) + { + if (LaugicalityWorld.etherial) + { + npc.dontTakeDamage = false; + npc.damage = dmg; + return true; + } + else + { + npc.dontTakeDamage = true; + npc.damage = 0; + return modPlayer.etherVision; + } + } + else + { + + if (LaugicalityWorld.etherial) + { + npc.dontTakeDamage = true; + npc.damage = 0; + return modPlayer.etherVision; + } + else + { + npc.dontTakeDamage = false; + npc.damage = dmg; + return true; + } + } + } + else return true; + } + } + + public override Color? GetAlpha(NPC npc, Color drawColor) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (LaugicalityWorld.etherial) + { + var b = 125; + var b2 = 225; + var b3 = 255; + if (drawColor.R != (byte)b) + { + drawColor.R = (byte)b; + } + if (drawColor.G < (byte)b2) + { + drawColor.G = (byte)b2; + } + if (drawColor.B < (byte)b3) + { + drawColor.B = (byte)b3; + } + return drawColor; + } + else + { + return null; + } + } + public override void DrawEffects(NPC npc, ref Color drawColor) { + if (eFied) { if (Main.rand.Next(4) < 3) @@ -119,6 +280,8 @@ public override void DrawEffects(NPC npc, ref Color drawColor) } public override void NPCLoot(NPC npc) { + if (plays <= 0) + plays = 1; //Soul Drops if (npc.lifeMax > 5 && npc.value > 0f && Main.hardMode) { @@ -138,28 +301,74 @@ public override void NPCLoot(NPC npc) } if (npc.type == 4) { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("TastyMorsel"), 1); + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("TastyMorsel"), plays); } //Soul Fragments if (npc.type == NPCID.QueenBee && Main.expertMode) { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("HonifiedSoulCrystal"), 1); + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("HonifiedSoulCrystal"), plays); } if (npc.type == 35 && Main.expertMode) { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("NecroticSoulCrystal"), 1); + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("NecroticSoulCrystal"), plays); } if (npc.type == 113 && Main.expertMode) { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("HellishSoulCrystal"), 1); + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("HellishSoulCrystal"), plays); } if (npc.type == NPCID.Plantera && Main.expertMode) { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("NaturalSoulCrystal"), 1); + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("NaturalSoulCrystal"), plays); } if (npc.type == 439 && Main.expertMode) { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("LunarSoulCrystal"), 1); + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("LunarSoulCrystal"), plays); + } + + //Etherial + if (etherSpawn) + { + if (npc.boss)Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialEssence"), Main.rand.Next(5, 11)); + //Vanilla + if (npc.type == 4) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EyeOfEtheria"), plays); + if (npc.type == 113) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialEnergy"), plays); + if (npc.type == 50) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialGel"), plays); + if (npc.type == 35) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialSkull"), plays); + if (npc.type == 13 && NPC.CountNPCS(13) < 2 && NPC.CountNPCS(14) < 2) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialScarf"), plays); + if (npc.type == 266) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("BrainOfEtheria"), plays); + if (npc.type == 222) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialPack"), plays); + if (npc.type == 245) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("StoneOfEtheria"), plays); + if (npc.type == 262) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialSac"), plays); + if (npc.type == 398) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialGlobe"), plays); + if (npc.type == 370) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialTruffle"), plays); + + //Enigma + if (npc.type == mod.NPCType("DuneSharkron")) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Etheramind"), plays); + if (npc.type == mod.NPCType("Hypothema")) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialFrost"), plays); + if (npc.type == mod.NPCType("Ragnar")) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("MoltenEtheria"), plays); + if (npc.type == mod.NPCType("TheAnnihilator")) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("CogOfEtheria"), plays); + if (npc.type == mod.NPCType("Slybertron")) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Etherworks"), plays); + if (npc.type == mod.NPCType("SteamTrain")) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EtherialTank"), plays); + if (npc.type == mod.NPCType("Etheria")) + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EssenceOfEtheria"), plays); + } } @@ -171,5 +380,37 @@ public override bool InstancePerEntity } } + public override bool? DrawHealthBar(NPC npc, byte hbPosition, ref float scale, ref Vector2 position) + { + var modPlayer = Main.LocalPlayer.GetModPlayer(mod); + if (!npc.friendly) + { + if (etherial) + { + if (modPlayer.etherial) + { + scale = 1f; + } + else + { + scale = 0f; + } + } + else + { + + if (modPlayer.etherial) + { + scale = 0f; + } + else + { + scale = 1f; + } + } + } + else scale = 1f; + return null; + } } } \ No newline at end of file diff --git a/NPCs/PreTrio/DuneSharkron.cs b/NPCs/PreTrio/DuneSharkron.cs index a6a6a21..fe07d07 100644 --- a/NPCs/PreTrio/DuneSharkron.cs +++ b/NPCs/PreTrio/DuneSharkron.cs @@ -21,15 +21,20 @@ public class DuneSharkron : ModNPC public int jump = 0; public int shoot = 0; public int reload = 160; + public bool bitherial = true; + public int plays = 0; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Dune Sharkron"); Main.npcFrameCount[npc.type] = 2; } public override void SetDefaults() { + plays = 1; + bitherial = true; shoot = 0; reload = 260; phase = 1; @@ -57,6 +62,7 @@ public override void SetDefaults() public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { + plays = numPlayers; npc.lifeMax = 3000 + numPlayers * 800; npc.damage = 36; reload = 220; @@ -66,6 +72,7 @@ public override void ScaleExpertStats(int numPlayers, float bossLifeScale) public override void AI() { + bitherial = true; if (Main.player[npc.target].statLife == 0) { npc.position.Y += 100; } if (!Main.dayTime) { npc.position.Y += 300; } @@ -178,7 +185,9 @@ public override void OnHitPlayer(Player player, int dmgDealt, bool crit) public override void BossLoot(ref string name, ref int potionType) { - potionType = 188; + if (plays == 0) + plays = 1; + potionType = 188; if (!Main.expertMode) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("AncientShard"), Main.rand.Next(1, 3)); diff --git a/NPCs/PreTrio/Hypothema.cs b/NPCs/PreTrio/Hypothema.cs index e073746..2283127 100644 --- a/NPCs/PreTrio/Hypothema.cs +++ b/NPCs/PreTrio/Hypothema.cs @@ -34,14 +34,19 @@ public class Hypothema : ModNPC public int hovDir = 1; public int moveDelay = 600; public int vDir = 2; + public bool bitherial = true; + public int plays = 0; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Hypothema"); } public override void SetDefaults() { + plays = 1; + bitherial = true; moveDelay = 600; hovDir = 1; vDir = 1; @@ -60,8 +65,8 @@ public override void SetDefaults() dir = 0; vdir = 0; delay = reload; - npc.width = 26; - npc.height = 36; + npc.width = 64; + npc.height = 64; npc.damage = 28; npc.defense = 10; npc.aiStyle = 0; @@ -81,6 +86,7 @@ public override void SetDefaults() public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { + plays = numPlayers; npc.lifeMax = 3000 + numPlayers * 800; npc.damage = 36; reload = 220; @@ -91,6 +97,7 @@ public override void ScaleExpertStats(int numPlayers, float bossLifeScale) public override void AI() { + bitherial = true; if (Main.player[npc.target].statLife <= 0) { npc.position.Y -= 10; } if (Main.player[npc.target].ZoneSnow == false) { npc.position.Y -= 10; } Vector2 delta = Main.player[npc.target].Center - npc.Center; @@ -307,7 +314,9 @@ public override void OnHitPlayer(Player target, int dmgDealt, bool crit) public override void BossLoot(ref string name, ref int potionType) { - potionType = 188; + if (plays == 0) + plays = 1; + potionType = 188; if (!Main.expertMode) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("FrostShard"), Main.rand.Next(1, 3)); diff --git a/NPCs/PreTrio/Hypothema.png b/NPCs/PreTrio/Hypothema.png index 436dfa3..34320d3 100644 Binary files a/NPCs/PreTrio/Hypothema.png and b/NPCs/PreTrio/Hypothema.png differ diff --git a/NPCs/PreTrio/Hypothema_Head_Boss.png b/NPCs/PreTrio/Hypothema_Head_Boss.png index 436dfa3..021e112 100644 Binary files a/NPCs/PreTrio/Hypothema_Head_Boss.png and b/NPCs/PreTrio/Hypothema_Head_Boss.png differ diff --git a/NPCs/PreTrio/IceShard.cs b/NPCs/PreTrio/IceShard.cs index 669cb94..9dbf006 100644 --- a/NPCs/PreTrio/IceShard.cs +++ b/NPCs/PreTrio/IceShard.cs @@ -10,6 +10,7 @@ namespace Laugicality.NPCs.PreTrio { public class IceShard : ModProjectile { + public bool bitherial = true; public override void SetStaticDefaults() { DisplayName.SetDefault("Ice Shard"); @@ -18,8 +19,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 54; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 54; projectile.height = 54; //projectile.alpha = 255; projectile.timeLeft = 240; @@ -31,6 +34,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; projectile.rotation += .2f; if (projectile.localAI[0] == 0f) diff --git a/NPCs/PreTrio/IceSpike.cs b/NPCs/PreTrio/IceSpike.cs index 6cc456a..8f3bc6d 100644 --- a/NPCs/PreTrio/IceSpike.cs +++ b/NPCs/PreTrio/IceSpike.cs @@ -13,7 +13,8 @@ public class IceSpike : ModProjectile { public int grounded = 0; public int delay = 4; - public override void SetStaticDefaults() + public bool bitherial = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Ice Spark"); //ProjectileID.Sets.Homing[projectile.type] = true; @@ -21,7 +22,9 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; delay = 4; grounded = 0; projectile.width = 20; @@ -36,6 +39,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; delay -= 1; diff --git a/NPCs/PreTrio/MiniRock.cs b/NPCs/PreTrio/MiniRock.cs index 7fcfe79..ef3a30b 100644 --- a/NPCs/PreTrio/MiniRock.cs +++ b/NPCs/PreTrio/MiniRock.cs @@ -12,8 +12,11 @@ namespace Laugicality.NPCs.PreTrio public class MiniRock : ModProjectile { - public override void SetDefaults() - { + public bool bitherial = true; + public override void SetDefaults() + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; projectile.width = 16; projectile.height = 16; //projectile.alpha = 255; @@ -25,6 +28,7 @@ public override void SetDefaults() } public override void AI() { + bitherial = true; Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 127, 0f, 0f); projectile.rotation += 0.02f; diff --git a/NPCs/PreTrio/Ragnar.cs b/NPCs/PreTrio/Ragnar.cs index df0d33a..279465d 100644 --- a/NPCs/PreTrio/Ragnar.cs +++ b/NPCs/PreTrio/Ragnar.cs @@ -36,15 +36,20 @@ public class Ragnar : ModNPC public int vDir = 2; public int attacks = 0; public bool attacking = false; + public bool bitherial = true; + public int plays = 0; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Ragnar"); Main.npcFrameCount[npc.type] = 2; } public override void SetDefaults() { + plays = 1; + bitherial = true; attacks = 0; attacking = false; moveDelay = 600; @@ -86,6 +91,7 @@ public override void SetDefaults() public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { + plays = numPlayers; npc.lifeMax = 4200 + numPlayers * 800; npc.damage = 40; reload = 220; @@ -95,10 +101,11 @@ public override void ScaleExpertStats(int numPlayers, float bossLifeScale) public override void AI() { + bitherial = true; Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, 127, 0f, 0f); - if (Main.player[npc.target].statLife <= 0) { npc.position.Y -= 10; } - if (Main.player[npc.target].ZoneRockLayerHeight == false) { npc.position.Y -= 10; } + if (Main.player[npc.target].statLife <= 0) { npc.position.Y -= 30; } + if (Main.player[npc.target].ZoneRockLayerHeight == false) { npc.position.Y -= 30; } Vector2 delta = Main.player[npc.target].Center - npc.Center; float magnitude = (float)Math.Sqrt(delta.X * delta.X + delta.Y * delta.Y); @@ -118,8 +125,24 @@ public override void AI() attacking = false; //Horizontal Movement npc.velocity.X = accel; - if (npc.position.X < Main.player[npc.target].position.X - 400 && hovDir == -1) { hovDir = 1;} - if (npc.position.X > Main.player[npc.target].position.X + 400 && hovDir == 1) { hovDir = -1;} + if (npc.position.X < Main.player[npc.target].position.X - 400 && hovDir == -1) + { + hovDir = 1; + if (npc.life > npc.lifeMax / 2) + shoot = 1; + else + shoot = 2; + attacks += 1; + } + if (npc.position.X > Main.player[npc.target].position.X + 400 && hovDir == 1) + { + hovDir = -1; + if (npc.life > npc.lifeMax / 2) + shoot = 1; + else + shoot = 2; + attacks += 1; + } if (Math.Abs(accel) < maxAccel) { accel += (float)hovDir / 4f; } else { accel *= .5f; } @@ -176,7 +199,7 @@ public override void AI() shoot = 2; } } - //Attacks + /*Attacks if (moveType == 1) { reload = 100; @@ -191,7 +214,7 @@ public override void AI() attacks += 1; } } - + */ if (shoot == 1) { shoot = 0; @@ -201,15 +224,15 @@ public override void AI() { shoot = 0; Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 0, mod.ProjectileType("RockLoose"), damage / 2, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 8, mod.ProjectileType("RockFalling"), damage, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 8, 0, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -8, 0, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 8, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -8, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 4, 4, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 4, -4, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -4, -4, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -4, 4, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 5, mod.ProjectileType("RockFalling"), damage, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 7, 0, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -7, 0, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 7, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, -7, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, 5, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 5, -5, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, -5, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, -5, 5, mod.ProjectileType("MiniRock"), damage / 3, 3, Main.myPlayer); } } @@ -227,7 +250,9 @@ public override void OnHitPlayer(Player target, int dmgDealt, bool crit) public override void BossLoot(ref string name, ref int potionType) { - potionType = 188; + if (plays == 0) + plays = 1; + potionType = 188; if (Main.expertMode) { diff --git a/NPCs/PreTrio/RockFalling.cs b/NPCs/PreTrio/RockFalling.cs index cf85ef4..72b4054 100644 --- a/NPCs/PreTrio/RockFalling.cs +++ b/NPCs/PreTrio/RockFalling.cs @@ -13,13 +13,16 @@ public class RockFalling : ModProjectile { public int delay = 0; public int delMax = 200; - public override void SetStaticDefaults() + public bool bitherial = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Falling Rock"); } public override void SetDefaults() - { + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; delMax = 0; delay = 0; projectile.width = 32; @@ -35,6 +38,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 127, 0f, 0f); if (delMax == 0) @@ -45,14 +49,14 @@ public override void AI() delay += 1; if(delay >= delMax) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 8, 0, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -8, 0, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, 8, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, -8, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 4, 4, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 4, -4, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -4, -4, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -4, 4, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 7, 0, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -7, 0, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, 7, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, -7, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 5, 5, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 5, -5, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -5, -5, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -5, 5, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); projectile.Kill(); } } diff --git a/NPCs/PreTrio/RockLoose.cs b/NPCs/PreTrio/RockLoose.cs index a94048b..f22f006 100644 --- a/NPCs/PreTrio/RockLoose.cs +++ b/NPCs/PreTrio/RockLoose.cs @@ -12,6 +12,7 @@ public class RockLoose : ModProjectile { public int spawned = 0; public int delay = 0; + public bool bitherial = true; public override void SetStaticDefaults() { DisplayName.SetDefault("a Loose Rock"); @@ -19,6 +20,8 @@ public override void SetStaticDefaults() public override void SetDefaults() { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; delay = 0; spawned = 0; projectile.width = 32; @@ -34,6 +37,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 127, 0f, 0f); projectile.rotation -= 0.02f; if (spawned == 0) { @@ -69,14 +73,14 @@ public override void AI() if (delay >= 60) { { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 8, 0, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -8, 0, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, 8, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, -8, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 4, 4, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 4, -4, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -4, -4, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -4, 4, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 2f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 7, 0, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -7, 0, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, 7, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0, -7, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 5, 5, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 5, -5, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -5, -5, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, -5, 5, mod.ProjectileType("MiniRock"), (int)(projectile.damage / 1.27f), 3, Main.myPlayer); projectile.Kill(); } } diff --git a/NPCs/PreTrio/SharkNeedle.cs b/NPCs/PreTrio/SharkNeedle.cs index f0d7314..6e94b40 100644 --- a/NPCs/PreTrio/SharkNeedle.cs +++ b/NPCs/PreTrio/SharkNeedle.cs @@ -12,7 +12,8 @@ namespace Laugicality.NPCs.PreTrio public class SharkNeedle : ModProjectile { public int grounded = 0; - public override void SetStaticDefaults() + public bool bitherial = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Shark Needle"); //ProjectileID.Sets.Homing[projectile.type] = true; @@ -20,7 +21,9 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; grounded = 0; projectile.width = 32; projectile.height = 32; @@ -34,6 +37,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + .785f; } diff --git a/NPCs/PreTrio/SharkNeedleHoming.cs b/NPCs/PreTrio/SharkNeedleHoming.cs index ae67d11..cbef556 100644 --- a/NPCs/PreTrio/SharkNeedleHoming.cs +++ b/NPCs/PreTrio/SharkNeedleHoming.cs @@ -10,6 +10,7 @@ namespace Laugicality.NPCs.PreTrio { public class SharkNeedleHoming : ModProjectile { + public bool bitherial = true; public override void SetStaticDefaults() { DisplayName.SetDefault("Seek Needle"); @@ -19,6 +20,8 @@ public override void SetStaticDefaults() public override void SetDefaults() { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; projectile.width = 32; projectile.height = 32; //projectile.alpha = 255; @@ -31,6 +34,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + .785f; if (projectile.localAI[0] == 0f) diff --git a/NPCs/RockBros/Andesia.png b/NPCs/RockBros/Andesia.png new file mode 100644 index 0000000..c4fe439 Binary files /dev/null and b/NPCs/RockBros/Andesia.png differ diff --git a/NPCs/Slybertron/CogLoose.cs b/NPCs/Slybertron/CogLoose.cs index 81fb5b3..8601353 100644 --- a/NPCs/Slybertron/CogLoose.cs +++ b/NPCs/Slybertron/CogLoose.cs @@ -11,6 +11,7 @@ namespace Laugicality.NPCs.Slybertron public class CogLoose : ModProjectile { public int spawned = 0; + public bool bitherial = true; public override void SetStaticDefaults() { DisplayName.SetDefault("a Loose Cog"); @@ -20,6 +21,8 @@ public override void SetStaticDefaults() public override void SetDefaults() { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; spawned = 0; projectile.width = 48; projectile.height = 48; @@ -34,6 +37,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; projectile.rotation -= 6; if (spawned == 0) { Vector2 move = Vector2.Zero; diff --git a/NPCs/Slybertron/Coginator.cs b/NPCs/Slybertron/Coginator.cs index a24e488..9df79f7 100644 --- a/NPCs/Slybertron/Coginator.cs +++ b/NPCs/Slybertron/Coginator.cs @@ -9,8 +9,9 @@ namespace Laugicality.NPCs.Slybertron { public class Coginator : ModProjectile - { - public override void SetStaticDefaults() + { + public bool bitherial = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Coginator"); //ProjectileID.Sets.Homing[projectile.type] = true; @@ -18,8 +19,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; //projectile.alpha = 255; projectile.timeLeft = 240; @@ -31,6 +34,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; projectile.rotation += 6; if (projectile.localAI[0] == 0f) { diff --git a/NPCs/Slybertron/Electroshock.cs b/NPCs/Slybertron/Electroshock.cs index 0c8c64b..2df17c4 100644 --- a/NPCs/Slybertron/Electroshock.cs +++ b/NPCs/Slybertron/Electroshock.cs @@ -9,6 +9,7 @@ public class Electroshock : ModProjectile { public int delay = 0; public int damage = 0; + public bool bitherial = true; public override void SetStaticDefaults() { @@ -18,8 +19,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; //projectile.alpha = 255; projectile.timeLeft = 240; @@ -33,6 +36,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; delay += 1; if(delay == 100) { diff --git a/NPCs/Slybertron/ElectroshockP2.cs b/NPCs/Slybertron/ElectroshockP2.cs index a3a33a6..707f13f 100644 --- a/NPCs/Slybertron/ElectroshockP2.cs +++ b/NPCs/Slybertron/ElectroshockP2.cs @@ -6,8 +6,9 @@ namespace Laugicality.NPCs.Slybertron { public class ElectroshockP2 : ModProjectile - { - public override void SetStaticDefaults() + { + public bool bitherial = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Electroshock"); //ProjectileID.Sets.Homing[projectile.type] = true; @@ -15,8 +16,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; //projectile.alpha = 255; projectile.timeLeft = 80; @@ -26,6 +29,11 @@ public override void SetDefaults() projectile.tileCollide = false; } + public override void AI() + { + + bitherial = true; + } public override void OnHitPlayer(Player player, int dmgDealt, bool crit) { //NPCs.Slybertron.Slybertron.electroShockHits += 1; diff --git a/NPCs/Slybertron/GasBall.cs b/NPCs/Slybertron/GasBall.cs index 9d34f38..cd30b9b 100644 --- a/NPCs/Slybertron/GasBall.cs +++ b/NPCs/Slybertron/GasBall.cs @@ -9,6 +9,7 @@ public class GasBall : ModProjectile { public int delay = 0; public int damage = 0; + public bool bitherial = true; public override void SetStaticDefaults() { @@ -18,8 +19,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; //projectile.alpha = 255; projectile.timeLeft = 240; @@ -32,6 +35,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; delay += 1; if (delay == 30) { diff --git a/NPCs/Slybertron/GasBallDown.cs b/NPCs/Slybertron/GasBallDown.cs index aedc233..ef8caea 100644 --- a/NPCs/Slybertron/GasBallDown.cs +++ b/NPCs/Slybertron/GasBallDown.cs @@ -9,6 +9,7 @@ public class GasBallDown : ModProjectile { public int delay = 0; public int damage = 0; + public bool bitherial = true; public override void SetStaticDefaults() { @@ -18,8 +19,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; //projectile.alpha = 255; projectile.timeLeft = 60; @@ -30,6 +33,11 @@ public override void SetDefaults() damage = projectile.damage; } + public override void AI() + { + + bitherial = true; + } public override void OnHitPlayer(Player player, int dmgDealt, bool crit) { diff --git a/NPCs/Slybertron/GasBallUp.cs b/NPCs/Slybertron/GasBallUp.cs index 3348b1e..eb519f7 100644 --- a/NPCs/Slybertron/GasBallUp.cs +++ b/NPCs/Slybertron/GasBallUp.cs @@ -9,6 +9,7 @@ public class GasBallUp : ModProjectile { public int delay = 0; public int damage = 0; + public bool bitherial = true; public override void SetStaticDefaults() { @@ -18,8 +19,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; //projectile.alpha = 255; projectile.timeLeft = 180; @@ -32,6 +35,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; delay += 1; if(delay == 30) { diff --git a/NPCs/Slybertron/Gearikan.cs b/NPCs/Slybertron/Gearikan.cs index 46d7669..f3514b4 100644 --- a/NPCs/Slybertron/Gearikan.cs +++ b/NPCs/Slybertron/Gearikan.cs @@ -8,7 +8,8 @@ namespace Laugicality.NPCs.Slybertron public class Gearikan : ModProjectile { public int grounded = 0; - public override void SetStaticDefaults() + public bool bitherial = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Gearikan"); //ProjectileID.Sets.Homing[projectile.type] = true; @@ -16,7 +17,9 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; grounded = 0; projectile.width = 22; projectile.height = 22; @@ -30,6 +33,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; projectile.rotation += projectile.velocity.X; projectile.velocity.Y += .5f; } diff --git a/NPCs/Slybertron/Slybertron.cs b/NPCs/Slybertron/Slybertron.cs index 3d318ea..b8b76b3 100644 --- a/NPCs/Slybertron/Slybertron.cs +++ b/NPCs/Slybertron/Slybertron.cs @@ -55,15 +55,20 @@ public class Slybertron : ModNPC public int gasBallHits = 0; public int gasBallShots = 0; public bool stage2 = false; - + public bool bitherial = true; + public int plays = 0; + public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Slybertron"); //Main.npcFrameCount[npc.type] = 2; } public override void SetDefaults() { + plays = 1; + bitherial = true; attackReloadSpeed = 1.0; attackDelay = 300; //Delay before first attack attackReload = 200; //Resetting the reload speed @@ -92,6 +97,7 @@ public override void SetDefaults() public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { + plays = numPlayers; npc.lifeMax = 80000 + numPlayers * 8000; npc.damage = 140; damage = 50; @@ -101,6 +107,7 @@ public override void ScaleExpertStats(int numPlayers, float bossLifeScale) public override void AI() { + bitherial = true; //Despawn check if (Main.player[npc.target].statLife == 0) { npc.position.Y += -100; spawned = 0; } Vector2 delta = Main.player[npc.target].Center - npc.Center; @@ -343,7 +350,7 @@ public override void AI() public override void OnHitPlayer(Player player, int dmgDealt, bool crit) { - if (Main.expertMode) + if (Main.expertMode) { int debuff = mod.BuffType("Electrified"); if (debuff >= 0) @@ -355,6 +362,8 @@ public override void OnHitPlayer(Player player, int dmgDealt, bool crit) public override void BossLoot(ref string name, ref int potionType) { + if (plays == 0) + plays = 1; spawned = 0; if (!Main.expertMode) { diff --git a/NPCs/Slybertron/SteamStream.cs b/NPCs/Slybertron/SteamStream.cs index cbdcf37..6a590a5 100644 --- a/NPCs/Slybertron/SteamStream.cs +++ b/NPCs/Slybertron/SteamStream.cs @@ -6,8 +6,9 @@ namespace Laugicality.NPCs.Slybertron { public class SteamStream : ModProjectile - { - public override void SetStaticDefaults() + { + public bool bitherial = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Steam Stream"); //ProjectileID.Sets.Homing[projectile.type] = true; @@ -15,8 +16,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; projectile.alpha = 55; projectile.timeLeft = 80; @@ -28,6 +31,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Steam"), 0f, 0f); } diff --git a/NPCs/Slybertron/SteamyShadow.cs b/NPCs/Slybertron/SteamyShadow.cs index 23ecff1..7783980 100644 --- a/NPCs/Slybertron/SteamyShadow.cs +++ b/NPCs/Slybertron/SteamyShadow.cs @@ -9,8 +9,9 @@ namespace Laugicality.NPCs.Slybertron { public class SteamyShadow : ModProjectile - { - public override void SetStaticDefaults() + { + public bool bitherial = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Steamy Shadow"); //ProjectileID.Sets.Homing[projectile.type] = true; @@ -18,8 +19,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; projectile.alpha = 0; projectile.timeLeft = 240; @@ -31,6 +34,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Steam"), 0f, 0f); Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Steam"), 0f, 0f); projectile.rotation += 6; diff --git a/NPCs/Slybertron/XOut.cs b/NPCs/Slybertron/XOut.cs index a9ad3e2..1868c0a 100644 --- a/NPCs/Slybertron/XOut.cs +++ b/NPCs/Slybertron/XOut.cs @@ -9,6 +9,7 @@ public class XOut : ModProjectile { public int delay = 25; public int damage = 0; + public bool bitherial = true; public override void SetStaticDefaults() { DisplayName.SetDefault("X-Out"); @@ -17,8 +18,10 @@ public override void SetStaticDefaults() } public override void SetDefaults() - { - projectile.width = 48; + { + LaugicalityVars.EProjectiles.Add(projectile.type); + bitherial = true; + projectile.width = 48; projectile.height = 48; //projectile.alpha = 255; projectile.timeLeft = 120; @@ -32,6 +35,7 @@ public override void SetDefaults() public override void AI() { + bitherial = true; delay += 1; if (delay == 30) { diff --git a/NPCs/SteamPunk_SpiderTank_2.png b/NPCs/SteamPunk_SpiderTank_2.png new file mode 100644 index 0000000..05164a1 Binary files /dev/null and b/NPCs/SteamPunk_SpiderTank_2.png differ diff --git a/NPCs/SteamTrain/SteamTrain.cs b/NPCs/SteamTrain/SteamTrain.cs index 4dfa11a..faf8497 100644 --- a/NPCs/SteamTrain/SteamTrain.cs +++ b/NPCs/SteamTrain/SteamTrain.cs @@ -26,14 +26,19 @@ public class SteamTrain : ModNPC public int delay = 0; public int maxDelay = 60; public int range = 2000; + public bool bitherial = true; + public int plays = 0; public override void SetStaticDefaults() { + LaugicalityVars.ENPCs.Add(npc.type); DisplayName.SetDefault("Steam Train"); } public override void SetDefaults() { + plays = 1; + bitherial = true; maxDelay = 60; range = 2200; maxAccel = 20f; @@ -47,7 +52,7 @@ public override void SetDefaults() delay = 0; boosted = false; npc.width = 1680; - npc.height = 120; + npc.height = 124; npc.damage = 90; npc.defense = 30; npc.aiStyle = 0; @@ -61,12 +66,12 @@ public override void SetDefaults() npc.lavaImmune = true; npc.noGravity = true; npc.noTileCollide = true; - music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Slybertron"); - + music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Steam_Tracks_hopefully_final"); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { + plays = numPlayers; npc.lifeMax = 50000 + numPlayers * 6000; npc.damage = 100; } @@ -74,6 +79,8 @@ public override void ScaleExpertStats(int numPlayers, float bossLifeScale) public override void AI() { + bitherial = true; + npc.spriteDirection = 0; //Despawn check if (Main.player[npc.target].statLife == 0) { npc.position.X = -1000; } Vector2 delta = Main.player[npc.target].Center - npc.Center; @@ -238,7 +245,7 @@ public override void AI() } if (phase == 3) { - range = 1200; + range = 1000; maxAccel = 38f; maxVaccel = 38f; maxDelay = 30; @@ -269,6 +276,8 @@ public override void OnHitPlayer(Player player, int dmgDealt, bool crit) public override void BossLoot(ref string name, ref int potionType) { + if (plays == 0) + plays = 1; if (!Main.expertMode) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("SteamBar"), Main.rand.Next(15, 30)); diff --git a/NPCs/SteamTrain/SteamTrain.png b/NPCs/SteamTrain/SteamTrain.png index 40aabc5..58a070f 100644 Binary files a/NPCs/SteamTrain/SteamTrain.png and b/NPCs/SteamTrain/SteamTrain.png differ diff --git a/NPCs/SteamTrain/SteamTrainBkup.zip b/NPCs/SteamTrain/SteamTrainBkup.zip deleted file mode 100644 index ef4dae7..0000000 Binary files a/NPCs/SteamTrain/SteamTrainBkup.zip and /dev/null differ diff --git a/NPCs/SteamTrain/SteamTrain_new.png b/NPCs/SteamTrain/SteamTrain_new.png new file mode 100644 index 0000000..7ca7c24 Binary files /dev/null and b/NPCs/SteamTrain/SteamTrain_new.png differ diff --git a/Projectiles/EnginatorP.cs b/Projectiles/EnginatorP.cs index 42a203e..c5267de 100644 --- a/Projectiles/EnginatorP.cs +++ b/Projectiles/EnginatorP.cs @@ -10,23 +10,87 @@ namespace Laugicality.Projectiles public class EnginatorP : ModProjectile { public int rot = 0; + public int delay = 0; + public bool reverse = false; + public override void SetDefaults() { + reverse = false; + delay = 20; projectile.width = 24; projectile.height = 24; projectile.friendly = true; projectile.thrown = true; projectile.penetrate = -1; - projectile.aiStyle = 3; - projectile.timeLeft = 600; - aiType = 52; + projectile.aiStyle = 0; + projectile.timeLeft = 400; + Main.projFrames[projectile.type] = 2; } public override void AI() { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + + if (projectile.velocity.X < 0) projectile.frame = 1; + else projectile.frame = 0; + + delay -= 1; + if(delay <= 0 && reverse == false) + { + projectile.velocity.X *= .95f; + projectile.velocity.Y *= .95f; + if (Math.Abs(projectile.velocity.X) < 4f && Math.Abs(projectile.velocity.Y) < 4f) + { + projectile.velocity.X = -projectile.velocity.X; + projectile.velocity.Y = -projectile.velocity.Y; + reverse = true; + } + } + if (reverse) + { + if (projectile.localAI[0] == 0f) + { + AdjustMagnitude(ref projectile.velocity); + projectile.localAI[0] = 1f; + } + Vector2 move = Vector2.Zero; + float distance = 1400f; + bool target = false; + + Vector2 newMove = Main.player[Main.myPlayer].Center - projectile.Center; + float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y); + if (distanceTo < distance) + { + move = newMove; + distance = distanceTo; + target = true; + } + + + if (target) + { + AdjustMagnitude(ref move); + projectile.velocity = (20 * projectile.velocity + move) / 5f; + AdjustMagnitude(ref projectile.velocity); + } + + Vector2 delta = Main.player[Main.myPlayer].Center - projectile.Center; + if (Math.Abs(delta.X) < 8 && Math.Abs(delta.Y) < 8) + projectile.Kill(); + } + } + + private void AdjustMagnitude(ref Vector2 vector) + { + float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y); + if (magnitude > 10f) + { + vector *= 10f / magnitude; + } } public override bool OnTileCollide(Vector2 oldVelocity) { + reverse = true; projectile.ai[0] += 0.1f; if (projectile.velocity.X != oldVelocity.X) { @@ -36,10 +100,10 @@ public override bool OnTileCollide(Vector2 oldVelocity) { projectile.velocity.Y = -oldVelocity.Y; } + projectile.tileCollide = false; return false; } - - + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(mod.BuffType("Electrified"), 120); //Add Onfire buff to the NPC for 1 second diff --git a/Projectiles/EnginatorP.png b/Projectiles/EnginatorP.png index 5fb0d42..bd81bbe 100644 Binary files a/Projectiles/EnginatorP.png and b/Projectiles/EnginatorP.png differ diff --git a/Items/Weapons/Enginator.png b/Projectiles/EnginatorP_bkup.png similarity index 100% rename from Items/Weapons/Enginator.png rename to Projectiles/EnginatorP_bkup.png diff --git a/Projectiles/EtheriaSpawn.cs b/Projectiles/EtheriaSpawn.cs new file mode 100644 index 0000000..741bb99 --- /dev/null +++ b/Projectiles/EtheriaSpawn.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 Laugicality.Projectiles +{ + public class EtheriaSpawn : ModProjectile + { + public override void SetDefaults() + { + projectile.width = 6; + projectile.height = 6; + projectile.aiStyle = 1; + projectile.scale = 1f; + projectile.penetrate = 1; + projectile.timeLeft = 20; + projectile.tileCollide = false; + aiType = ProjectileID.Bullet; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + projectile.ai[1]++; + + if (projectile.ai[1] >= 0) + { + Main.PlaySound(15, (int)player.position.X, (int)player.position.Y-50, 0); + NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Etheria")); + projectile.ai[1] = -30; + } + } + } +} \ No newline at end of file diff --git a/Projectiles/EtheriaSpawn.png b/Projectiles/EtheriaSpawn.png new file mode 100644 index 0000000..a3192f9 Binary files /dev/null and b/Projectiles/EtheriaSpawn.png differ diff --git a/Projectiles/LaugicalityGlobalProjectile.cs b/Projectiles/LaugicalityGlobalProjectile.cs index 624c707..7dd9e1a 100644 --- a/Projectiles/LaugicalityGlobalProjectile.cs +++ b/Projectiles/LaugicalityGlobalProjectile.cs @@ -4,16 +4,95 @@ using Terraria.ModLoader; using Laugicality; using Laugicality.NPCs; +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework.Graphics; namespace Laugicality.Projectiles { public class LaugicalityGlobalProjectile : GlobalProjectile { - - public virtual bool PreAI(Projectile projectile) + public bool etherial = false; + public bool bitherial = false; + public bool friend = false; + private int dmg = 0; + public int eDmg = 0; + + public override void SetDefaults(Projectile projectile) { - return true; + eDmg = 0; + dmg = 0; + etherial = false; + bitherial = false; + if (LaugicalityVars.EProjectiles.Contains(projectile.type)) + { + bitherial = true; + } + } + + public override bool PreDraw(Projectile projectile, SpriteBatch spriteBatch, Color lightColor) + { + if (eDmg == 0) + eDmg = projectile.damage; + + if (bitherial) + { + if (LaugicalityWorld.etherial) + projectile.damage = eDmg + 25; + else + projectile.damage = eDmg; + return true; + } + else + { + if (dmg == 0) + { + dmg = projectile.damage; + friend = projectile.friendly; + } + if (!friend) + { + if (etherial) + { + if (LaugicalityWorld.etherial) + { + projectile.damage = dmg; + return true; + } + else + { + projectile.damage = 0; + return false; + } + } + else + { + + if (LaugicalityWorld.etherial) + { + projectile.damage = 0; + return false; + } + else + { + projectile.damage = dmg; + return true; + } + } + } + else return true; + } + + } + public virtual bool PreAI(Projectile projectile) + { + /* + if (LaugicalityWorld.etherial) + { + etherial = true; + } + */ var mPlayer = Main.LocalPlayer.GetModPlayer(mod); int rand = Main.rand.Next(4); @@ -41,6 +120,7 @@ public virtual bool PreAI(Projectile projectile) { Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Lightning"), projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); } + return true; } public override bool InstancePerEntity diff --git a/Projectiles/Sandball.cs b/Projectiles/Sandball.cs index c66bbac..5839e3f 100644 --- a/Projectiles/Sandball.cs +++ b/Projectiles/Sandball.cs @@ -19,7 +19,7 @@ public override void SetDefaults() public override void AI() { - projectile.velocity.Y += projectile.ai[0]; + projectile.velocity.Y += projectile.ai[0] + 0.1f; Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Sandy"), projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); } diff --git a/Projectiles/TV.png b/Projectiles/TV.png index f843f57..f9d34a9 100644 Binary files a/Projectiles/TV.png and b/Projectiles/TV.png differ diff --git a/Projectiles/TrainScythe.cs b/Projectiles/TrainScythe.cs index 4699d12..8effac3 100644 --- a/Projectiles/TrainScythe.cs +++ b/Projectiles/TrainScythe.cs @@ -28,7 +28,7 @@ public override void AI() if (projectile.velocity.X < 0) projectile.frame = 1; else projectile.frame = 0; - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Steam"), 0f, 0f); + if(Main.rand.Next(0,14)==0)Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("Steam"), 0f, 0f); } /* diff --git a/Sounds/EtherialChange.wav b/Sounds/EtherialChange.wav new file mode 100644 index 0000000..bae4329 Binary files /dev/null and b/Sounds/EtherialChange.wav differ diff --git a/Sounds/Music/Annihilator_balanced.mp3 b/Sounds/Music/Annihilator_balanced.mp3 new file mode 100644 index 0000000..0412461 Binary files /dev/null and b/Sounds/Music/Annihilator_balanced.mp3 differ diff --git a/Sounds/Music/Etheria.mp3 b/Sounds/Music/Etheria.mp3 new file mode 100644 index 0000000..205c11f Binary files /dev/null and b/Sounds/Music/Etheria.mp3 differ diff --git a/Sounds/Music/Etherial.mp3 b/Sounds/Music/Etherial.mp3 new file mode 100644 index 0000000..3bd4f2e Binary files /dev/null and b/Sounds/Music/Etherial.mp3 differ diff --git a/Sounds/Music/Slybertron_Theme.mp3 b/Sounds/Music/Slybertron_Theme.mp3 new file mode 100644 index 0000000..c486c83 Binary files /dev/null and b/Sounds/Music/Slybertron_Theme.mp3 differ diff --git a/Sounds/Music/SteamTrain.mp3 b/Sounds/Music/SteamTrain.mp3 new file mode 100644 index 0000000..974102c Binary files /dev/null and b/Sounds/Music/SteamTrain.mp3 differ diff --git a/Sounds/Music/Steam_Tracks_hopefully_final.mp3 b/Sounds/Music/Steam_Tracks_hopefully_final.mp3 new file mode 100644 index 0000000..5f5e5b3 Binary files /dev/null and b/Sounds/Music/Steam_Tracks_hopefully_final.mp3 differ diff --git a/description.txt b/description.txt index 13b9d7a..d82be20 100644 --- a/description.txt +++ b/description.txt @@ -3,18 +3,18 @@ Current features: ========= A new level-up system in the form of the Soul Stone A new class- The Mystic Class! -6 Boss fights -Over 180 new Items, including a new way to use Potions +A new dimension- The Etherial +7 Boss fights +Over 200 new Items, including a new way to use Potions A new biome 3 new Armor sets And lots more planned features! ----- -v 0.9.5 -Added Ragnar, the guardian of the Caverns. -Added toggles for Soul Stone Visual and Mobility effects. +v 0.10 +The Etherial is here- an alternate dimension that adds a new level of challenge and loot to the game! ----- Recent Changes: -Added Hypothema- A chilly boss that guards the Ice Biome in Pre-Hardmode +Completed the Pre-Trio, a set of bosses to fight Early Hardmode to give the player some earlier class based armor and gear. Complete Revamp of the Obsidium biome! More additions to come, especially Hardmode changes, but the world generation should be staying as is for now! New Enchanting and Infusion Stations- place them on top of the Alchemical Infuser! Added Mystic weapons to PreHM! @@ -27,6 +27,6 @@ Crystalize 4 of any buff potion into a wearable 'Gem' accessory. Music ======== PreTrio: Rotten Shotgun - Death Road to Canada OST -Annihilator: Tied Up - Silent Partner -Slybertron / Steam Train: They're Everywhere - Steredenn OST +Steam Trio: Turquoise / IcerM Obsidium: Chaos 101 2 - Gunnar Johnsen +Etherial: This Is The End 3 - Merlean, Epidemic Sound