Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Xhuis committed Feb 9, 2019
1 parent d267a76 commit 2338dc3
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 0 deletions.
111 changes: 111 additions & 0 deletions YABSSM.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace YABSSM
{
class YABSSM : Mod
{

}
}

namespace YABSSM.NPCs
{
class YABSSMNPC : GlobalNPC
{
public override void SetupShop(int type, Chest shop, ref int nextSlot)
{
if (type == NPCID.Dryad)
{
if (NPC.downedSlimeKing)
{
shop.item[nextSlot].SetDefaults(ItemID.SlimeCrown);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 50, 0);
nextSlot++;
}
if (NPC.downedBoss1)
{
shop.item[nextSlot].SetDefaults(ItemID.SuspiciousLookingEye);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0);
nextSlot++;
}
if (NPC.downedBoss2)
{
if (!WorldGen.crimson)
{
shop.item[nextSlot].SetDefaults(ItemID.WormFood);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0);
nextSlot++;
}
else
{
shop.item[nextSlot].SetDefaults(ItemID.BloodySpine);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0);
nextSlot++;
}
}
if (NPC.downedBoss3)
{
shop.item[nextSlot].SetDefaults(ItemID.ClothierVoodooDoll);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0);
nextSlot++;
}
if (NPC.downedQueenBee)
{
shop.item[nextSlot].SetDefaults(ItemID.Abeemination);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0);
nextSlot++;
}
if (Main.hardMode)
{
shop.item[nextSlot].SetDefaults(ItemID.GuideVoodooDoll);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 10, 0, 0);
nextSlot++;
}
if (NPC.downedMechBoss1)
{
shop.item[nextSlot].SetDefaults(ItemID.MechanicalEye);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 10, 0, 0);
nextSlot++;
}
if (NPC.downedMechBoss2)
{
shop.item[nextSlot].SetDefaults(ItemID.MechanicalWorm);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 10, 0, 0);
nextSlot++;
}
if (NPC.downedMechBoss3)
{
shop.item[nextSlot].SetDefaults(ItemID.MechanicalSkull);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 10, 0, 0);
nextSlot++;
}
if (NPC.downedGolemBoss)
{
shop.item[nextSlot].SetDefaults(ItemID.LihzahrdPowerCell);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 25, 0, 0);
nextSlot++;
}
if (NPC.downedHalloweenTree)
{
shop.item[nextSlot].SetDefaults(ItemID.PumpkinMoonMedallion);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 25, 0, 0);
nextSlot++;
}
if (NPC.downedChristmasTree)
{
shop.item[nextSlot].SetDefaults(ItemID.NaughtyPresent);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 25, 0, 0);
nextSlot++;
}
if (NPC.downedMoonlord)
{
shop.item[nextSlot].SetDefaults(ItemID.CelestialSigil);
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 50, 0, 0);
nextSlot++;
}
}
}
}
}
3 changes: 3 additions & 0 deletions build.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
author = Ilysen
version = 0.1
displayName = Yet Another Boss Summon Shop Mod
3 changes: 3 additions & 0 deletions description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
YABSSM is a simple mod that makes the Dryad sell boss summoning items when you defeat the respective vanilla boss. The price for these items depends on the difficulty of the boss and placement for progression.

If you have a mod like Calamity that already has this function built in, you won't need this mod.
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2338dc3

Please sign in to comment.