Skip to content

Commit

Permalink
Update to v0.0.3
Browse files Browse the repository at this point in the history
1. New weapon added: Giant crusher
The weapon is similar in mechanics to the boomerang and possessed hatchet, but with the ability to penetrate multiple targets.
Also goes through walls and blocks!

Drops from Golem with a 100% chance of success

2. Blasphemous blade Update
* Sprite redraw!
* Reduced base damage from 75 to 55
* Reduced the sword's charge damage multiplier from 3 to 1.76
* Reduced the maximum amount of health a sword can regenerate from 200 to 150
* Sword now takes between 10 and 20 of the player's health when charging, instead of the constant 18
* Reduced rarity from Light Purple(6) to Light Red(4) to symbolize that this sword is an early hardmode sword

3. Fixed localization issues
  • Loading branch information
rzc0d3r authored Sep 10, 2024
1 parent a28083e commit 7cf7a10
Show file tree
Hide file tree
Showing 11 changed files with 177 additions and 25 deletions.
5 changes: 4 additions & 1 deletion Common/NPCLootDrop/NPCLootDrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ public class NPCLootDrop : GlobalNPC
{
public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
{
// BlasphemousBlade
// Blasphemous Blade
if (npc.type == NPCID.BloodEelHead)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<BlasphemousBlade>(), 12));
if (npc.type == NPCID.BloodNautilus)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<BlasphemousBlade>(), 4));
// Rune Arc
if (npc.type == NPCID.Pixie)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<RuneArc>(), 8));
// Gian Crusher
if (npc.type == NPCID.Golem)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<GiantCrusher>(), 1));
}
}
}
34 changes: 19 additions & 15 deletions Content/Items/Weapons/Melee/BlasphemousBlade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,25 @@ public class BlasphemousBlade : ModItem
bool BonusLimit = false;

// Blade default properties (without holding bonus)
int BaseDamage = 75;
int BaseDamage = 55;
float BaseKnockBack = 5f;
float BaseShootSpeed = 14f;

SoundStyle BladeMaxChargeSound = new SoundStyle("EldenRingItems/Sounds/TogethaAsFamilee");
SoundStyle BladeStartChargingSound = new SoundStyle("EldenRingItems/Sounds/DemonshadeEnrage");

public override void SetStaticDefaults()
{
// 20 - Number of ticks after which the frame will change (3.5 frames per 60FPS); 8 - Quantity of frames in a blade texture
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(17, 8));
// Allows animation rendering not only in the inventory, but also in the world
ItemID.Sets.AnimatesAsSoul[Type] = true;
}
SoundStyle BladeShootSound = SoundID.Item60;

//public override void SetStaticDefaults()
//{
// // 20 - Number of ticks after which the frame will change (3.5 frames per 60FPS); 8 - Quantity of frames in a blade texture
// Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(17, 8));
// // Allows animation rendering not only in the inventory, but also in the world
// ItemID.Sets.AnimatesAsSoul[Type] = true;
//}

public override void SetDefaults()
{
Item.width = 94;
Item.width = 92;
Item.height = 92;
Item.DamageType = DamageClass.Melee;
Item.damage = BaseDamage;
Expand All @@ -48,7 +49,7 @@ public override void SetDefaults()
Item.useStyle = ItemUseStyleID.Swing;
Item.UseSound = SoundID.Item1;
Item.value = Item.sellPrice(0, 75, 0, 0);
Item.rare = ItemRarityID.LightPurple;
Item.rare = ItemRarityID.LightRed;

Item.shoot = ModContent.ProjectileType<BloodSlash>();
Item.shootSpeed = BaseShootSpeed;
Expand Down Expand Up @@ -82,11 +83,14 @@ public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source,
{
MadeChargedAttacks++;
SoundEngine.PlaySound(SoundID.Item73, position);
player.Heal(Main.rand.Next(15, 41));
player.Heal(Main.rand.Next(15, 31));
}
}
else
SoundEngine.PlaySound(SoundID.Item60, position);
{
BladeShootSound.Volume = 0.5f;
SoundEngine.PlaySound(BladeShootSound, position);
}
return true;
}

