Add Avalian Trader Town NPC, add Infinite Mana accessory for testing, add two new magic weapons
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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 = 2000;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user