Add Avalian Trader Town NPC, add Infinite Mana accessory for testing, add two new magic weapons

This commit is contained in:
2025-11-09 23:53:14 +00:00
parent b2972be531
commit a73cf0965d
16 changed files with 919 additions and 2 deletions
@@ -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;
}
}
}