From 1ccea8b5fadd52580d694906fda16b35869769fd Mon Sep 17 00:00:00 2001 From: Niko Date: Mon, 10 Nov 2025 11:46:42 +0000 Subject: [PATCH] Add sell prices to most materials, add Singularity materials --- Content/Items/Accessories/DevInfiniteMana.cs | 1 + .../Items/Materials/ControlledSingularity.cs | 20 +++++++++ .../Items/Materials/ControlledSingularity.png | Bin 0 -> 504 bytes Content/Items/Materials/MiniSingularity.cs | 20 +++++++++ Content/Items/Materials/MiniSingularity.png | Bin 0 -> 504 bytes Content/Items/Materials/RGBAlloy.cs | 1 + Content/Items/Materials/RGBass.cs | 1 + Content/Items/Materials/VisorShard.cs | 1 + Content/Items/Prefixes/SingularityPowered.cs | 39 ++++++++++++++++++ Content/Items/Tiles/HighTechMarvelItem.cs | 1 + .../en-US_Mods.ForgottenWawiTech.hjson | 15 ++++++- 11 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 Content/Items/Materials/ControlledSingularity.cs create mode 100644 Content/Items/Materials/ControlledSingularity.png create mode 100644 Content/Items/Materials/MiniSingularity.cs create mode 100644 Content/Items/Materials/MiniSingularity.png create mode 100644 Content/Items/Prefixes/SingularityPowered.cs diff --git a/Content/Items/Accessories/DevInfiniteMana.cs b/Content/Items/Accessories/DevInfiniteMana.cs index 9ab621e..797165a 100644 --- a/Content/Items/Accessories/DevInfiniteMana.cs +++ b/Content/Items/Accessories/DevInfiniteMana.cs @@ -18,6 +18,7 @@ namespace ForgottenWawiTech.Content.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.statMana = player.statManaMax2; + player.statManaMax2 += 2000; } } } \ No newline at end of file diff --git a/Content/Items/Materials/ControlledSingularity.cs b/Content/Items/Materials/ControlledSingularity.cs new file mode 100644 index 0000000..c4b1f47 --- /dev/null +++ b/Content/Items/Materials/ControlledSingularity.cs @@ -0,0 +1,20 @@ +using Terraria.ID; +using Terraria; +using Terraria.ModLoader; + +namespace ForgottenWawiTech.Content.Items.Materials +{ + public class ControlledSingularity : ModItem + { + + public override void SetDefaults() + { + Item.width = 20; + Item.height = 20; + Item.maxStack = 9999; + Item.rare = ItemRarityID.White; + Item.value = Item.buyPrice(gold: 50); + } + + } +} \ No newline at end of file diff --git a/Content/Items/Materials/ControlledSingularity.png b/Content/Items/Materials/ControlledSingularity.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Items/Materials/MiniSingularity.cs b/Content/Items/Materials/MiniSingularity.cs new file mode 100644 index 0000000..faf870d --- /dev/null +++ b/Content/Items/Materials/MiniSingularity.cs @@ -0,0 +1,20 @@ +using Terraria.ID; +using Terraria; +using Terraria.ModLoader; + +namespace ForgottenWawiTech.Content.Items.Materials +{ + public class MiniSingularity : ModItem + { + + public override void SetDefaults() + { + Item.width = 20; + Item.height = 20; + Item.maxStack = 9999; + Item.rare = ItemRarityID.White; + Item.value = Item.buyPrice(gold: 50); + } + + } +} \ No newline at end of file diff --git a/Content/Items/Materials/MiniSingularity.png b/Content/Items/Materials/MiniSingularity.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0cf81e52f4133dbe85453dd9a37993af17b5be GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r53?z4+XPOVBbOU@sT!FNbf{DF-NtsjE_3B;! z|NjSy0D+K@p01v+t9x8zR#D@WS?dlQ`1+YJESG!@x4dC7*`C93=UXkhhvvt!hjSLlJ~RwmnP~Bh_e#*cGOJz5H)U2RZk=*d{>S{o z|7E^K_FWXNcxrjXh&wV*Hfp0Ti%!ljhM&t`NT+&77>M@wN(xASbQfH=B6&8`PK|k& o(pT;d?|57xzrgJ7^Ax@sCjQeEzP*#>W`d&2)78&qol`;+07t#pIRF3v literal 0 HcmV?d00001 diff --git a/Content/Items/Materials/RGBAlloy.cs b/Content/Items/Materials/RGBAlloy.cs index cc47ba1..0ff525e 100644 --- a/Content/Items/Materials/RGBAlloy.cs +++ b/Content/Items/Materials/RGBAlloy.cs @@ -1,4 +1,5 @@ using Terraria.ID; +using Terraria; using Terraria.ModLoader; namespace ForgottenWawiTech.Content.Items.Materials diff --git a/Content/Items/Materials/RGBass.cs b/Content/Items/Materials/RGBass.cs index fa6fe6d..ef4d68c 100644 --- a/Content/Items/Materials/RGBass.cs +++ b/Content/Items/Materials/RGBass.cs @@ -1,4 +1,5 @@ using Terraria.ID; +using Terraria; using Terraria.ModLoader; namespace ForgottenWawiTech.Content.Items.Materials diff --git a/Content/Items/Materials/VisorShard.cs b/Content/Items/Materials/VisorShard.cs index af1f4d8..3ce24aa 100644 --- a/Content/Items/Materials/VisorShard.cs +++ b/Content/Items/Materials/VisorShard.cs @@ -1,4 +1,5 @@ using Terraria.ID; +using Terraria; using Terraria.ModLoader; namespace ForgottenWawiTech.Content.Items.Materials diff --git a/Content/Items/Prefixes/SingularityPowered.cs b/Content/Items/Prefixes/SingularityPowered.cs new file mode 100644 index 0000000..177e0f8 --- /dev/null +++ b/Content/Items/Prefixes/SingularityPowered.cs @@ -0,0 +1,39 @@ +using Terraria; +using Terraria.ModLoader; + +namespace ForgottenWawiTech.Content.Items.Prefixes +{ + public class SingularityPowered : ModPrefix + { + public override PrefixCategory Category => PrefixCategory.AnyWeapon; + + + // Prevent from being obtained through Goblin Tinkerer reforging + public override bool CanRoll(Item item) => false; + + // Also prevent random roll chances on spawn + public override float RollChance(Item item) => 0f; + + // +100% damage, +50% use time + public override void SetStats( + ref float damageMult, + ref float knockbackMult, + ref float useTimeMult, + ref float scaleMult, + ref float shootSpeedMult, + ref float manaMult, + ref int critBonus) + { + damageMult = 2f; + knockbackMult = 1.5f; + shootSpeedMult = 1.5f; + useTimeMult = 1.5f; + } + + // Increase item value due to powerful stats + public override void ModifyValue(ref float valueMult) + { + valueMult *= 2f; + } + } +} \ No newline at end of file diff --git a/Content/Items/Tiles/HighTechMarvelItem.cs b/Content/Items/Tiles/HighTechMarvelItem.cs index 1701e0f..ec9f019 100644 --- a/Content/Items/Tiles/HighTechMarvelItem.cs +++ b/Content/Items/Tiles/HighTechMarvelItem.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using Terraria.ID; using ForgottenWawiTech.Content.Tiles.CraftingStations; namespace ForgottenWawiTech.Content.Items.Tiles diff --git a/Localization/en-US_Mods.ForgottenWawiTech.hjson b/Localization/en-US_Mods.ForgottenWawiTech.hjson index 3ba87bb..975748a 100644 --- a/Localization/en-US_Mods.ForgottenWawiTech.hjson +++ b/Localization/en-US_Mods.ForgottenWawiTech.hjson @@ -104,6 +104,16 @@ Items: { DisplayName: Visor Shard Tooltip: "" } + + MiniSingularity: { + Tooltip: "" + DisplayName: Mini Singularity + } + + ControlledSingularity: { + Tooltip: "" + DisplayName: Controlled Singularity + } } NPCs: { @@ -199,4 +209,7 @@ Projectiles: { ShatteredPrismHoldout.DisplayName: Shattered Prism Holdout } -Prefixes.Healthy.DisplayName: Healthy +Prefixes: { + Healthy.DisplayName: Healthy + SingularityPowered.DisplayName: Singularity Powered +}