-
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.
- Loading branch information
Showing
25 changed files
with
476 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Terraria.GameContent.ItemDropRules; | ||
using Terraria.ModLoader; | ||
using Terraria; | ||
using Terraria.ID; | ||
|
||
using EldenRingItems.Content.Items.Weapons.Melee; | ||
using EldenRingItems.Content.Items.Consumables; | ||
|
||
namespace EldenRingItems.Common.NPCLootDrop | ||
{ | ||
public class NPCLootDrop : GlobalNPC | ||
{ | ||
public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot) | ||
{ | ||
// BlasphemousBlade | ||
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)); | ||
} | ||
} | ||
} |
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,18 @@ | ||
using Terraria.ModLoader; | ||
|
||
namespace EldenRingItems.Common.Players | ||
{ | ||
public class ERIPlayer : ModPlayer | ||
{ | ||
public bool Blessed; | ||
|
||
public override void ResetEffects() | ||
{ | ||
} | ||
|
||
public override void OnRespawn() | ||
{ | ||
Blessed = false; | ||
} | ||
} | ||
} |
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,22 @@ | ||
using Terraria; | ||
using Terraria.ModLoader; | ||
using EldenRingItems.Common.Players; | ||
|
||
namespace EldenRingItems.Content.Buffs | ||
{ | ||
public class BlessingBuff : ModBuff | ||
{ | ||
public override void SetStaticDefaults() | ||
{ | ||
Main.buffNoSave[Type] = true; | ||
Main.buffNoTimeDisplay[Type] = true; | ||
Main.debuff[Type] = true; | ||
} | ||
|
||
public override void Update(Player player, ref int buffIndex) | ||
{ | ||
if (!player.dead) | ||
player.GetModPlayer<ERIPlayer>().Blessed = true; | ||
} | ||
} | ||
} |
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,47 @@ | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
using Terraria; | ||
using Terraria.Localization; | ||
using EldenRingItems.Common.Players; | ||
|
||
namespace EldenRingItems.Content.Items.Accessories | ||
{ | ||
public class RadahnsGreatRune : ModItem | ||
{ | ||
public static readonly int LifeBonus = 15; | ||
public static readonly int ManaBonus = 60; | ||
|
||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(LifeBonus, ManaBonus); | ||
|
||
public override void SetDefaults() | ||
{ | ||
Item.width = 32; | ||
Item.height = 32; | ||
Item.value = Item.buyPrice(0, 7, 50, 0); | ||
Item.rare = ItemRarityID.Lime; | ||
Item.accessory = true; | ||
} | ||
|
||
public override void UpdateAccessory(Player player, bool hideVisual) | ||
{ | ||
ERIPlayer eri_player = player.GetModPlayer<ERIPlayer>(); | ||
if (eri_player.Blessed) | ||
{ | ||
player.statLifeMax2 += (player.statLifeMax / 100) * LifeBonus; | ||
player.statManaMax2 += ManaBonus; | ||
} | ||
} | ||
|
||
public override void AddRecipes() | ||
{ | ||
Recipe r = CreateRecipe(); | ||
r.AddIngredient(ItemID.PixieDust, 100); | ||
r.AddIngredient(ItemID.CrystalShard, 25); | ||
r.AddIngredient(ItemID.SoulofNight, 6); | ||
r.AddIngredient(ItemID.SoulofLight, 6); | ||
r.AddIngredient(ItemID.LifeCrystal, 1); | ||
r.AddIngredient(ItemID.ManaCrystal, 1); | ||
r.Register(); | ||
} | ||
} | ||
} |
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,45 @@ | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
using Terraria; | ||
using Terraria.Audio; | ||
|
||
using EldenRingItems.Common.Players; | ||
using EldenRingItems.Content.Buffs; | ||
|
||
namespace EldenRingItems.Content.Items.Consumables | ||
{ | ||
internal class RuneArc : ModItem | ||
{ | ||
public override void SetDefaults() | ||
{ | ||
Item.width = 20; | ||
Item.height = 40; | ||
Item.value = Item.sellPrice(0, 0, 50, 0); | ||
Item.rare = ItemRarityID.Orange; | ||
Item.consumable = true; | ||
Item.UseSound = new SoundStyle("EldenRingItems/Sounds/RetrieveLostRunes"); | ||
Item.useTime = 30; | ||
Item.useStyle = ItemUseStyleID.HoldUp; | ||
Item.maxStack = 9999; | ||
} | ||
|
||
public override bool CanUseItem(Player player) | ||
{ | ||
ERIPlayer eri_player = player.GetModPlayer<ERIPlayer>(); | ||
return !player.HasBuff(ModContent.BuffType<BlessingBuff>()); | ||
} | ||
|
||
public override bool? UseItem(Player player) | ||
{ | ||
if(player.HasBuff(ModContent.BuffType<BlessingBuff>())) | ||
return false; | ||
if (player.whoAmI == Main.myPlayer) | ||
{ | ||
ERIPlayer eri_player = player.GetModPlayer<ERIPlayer>(); | ||
player.AddBuff(ModContent.BuffType<BlessingBuff>(), int.MaxValue); | ||
} | ||
return true; | ||
} | ||
|
||
} | ||
} |
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,129 @@ | ||
using Terraria; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
using EldenRingItems.Projectiles.Melee; | ||
using Terraria.Audio; | ||
using Terraria.DataStructures; | ||
using Microsoft.Xna.Framework; | ||
using System; | ||
|
||
namespace EldenRingItems.Content.Items.Weapons.Melee | ||
{ | ||
public class BlasphemousBlade : ModItem | ||
{ | ||
// MouseRight holding bonus | ||
float HoldingDamageBonus = 1f; | ||
float HoldingCount = 0; | ||
bool BladeIsCharged = false; | ||
int MadeChargedAttacks = 0; | ||
bool BonusLimit = false; | ||
|
||
// Blade default properties (without holding bonus) | ||
int BaseDamage = 75; | ||
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; | ||
} | ||
|
||
public override void SetDefaults() | ||
{ | ||
Item.width = 94; | ||
Item.height = 92; | ||
Item.DamageType = DamageClass.Melee; | ||
Item.damage = BaseDamage; | ||
Item.knockBack = BaseKnockBack; | ||
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, 75, 0, 0); | ||
Item.rare = ItemRarityID.LightPurple; | ||
|
||
Item.shoot = ModContent.ProjectileType<BloodSlash>(); | ||
Item.shootSpeed = BaseShootSpeed; | ||
|
||
} | ||
void ResetBladeBonus() | ||
{ | ||
HoldingCount = 0; | ||
MadeChargedAttacks = 0; | ||
HoldingDamageBonus = 1f; | ||
BladeIsCharged = false; | ||
BonusLimit = false; | ||
Item.shoot = ModContent.ProjectileType<BloodSlash>(); | ||
Item.damage = BaseDamage; | ||
Item.knockBack = BaseKnockBack; | ||
Item.shootSpeed = BaseShootSpeed; | ||
Item.useTime = 30; | ||
Item.useAnimation = 30; | ||
} | ||
|
||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) | ||
{ | ||
if (BladeIsCharged) | ||
{ | ||
if (MadeChargedAttacks > 4) // 5 attacks (0, 1, 2, 3, 4) | ||
{ | ||
ResetBladeBonus(); | ||
return false; | ||
} | ||
else | ||
{ | ||
MadeChargedAttacks++; | ||
SoundEngine.PlaySound(SoundID.Item73, position); | ||
player.Heal(Main.rand.Next(15, 41)); | ||
} | ||
} | ||
else | ||
SoundEngine.PlaySound(SoundID.Item60, position); | ||
return true; | ||
} | ||
|
||
public override void HoldStyle(Player player, Rectangle heldItemFrame) | ||
{ | ||
if (Main.mouseRight) | ||
{ | ||
if (HoldingDamageBonus < 3f) | ||
{ | ||
HoldingCount++; | ||
HoldingDamageBonus += 0.003f; | ||
Item.damage = Convert.ToInt32(BaseDamage * HoldingDamageBonus); | ||
if (HoldingCount == 25) // Take away player's health every 25 mouseRight-holding events processed | ||
{ | ||
player.Hurt(PlayerDeathReason.ByCustomReason(""), 18, player.direction, armorPenetration: 1000); | ||
HoldingCount = 0; | ||
} | ||
} | ||
else | ||
if (!BonusLimit) // Will only play the blade max charge sound 1 time | ||
{ | ||
BonusLimit = true; | ||
BladeMaxChargeSound.Volume = 0.8f; | ||
SoundEngine.PlaySound(BladeMaxChargeSound, player.position); | ||
} | ||
if (HoldingDamageBonus >= 2f && !BladeIsCharged) // The blade is charged when the damage multiplier >= 2x | ||
{ | ||
// Changing blade properties | ||
SoundEngine.PlaySound(BladeStartChargingSound, player.position); | ||
BladeIsCharged = true; | ||
Item.shoot = ProjectileID.InfernoFriendlyBlast; | ||
Item.shootSpeed = 20f; | ||
Item.knockBack = 9f; | ||
Item.useTime = 16; | ||
Item.useAnimation = 16; | ||
} | ||
} | ||
} | ||
} | ||
} |
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,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Terraria.ModLoader; | ||
|
||
namespace EldenRingItems | ||
{ | ||
// Please read https://github.com/tModLoader/tModLoader/wiki/Basic-tModLoader-Modding-Guide#mod-skeleton-contents for more information about the various files in a mod. | ||
public class EldenRingItems : Mod | ||
{ | ||
|
||
} | ||
} |
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,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<!-- Import tModLoader mod properties --> | ||
<Import Project="..\tModLoader.targets" /> | ||
|
||
<!-- General --> | ||
<PropertyGroup> | ||
|
||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Remove="Content\Buffs\BlessingBuff.png" /> | ||
<None Remove="Content\Items\Accessories\RadahnsGreatRune.png" /> | ||
<None Remove="Content\Items\Consumables\RuneArc.png" /> | ||
<None Remove="Content\Items\Weapons\Melee\BlasphemousBlade.png" /> | ||
<None Remove="Localization\ru-RU_Mods.EldenRingItems.hjson" /> | ||
<None Remove="Projectiles\Melee\BloodSlash.png" /> | ||
</ItemGroup> | ||
|
||
<!-- References --> | ||
|
||
</Project> |
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,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.10.35027.167 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EldenRingItems", "EldenRingItems.csproj", "{7005B578-8D75-43AE-9CAD-29316EA25D78}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{7005B578-8D75-43AE-9CAD-29316EA25D78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7005B578-8D75-43AE-9CAD-29316EA25D78}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7005B578-8D75-43AE-9CAD-29316EA25D78}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7005B578-8D75-43AE-9CAD-29316EA25D78}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {BEEB6D2E-D7D7-492A-A0E0-4130BA8872A1} | ||
EndGlobalSection | ||
EndGlobal |
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,17 @@ | ||
# This file will automatically update with entries for new content after a build and reload. | ||
|
||
Items: { | ||
RadahnsGreatRune: { | ||
} | ||
|
||
RuneArc: { | ||
} | ||
|
||
BlasphemousBlade: { | ||
} | ||
} | ||
|
||
Buffs: { | ||
BlessingBuff: { | ||
} | ||
} |
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,17 @@ | ||
# This file will automatically update with entries for new content after a build and reload. | ||
|
||
Items: { | ||
RadahnsGreatRune: { | ||
} | ||
|
||
RuneArc: { | ||
} | ||
|
||
BlasphemousBlade: { | ||
} | ||
} | ||
|
||
Buffs: { | ||
BlessingBuff: { | ||
} | ||
} |
Oops, something went wrong.