diff --git a/Common/NPCLootDrop/NPCLootDrop.cs b/Common/NPCLootDrop/NPCLootDrop.cs index ba20156..3c1e636 100644 --- a/Common/NPCLootDrop/NPCLootDrop.cs +++ b/Common/NPCLootDrop/NPCLootDrop.cs @@ -23,6 +23,14 @@ public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot) // Gian Crusher if (npc.type == NPCID.Golem) npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 1)); + // Dark Moon Greatsword + if (npc.type == NPCID.CultistBoss) + npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 1)); + // Rivers Of Blood + if (npc.type == NPCID.BloodEelHead) + npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 12)); + if (npc.type == NPCID.BloodNautilus) + npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 4)); } } } diff --git a/Content/Items/Weapons/Melee/BlasphemousBlade.cs b/Content/Items/Weapons/Melee/BlasphemousBlade.cs index 6128332..b569328 100644 --- a/Content/Items/Weapons/Melee/BlasphemousBlade.cs +++ b/Content/Items/Weapons/Melee/BlasphemousBlade.cs @@ -14,12 +14,12 @@ namespace EldenRingItems.Content.Items.Weapons.Melee public class BlasphemousBlade : ModItem { public override string Texture => "EldenRingItems/Content/Items/Weapons/Melee/BlasphemousBlade"; - public override LocalizedText DisplayName => base.DisplayName.WithFormatArgs(""); const int MAX_CHARGED_ATTACKS = 5; const int MIN_HEAL = 10; const int MAX_HEAL = 25; + public override LocalizedText DisplayName => base.DisplayName.WithFormatArgs(""); public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MIN_HEAL*MAX_CHARGED_ATTACKS, MAX_HEAL*MAX_CHARGED_ATTACKS, MAX_CHARGED_ATTACKS); float HoldingCount = 0; diff --git a/Content/Items/Weapons/Melee/DarkMoonGreatsword.cs b/Content/Items/Weapons/Melee/DarkMoonGreatsword.cs new file mode 100644 index 0000000..44e8b40 --- /dev/null +++ b/Content/Items/Weapons/Melee/DarkMoonGreatsword.cs @@ -0,0 +1,260 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Localization; +using EldenRingItems.Content.Items.Materials.SomberSmithingStones; +using EldenRingItems.Projectiles.Melee; +using Terraria.DataStructures; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace EldenRingItems.Content.Items.Weapons.Melee +{ + public class DarkMoonGreatsword : ModItem + { + public override string Texture => "EldenRingItems/Content/Items/Weapons/Melee/DarkMoonGreatsword"; + public int BaseDamage { get; set; } = 100; + + SoundStyle IsChargedSound = new SoundStyle("EldenRingItems/Sounds/cs_c2010.649"); + SoundStyle ChargedUseSound = new SoundStyle("EldenRingItems/Sounds/cs_c2010.2318"); + + bool IsCharged = false; + const int MAX_CHARGED_ATTACKS = 8; + int MadeChargedAttacks = 0; + const int MANA_FOR_CHARGE = 60; + + public override LocalizedText DisplayName => base.DisplayName.WithFormatArgs(""); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MANA_FOR_CHARGE, MAX_CHARGED_ATTACKS); + + public override void SetDefaults() + { + Item.width = 92; + Item.height = 91; + Item.DamageType = DamageClass.Melee; + Item.damage = BaseDamage; + Item.knockBack = 5f; + Item.useTime = 20; + Item.useAnimation = 20; + Item.autoReuse = true; + Item.useTurn = true; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.value = Item.sellPrice(0, 35, 0, 0); + Item.rare = ItemRarityID.Cyan; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 12f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + if (IsCharged) + { + if (MadeChargedAttacks == MAX_CHARGED_ATTACKS) + { + MadeChargedAttacks = 0; + IsCharged = false; + return false; + } + if (MadeChargedAttacks == MAX_CHARGED_ATTACKS-1) + Item.UseSound = SoundID.Item1; + MadeChargedAttacks++; + return true; + } + return false; + } + + public override void HoldStyle(Player player, Rectangle heldItemFrame) + { + if (Main.mouseRight && !IsCharged) + { + if (player.CheckMana(MANA_FOR_CHARGE, true)) + { + IsChargedSound.Volume = 0.6f; + SoundEngine.PlaySound(IsChargedSound); + Item.UseSound = ChargedUseSound; + IsCharged = true; + } + } + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture; + + if (!IsCharged) + { + texture = ModContent.Request(Texture).Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + else + { + texture = ModContent.Request("EldenRingItems/Content/Items/Weapons/Melee/DarkMoonGreatswordCharged").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); + } + return false; + } + + //public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + //{ + // Texture2D texture; + + // if (!IsCharged) + // { + // texture = ModContent.Request(Texture).Value; + // spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + // } + // else + // { + // texture = ModContent.Request("EldenRingItems/Content/Items/Weapons/Melee/DarkMoonGreatswordCharged").Value; + // spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + // } + // return false; + //} + + //public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + //{ + // if (!IsCharged) + // return; + // Texture2D texture = ModContent.Request("EldenRingItems/Content/Items/Weapons/Melee/DarkMoonGreatswordCharged").Value; + // spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + //} + } + + #region Upgrade + public abstract class UpgradedDarkMoonGreatsword : DarkMoonGreatsword + { + public int UpgradeLevel { get; set; } + public Recipe recipe { get; set; } + public override LocalizedText Tooltip => ModContent.GetModItem(ModContent.ItemType()).Tooltip; + public override LocalizedText DisplayName => ModContent.GetModItem(ModContent.ItemType()).DisplayName.WithFormatArgs($" +{UpgradeLevel}"); + + protected UpgradedDarkMoonGreatsword(int upgradeLevel) + { + UpgradeLevel = upgradeLevel; + } + + public override void SetDefaults() + { + BaseDamage += UpgradeLevel * 10; + base.SetDefaults(); + } + + public override void AddRecipes() + { + recipe = CreateRecipe(); + recipe.AddIngredient(SSSUtils.GetSSSByLevel(UpgradeLevel)); + recipe.AddTile(SSSUtils.GetTileByLevel(UpgradeLevel)); + } + } + + public class DarkMoonGreatsword1 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword1() : base(1) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class DarkMoonGreatsword2 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword2() : base(2) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class DarkMoonGreatsword3 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword3() : base(3) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + public class DarkMoonGreatsword4 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword4() : base(4) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class DarkMoonGreatsword5 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword5() : base(5) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class DarkMoonGreatsword6 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword6() : base(6) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class DarkMoonGreatsword7 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword7() : base(7) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class DarkMoonGreatsword8 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword8() : base(8) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class DarkMoonGreatsword9 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword9() : base(9) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class DarkMoonGreatsword10 : UpgradedDarkMoonGreatsword + { + public DarkMoonGreatsword10() : base(10) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + #endregion +} diff --git a/Content/Items/Weapons/Melee/DarkMoonGreatsword.png b/Content/Items/Weapons/Melee/DarkMoonGreatsword.png new file mode 100644 index 0000000..13fe168 Binary files /dev/null and b/Content/Items/Weapons/Melee/DarkMoonGreatsword.png differ diff --git a/Content/Items/Weapons/Melee/DarkMoonGreatswordCharged.png b/Content/Items/Weapons/Melee/DarkMoonGreatswordCharged.png new file mode 100644 index 0000000..d43f653 Binary files /dev/null and b/Content/Items/Weapons/Melee/DarkMoonGreatswordCharged.png differ diff --git a/Content/Items/Weapons/Melee/RiversOfBlood.cs b/Content/Items/Weapons/Melee/RiversOfBlood.cs new file mode 100644 index 0000000..3bffcd2 --- /dev/null +++ b/Content/Items/Weapons/Melee/RiversOfBlood.cs @@ -0,0 +1,233 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Localization; +using EldenRingItems.Content.Items.Materials.SomberSmithingStones; +using Terraria.DataStructures; +using Microsoft.Xna.Framework; +using EldenRingItems.Projectiles.Melee; + +namespace EldenRingItems.Content.Items.Weapons.Melee +{ + public class RiversOfBlood : ModItem + { + public override string Texture => "EldenRingItems/Content/Items/Weapons/Melee/RiversOfBlood"; + public int BaseDamage { get; set; } = 65; + + SoundStyle IsChargedSound = new SoundStyle("EldenRingItems/Sounds/RiversOfBlood/ChargeSound"); + + bool IsCharged = false; + const int MAX_CHARGED_ATTACKS = 3; + int MadeChargedAttacks = 0; + const int MANA_FOR_CHARGE = 50; + + public override LocalizedText DisplayName => base.DisplayName.WithFormatArgs(""); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MANA_FOR_CHARGE); + + public override void SetDefaults() + { + Item.width = 75; + Item.height = 75; + Item.DamageType = DamageClass.Melee; + Item.damage = BaseDamage; + Item.knockBack = 5f; + Item.useTime = 20; + Item.useAnimation = 20; + Item.autoReuse = true; + Item.useTurn = true; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.value = Item.sellPrice(0, 25, 0, 0); + Item.rare = ItemRarityID.LightRed; + Item.shoot = ProjectileID.None; + Item.shootSpeed = 10f; + Item.scale = 1.25f; + } + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + if (IsCharged) + { + if (MadeChargedAttacks == MAX_CHARGED_ATTACKS) + { + MadeChargedAttacks = 0; + IsCharged = false; + Item.noUseGraphic = false; + Item.noMelee = false; + Item.shoot = ProjectileID.None; + return false; + } + if (MadeChargedAttacks == MAX_CHARGED_ATTACKS - 1) + Item.UseSound = SoundID.Item1; + MadeChargedAttacks++; + return true; + } + return false; + } + + public override void HoldStyle(Player player, Rectangle heldItemFrame) + { + if (Main.mouseRight && !IsCharged) + { + if (player.CheckMana(MANA_FOR_CHARGE, true)) + { + //player.Hurt(PlayerDeathReason.ByCustomReason(""), Main.rand.Next(MIN_HP_FOR_CHARGE, MAX_HP_FOR_CHARGE+1), player.direction, armorPenetration: 1000, dodgeable: false, cooldownCounter:1); + IsChargedSound.Volume = 0.6f; + SoundEngine.PlaySound(IsChargedSound); + IsCharged = true; + MadeChargedAttacks = 0; + Item.shoot = ModContent.ProjectileType(); + Item.noUseGraphic = true; + Item.noMelee = true; + } + } + } + public override void MeleeEffects(Player player, Rectangle hitbox) + { + int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Blood, Scale: Main.rand.NextFloat(0.5f, 1.2f)); + } + public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) + { + if (!target.HasBuff(BuffID.Venom)) + target.AddBuff(BuffID.Venom, 60*15); // 15 seconds + } + } + + #region Upgrade + public abstract class UpgradedRiversOfBlood : RiversOfBlood + { + public int UpgradeLevel { get; set; } + public Recipe recipe { get; set; } + public override LocalizedText Tooltip => ModContent.GetModItem(ModContent.ItemType()).Tooltip; + public override LocalizedText DisplayName => ModContent.GetModItem(ModContent.ItemType()).DisplayName.WithFormatArgs($" +{UpgradeLevel}"); + + protected UpgradedRiversOfBlood(int upgradeLevel) + { + UpgradeLevel = upgradeLevel; + } + + public override void SetDefaults() + { + BaseDamage += UpgradeLevel * 8; + base.SetDefaults(); + } + + public override void AddRecipes() + { + recipe = CreateRecipe(); + recipe.AddIngredient(SSSUtils.GetSSSByLevel(UpgradeLevel)); + recipe.AddTile(SSSUtils.GetTileByLevel(UpgradeLevel)); + } + } + + public class RiversOfBlood1 : UpgradedRiversOfBlood + { + public RiversOfBlood1() : base(1) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class RiversOfBlood2 : UpgradedRiversOfBlood + { + public RiversOfBlood2() : base(2) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class RiversOfBlood3 : UpgradedRiversOfBlood + { + public RiversOfBlood3() : base(3) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + public class RiversOfBlood4 : UpgradedRiversOfBlood + { + public RiversOfBlood4() : base(4) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class RiversOfBlood5 : UpgradedRiversOfBlood + { + public RiversOfBlood5() : base(5) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class RiversOfBlood6 : UpgradedRiversOfBlood + { + public RiversOfBlood6() : base(6) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class RiversOfBlood7 : UpgradedRiversOfBlood + { + public RiversOfBlood7() : base(7) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class RiversOfBlood8 : UpgradedRiversOfBlood + { + public RiversOfBlood8() : base(8) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class RiversOfBlood9 : UpgradedRiversOfBlood + { + public RiversOfBlood9() : base(9) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class RiversOfBlood10 : UpgradedRiversOfBlood + { + public RiversOfBlood10() : base(10) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + #endregion +} diff --git a/Content/Items/Weapons/Melee/RiversOfBlood.png b/Content/Items/Weapons/Melee/RiversOfBlood.png new file mode 100644 index 0000000..8dc6edb Binary files /dev/null and b/Content/Items/Weapons/Melee/RiversOfBlood.png differ diff --git a/Localization/en-US_Mods.EldenRingItems.hjson b/Localization/en-US_Mods.EldenRingItems.hjson index 9b8374a..4c9595f 100644 --- a/Localization/en-US_Mods.EldenRingItems.hjson +++ b/Localization/en-US_Mods.EldenRingItems.hjson @@ -139,11 +139,31 @@ Items: { DisplayName: Dark Moon Greatsword{0} Tooltip: ''' + When holding it in your hand, press [c/939393:right mouse button] to charge the sword (spends [c/4110a3:{0}] mana) + When the sword becomes [c/0078bd:charged] it will make a special sound, and it will also become brighter in your inventory + Attacking from [c/0078bd:charged state] releases super-fast waves + The sword will lose its charge (after dealing [c/980000:{1}] [c/0078bd:charged] blows) + Attack from [c/939393:normal state] makes normal sword strikes [c/757575:A Moon Greatsword, bestowed by a Carian queen upon her spouse to honor long-standing tradition.] [c/757575:One of the legendary armaments.] [c/757575:Ranni's sigil is a full moon, cold and leaden, and this sword is but a beam of its light.] ''' } + + RiversOfBlood: { + DisplayName: Rivers Of Blood{0} + Tooltip: + ''' + When holding it in your hand, press [c/939393:right mouse button] to charge the katana (spends [c/4110a3:{0}] mana) + When the katana becomes [c/0078bd:charged] it will make a special sound + Attacking from the [c/0078bd:charged state] makes super-fast piercing blows that inflict debuff [c/4110a3:Venom] on the target + Attacking from [c/939393:normal state] deals normal katana strikes + [c/757575:Weapon of Okina, swordsman from the Land of Reeds.] + [c/757575:A cursed weapon that has felled countless men.] + [c/757575:When Mohg, the Lord of Blood, first felt Okina's sword, and madness,] + [c/757575:upon his flesh, he had a proposal, to offer Okina the life of a demon, whose thirst would never go unsated.] + ''' + } } Buffs: { @@ -157,4 +177,5 @@ Projectiles: { BloodSlash.DisplayName: Blood Slash GiantCrusherProj.DisplayName: Giant Crusher Proj DarkMoonGreatswordProj.DisplayName: Dark Moon Greatsword Proj + RiversOfBloodProj.DisplayName: Rivers Of Blood Proj } diff --git a/Localization/ru-RU_Mods.EldenRingItems.hjson b/Localization/ru-RU_Mods.EldenRingItems.hjson index cb172d5..eceeafc 100644 --- a/Localization/ru-RU_Mods.EldenRingItems.hjson +++ b/Localization/ru-RU_Mods.EldenRingItems.hjson @@ -139,11 +139,31 @@ Items: { DisplayName: Двуручник тёмной луны{0} Tooltip: ''' + При взятии в руку, зажмите [c/939393:правую кнопку мыши] для зарядки меча (тратит [c/4110a3:{0}] маны) + Когда меч станет [c/0078bd:заряжённым] он издаст специальный звук, а также в инвентаре он станет ярче + Атака из [c/0078bd:заряжённого состояния] выпускает сверхбыстрые волны + Меч потеряет заряд (после нанесении [c/980000:{1}] [c/0078bd:заряжённых] ударов) + Атака из [c/939393:обычного состояния] наносит обычные удары мечём [c/757575:Лунный двуручник, который карианские королевы традиционно дарят своим супругам.] [c/757575:Легендарное оружие.] [c/757575:Символ Ренни — полная луна, холодная и мрачная, а этот меч — не что иное, как частица её сияния.] ''' } + + RiversOfBlood: { + DisplayName: Реки крови{0} + Tooltip: + ''' + При взятии в руку, зажмите [c/939393:правую кнопку мыши] для зарядки меча (тратит [c/4110a3:{0}] маны) + Когда меч станет [c/0078bd:заряжённым] он издаст специальный звук + Атака из [c/0078bd:заряжённого состояния] делает сверхбыстрые пробивающие удары, которые накладывают дебафф [c/4110a3:Кислотный Яд] на цель + Атака из [c/939393:обычного состояния] наносит обычные удары катаной + [c/757575:Оружие Окины, мечника из Страны тростника.] + [c/757575:Проклятое оружие, убившее бесчисленное количество людей.] + [c/757575:Когда Мог Повелитель Крови впервые ощутил на собственной плоти меч Окины и его безумие,] + [c/757575:он предложил мечнику жизнь демона, чья жажда никогда не останется неутолённой.] + ''' + } } Buffs: { @@ -157,4 +177,5 @@ Projectiles: { BloodSlash.DisplayName: Blood Slash // GiantCrusherProj.DisplayName: Giant Crusher Proj // DarkMoonGreatswordProj.DisplayName: Dark Moon Greatsword Proj + // RiversOfBloodProj.DisplayName: Rivers Of Blood Proj } diff --git a/Projectiles/Melee/DarkMoonGreatswordProj.cs b/Projectiles/Melee/DarkMoonGreatswordProj.cs new file mode 100644 index 0000000..4310399 --- /dev/null +++ b/Projectiles/Melee/DarkMoonGreatswordProj.cs @@ -0,0 +1,52 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Audio; + +namespace EldenRingItems.Projectiles.Melee +{ + public class DarkMoonGreatswordProj : ModProjectile + { + public SoundStyle hitSound = new SoundStyle("EldenRingItems/Sounds/cs_c3320_13"); + + public override void SetDefaults() + { + Projectile.width = 50; + Projectile.height = 18; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.extraUpdates = 1; + Projectile.penetrate = 1; + Projectile.timeLeft = 800; + Projectile.friendly = true; + Projectile.scale = 2f; + } + + public override void AI() + { + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; + + Lighting.AddLight(Projectile.Center, 0.4f, 0f, 0.6f); + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + Player player = Main.player[Projectile.owner]; + float numberOfDusts = 24f; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) + { + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = new Vector2(18f, 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 4.1f)); + Vector2 velOffset = new Vector2(12f, 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 4.1f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, DustID.Electric, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = true; + dust.velocity = velOffset; + dust.scale = Main.rand.NextFloat(0.8f, 1.5f); + } + Projectile.Kill(); + } + } +} diff --git a/Projectiles/Melee/DarkMoonGreatswordProj.png b/Projectiles/Melee/DarkMoonGreatswordProj.png new file mode 100644 index 0000000..830d554 Binary files /dev/null and b/Projectiles/Melee/DarkMoonGreatswordProj.png differ diff --git a/Projectiles/Melee/RiversOfBloodProj.cs b/Projectiles/Melee/RiversOfBloodProj.cs new file mode 100644 index 0000000..ad17124 --- /dev/null +++ b/Projectiles/Melee/RiversOfBloodProj.cs @@ -0,0 +1,96 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace EldenRingItems.Projectiles.Melee +{ + public class RiversOfBloodProj : ModProjectile + { + SoundStyle HitSound = new SoundStyle("EldenRingItems/Sounds/RiversOfBlood/HitOrganic"); + + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 2; + } + + bool Slashing = false; + int NumHits = 0; + + public override void SetDefaults() + { + Projectile.width = 136; + Projectile.height = 185; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.MeleeNoSpeed; + Projectile.extraUpdates = 1; + Projectile.tileCollide = false; + Projectile.penetrate = -1; + Projectile.alpha = 0; + Projectile.frameCounter = 0; + Projectile.timeLeft = 25; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 12; + } + + public override bool PreDraw(ref Color lightColor) + { + if (Projectile.frameCounter <= 1) + return false; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Rectangle frame = texture.Frame(verticalFrames: Main.projFrames[Type], frameY: Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + SpriteEffects spriteEffects = Projectile.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + (Projectile.velocity * 0.3f) + new Vector2(0, -32).RotatedBy(Projectile.rotation), frame, Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0); + return false; + } + + public override void AI() + { + if (Main.mouseLeft) + Slashing = true; + else if (Main.mouseLeftRelease) + Slashing = false; + + if (Slashing) + { + Projectile.frameCounter++; + if (Projectile.frameCounter % 5 == 0) + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; + + Vector2 playerRotatedPoint = Main.player[Projectile.owner].RotatedRelativePoint(Main.player[Projectile.owner].MountedCenter, true); + + float velocityAngle = Projectile.velocity.ToRotation(); + Projectile.rotation = velocityAngle + (Projectile.direction == -1).ToInt() * MathHelper.Pi; + float velocityAngle2 = Projectile.velocity.ToRotation(); + Projectile.direction = (Math.Cos(velocityAngle2) > 0).ToDirectionInt(); + + float offset = 50f * Projectile.scale; + Projectile.Center = playerRotatedPoint + velocityAngle2.ToRotationVector2() * offset; + + int dust = Dust.NewDust(new Vector2(Projectile.Hitbox.X, Projectile.Hitbox.Y), Projectile.width, Projectile.height, DustID.Blood, Scale: Main.rand.NextFloat(0.5f, 1.5f)); + } + else + Projectile.Kill(); + } + + public override bool? CanDamage() + { + if (Slashing) + return true; + else + return false; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + HitSound.Volume = Main.rand.NextFloat(0.3f, 0.6f); + HitSound.Pitch = Main.rand.NextFloat(-0.1f, 0.1f); + SoundEngine.PlaySound(HitSound); + if (!target.HasBuff(BuffID.Venom)) + target.AddBuff(BuffID.Venom, 60 * 15); + } + } +} \ No newline at end of file diff --git a/Projectiles/Melee/RiversOfBloodProj.png b/Projectiles/Melee/RiversOfBloodProj.png new file mode 100644 index 0000000..44353f3 Binary files /dev/null and b/Projectiles/Melee/RiversOfBloodProj.png differ diff --git a/Sounds/RiversOfBlood/ChargeSound.ogg b/Sounds/RiversOfBlood/ChargeSound.ogg new file mode 100644 index 0000000..f7c10a6 Binary files /dev/null and b/Sounds/RiversOfBlood/ChargeSound.ogg differ diff --git a/Sounds/RiversOfBlood/HitOrganic.ogg b/Sounds/RiversOfBlood/HitOrganic.ogg new file mode 100644 index 0000000..4898afa Binary files /dev/null and b/Sounds/RiversOfBlood/HitOrganic.ogg differ diff --git a/Sounds/cs_c2010.2318.ogg b/Sounds/cs_c2010.2318.ogg new file mode 100644 index 0000000..90b41a1 Binary files /dev/null and b/Sounds/cs_c2010.2318.ogg differ diff --git a/Sounds/cs_c2010.649.ogg b/Sounds/cs_c2010.649.ogg new file mode 100644 index 0000000..354a8f1 Binary files /dev/null and b/Sounds/cs_c2010.649.ogg differ diff --git a/Sounds/cs_c3320_13.ogg b/Sounds/cs_c3320_13.ogg new file mode 100644 index 0000000..324c730 Binary files /dev/null and b/Sounds/cs_c3320_13.ogg differ