Expand All @@ -98,10 +102,10 @@ public override void HoldStyle(Player player, Rectangle heldItemFrame)
{
HoldingCount++;
HoldingDamageBonus += 0.003f;
Item.damage = Convert.ToInt32(BaseDamage * HoldingDamageBonus);
Item.damage = Convert.ToInt32(BaseDamage * (HoldingDamageBonus/1.7));
if (HoldingCount == 25) // Take away player's health every 25 mouseRight-holding events processed
{
player.Hurt(PlayerDeathReason.ByCustomReason(""), 18, player.direction, armorPenetration: 1000);
player.Hurt(PlayerDeathReason.ByCustomReason(""), Main.rand.Next(10, 21), player.direction, armorPenetration: 1000);
HoldingCount = 0;
}
}
Expand Down
Binary file modified Content/Items/Weapons/Melee/BlasphemousBlade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions Content/Items/Weapons/Melee/GiantCrusher.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using Terraria.DataStructures;
using Microsoft.Xna.Framework;
using System;
using EldenRingItems.Projectiles.Melee;

namespace EldenRingItems.Content.Items.Weapons.Melee
{
public class GiantCrusher : ModItem
{
public override void SetDefaults()
{
Item.width = 120;
Item.height = 120;
Item.noUseGraphic = true;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.damage = 110;
Item.knockBack = 9f;
Item.useTime = 30;
Item.useAnimation = 30;
Item.autoReuse = true;
Item.noMelee = true;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.noUseGraphic = true;
Item.UseSound = SoundID.Item1;
Item.value = Item.sellPrice(0, 20, 0, 0);
Item.rare = ItemRarityID.Lime;
Item.shoot = ModContent.ProjectileType<GiantCrusherProj>();
Item.shootSpeed = 17f;
}

}


}
Binary file added Content/Items/Weapons/Melee/GiantCrusher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 17 additions & 4 deletions Localization/en-US_Mods.EldenRingItems.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,34 @@ Items: {
}

RuneArc: {
DisplayName: Rune Arc
DisplayName: Rune arc
Tooltip: Gives you a blessing!
}

BlasphemousBlade: {
DisplayName: Blasphemous Blade
DisplayName: Blasphemous blade
Tooltip:
'''
When holding it in your hand, press [c/939393:right mouse button] to increase the damage [c/757575:(in exchange for health)].
When the sword has taken the right amount of your health it will become [c/0078bd:charged] and make 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:75] and [c/980000:200] of your health
on the target and replenish between [c/980000:75] and [c/980000:150] of your health
Attack from [c/939393:Normal State] strikes with a blood wave that replenishes [c/980000:1] to [c/980000:5] of your health.
[c/757575:Sacred Sword of Rickard, Blasphemous Lord].
[c/75757575:The remains of the countless heroes he devoured wriggle on the surface of this blade].
[c/75757575:They are now one family, bound by ties of blood]
'''
}

GiantCrusher: {
DisplayName: Giant crusher
Tooltip:
'''
[c/757575:A hammer made from a boulder, used in the War against the Giants.]
[c/757575:One of the heftiest weapons in the entire Lands Between.]
[c/757575:After the giants were quelled, and man turned against man in violence, this weapon was all but forgotten.]
'''
}
}

Buffs: {
Expand All @@ -39,4 +49,7 @@ Buffs: {
}
}

