Make the Avalian Trader less robotic, add Avali Feather
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user