Skip to content

Commit

Permalink
Update to v0.0.7
Browse files Browse the repository at this point in the history
1. Added 3 new weapons: Great Katana, Sword of Night and Flame, Moonveil

2. Added a new consumable item: Black Flame Spell
2.1 Added a new buff: Weapon Inbue: Black Flame
2.2 Added a new debuff: Black Flame

3. Update for Rune Arc:
* Now requires 60 mana to use

4. Update for Blasphemous blade
* Accelerated sword charging by 2.08 times

5. Update for Dark Moon Greatsword.
* Added "Ice Burn" debuff when hitting a target.
* Reduced base damage from 100 to 85
* Increased attack time from 20 to 27
* Reduced the increase in base damage when forging darkness stones from 10 to 8 per level.

6. Update for Rivers of Blood
* Resprite charged attack!
* Removed the "Venom" debuff on the target on impact
* Increased the amount of mana required to charge a katana from 50 to 60
* Reduced the number of invulnerability frames after a charged strike from 12 to 10 (DPS boost)
* Reduced the volume of the charge sound by 25%
* Reduced the sound volume of charged attacks by 15%
* Reduced base damage from 65 to 60
* Reduced the base damage increase for Somber Smithing Stones [1-5] from 8 to 3 per level.
* Reduced the base damage increase for the Somber Smithing Stones [6-10] from 8 to 7 for each level.
* Increased the size of the charged attack by 15%
* Added Hemmorhage: On normal hits, with a 16.6% chance, this mode can be activated,
Under this mode, the katana deals twice as much damage.

7. Update for Blasphemous Blade
* Reduced the increase in base damage when forging darkness stones [1-5] from 10 to 3 for each level

8. Updates for Giant Crusher
* Reduced the attack time from 30 to 25

9. Fixed a bug in the crafting of Somber Smithing Stones [7]
New Craft: 12 Titanium Bar / 12 Adamantite Bar
Workstation: Mythril Anvil / Orichalcum Anvil

10. Fixed bug with sticking action on the right mouse button in all weapons!!!
Bug description: you could use the right mouse button action only after discharging the weapon and ONE ADDITIONAL hit.
Now you can immediately use the right mouse button action after discharging the weapon.

11. Clarified some descriptions of things in all localizations
  • Loading branch information
rzc0d3r authored Sep 18, 2024
1 parent 6fe0db3 commit 0b8d8ea
Show file tree
Hide file tree
Showing 34 changed files with 1,177 additions and 61 deletions.
20 changes: 20 additions & 0 deletions Common/GlobalsNPCs/DamageOverTimeGlobalNPC.cs
Original file line number Diff line number Diff line change
@@ -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<BlackFlameDebuff>())
{
damage = 5;
npc.lifeRegen -= damage*5*2; // damage * 4 per second
}
}
}
}
5 changes: 5 additions & 0 deletions Common/NPCLootDrop/NPCLootDrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<RiversOfBlood>(), 12));
if (npc.type == NPCID.BloodNautilus)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<RiversOfBlood>(), 4));
// Moonveil
if (npc.type == NPCID.BlueArmoredBonesSword)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<Moonveil>(), 12));
if (npc.type == NPCID.WyvernHead)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<Moonveil>(), 25));
}
}
}
31 changes: 29 additions & 2 deletions Common/Players/ERIPlayer.cs
Original file line number Diff line number Diff line change
@@ -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<MeleeDamageClass>() && !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<MeleeDamageClass>())
{
target.AddBuff(ModContent.BuffType<BlackFlameDebuff>(), 60*3);
}
}
}
}
23 changes: 23 additions & 0 deletions Content/Buffs/StatBuff/BlessingBuff.cs
Original file line number Diff line number Diff line change
@@ -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<ERIPlayer>().Blessed = true;
}
}
}
Binary file added Content/Buffs/StatBuff/BlessingBuff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Content/Buffs/StatBuff/WeaponImbueBlackFlame.cs
Original file line number Diff line number Diff line change
@@ -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<ERIPlayer>().WeaponImbueBlackFlame = true;
player.MeleeEnchantActive = true;
}
}
}
Binary file added Content/Buffs/StatBuff/WeaponImbueBlackFlame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions Content/Buffs/StatDebuff/BlackFlameDebuff.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
}
Binary file added Content/Buffs/StatDebuff/BlackFlameDebuff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Content/Items/Accessories/RadahnsGreatRune.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Terraria;
using Terraria.Localization;
using EldenRingItems.Common.Players;
using EldenRingItems.Content.Buffs.StatBuff;

namespace EldenRingItems.Content.Items.Accessories
{
Expand All @@ -24,8 +25,7 @@ public override void SetDefaults()

public override void UpdateAccessory(Player player, bool hideVisual)
{
ERIPlayer eri_player = player.GetModPlayer<ERIPlayer>();
if (eri_player.Blessed)
if (player.HasBuff<BlessingBuff>())
{
player.statLifeMax2 += (player.statLifeMax / 100) * LifeBonus;
player.statManaMax2 += ManaBonus;
Expand Down
49 changes: 49 additions & 0 deletions Content/Items/Consumables/BlackFlameSpell.cs
Original file line number Diff line number Diff line change
@@ -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<WeaponImbueBlackFlame>();
Item.buffTime = 60 * 60 * 8; // 8m
}

public override bool CanUseItem(Player player)
{
return !player.HasBuff(ModContent.BuffType<WeaponImbueBlackFlame>());
}

public override bool? UseItem(Player player)
{
if(player.HasBuff(ModContent.BuffType<WeaponImbueBlackFlame>()))
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();
}
}
}
Binary file added Content/Items/Consumables/BlackFlameSpell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion Content/Items/Consumables/RuneArc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
7 changes: 5 additions & 2 deletions Content/Items/Weapons/Melee/BlasphemousBlade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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();
}

Expand Down
24 changes: 15 additions & 9 deletions Content/Items/Weapons/Melee/DarkMoonGreatsword.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
}
}
Expand All @@ -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;
Expand Down Expand Up @@ -136,7 +142,7 @@ protected UpgradedDarkMoonGreatsword(int upgradeLevel)

public override void SetDefaults()
{
BaseDamage += UpgradeLevel * 10;
BaseDamage += UpgradeLevel * 8;
base.SetDefaults();
}

Expand Down
4 changes: 2 additions & 2 deletions Content/Items/Weapons/Melee/GiantCrusher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 0b8d8ea

Please sign in to comment.