-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
11 changed files
with
177 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} | ||
|
||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |