diff --git a/Common/GlobalsNPCs/DamageOverTimeGlobalNPC.cs b/Common/GlobalsNPCs/DamageOverTimeGlobalNPC.cs new file mode 100644 index 0000000..082924c --- /dev/null +++ b/Common/GlobalsNPCs/DamageOverTimeGlobalNPC.cs @@ -0,0 +1,20 @@ +using Terraria; +using Terraria.ModLoader; +using EldenRingItems.Content.Buffs.StatDebuff; + +namespace ExampleMod.Common.GlobalNPCs +{ + internal class DamageOverTimeGlobalNPC : GlobalNPC + { + public override bool InstancePerEntity => true; + + public override void UpdateLifeRegen(NPC npc, ref int damage) + { + if (npc.HasBuff()) + { + damage = 5; + npc.lifeRegen -= damage*5*2; // damage * 4 per second + } + } + } +} \ No newline at end of file diff --git a/Common/NPCLootDrop/NPCLootDrop.cs b/Common/NPCLootDrop/NPCLootDrop.cs index 3c1e636..518bc58 100644 --- a/Common/NPCLootDrop/NPCLootDrop.cs +++ b/Common/NPCLootDrop/NPCLootDrop.cs @@ -31,6 +31,11 @@ public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot) npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 12)); if (npc.type == NPCID.BloodNautilus) npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 4)); + // Moonveil + if (npc.type == NPCID.BlueArmoredBonesSword) + npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 12)); + if (npc.type == NPCID.WyvernHead) + npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 25)); } } } diff --git a/Common/Players/ERIPlayer.cs b/Common/Players/ERIPlayer.cs index ca6113b..140f22c 100644 --- a/Common/Players/ERIPlayer.cs +++ b/Common/Players/ERIPlayer.cs @@ -1,18 +1,45 @@ -using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.UI; +using Terraria.ModLoader; +using Terraria.ID; +using EldenRingItems.Content.Buffs.StatDebuff; namespace EldenRingItems.Common.Players { public class ERIPlayer : ModPlayer { - public bool Blessed; + public bool Blessed = false; + public bool WeaponImbueBlackFlame = false; public override void ResetEffects() { + WeaponImbueBlackFlame = false; } public override void OnRespawn() { Blessed = false; } + + public override void MeleeEffects(Item item, Rectangle hitbox) + { + if (WeaponImbueBlackFlame) + { + if (item.DamageType.CountsAsClass() && !item.noMelee && !item.noUseGraphic) + if (Main.rand.NextBool(2)) + { + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Wraith, Scale: Main.rand.NextFloat(0.5f, 0.8f)); + } + } + } + + public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone) + { + if (WeaponImbueBlackFlame && item.DamageType.CountsAsClass()) + { + target.AddBuff(ModContent.BuffType(), 60*3); + } + } } } \ No newline at end of file diff --git a/Content/Buffs/StatBuff/BlessingBuff.cs b/Content/Buffs/StatBuff/BlessingBuff.cs new file mode 100644 index 0000000..931c35f --- /dev/null +++ b/Content/Buffs/StatBuff/BlessingBuff.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ModLoader; +using EldenRingItems.Common.Players; +using Terraria.ID; + +namespace EldenRingItems.Content.Buffs.StatBuff +{ + public class BlessingBuff : ModBuff + { + public override void SetStaticDefaults() + { + Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + Main.debuff[Type] = true; + BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetModPlayer().Blessed = true; + } + } +} \ No newline at end of file diff --git a/Content/Buffs/StatBuff/BlessingBuff.png b/Content/Buffs/StatBuff/BlessingBuff.png new file mode 100644 index 0000000..6ad3724 Binary files /dev/null and b/Content/Buffs/StatBuff/BlessingBuff.png differ diff --git a/Content/Buffs/StatBuff/WeaponImbueBlackFlame.cs b/Content/Buffs/StatBuff/WeaponImbueBlackFlame.cs new file mode 100644 index 0000000..86da8f3 --- /dev/null +++ b/Content/Buffs/StatBuff/WeaponImbueBlackFlame.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ModLoader; +using EldenRingItems.Common.Players; +using Terraria.ID; + +namespace EldenRingItems.Content.Buffs.StatBuff +{ + public class WeaponImbueBlackFlame : ModBuff + { + public override void SetStaticDefaults() + { + BuffID.Sets.IsAFlaskBuff[Type] = true; + Main.meleeBuff[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetModPlayer().WeaponImbueBlackFlame = true; + player.MeleeEnchantActive = true; + } + } +} \ No newline at end of file diff --git a/Content/Buffs/StatBuff/WeaponImbueBlackFlame.png b/Content/Buffs/StatBuff/WeaponImbueBlackFlame.png new file mode 100644 index 0000000..d27594f Binary files /dev/null and b/Content/Buffs/StatBuff/WeaponImbueBlackFlame.png differ diff --git a/Content/Buffs/StatDebuff/BlackFlameDebuff.cs b/Content/Buffs/StatDebuff/BlackFlameDebuff.cs new file mode 100644 index 0000000..712d620 --- /dev/null +++ b/Content/Buffs/StatDebuff/BlackFlameDebuff.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; +using Terraria.DataStructures; + +namespace EldenRingItems.Content.Buffs.StatDebuff +{ + public class BlackFlameDebuff : ModBuff + { + public override void SetStaticDefaults() + { + Main.buffNoSave[Type] = true; + Main.debuff[Type] = true; + } + + public override void Update(NPC npc, ref int buffIndex) + { + DrawEffects(npc); + if (npc.buffTime[buffIndex] <= 0) + { + npc.DelBuff(buffIndex); + buffIndex--; + } + } + + public static void DrawEffects(NPC npc) + { + if (Main.rand.NextBool(2)) + { + Dust dust = Dust.NewDustDirect(npc.position, npc.width, npc.height, DustID.Wraith); + dust.noGravity = true; + dust.velocity = new Vector2(0, Main.rand.NextFloat(-3f, -5f)) + npc.velocity; + for (int i = 0; i < 3; i++) + { + Dust dust2 = Dust.NewDustDirect(npc.position + new Vector2(Main.rand.NextFloat(-10f, 10f), npc.height / 2), npc.width, npc.height, DustID.Wraith, Alpha:75); + dust2.noGravity = true; + dust2.velocity = new Vector2(Main.rand.NextFloat(-4f, 4f), Main.rand.NextFloat(-1f, -3f)) + npc.velocity; + dust2.scale = 1.2f; + } + Lighting.AddLight(npc.position, 0.05f, 0.01f, 0.01f); + } + } + } +} \ No newline at end of file diff --git a/Content/Buffs/StatDebuff/BlackFlameDebuff.png b/Content/Buffs/StatDebuff/BlackFlameDebuff.png new file mode 100644 index 0000000..d27594f Binary files /dev/null and b/Content/Buffs/StatDebuff/BlackFlameDebuff.png differ diff --git a/Content/Items/Accessories/RadahnsGreatRune.cs b/Content/Items/Accessories/RadahnsGreatRune.cs index 16c6403..39b2257 100644 --- a/Content/Items/Accessories/RadahnsGreatRune.cs +++ b/Content/Items/Accessories/RadahnsGreatRune.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.Localization; using EldenRingItems.Common.Players; +using EldenRingItems.Content.Buffs.StatBuff; namespace EldenRingItems.Content.Items.Accessories { @@ -24,8 +25,7 @@ public override void SetDefaults() public override void UpdateAccessory(Player player, bool hideVisual) { - ERIPlayer eri_player = player.GetModPlayer(); - if (eri_player.Blessed) + if (player.HasBuff()) { player.statLifeMax2 += (player.statLifeMax / 100) * LifeBonus; player.statManaMax2 += ManaBonus; diff --git a/Content/Items/Consumables/BlackFlameSpell.cs b/Content/Items/Consumables/BlackFlameSpell.cs new file mode 100644 index 0000000..4a96c3c --- /dev/null +++ b/Content/Items/Consumables/BlackFlameSpell.cs @@ -0,0 +1,49 @@ +using Terraria.ID; +using Terraria.ModLoader; +using Terraria; +using Terraria.Audio; +using EldenRingItems.Content.Buffs.StatBuff; + +namespace EldenRingItems.Content.Items.Consumables +{ + internal class BlackFlameSpell : ModItem + { + public override void SetDefaults() + { + Item.width = 28; + Item.height = 30; + Item.value = Item.sellPrice(0, 8, 0, 0); + Item.rare = ItemRarityID.LightRed; + Item.consumable = true; + Item.UseSound = new SoundStyle("EldenRingItems/Sounds/UsingSpell"); + Item.useTime = 130; + Item.useAnimation = 130; + Item.mana = 160; + Item.useStyle = ItemUseStyleID.HoldUp; + Item.maxStack = 1; + Item.buffType = ModContent.BuffType(); + Item.buffTime = 60 * 60 * 8; // 8m + } + + public override bool CanUseItem(Player player) + { + return !player.HasBuff(ModContent.BuffType()); + } + + public override bool? UseItem(Player player) + { + if(player.HasBuff(ModContent.BuffType())) + return false; + return true; + } + + public override void AddRecipes() + { + Recipe r = CreateRecipe(); + r.AddIngredient(ItemID.SpellTome); + r.AddIngredient(ItemID.SoulofNight, 25); + r.AddTile(TileID.Bookcases); + r.Register(); + } + } +} diff --git a/Content/Items/Consumables/BlackFlameSpell.png b/Content/Items/Consumables/BlackFlameSpell.png new file mode 100644 index 0000000..1eb73cb Binary files /dev/null and b/Content/Items/Consumables/BlackFlameSpell.png differ diff --git a/Content/Items/Consumables/RuneArc.cs b/Content/Items/Consumables/RuneArc.cs index 0f6e5fa..a363b09 100644 --- a/Content/Items/Consumables/RuneArc.cs +++ b/Content/Items/Consumables/RuneArc.cs @@ -4,7 +4,7 @@ using Terraria.Audio; using EldenRingItems.Common.Players; -using EldenRingItems.Content.Buffs; +using EldenRingItems.Content.Buffs.StatBuff; namespace EldenRingItems.Content.Items.Consumables { @@ -21,6 +21,7 @@ public override void SetDefaults() Item.useTime = 30; Item.useStyle = ItemUseStyleID.HoldUp; Item.maxStack = 9999; + Item.mana = 60; } public override bool CanUseItem(Player player) diff --git a/Content/Items/Materials/SomberSmithingStones/SomberSmithingStones.cs b/Content/Items/Materials/SomberSmithingStones/SomberSmithingStones.cs index 0c0be44..17e371d 100644 --- a/Content/Items/Materials/SomberSmithingStones/SomberSmithingStones.cs +++ b/Content/Items/Materials/SomberSmithingStones/SomberSmithingStones.cs @@ -161,12 +161,12 @@ public override void SetDefaults() public override void AddRecipes() { Recipe r = CreateRecipe(); - r.AddIngredient(ItemID.MythrilBar, 12); + r.AddIngredient(ItemID.TitaniumBar, 12); r.AddTile(TileID.MythrilAnvil); r.Register(); Recipe r2 = CreateRecipe(); - r2.AddIngredient(ItemID.OrichalcumBar, 12); + r2.AddIngredient(ItemID.AdamantiteBar, 12); r2.AddTile(TileID.MythrilAnvil); r2.Register(); } diff --git a/Content/Items/Weapons/Melee/BlasphemousBlade.cs b/Content/Items/Weapons/Melee/BlasphemousBlade.cs index b569328..e485588 100644 --- a/Content/Items/Weapons/Melee/BlasphemousBlade.cs +++ b/Content/Items/Weapons/Melee/BlasphemousBlade.cs @@ -99,7 +99,7 @@ public override void HoldStyle(Player player, Rectangle heldItemFrame) if (HurtCount < 7) { HoldingCount++; - if (HoldingCount == 25) // every 25 mouseRight-holding events processed + if (HoldingCount == 12) // every 12 mouseRight-holding events processed { HoldingCount = 0; HurtCount++; @@ -136,7 +136,10 @@ protected UpgradedBlasphemousBlade(int upgradeLevel) public override void SetDefaults() { - BaseDamage += UpgradeLevel * 10; + if (UpgradeLevel <= 5) + BaseDamage += UpgradeLevel * 3; + else + BaseDamage += UpgradeLevel * 10; base.SetDefaults(); } diff --git a/Content/Items/Weapons/Melee/DarkMoonGreatsword.cs b/Content/Items/Weapons/Melee/DarkMoonGreatsword.cs index 44e8b40..ef15ca4 100644 --- a/Content/Items/Weapons/Melee/DarkMoonGreatsword.cs +++ b/Content/Items/Weapons/Melee/DarkMoonGreatsword.cs @@ -14,7 +14,7 @@ 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; + public int BaseDamage { get; set; } = 85; SoundStyle IsChargedSound = new SoundStyle("EldenRingItems/Sounds/cs_c2010.649"); SoundStyle ChargedUseSound = new SoundStyle("EldenRingItems/Sounds/cs_c2010.2318"); @@ -34,8 +34,8 @@ public override void SetDefaults() Item.DamageType = DamageClass.Melee; Item.damage = BaseDamage; Item.knockBack = 5f; - Item.useTime = 20; - Item.useAnimation = 20; + Item.useTime = 27; + Item.useAnimation = 27; Item.autoReuse = true; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; @@ -50,15 +50,14 @@ public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, { if (IsCharged) { - if (MadeChargedAttacks == MAX_CHARGED_ATTACKS) + if (MadeChargedAttacks == MAX_CHARGED_ATTACKS - 1) { + Item.UseSound = SoundID.Item1; MadeChargedAttacks = 0; IsCharged = false; - return false; } - if (MadeChargedAttacks == MAX_CHARGED_ATTACKS-1) - Item.UseSound = SoundID.Item1; - MadeChargedAttacks++; + else + MadeChargedAttacks++; return true; } return false; @@ -73,6 +72,7 @@ public override void HoldStyle(Player player, Rectangle heldItemFrame) IsChargedSound.Volume = 0.6f; SoundEngine.PlaySound(IsChargedSound); Item.UseSound = ChargedUseSound; + MadeChargedAttacks = 0; IsCharged = true; } } @@ -95,6 +95,12 @@ public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 positio return false; } + public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) + { + if (!target.HasBuff(BuffID.Frostburn)) + target.AddBuff(BuffID.Frostburn, 60 * 15); // 15 seconds + } + //public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) //{ // Texture2D texture; @@ -136,7 +142,7 @@ protected UpgradedDarkMoonGreatsword(int upgradeLevel) public override void SetDefaults() { - BaseDamage += UpgradeLevel * 10; + BaseDamage += UpgradeLevel * 8; base.SetDefaults(); } diff --git a/Content/Items/Weapons/Melee/GiantCrusher.cs b/Content/Items/Weapons/Melee/GiantCrusher.cs index fb8c2cc..e128fb9 100644 --- a/Content/Items/Weapons/Melee/GiantCrusher.cs +++ b/Content/Items/Weapons/Melee/GiantCrusher.cs @@ -21,8 +21,8 @@ public override void SetDefaults() Item.DamageType = DamageClass.MeleeNoSpeed; Item.damage = BaseDamage; Item.knockBack = 9f; - Item.useTime = 30; - Item.useAnimation = 30; + Item.useTime = 25; + Item.useAnimation = 25; Item.autoReuse = true; Item.noMelee = true; Item.useTurn = true; diff --git a/Content/Items/Weapons/Melee/GreatKatana.cs b/Content/Items/Weapons/Melee/GreatKatana.cs new file mode 100644 index 0000000..a2c02a1 --- /dev/null +++ b/Content/Items/Weapons/Melee/GreatKatana.cs @@ -0,0 +1,232 @@ +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Localization; +using EldenRingItems.Content.Items.Materials.SomberSmithingStones; +using Microsoft.Xna.Framework; +using System; + +namespace EldenRingItems.Content.Items.Weapons.Melee +{ + public class GreatKatana : ModItem + { + public override string Texture => "EldenRingItems/Content/Items/Weapons/Melee/GreatKatana"; + public int BaseDamage { get; set; } = 35; + + SoundStyle IsChargedSound = new SoundStyle("EldenRingItems/Sounds/GreatKatana/ChargeSound"); + + bool CriticalHit = false; + public int CriticalHitConsequent { get; set; } = 12; + public float DamageMultiplier { get; set; } = 1.1f; + + public override LocalizedText DisplayName => base.DisplayName.WithFormatArgs(""); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(Double.Round((1.0/CriticalHitConsequent)*100, 2), DamageMultiplier); + + public override void SetDefaults() + { + Item.width = 86; + Item.height = 86; + Item.DamageType = DamageClass.Melee; + Item.damage = BaseDamage; + Item.knockBack = 6f; + Item.useTime = 30; + Item.useAnimation = 30; + Item.autoReuse = true; + Item.useTurn = true; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.value = Item.sellPrice(0, 12, 0, 0); + Item.rare = ItemRarityID.LightRed; + Item.scale = 1.5f; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(2)) + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Pot, Scale: Main.rand.NextFloat(0.3f, 0.8f)); + } + + public override void ModifyWeaponCrit(Player player, ref float crit) + { + if (CriticalHit) + crit = 100; + } + + public override void ModifyWeaponDamage(Player player, ref StatModifier damage) + { + if (CriticalHit) + damage *= DamageMultiplier; + } + + public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) + { + if(CriticalHit) + { + SoundEngine.PlaySound(SoundID.Item152); + CriticalHit = false; + } + if (Main.rand.NextBool(CriticalHitConsequent)) + CriticalHit = true; + } + + public override void AddRecipes() + { + Recipe r = CreateRecipe(); + r.AddIngredient(ItemID.Katana); + r.AddIngredient(ItemID.Muramasa); + r.AddIngredient(ItemID.CobaltBar, 8); + r.AddTile(TileID.Anvils); + r.Register(); + + Recipe r2 = CreateRecipe(); + r2.AddIngredient(ItemID.Katana); + r2.AddIngredient(ItemID.Muramasa); + r2.AddIngredient(ItemID.PalladiumBar, 8); + r2.AddTile(TileID.Anvils); + r2.Register(); + } + } + + #region Upgrade + public abstract class UpgradedGreatKatana : GreatKatana + { + public int UpgradeLevel { get; set; } + public Recipe recipe { get; set; } + public override LocalizedText Tooltip => ModContent.GetModItem(ModContent.ItemType()).Tooltip.WithFormatArgs(Double.Round((1.0/(CriticalHitConsequent))*100, 2), Double.Round(DamageMultiplier, 2)); + public override LocalizedText DisplayName => ModContent.GetModItem(ModContent.ItemType()).DisplayName.WithFormatArgs($" +{UpgradeLevel}"); + + protected UpgradedGreatKatana(int upgradeLevel) + { + UpgradeLevel = upgradeLevel; + CriticalHitConsequent -= upgradeLevel; + DamageMultiplier += UpgradeLevel / 25f; + } + + public override void SetDefaults() + { + if (UpgradeLevel <= 4) + BaseDamage += UpgradeLevel * 3; + else + BaseDamage += UpgradeLevel * 8; + base.SetDefaults(); + } + + public override void AddRecipes() + { + recipe = CreateRecipe(); + recipe.AddIngredient(SSSUtils.GetSSSByLevel(UpgradeLevel)); + recipe.AddTile(SSSUtils.GetTileByLevel(UpgradeLevel)); + } + } + + public class GreatKatana1 : UpgradedGreatKatana + { + public GreatKatana1() : base(1) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class GreatKatana2 : UpgradedGreatKatana + { + public GreatKatana2() : base(2) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class GreatKatana3 : UpgradedGreatKatana + { + public GreatKatana3() : base(3) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + public class GreatKatana4 : UpgradedGreatKatana + { + public GreatKatana4() : base(4) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class GreatKatana5 : UpgradedGreatKatana + { + public GreatKatana5() : base(5) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class GreatKatana6 : UpgradedGreatKatana + { + public GreatKatana6() : base(6) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class GreatKatana7 : UpgradedGreatKatana + { + public GreatKatana7() : base(7) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class GreatKatana8 : UpgradedGreatKatana + { + public GreatKatana8() : base(8) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class GreatKatana9 : UpgradedGreatKatana + { + public GreatKatana9() : base(9) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class GreatKatana10 : UpgradedGreatKatana + { + public GreatKatana10() : base(10) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + #endregion +} diff --git a/Content/Items/Weapons/Melee/GreatKatana.png b/Content/Items/Weapons/Melee/GreatKatana.png new file mode 100644 index 0000000..091966d Binary files /dev/null and b/Content/Items/Weapons/Melee/GreatKatana.png differ diff --git a/Content/Items/Weapons/Melee/Moonveil.cs b/Content/Items/Weapons/Melee/Moonveil.cs new file mode 100644 index 0000000..e12427e --- /dev/null +++ b/Content/Items/Weapons/Melee/Moonveil.cs @@ -0,0 +1,228 @@ +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 Moonveil : ModItem + { + public override string Texture => "EldenRingItems/Content/Items/Weapons/Melee/Moonveil"; + public int BaseDamage { get; set; } = 60; + + SoundStyle IsChargedSound = new SoundStyle("EldenRingItems/Sounds/cs_c2010.649"); + + bool IsCharged = false; + const int MAX_CHARGED_ATTACKS = 1; + 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); + + 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.LightPurple; + 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) + { + Item.damage = BaseDamage; + if (IsCharged) + { + if (MadeChargedAttacks == 0) + Item.damage = BaseDamage * 3; + if (MadeChargedAttacks == MAX_CHARGED_ATTACKS - 1) + { + Item.UseSound = SoundID.Item1; + MadeChargedAttacks = 0; + IsCharged = false; + } + else + 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.45f; + SoundEngine.PlaySound(IsChargedSound); + IsCharged = true; + } + } + } + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(3)) + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.BlueTorch, 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.Frostburn)) + target.AddBuff(BuffID.Frostburn, 60 *15); // 15 seconds + } + } + + #region Upgrade + public abstract class UpgradedMoonveil : Moonveil + { + 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 UpgradedMoonveil(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 Moonveil1 : UpgradedMoonveil + { + public Moonveil1() : base(1) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class Moonveil2 : UpgradedMoonveil + { + public Moonveil2() : base(2) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class Moonveil3 : UpgradedMoonveil + { + public Moonveil3() : base(3) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + public class Moonveil4 : UpgradedMoonveil + { + public Moonveil4() : base(4) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class Moonveil5 : UpgradedMoonveil + { + public Moonveil5() : base(5) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class Moonveil6 : UpgradedMoonveil + { + public Moonveil6() : base(6) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class Moonveil7 : UpgradedMoonveil + { + public Moonveil7() : base(7) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class Moonveil8 : UpgradedMoonveil + { + public Moonveil8() : base(8) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class Moonveil9 : UpgradedMoonveil + { + public Moonveil9() : base(9) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class Moonveil10 : UpgradedMoonveil + { + public Moonveil10() : base(10) { } + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + #endregion +} \ No newline at end of file diff --git a/Content/Items/Weapons/Melee/Moonveil.png b/Content/Items/Weapons/Melee/Moonveil.png new file mode 100644 index 0000000..1be525d Binary files /dev/null and b/Content/Items/Weapons/Melee/Moonveil.png differ diff --git a/Content/Items/Weapons/Melee/RiversOfBlood.cs b/Content/Items/Weapons/Melee/RiversOfBlood.cs index 3bffcd2..54189e4 100644 --- a/Content/Items/Weapons/Melee/RiversOfBlood.cs +++ b/Content/Items/Weapons/Melee/RiversOfBlood.cs @@ -13,14 +13,15 @@ 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; + public int BaseDamage { get; set; } = 60; SoundStyle IsChargedSound = new SoundStyle("EldenRingItems/Sounds/RiversOfBlood/ChargeSound"); + bool Hemmorhage = false; bool IsCharged = false; const int MAX_CHARGED_ATTACKS = 3; int MadeChargedAttacks = 0; - const int MANA_FOR_CHARGE = 50; + const int MANA_FOR_CHARGE = 60; public override LocalizedText DisplayName => base.DisplayName.WithFormatArgs(""); public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MANA_FOR_CHARGE); @@ -40,30 +41,30 @@ public override void SetDefaults() Item.UseSound = SoundID.Item1; Item.value = Item.sellPrice(0, 25, 0, 0); Item.rare = ItemRarityID.LightRed; - Item.shoot = ProjectileID.None; + Item.shoot = ModContent.ProjectileType(); 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) + if (MadeChargedAttacks == MAX_CHARGED_ATTACKS - 1) { + Item.UseSound = SoundID.Item1; 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++; + else + MadeChargedAttacks++; return true; } - return false; + else + { + Item.noMelee = false; + Item.noUseGraphic = false; + return false; + } } public override void HoldStyle(Player player, Rectangle heldItemFrame) @@ -72,25 +73,50 @@ public override void HoldStyle(Player player, Rectangle heldItemFrame) { 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; + IsChargedSound.Volume = 0.3f; 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)); + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Blood, Scale: Main.rand.NextFloat(0.5f, 1.2f)); } + + public static void DrawHemmorhageEffect(NPC npc) + { + Dust dust = Dust.NewDustDirect(npc.position, npc.width, npc.height, DustID.RedTorch, Alpha:180); + dust.noGravity = true; + dust.velocity = new Vector2(0, Main.rand.NextFloat(-3f, -5f)) + npc.velocity; + for (int i = 0; i < 4; i++) + { + Dust dust2 = Dust.NewDustDirect(npc.position + new Vector2(Main.rand.NextFloat(-10f, 10f), npc.height / 3f), npc.width, npc.height, DustID.Blood, Alpha: 50); + dust2.noGravity = true; + dust2.velocity = new Vector2(Main.rand.NextFloat(-4f, 4f), Main.rand.NextFloat(-1f, -3f)) + npc.velocity; + dust2.scale = 1.35f; + } + } + 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 + if (Hemmorhage) + { + Hemmorhage = false; + Item.damage = BaseDamage; + SoundEngine.PlaySound(SoundID.Item152); + for (int i = 0; i < 5; i++) + DrawHemmorhageEffect(target); + } + if (Main.rand.NextBool(6)) // 16.66 % + { + Hemmorhage = true; + Item.damage *= 2; + } } } @@ -109,7 +135,10 @@ protected UpgradedRiversOfBlood(int upgradeLevel) public override void SetDefaults() { - BaseDamage += UpgradeLevel * 8; + if (UpgradeLevel <= 5) + BaseDamage += UpgradeLevel * 3; + else + BaseDamage += UpgradeLevel * 7; base.SetDefaults(); } diff --git a/Content/Items/Weapons/Melee/SwordOfNightAndFlame.cs b/Content/Items/Weapons/Melee/SwordOfNightAndFlame.cs new file mode 100644 index 0000000..a9f3960 --- /dev/null +++ b/Content/Items/Weapons/Melee/SwordOfNightAndFlame.cs @@ -0,0 +1,220 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Localization; +using EldenRingItems.Content.Items.Materials.SomberSmithingStones; +using Microsoft.Xna.Framework; + +namespace EldenRingItems.Content.Items.Weapons.Melee +{ + public class SwordOfNightAndFlame : ModItem + { + public override string Texture => "EldenRingItems/Content/Items/Weapons/Melee/SwordOfNightAndFlame"; + public override LocalizedText DisplayName => base.DisplayName.WithFormatArgs(""); + public int BaseDamage { get; set; } = 32; + bool FlameAttack = true; + + public override void SetDefaults() + { + Item.width = 92; + Item.height = 92; + Item.DamageType = DamageClass.Melee; + Item.damage = BaseDamage; + Item.knockBack = 4f; + Item.useTime = 30; + Item.useAnimation = 30; + Item.autoReuse = true; + Item.useTurn = true; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; + Item.value = Item.sellPrice(0, 5, 0, 0); + Item.rare = ItemRarityID.LightRed; + Item.scale = 1.1f; + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (!Main.rand.NextBool(2)) + return; + if (Main.rand.NextBool(10)) + FlameAttack = !FlameAttack; + if (FlameAttack) + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Torch, Scale: Main.rand.NextFloat(0.85f, 1.3f)); + else + Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.IceTorch, Scale: Main.rand.NextFloat(0.7f, 1.1f)); + } + public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) + { + if (FlameAttack) + { + if (!target.HasBuff(BuffID.OnFire)) + target.AddBuff(BuffID.OnFire, 60 * 15); + } + else + { + if (!target.HasBuff(BuffID.Frostburn)) + target.AddBuff(BuffID.Frostburn, 60 * 15); // 15 seconds + } + } + + public override void AddRecipes() + { + Recipe r = CreateRecipe(); + r.AddIngredient(ItemID.HellstoneBar, 20); + r.AddIngredient(ItemID.SoulofNight, 3); + r.AddTile(TileID.Anvils); + r.Register(); + } + } + + #region Upgrade + public abstract class UpgradedSwordOfNightAndFlame : SwordOfNightAndFlame + { + 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 UpgradedSwordOfNightAndFlame(int upgradeLevel) + { + UpgradeLevel = upgradeLevel; + } + + public override void SetDefaults() + { + if (UpgradeLevel <= 4) // Pre-Hardmode + BaseDamage += UpgradeLevel * 3; + else + BaseDamage += UpgradeLevel * 7; + base.SetDefaults(); + } + + public override void AddRecipes() + { + recipe = CreateRecipe(); + recipe.AddIngredient(SSSUtils.GetSSSByLevel(UpgradeLevel)); + recipe.AddTile(SSSUtils.GetTileByLevel(UpgradeLevel)); + } + } + + public class SwordOfNightAndFlame1 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame1() : base(1) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame2 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame2() : base(2) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame3 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame3() : base(3) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame4 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame4() : base(4) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame5 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame5() : base(5) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame6 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame6() : base(6) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame7 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame7() : base(7) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame8 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame8() : base(8) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame9 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame9() : base(9) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + + public class SwordOfNightAndFlame10 : UpgradedSwordOfNightAndFlame + { + public SwordOfNightAndFlame10() : base(10) { } + + public override void AddRecipes() + { + base.AddRecipes(); + recipe.AddIngredient(ModContent.ItemType()); + recipe.Register(); + } + } + #endregion +} \ No newline at end of file diff --git a/Content/Items/Weapons/Melee/SwordOfNightAndFlame.png b/Content/Items/Weapons/Melee/SwordOfNightAndFlame.png new file mode 100644 index 0000000..5afa709 Binary files /dev/null and b/Content/Items/Weapons/Melee/SwordOfNightAndFlame.png differ diff --git a/EldenRingItems.csproj b/EldenRingItems.csproj index 049443d..a07ede7 100644 --- a/EldenRingItems.csproj +++ b/EldenRingItems.csproj @@ -9,7 +9,10 @@ + + + @@ -23,7 +26,12 @@ + + + + + diff --git a/Localization/en-US_Mods.EldenRingItems.hjson b/Localization/en-US_Mods.EldenRingItems.hjson index 4c9595f..89ba552 100644 --- a/Localization/en-US_Mods.EldenRingItems.hjson +++ b/Localization/en-US_Mods.EldenRingItems.hjson @@ -7,20 +7,29 @@ Items: { ''' Increases max HP by {0}% Increases maximum mana by {1} - [c/9a1b00:Gives power only to the worthy...] + [c/757575:A Great Rune of the shardbearer Radahn.] + [c/757575:Radahn was amongst the children of Rennala and Radagon,] + [c/757575:who became demigod stepchildren after Radagon's union with Queen Marika.] + [c/757575:The Great Rune burns, to resist the encroachment of the scarlet rot.] ''' } RuneArc: { - DisplayName: Rune arc - Tooltip: Gives you a blessing! + DisplayName: Rune Arc + Tooltip: + ''' + [c/757575:A shard of the shattered Elden Ring.] + [c/757575:Grants the blessing of an equipped Great Rune upon use.] + [c/757575:The lower arc of the Elden Ring is held to be the basin in which its blessings pool.] + [c/757575:Perhaps this shard originates from that very arc.] + ''' } BlasphemousBlade: { DisplayName: Blasphemous blade{0} Tooltip: ''' - When holding it in your hand, press [c/939393:right mouse button] to charge the sword + When holding it in your hand, hold [c/939393:right mouse button] to charge the sword When the sword becomes [c/0078bd:charged] it will emit a special sound Attacking from the [c/0078bd:charged state] releases super-fast blast waves that cast [c/c90000:Hellfire] on the target and replenish between [c/980000:{0}] and [c/980000:{1}] of your health @@ -144,6 +153,7 @@ Items: { 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 + All sword attacks impose a [c/a1fffd:Frostburn] debuff on the target [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.] @@ -151,19 +161,69 @@ Items: { } RiversOfBlood: { - DisplayName: Rivers Of Blood{0} + 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 the [c/0078bd:charged state] makes super-fast piercing blows Attacking from [c/939393:normal state] deals normal katana strikes + During normal strikes, the [c/c90000:16.6%] chance of [c/c90000:Hemmorhage] mode can be activated + When this mode is activated, the katana deals twice as much damage [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.] ''' } + + GreatKatana: { + DisplayName: Great Katana{0} + Tooltip: + ''' + Chance of a [c/ad0d00:supercritical hit] - [c/ad0d00:{0}%] + [c/ad0d00:Supercritical hit] increases base damage [c/ad0d00:{1}] times, and it also deals guaranteed critical damage + [c/757575:Large katana with a long, heavy blade.] + [c/757575:A weapon unique to warriors of the Land of Reeds.] + [c/757575:Designed for aggression, this armament requires the wielder to throw their entire body into swinging it.] + ''' + } + + SwordOfNightAndFlame: { + DisplayName: Sword of Night and Flame{0} + Tooltip: + ''' + Inflicts 2 debuffs on the target in random order: [c/d34e02:On Fire!] and [c/a1fffd:Ice Burn] + [c/757575:Storied sword and treasure of Caria Manor. One of the legendary armaments.] + [c/757575:Astrologers, who preceded the sorcerers, established themselves in mountaintops that] + [c/757575:nearly touched the sky, and considered the Fire Giants their neighbors.] + ''' + } + + Moonveil: { + DisplayName: Moonveil{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] deals 3 times more damage and also + unleashes a huge, super-fast arc that pierces through everything + Attack from [c/939393:normal state] deals normal katana strikes + [c/757575:Katana forged of glintstone.] + [c/757575:Masterpiece of a Sellian swordsmith. ] + [c/757575:Light enwreathes the blade when sheathed, explaining its Moonveil moniker.] + ''' + } + + BlackFlameSpell: { + DisplayName: Black Flame Spell + Tooltip: + ''' + Melee attacks set enemies on black flame + [c/757575:Black flame is weighty.] + [c/757575:After dealing damage it continues to sap foes' HP for a very short time.] + ''' + } } Buffs: { @@ -171,6 +231,16 @@ Buffs: { DisplayName: Blessing Description: You are blessed, the runes give you strength! } + + WeaponImbueBlackFlame: { + DisplayName: Weapon Imbue: Black Flame + Description: Melee attacks set enemies on black flame + } + + BlackFlameDebuff: { + DisplayName: Black Flame + Description: Empty + } } Projectiles: { @@ -178,4 +248,5 @@ Projectiles: { GiantCrusherProj.DisplayName: Giant Crusher Proj DarkMoonGreatswordProj.DisplayName: Dark Moon Greatsword Proj RiversOfBloodProj.DisplayName: Rivers Of Blood Proj + MoonveilProj.DisplayName: Moonveil Proj } diff --git a/Localization/ru-RU_Mods.EldenRingItems.hjson b/Localization/ru-RU_Mods.EldenRingItems.hjson index eceeafc..bd4c277 100644 --- a/Localization/ru-RU_Mods.EldenRingItems.hjson +++ b/Localization/ru-RU_Mods.EldenRingItems.hjson @@ -7,13 +7,22 @@ Items: { ''' Увеличивает максимальный запас здоровья на {0}% Увеличивает максимум маны на {1} - [c/9a1b00:Даёт силу только достойным...] + [c/757575:Великая руна хозяина осколка Радана Бича Звёзд.] + [c/757575:Полубог Радан — один из детей Ренналы и Радагона.] + [c/757575:После того, как Радагон женился на Марике, Радан стал пасынком королевы.] + [c/757575:Правая сторона руны полыхает огнём, отгоняющим красную гниль.] ''' } RuneArc: { DisplayName: Руническая дуга - Tooltip: Наделяет вас благословением! + Tooltip: + ''' + [c/757575:Осколок разбитого Кольца Элден.] + [c/757575:При использовании дарует благословение вашим великим рунам.] + [c/757575:Нижняя дуга разбитого Кольца Элден скапливает благоденствие.] + [c/757575:Возможно, именно этот осколок появился от той самой дуги.] + ''' } BlasphemousBlade: { @@ -139,11 +148,12 @@ Items: { DisplayName: Двуручник тёмной луны{0} Tooltip: ''' - При взятии в руку, зажмите [c/939393:правую кнопку мыши] для зарядки меча (тратит [c/4110a3:{0}] маны) + При взятии в руку, нажмите [c/939393:правую кнопку мыши] для зарядки меча (тратит [c/4110a3:{0}] маны) Когда меч станет [c/0078bd:заряжённым] он издаст специальный звук, а также в инвентаре он станет ярче Атака из [c/0078bd:заряжённого состояния] выпускает сверхбыстрые волны Меч потеряет заряд (после нанесении [c/980000:{1}] [c/0078bd:заряжённых] ударов) Атака из [c/939393:обычного состояния] наносит обычные удары мечём + Все атаки меча накладывают дебафф [c/a1fffd:Ледяной ожог] на цель [c/757575:Лунный двуручник, который карианские королевы традиционно дарят своим супругам.] [c/757575:Легендарное оружие.] [c/757575:Символ Ренни — полная луна, холодная и мрачная, а этот меч — не что иное, как частица её сияния.] @@ -154,16 +164,66 @@ Items: { DisplayName: Реки крови{0} Tooltip: ''' - При взятии в руку, зажмите [c/939393:правую кнопку мыши] для зарядки меча (тратит [c/4110a3:{0}] маны) + При взятии в руку, нажмите [c/939393:правую кнопку мыши] для зарядки меча (тратит [c/4110a3:{0}] маны) Когда меч станет [c/0078bd:заряжённым] он издаст специальный звук - Атака из [c/0078bd:заряжённого состояния] делает сверхбыстрые пробивающие удары, которые накладывают дебафф [c/4110a3:Кислотный Яд] на цель + Атака из [c/0078bd:заряжённого состояния] делает сверхбыстрые пробивающие удары Атака из [c/939393:обычного состояния] наносит обычные удары катаной + При обычных ударах, с шансом [c/c90000:16.6%] может активироваться режим [c/c90000:Кровотечения] + Под действием этого режима, катана наносит в два раза больше урона [c/757575:Оружие Окины, мечника из Страны тростника.] [c/757575:Проклятое оружие, убившее бесчисленное количество людей.] [c/757575:Когда Мог Повелитель Крови впервые ощутил на собственной плоти меч Окины и его безумие,] [c/757575:он предложил мечнику жизнь демона, чья жажда никогда не останется неутолённой.] ''' } + + GreatKatana: { + DisplayName: Большая катана{0} + Tooltip: + ''' + Вероятность [c/ad0d00:сверхкритического удара] - [c/ad0d00:{0}%] + [c/ad0d00:Сверхкритический удар] увечивает базовый урон [cad0d00:{1}] раза, а также он наносит гарантированый критический урон + [c/757575:Большая катана с длинным увесистым клинком.] + [c/757575:Оружие воинов из Страны тростника.] + [c/757575:Чтобы размахивать этим грозным оружием, нужно напрячься всем телом.] + ''' + } + + SwordOfNightAndFlame: { + DisplayName: Меч ночи и пламени{0} + Tooltip: + ''' + Накладывает на цель 2 дебаффа в случайном порядке: [c/d34e02:В огне!] и [c/a1fffd:Ледяной ожог] + [c/757575:Знаменитый меч из поместья Карии. Легендарное оружие.] + [c/757575:Чародеи — потомки астрологов.] + [c/757575:Их пращуры населяли горные вершины, почти касающиеся небес, а по соседству с ними жили огненные великаны.] + ''' + } + + Moonveil: { + DisplayName: Лунная вуаль{0} + Tooltip: + ''' + При взятии в руку, нажмите [c/939393:правую кнопку мыши] для зарядки меча (тратит [c/4110a3:{0}] маны) + Когда меч станет [c/0078bd:заряжённым] он издаст специальный звук + Атака из [c/0078bd:заряжённого состояния] наносит в 4 раза больше урона, а также + выпускает огромную сверхбыструю дугу, которая пробивает всё + Атака из [c/939393:обычного состояния] наносит обычные удары катаной + [c/757575:Катана, выкованная из блестящего камня.] + [c/757575:Шедевр селлийских кузнецов.] + [c/757575:Когда катана вложена в ножны, её окутывает свет, отсюда и название — "Лунная вуаль"".] + ''' + } + + BlackFlameSpell: { + DisplayName: Заклинание чёрного пламени + Tooltip: + ''' + Атаки ближнего боя поджигают врагов чёрным пламенем + [c/757575:Чёрному пламени присуща особая плотность.] + [c/757575:Опалив врагов, оно ещё пару мгновений будет поглощать их здоровье.] + ''' + } } Buffs: { @@ -171,6 +231,16 @@ Buffs: { DisplayName: Благословение Description: Вы благословлены, Великие Руны дают вам силу! } + + WeaponImbueBlackFlame: { + DisplayName: Насыщение оружия: Чёрное пламя + Description: Атаки ближнего боя поджигают врагов чёрным пламенем + } + + BlackFlameDebuff: { + DisplayName: Чёрное пламя + Description: Пусто + } } Projectiles: { @@ -178,4 +248,5 @@ Projectiles: { // GiantCrusherProj.DisplayName: Giant Crusher Proj // DarkMoonGreatswordProj.DisplayName: Dark Moon Greatsword Proj // RiversOfBloodProj.DisplayName: Rivers Of Blood Proj + // MoonveilProj.DisplayName: Moonveil Proj } diff --git a/Projectiles/Melee/DarkMoonGreatswordProj.cs b/Projectiles/Melee/DarkMoonGreatswordProj.cs index 4310399..dd7a03c 100644 --- a/Projectiles/Melee/DarkMoonGreatswordProj.cs +++ b/Projectiles/Melee/DarkMoonGreatswordProj.cs @@ -33,6 +33,8 @@ public override void AI() public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { + if (!target.HasBuff(BuffID.Frostburn)) + target.AddBuff(BuffID.Frostburn, 60 * 15); // 15 seconds Player player = Main.player[Projectile.owner]; float numberOfDusts = 24f; float rotFactor = 360f / numberOfDusts; diff --git a/Projectiles/Melee/MoonveilProj.cs b/Projectiles/Melee/MoonveilProj.cs new file mode 100644 index 0000000..851c887 --- /dev/null +++ b/Projectiles/Melee/MoonveilProj.cs @@ -0,0 +1,55 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Audio; + +namespace EldenRingItems.Projectiles.Melee +{ + public class MoonveilProj : ModProjectile + { + public SoundStyle hitSound = new SoundStyle("EldenRingItems/Sounds/cs_c3320_13"); + public override string Texture => "EldenRingItems/Projectiles/Melee/DarkMoonGreatswordProj"; + + public override void SetDefaults() + { + Projectile.width = 50; + Projectile.height = 18; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.extraUpdates = 1; + Projectile.penetrate = -1; + Projectile.timeLeft = 300; + Projectile.friendly = true; + Projectile.scale = 3f; + } + + public override void AI() + { + Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2; + Dust d1 = Dust.NewDustPerfect(Projectile.Top, DustID.BlueTorch, Scale: Main.rand.NextFloat(0.5f, 1.2f)); + Dust d2 = Dust.NewDustPerfect(Projectile.Center, DustID.BlueTorch, Scale: Main.rand.NextFloat(0.5f, 1.2f)); + Dust d3 = Dust.NewDustPerfect(Projectile.Bottom, DustID.BlueTorch, Scale: Main.rand.NextFloat(0.5f, 1.2f)); + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (!target.HasBuff(BuffID.Frostburn)) + target.AddBuff(BuffID.Frostburn, 60 * 15); // 15 seconds + 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); + } + } + } +} diff --git a/Projectiles/Melee/MoonveilProj.png b/Projectiles/Melee/MoonveilProj.png new file mode 100644 index 0000000..11af628 Binary files /dev/null and b/Projectiles/Melee/MoonveilProj.png differ diff --git a/Projectiles/Melee/RiversOfBloodProj.cs b/Projectiles/Melee/RiversOfBloodProj.cs index ad17124..141e3f5 100644 --- a/Projectiles/Melee/RiversOfBloodProj.cs +++ b/Projectiles/Melee/RiversOfBloodProj.cs @@ -11,14 +11,13 @@ 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; + Main.projFrames[Projectile.type] = 8; } bool Slashing = false; - int NumHits = 0; public override void SetDefaults() { @@ -31,9 +30,10 @@ public override void SetDefaults() Projectile.penetrate = -1; Projectile.alpha = 0; Projectile.frameCounter = 0; - Projectile.timeLeft = 25; + Projectile.timeLeft = 30; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 12; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.scale = 1.15f; } public override bool PreDraw(ref Color lightColor) @@ -58,7 +58,7 @@ public override void AI() if (Slashing) { Projectile.frameCounter++; - if (Projectile.frameCounter % 5 == 0) + if (Projectile.frameCounter % 3 == 0) Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Vector2 playerRotatedPoint = Main.player[Projectile.owner].RotatedRelativePoint(Main.player[Projectile.owner].MountedCenter, true); @@ -86,11 +86,9 @@ public override void AI() } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - HitSound.Volume = Main.rand.NextFloat(0.3f, 0.6f); + HitSound.Volume = Main.rand.NextFloat(0.2f, 0.45f); 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 index 44353f3..17b3885 100644 Binary files a/Projectiles/Melee/RiversOfBloodProj.png and b/Projectiles/Melee/RiversOfBloodProj.png differ diff --git a/Sounds/UsingSpell.ogg b/Sounds/UsingSpell.ogg new file mode 100644 index 0000000..e5a668b Binary files /dev/null and b/Sounds/UsingSpell.ogg differ diff --git a/build.txt b/build.txt index 557cf30..3272388 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ displayName = Elden Ring Items author = rzc0d3r -version = 0.0.6 \ No newline at end of file +version = 0.0.7 \ No newline at end of file