1 - Cirrus sells non-alcoholic drinks while the Stylist is around and it's post-ML.
2 - Cirrus only sells Milk Cartons and Milkshakes while the Stylist is around. 3 - Stylist sells Chocolate Chip Cookies while happy and Cirrus is around. 4 - Princess sells non-alcoholic juice and smoothies while Cirrus is around. 5 - Trees drop fruit when broken. Fruit types vary with tree types. 6 - Added recipes for Apple Pie, Banana Split, BBQ Ribs, Milk Carton and Nachos.
This commit is contained in:
1 parent
fdd38fdb41
commit
7185c06717
4 files changed
+229
-6
No files matched your search
@@ -1528,6 +1528,8 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
int goldCost = NPC.downedMoonlord ? 8 : Main.hardMode ? 4 : 2;
|
||||
|
||||
bool happy = Main.LocalPlayer.currentShoppingSettings.PriceAdjustment <= 0.8999999761581421;
|
||||
|
||||
if (type == NPCID.Merchant)
|
||||
{
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.Bottle, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 0, 0, 20));
|
||||
@@ -1582,6 +1584,7 @@ namespace CalamityMod.NPCs
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<RageHairDye>(), CalamityWorld.revenge);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.StylistKilLaKillScissorsIWish, true, Item.buyPrice(0, 15));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<CirrusDress>(), Main.LocalPlayer.Calamity().alcoholPoisoning && NPC.FindFirstNPC(NPCType<FAP>()) != -1);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.ChocolateChipCookie, happy && NPC.FindFirstNPC(NPCType<FAP>()) != -1, Item.buyPrice(0, 3));
|
||||
}
|
||||
|
||||
if (type == NPCID.Cyborg)
|
||||
@@ -1684,6 +1687,13 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.PrincessWeapon, true, Item.buyPrice(0, 50, 0, 0));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<LanternCenter>());
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.AppleJuice, NPC.FindFirstNPC(NPCType<FAP>()) != -1);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.FruitJuice, NPC.FindFirstNPC(NPCType<FAP>()) != -1);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.GrapeJuice, NPC.FindFirstNPC(NPCType<FAP>()) != -1);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.Lemonade, NPC.FindFirstNPC(NPCType<FAP>()) != -1);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.PrismaticPunch, NPC.FindFirstNPC(NPCType<FAP>()) != -1);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.SmoothieofDarkness, NPC.FindFirstNPC(NPCType<FAP>()) != -1);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.TropicalSmoothie, NPC.FindFirstNPC(NPCType<FAP>()) != -1);
|
||||
}
|
||||
|
||||
if (type == NPCID.SkeletonMerchant)
|
||||
|
||||
+35
-6
@@ -308,6 +308,10 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
|
||||
public override void SetupShop(Chest shop, ref int nextSlot) //charges 50% extra than the original alcohol value
|
||||
{
|
||||
int wife = NPC.FindFirstNPC(NPCID.Stylist);
|
||||
bool wifeIsAround = wife != -1;
|
||||
bool beLessDrunk = wifeIsAround && NPC.downedMoonlord;
|
||||
|
||||
if (CalamityConfig.Instance.PotionSelling)
|
||||
{
|
||||
shop.item[nextSlot].SetDefaults(ItemID.HeartreachPotion);
|
||||
@@ -426,6 +430,25 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
nextSlot++;
|
||||
}
|
||||
|
||||
if (beLessDrunk)
|
||||
{
|
||||
shop.item[nextSlot].SetDefaults(ItemID.BloodyMoscato);
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0);
|
||||
nextSlot++;
|
||||
|
||||
shop.item[nextSlot].SetDefaults(ItemID.BananaDaiquiri);
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 75, 0);
|
||||
nextSlot++;
|
||||
|
||||
shop.item[nextSlot].SetDefaults(ItemID.PeachSangria);
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 50, 0);
|
||||
nextSlot++;
|
||||
|
||||
shop.item[nextSlot].SetDefaults(ItemID.PinaColada);
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0);
|
||||
nextSlot++;
|
||||
}
|
||||
|
||||
shop.item[nextSlot].SetDefaults(ModContent.ItemType<WeightlessCandle>());
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 50, 0, 0);
|
||||
nextSlot++;
|
||||
@@ -449,9 +472,12 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
bool happyAsFuck = Main.LocalPlayer.currentShoppingSettings.PriceAdjustment <= 0.8999999761581421;
|
||||
if (happyAsFuck)
|
||||
{
|
||||
shop.item[nextSlot].SetDefaults(ItemID.MilkCarton);
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0);
|
||||
nextSlot++;
|
||||
if (wifeIsAround)
|
||||
{
|
||||
shop.item[nextSlot].SetDefaults(ItemID.MilkCarton);
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0);
|
||||
nextSlot++;
|
||||
}
|
||||
|
||||
if (Main.LocalPlayer.ZoneHallow)
|
||||
{
|
||||
@@ -459,9 +485,12 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 2, 50, 0);
|
||||
nextSlot++;
|
||||
|
||||
shop.item[nextSlot].SetDefaults(ItemID.Milkshake);
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0);
|
||||
nextSlot++;
|
||||
if (wifeIsAround)
|
||||
{
|
||||
shop.item[nextSlot].SetDefaults(ItemID.Milkshake);
|
||||
shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0);
|
||||
nextSlot++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,10 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using System;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
@@ -141,6 +143,118 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
|
||||
// Fruit from trees upon tree destruction
|
||||
GetTreeBottom(i, j, out int treeX, out int treeY);
|
||||
TreeTypes treeType = WorldGen.GetTreeType(Main.tile[treeX, treeY].TileType);
|
||||
if (treeType != TreeTypes.None)
|
||||
{
|
||||
treeY--;
|
||||
while (treeY > 10 && Main.tile[treeX, treeY].HasTile && TileID.Sets.IsShakeable[Main.tile[treeX, treeY].TileType])
|
||||
treeY--;
|
||||
|
||||
treeY++;
|
||||
|
||||
if (WorldGen.IsTileALeafyTreeTop(treeX, treeY) && !Collision.SolidTiles(treeX - 2, treeX + 2, treeY - 2, treeY + 2))
|
||||
{
|
||||
int randomAmt = WorldGen.genRand.Next(1, 4);
|
||||
for (int z = 0; z < randomAmt; z++)
|
||||
{
|
||||
int treeDropItemType = 0;
|
||||
switch (treeType)
|
||||
{
|
||||
case TreeTypes.Forest:
|
||||
|
||||
switch (WorldGen.genRand.Next(5))
|
||||
{
|
||||
case 0:
|
||||
treeDropItemType = ItemID.Apple;
|
||||
break;
|
||||
case 1:
|
||||
treeDropItemType = ItemID.Apricot;
|
||||
break;
|
||||
case 2:
|
||||
treeDropItemType = ItemID.Peach;
|
||||
break;
|
||||
case 3:
|
||||
treeDropItemType = ItemID.Grapefruit;
|
||||
break;
|
||||
default:
|
||||
treeDropItemType = ItemID.Lemon;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TreeTypes.Snow:
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Cherry : ItemID.Plum;
|
||||
break;
|
||||
|
||||
case TreeTypes.Jungle:
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Mango : ItemID.Pineapple;
|
||||
break;
|
||||
|
||||
case TreeTypes.Palm:
|
||||
|
||||
if (WorldGen.IsPalmOasisTree(treeX))
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Banana : ItemID.Coconut;
|
||||
|
||||
break;
|
||||
|
||||
case TreeTypes.PalmCorrupt:
|
||||
|
||||
if (WorldGen.genRand.NextBool())
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.BlackCurrant : ItemID.Elderberry;
|
||||
else if (WorldGen.IsPalmOasisTree(treeX))
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Banana : ItemID.Coconut;
|
||||
else
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.BlackCurrant : ItemID.Elderberry;
|
||||
|
||||
break;
|
||||
|
||||
case TreeTypes.Corrupt:
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.BlackCurrant : ItemID.Elderberry;
|
||||
break;
|
||||
|
||||
case TreeTypes.PalmHallowed:
|
||||
|
||||
if (WorldGen.genRand.NextBool())
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Dragonfruit : ItemID.Starfruit;
|
||||
else if (WorldGen.IsPalmOasisTree(treeX))
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Banana : ItemID.Coconut;
|
||||
else
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Dragonfruit : ItemID.Starfruit;
|
||||
|
||||
break;
|
||||
|
||||
case TreeTypes.Hallowed:
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Dragonfruit : ItemID.Starfruit;
|
||||
break;
|
||||
|
||||
case TreeTypes.PalmCrimson:
|
||||
|
||||
if (WorldGen.genRand.NextBool())
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.BloodOrange : ItemID.Rambutan;
|
||||
else if (WorldGen.IsPalmOasisTree(treeX))
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.Banana : ItemID.Coconut;
|
||||
else
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.BloodOrange : ItemID.Rambutan;
|
||||
|
||||
break;
|
||||
|
||||
case TreeTypes.Crimson:
|
||||
treeDropItemType = WorldGen.genRand.NextBool() ? ItemID.BloodOrange : ItemID.Rambutan;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (treeDropItemType != 0)
|
||||
Item.NewItem(new EntitySource_TileBreak(treeX, treeY), treeX * 16, treeY * 16, 16, 16, treeDropItemType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Helper function to shatter crystals attached to neighboring solid tiles.
|
||||
void CheckShatterCrystal(int xPos, int yPos, bool dontShatter)
|
||||
{
|
||||
@@ -313,5 +427,45 @@ namespace CalamityMod.Tiles
|
||||
|
||||
return base.CanKillTile(i, j, type, ref blockDamaged);
|
||||
}
|
||||
|
||||
// "Private" my ass, fuck off
|
||||
public static void GetTreeBottom(int i, int j, out int x, out int y)
|
||||
{
|
||||
x = i;
|
||||
y = j;
|
||||
Tile tileSafely = Framing.GetTileSafely(x, y);
|
||||
if (tileSafely.TileType == TileID.PalmTree)
|
||||
{
|
||||
while (y < Main.maxTilesY - 50 && (!tileSafely.HasTile || tileSafely.TileType == TileID.PalmTree))
|
||||
{
|
||||
y++;
|
||||
tileSafely = Framing.GetTileSafely(x, y);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int num = tileSafely.TileFrameX / 22;
|
||||
int num2 = tileSafely.TileFrameY / 22;
|
||||
if (num == 3 && num2 <= 2)
|
||||
x++;
|
||||
else if (num == 4 && num2 >= 3 && num2 <= 5)
|
||||
x--;
|
||||
else if (num == 1 && num2 >= 6 && num2 <= 8)
|
||||
x--;
|
||||
else if (num == 2 && num2 >= 6 && num2 <= 8)
|
||||
x++;
|
||||
else if (num == 2 && num2 >= 9)
|
||||
x++;
|
||||
else if (num == 3 && num2 >= 9)
|
||||
x--;
|
||||
|
||||
tileSafely = Framing.GetTileSafely(x, y);
|
||||
while (y < Main.maxTilesY - 50 && (!tileSafely.HasTile || TileID.Sets.IsATreeTrunk[tileSafely.TileType] || tileSafely.TileType == TileID.MushroomTrees))
|
||||
{
|
||||
y++;
|
||||
tileSafely = Framing.GetTileSafely(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1140,6 +1140,36 @@ namespace CalamityMod
|
||||
r.AddIngredient(ModContent.ItemType<SeaMinnowItem>());
|
||||
r.AddTile(TileID.CookingPots);
|
||||
r.Register();
|
||||
|
||||
r = Recipe.Create(ItemID.ApplePie);
|
||||
r.AddIngredient(ItemID.Apple, 3);
|
||||
r.AddTile(TileID.Furnaces);
|
||||
r.Register();
|
||||
|
||||
r = Recipe.Create(ItemID.BananaSplit);
|
||||
r.AddIngredient(ItemID.Banana);
|
||||
r.AddIngredient(ItemID.IceBlock);
|
||||
r.AddIngredient(ItemID.MilkCarton);
|
||||
r.AddTile(TileID.CookingPots);
|
||||
r.Register();
|
||||
|
||||
r = Recipe.Create(ItemID.BBQRibs);
|
||||
r.AddIngredient(ItemID.FleshBlock, 6);
|
||||
r.AddIngredient(ItemID.Bone, 6);
|
||||
r.AddTile(TileID.Furnaces);
|
||||
r.Register();
|
||||
|
||||
r = Recipe.Create(ItemID.MilkCarton);
|
||||
r.AddIngredient(ItemID.BottledWater);
|
||||
r.AddIngredient(ItemID.Bone, 2);
|
||||
r.AddTile(TileID.CookingPots);
|
||||
r.Register();
|
||||
|
||||
r = Recipe.Create(ItemID.Nachos);
|
||||
r.AddIngredient(ItemID.PotatoChips);
|
||||
r.AddIngredient(ItemID.MilkCarton);
|
||||
r.AddTile(TileID.CookingPots);
|
||||
r.Register();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in new issue
Block a user