- Added support for animated projectiles - Refactoring - Removed useless fields - Fixed swords not dealing damages - Added Hour Hand (from Evie's PR)
63 lines
2.0 KiB
C#
63 lines
2.0 KiB
C#
using Decimation.Content.Items.Accessories;
|
|
using Decimation.Content.Items.Misc;
|
|
using Decimation.Content.Items.Weapons.Bloodshot;
|
|
using Decimation.Content.NPCs.Bloodshot;
|
|
using Decimation.Lib.Items;
|
|
using Decimation.Lib.Util;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace Decimation.Content.Items.Boss.Bloodshot
|
|
{
|
|
internal class TreasureBagBloodshotEye : DecimationItem
|
|
{
|
|
protected override string ItemName => "Treasure Bag";
|
|
protected override string ItemTooltip => "{$CommonItemTooltip.RightClickToOpen}";
|
|
public override int BossBagNPC => ModContent.NPCType<BloodshotEye>();
|
|
|
|
protected override void Init()
|
|
{
|
|
item.consumable = true;
|
|
item.width = 24;
|
|
item.height = 24;
|
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
|
|
|
this.item.expert = true;
|
|
}
|
|
|
|
public override bool CanRightClick()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override void OpenBossBag(Player player)
|
|
{
|
|
player.QuickSpawnItem(ModContent.ItemType<BloodiedEssence>(), Main.rand.Next(35, 51));
|
|
player.QuickSpawnItem(ModContent.ItemType<NecrosisStone>());
|
|
|
|
int random = Main.rand.Next(3);
|
|
int weapon = 0;
|
|
|
|
switch (random)
|
|
{
|
|
case 0:
|
|
weapon = ModContent.ItemType<VampiricShiv>();
|
|
break;
|
|
case 1:
|
|
weapon = ModContent.ItemType<Umbra>();
|
|
break;
|
|
case 2:
|
|
weapon = ModContent.ItemType<BloodStream>();
|
|
break;
|
|
default:
|
|
Main.NewText(
|
|
"Unexpected error in Bloodshot Eye drops: weapon drop random is out of range (" + random + ").",
|
|
Color.Red);
|
|
break;
|
|
}
|
|
|
|
player.QuickSpawnItem(weapon);
|
|
}
|
|
}
|
|
} |