Add singularity armor, multitool and rarity

This commit is contained in:
2025-11-10 12:53:25 +00:00
parent 1ccea8b5fa
commit ecf3476874
20 changed files with 297 additions and 15 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ namespace ForgottenWawiTech.Content.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.statMana = player.statManaMax2;
player.statManaMax2 += 2000;
player.statManaMax2 = 1000;
}
}
}
@@ -0,0 +1,35 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Items.Materials;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Armor.SingularitySet
{
[AutoloadEquip(EquipType.Body)]
public class SingularityChestplate : ModItem
{
public override void SetDefaults()
{
Item.width = 18;
Item.height = 18;
Item.value = Item.sellPrice(gold: 5);
Item.rare = ModContent.RarityType<SingularityItem>();
Item.defense = 24;
}
public override void UpdateEquip(Player player)
{
player.GetDamage(DamageClass.Generic) += 0.12f;
player.statManaMax2 += 40;
}
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ControlledSingularity>(), 18)
.AddTile(TileID.MythrilAnvil)
.Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

@@ -0,0 +1,47 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Items.Materials;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Armor.SingularitySet
{
[AutoloadEquip(EquipType.Head)]
public class SingularityHelmet : ModItem
{
public override void SetDefaults()
{
Item.width = 18;
Item.height = 18;
Item.value = Item.sellPrice(gold: 5);
Item.rare = ModContent.RarityType<SingularityItem>();
Item.defense = 18;
}
public override void UpdateEquip(Player player)
{
player.GetDamage(DamageClass.Generic) += 0.15f;
player.GetCritChance(DamageClass.Generic) += 10;
}
public override bool IsArmorSet(Item head, Item body, Item legs)
{
return body.type == ModContent.ItemType<SingularityChestplate>() && legs.type == ModContent.ItemType<SingularityLeggings>();
}
public override void UpdateArmorSet(Player player)
{
player.setBonus = "Increased damage and critical strike chance\n+20% damage\n+15% critical strike chance";
player.GetDamage(DamageClass.Generic) += 0.20f;
player.GetCritChance(DamageClass.Generic) += 15;
}
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ControlledSingularity>(), 12)
.AddTile(TileID.MythrilAnvil)
.Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

@@ -0,0 +1,35 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Items.Materials;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Armor.SingularitySet
{
[AutoloadEquip(EquipType.Legs)]
public class SingularityLeggings : ModItem
{
public override void SetDefaults()
{
Item.width = 18;
Item.height = 18;
Item.value = Item.sellPrice(gold: 5);
Item.rare = ModContent.RarityType<SingularityItem>();
Item.defense = 16;
}
public override void UpdateEquip(Player player)
{
player.moveSpeed += 50f;
player.GetDamage(DamageClass.Generic) += 5f;
}
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ControlledSingularity>(), 15)
.AddTile(TileID.MythrilAnvil)
.Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

@@ -0,0 +1,21 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Materials
{
public class ContainmentUnit : ModItem
{
public override void SetDefaults()
{
Item.width = 20;
Item.height = 20;
Item.maxStack = 9999;
Item.rare = ModContent.RarityType<SingularityItem>();
Item.value = Item.buyPrice(gold: 50);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

@@ -1,6 +1,7 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Materials
{
@@ -12,9 +13,17 @@ namespace ForgottenWawiTech.Content.Items.Materials
Item.width = 20;
Item.height = 20;
Item.maxStack = 9999;
Item.rare = ItemRarityID.White;
Item.rare = ModContent.RarityType<SingularityItem>();
Item.value = Item.buyPrice(gold: 50);
}
public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ModContent.ItemType<MiniSingularity>(), 5);
recipe.AddIngredient(ModContent.ItemType<ContainmentUnit>(), 1);
recipe.AddTile(TileID.MythrilAnvil);
recipe.Register();
}
}
}
+2 -1
View File
@@ -1,6 +1,7 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Materials
{
@@ -12,7 +13,7 @@ namespace ForgottenWawiTech.Content.Items.Materials
Item.width = 20;
Item.height = 20;
Item.maxStack = 9999;
Item.rare = ItemRarityID.White;
Item.rare = ModContent.RarityType<SingularityItem>();
Item.value = Item.buyPrice(gold: 50);
}
@@ -7,6 +7,7 @@ namespace ForgottenWawiTech.Content.Items.Tiles
{
public class HighTechMarvelItem : ModItem
{
public override void SetDefaults()
{
Item.DefaultToPlaceableTile(ModContent.TileType<HighTechMarvel>(), 0);
@@ -0,0 +1,39 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Items.Materials;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Tools.SingularitySet
{
public class SingularityMultitool : ModItem
{
public override void SetDefaults()
{
Item.damage = 500;
Item.DamageType = DamageClass.Melee;
Item.width = 40;
Item.height = 40;
Item.useTime = 10;
Item.useAnimation = 20;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 5.0f;
Item.value = Item.sellPrice(gold: 5);
Item.rare = ModContent.RarityType<SingularityItem>();
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.useTurn = true;
Item.axe = 500;
Item.hammer = 500;
Item.pick = 500;
}
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ControlledSingularity>(), 12)
.AddTile(TileID.MythrilAnvil)
.Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

+11
View File
@@ -0,0 +1,11 @@
using Terraria.ModLoader;
using Terraria;
using Microsoft.Xna.Framework;
namespace ForgottenWawiTech.Content.Rarities
{
public class SingularityItem : ModRarity
{
public override Color RarityColor => new Color(140, 0, 128); // Dark reddish-purple color
}
}
@@ -13,17 +13,31 @@ namespace ForgottenWawiTech.Content.Tiles.CraftingStations
{
Main.tileSolid[Type] = false;
Main.tileNoAttach[Type] = true;
AddMapEntry(new Color(150, 50, 250), Language.GetText("HighTechMarvelItem.DisplayName"));
AdjTiles = new int[] {
TileID.WorkBenches,
TileID.Anvils,
TileID.Furnaces,
TileID.Sawmill,
TileID.Loom,
TileID.HeavyWorkBench,
TileID.AlchemyTable,
TileID.MythrilAnvil,
TileID.AdamantiteForge,
TileID.Autohammer,
TileID.CrystalBall,
TileID.TinkerersWorkbench
};
AddMapEntry(new Color(150, 50, 250), Language.GetText("HighTechMarvelItem"));
//TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2);
}
public override void NearbyEffects(int i, int j, bool closer)
/* public override void NearbyEffects(int i, int j, bool closer)
{
if (closer)
{
Main.LocalPlayer.AddBuff(BuffID.WellFed, 60);
}
}
} */
}
}
@@ -77,17 +77,30 @@ Items: {
BookOfUnholy: {
DisplayName: Book Of Unholy
Tooltip: ""
Tooltip:
'''
A tome radiating with the power of the void.
You probably shouldn't hold it so close.
'''
}
ShatteredPrism: {
DisplayName: Shattered Prism
Tooltip: ""
Tooltip:
'''
A Last Prism exposed to the power of several singularities.
The chaos within seems desperate to be released.
'''
}
DevInfiniteMana: {
DisplayName: Dev Infinite Mana
Tooltip: ""
DisplayName: Infinite Mana
Tooltip:
'''
You shouldn't have this.
+1000 max mana.
Prevents mana from being drained.
'''
}
SoulOfAvalon: {
@@ -97,23 +110,79 @@ Items: {
RGBAlloy: {
DisplayName: RGB Alloy
Tooltip: ""
Tooltip:
'''
A high-tech alloy used in advanced crafting.
Shimmers with red, green, and blue hues.
'''
}
VisorShard: {
DisplayName: Visor Shard
Tooltip: ""
Tooltip:
'''
A fragment of a high-tech visor.
Emits a faint glow.
'''
}
MiniSingularity: {
Tooltip: ""
Tooltip:
'''
A small, contained singularity.
Handle with care.
'''
DisplayName: Mini Singularity
}
ControlledSingularity: {
Tooltip: ""
Tooltip:
'''
A stabilized captive singularity for advanced applications.
Extremely volatile if mishandled.
'''
DisplayName: Controlled Singularity
}
SingularityChestplate: {
DisplayName: Singularity Chestplate
Tooltip: ""
}
SingularityHelmet: {
DisplayName: Singularity Helmet
Tooltip: ""
}
SingularityLeggings: {
DisplayName: Singularity Leggings
Tooltip: ""
}
SingularityAxe: {
DisplayName: Singularity Axe
Tooltip: ""
}
SingularityHammer: {
DisplayName: Singularity Hammer
Tooltip: ""
}
SingularityPickaxe: {
DisplayName: Singularity Pickaxe
Tooltip: ""
}
SingularityMultitool: {
Tooltip: ""
DisplayName: Singularity Multitool
}
ContainmentUnit: {
Tooltip: ""
DisplayName: Containment Unit
}
}
NPCs: {