32 lines
1003 B
C#
32 lines
1003 B
C#
using ForgottenWawiTech.Content.Projectiles;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace ForgottenWawiTech.Content.Items.Weapons.Magic
|
|
{
|
|
public class ShatteredPrism : ModItem
|
|
{
|
|
public override string Texture => "Terraria/Images/Item_" + ItemID.LastPrism; // TODO: Change
|
|
public static Color OverrideColor = new(80,0,80);
|
|
|
|
public override void SetDefaults() {
|
|
Item.CloneDefaults(ItemID.LastPrism);
|
|
Item.mana = 4;
|
|
Item.damage = 500;
|
|
Item.shoot = ModContent.ProjectileType<ShatteredPrismHoldout>();
|
|
Item.shootSpeed = 30f;
|
|
|
|
// Change the item's draw color so that it is visually distinct from the vanilla Last Prism.
|
|
Item.color = OverrideColor;
|
|
}
|
|
|
|
|
|
|
|
// Because this weapon fires a holdout projectile, it needs to block usage if its projectile already exists.
|
|
public override bool CanUseItem(Player player) {
|
|
return player.ownedProjectileCounts[ModContent.ProjectileType<ShatteredPrismHoldout>()] <= 0;
|
|
}
|
|
}
|
|
} |