Make the Avalian Trader less robotic, add Avali Feather

This commit is contained in:
2025-11-11 11:43:58 +00:00
parent 7038741693
commit a9b0d1571d
13 changed files with 268 additions and 80 deletions
+21
View File
@@ -0,0 +1,21 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using ForgottenWawiTech.Content.Rarities;
namespace ForgottenWawiTech.Content.Items.Materials
{
public class AvaliFeather : ModItem
{
public override void SetDefaults()
{
Item.width = 20;
Item.height = 20;
Item.maxStack = 9999;
Item.rare = ModContent.RarityType<AvalianItem>();
Item.value = Item.buyPrice(gold: 50);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

+2 -1
View File
@@ -1,4 +1,5 @@
// Animated by British_Raccoon
// and then Axl_The_Protogen
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
@@ -13,7 +14,7 @@ namespace ForgottenWawiTech.Content.Items.Materials
{
public class RGBAlloy : ModItem
{
private const int FRAME_COUNT = 5;
private const int FRAME_COUNT = 7;
private const int TICKS_PER_FRAME = 10;
public override void SetStaticDefaults()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 28 KiB

+33 -2
View File
@@ -1,6 +1,8 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
using Microsoft.Xna.Framework;
namespace ForgottenWawiTech.Content.Items.Materials
{
@@ -12,8 +14,37 @@ namespace ForgottenWawiTech.Content.Items.Materials
Item.width = 20;
Item.height = 20;
Item.maxStack = 9999;
Item.rare = ItemRarityID.White;
Item.rare = ItemRarityID.Expert; // temp rarity until custom rarity is added
Item.value = Item.buyPrice(gold: 10);
}
public override void OnStack(Item source, int numTransfered)
{
// Mark that RGBass has been obtained in this world
ForgottenWawiTechSystem.hasObtainedRGBass = true;
}
public override bool OnPickup(Player player)
{
// Mark that RGBass has been obtained in this world
ForgottenWawiTechSystem.hasObtainedRGBass = true;
return true;
}
}
}
public class RGBassFishingPlayer : ModPlayer
{
public override void CatchFish(FishingAttempt attempt, ref int itemDrop, ref int npcSpawn, ref AdvancedPopupRequest sonar, ref Vector2 sonarPosition)
{
// Only if Moon Lord has been defeated
if (!NPC.downedMoonlord)
return;
bool inWater = !attempt.inLava && !attempt.inHoney;
if (inWater && Main.rand.NextBool(20)) // 5% chance (1 in 20)
{
itemDrop = ModContent.ItemType<RGBass>();
}
}
}
}
+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<ProtogenItem>();
Item.value = Item.buyPrice(gold: 1);
}
}