Projectiles.BloodSlash.DisplayName: Blood Slash
Projectiles: {
BloodSlash.DisplayName: Blood Slash
GiantCrusherProj.DisplayName: Giant Crusher Proj
}
17 changes: 15 additions & 2 deletions Localization/ru-RU_Mods.EldenRingItems.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,23 @@ Items: {
При взятии в руку, зажмите [c/939393:правую кнопку мыши] для увеличения урона [c/757575:(взамен на здоровье)]
Когда меч возьмёт себе нужное количество вашего здоровья он станет [c/0078bd:заряжённым] и издаст специальный звук
Атака из [c/0078bd:заряжённого состояния] выпускает сверхбыстрые взрывные волны, которые накладывают [c/c90000:Адский Огонь]
на цель и восполняют от [c/980000:75] до [c/980000:200] вашего здоровья
на цель и восполняют от [c/980000:75] до [c/980000:150] вашего здоровья
Атака из [c/939393:обычного состояния] наносит удары кровавой волной, которая восполняет от [c/980000:1] до [c/980000:5] вашего здоровья.
[c/757575:Священный меч Рикарда, богохульного владыки]
[c/757575:Останки бесчисленных героев, которых он поглотил, извиваются на поверхности этого клинка]
[c/757575:Теперь они — одна семья, связанная узами крови]
'''
}

GiantCrusher: {
DisplayName: Гроза великанов
Tooltip:
'''
[c/757575:Молот из огромного валуна, применявшийся в Великанской войне.]
[c/757575:В Междуземье практически нет равных ему в мощи.]
[c/757575:Когда великанов сокрушили, а человек обратился против человека, это оружие почти кануло в безвестность.]
'''
}
}

Buffs: {
Expand All @@ -39,4 +49,7 @@ Buffs: {
}
}

Projectiles.BloodSlash.DisplayName: Blood Slash
Projectiles: {
BloodSlash.DisplayName: Blood Slash
// GiantCrusherProj.DisplayName: Giant Crusher Proj
}
2 changes: 0 additions & 2 deletions Projectiles/Melee/BloodSlash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using Terraria.ID;
using Terraria.ModLoader;

using EldenRingItems.Content.Items.Weapons;

namespace EldenRingItems.Projectiles.Melee
{
public class BloodSlash : ModProjectile
Expand Down
82 changes: 82 additions & 0 deletions Projectiles/Melee/GiantCrusherProj.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System;
using System.IO;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;

namespace EldenRingItems.Projectiles.Melee
{
public class GiantCrusherProj : ModProjectile
{
public override string Texture => "EldenRingItems/Content/Items/Weapons/Melee/GiantCrusher";
public static readonly SoundStyle hitSound = new("EldenRingItems/Sounds/GiantCrusherProjHit") { Volume = 0.2f };
public bool returnProj = false;
public bool projHadHit = false;

public override void SetDefaults()
{
Projectile.width = 120;
Projectile.height = 120;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.extraUpdates = 1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 120;
Projectile.tileCollide = false;
Projectile.penetrate = 3;
Projectile.alpha = 100;
}

public override void AI()
{
Player player = Main.player[Projectile.owner];
Vector2 direction = player.Center - Projectile.Center;
float distance = direction.Length();

if (distance > 850f && !returnProj) // maximum distance a projectile can travel
returnProj = true;
else if (distance < 80f && returnProj)
Projectile.Kill();
else if (returnProj)
{
direction.Normalize();
direction *= 17f;
Projectile.velocity = direction;
}

Lighting.AddLight(Projectile.Center, 0.322f, 0.082f, 0.027f);

Projectile.rotation += 0.25f * Projectile.direction;
Projectile.alpha -= 2;

// Stone Dust
if (Main.rand.NextBool(5)) // only spawn 20% of the time
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Stone, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f, 150);
}

public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
Player player = Main.player[Projectile.owner];
float numberOfDusts = 36f;
float rotFactor = 360f / numberOfDusts;
for (int i = 0; i < numberOfDusts; i++)
{
float rot = MathHelper.ToRadians(i * rotFactor);
Vector2 offset = new Vector2(3.6f, 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 4.1f));
Vector2 velOffset = new Vector2(3f, 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 4.1f));
Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, DustID.Stone, new Vector2(velOffset.X, velOffset.Y));
dust.noGravity = true;
dust.velocity = velOffset;
dust.scale = Main.rand.NextFloat(1f, 2f);
}
if (!projHadHit) // fixes a bug with repeated playback of the hit sound
{
SoundEngine.PlaySound(hitSound, Projectile.Center);
projHadHit = true;
}
Projectile.ai[1] = target.whoAmI;
}
}
}
Binary file added Sounds/GiantCrusherProjHit.ogg
Binary file not shown.
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
displayName = Elden Ring Items
author = rzc0d3r
version = 0.0.2
version = 0.0.3

0 comments on commit 7cf7a10

Please sign in to comment.