Skip to content

Commit

Permalink
Shimmer changes, shadow chest, price changes, and code cleanup.
Browse files Browse the repository at this point in the history
- Regular and Ancient Hallowed gear is now crafted into Hallowed Bar at Shimmering Star (to match current 1.4.4+ version.
- If craft-able rare chests is on, you can craft Shadow Key to and from Shadow Chest at a Shimmering Star.
- Item value modifications that match current 1.4.4+ version.
  • Loading branch information
dragon3025 committed Feb 6, 2023
1 parent 62d6c12 commit b7cd3a7
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ public class IOtherConfig : ModConfig
"Regular Wooden Chests. Chance = 1 / configuration_setting. Set to 0 to disable.")]
[DefaultValue(75)]
public int TerragrimChestChance;
//TO-DO Remove after 1.4.4

//TO-DO Remove after 1.4.4
[Label("Use 1.4.4 [i:4978] Fledgling Wings Chance")]
[DefaultValue(true)]
public bool FutureFledglingChestChance;
Expand Down
15 changes: 8 additions & 7 deletions Global/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public override void ModifyTooltips(Terraria.Item item, List<TooltipLine> toolti
return;
}

//TO-DO Shimmering makes it easier to get missing items, so this might not be necessary anymore.
if (item.type == ItemID.Vitamins || item.type == ItemID.ArmorPolish || item.type == ItemID.AdhesiveBandage || item.type == ItemID.Bezoar || item.type == ItemID.Nazar || item.type == ItemID.Megaphone || item.type == ItemID.TrifoldMap || item.type == ItemID.FastClock || item.type == ItemID.Blindfold || item.type == ItemID.ArmorBracing || item.type == ItemID.MedicatedBandage || item.type == ItemID.CountercurseMantra || item.type == ItemID.ThePlan)
{
tooltips.Add(new TooltipLine(Mod, "AnkhMaterialUseFromInventory", "Ankh Material\n" +
Expand Down Expand Up @@ -197,11 +198,11 @@ public override void ModifyItemLoot(Terraria.Item item, ItemLoot itemLoot)
if (rule2 is OneFromOptionsNotScaledWithLuckDropRule drop2 && drop2.dropIds.Contains(ItemID.Starfury))
{
List<int> newDropOptions = drop2.dropIds.ToList();
if (lootOtherConfig.FutureFledglingChestChance)

if (lootOtherConfig.FutureFledglingChestChance)
{
newDropOptions.Remove(ItemID.CreativeWings);
}
newDropOptions.Remove(ItemID.CreativeWings);
}
newDropOptions.Add(ItemID.LuckyHorseshoe);
newDropOptions.Add(ItemID.CelestialMagnet);

Expand All @@ -211,9 +212,9 @@ public override void ModifyItemLoot(Terraria.Item item, ItemLoot itemLoot)
}
}
if (lootOtherConfig.FutureFledglingChestChance)
{
itemLoot.Add(ItemDropRule.NotScalingWithLuck(ItemID.CreativeWings, 40));
}
{
itemLoot.Add(ItemDropRule.NotScalingWithLuck(ItemID.CreativeWings, 40));
}
itemLoot.Add(ItemDropRule.NotScalingWithLuck(ItemID.Cloud, 2, 50, 100));
}
if (item.type == ItemID.LavaCrate || item.type == ItemID.LavaCrateHard)
Expand Down
1 change: 0 additions & 1 deletion Global/NPCLoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
using Terraria.GameContent.Bestiary;

//Note netID is sometimes used when involving NPCs with negative IDs (variant NPCs), otherwise it gives duplicate loot drops to multiple NPCs. Not always does this happen though.
namespace ReducedGrinding.Global
Expand Down
39 changes: 27 additions & 12 deletions Global/Recipes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -482,62 +482,62 @@ public override void AddRecipes()
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.AncientHallowedMask);
recipe = Recipe.Create(ItemID.HallowedBar, 12);
recipe.AddIngredient(ItemID.HallowedMask);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.AncientHallowedHelmet);
recipe = Recipe.Create(ItemID.HallowedBar, 12);
recipe.AddIngredient(ItemID.HallowedHelmet);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.AncientHallowedHeadgear);
recipe = Recipe.Create(ItemID.HallowedBar, 12);
recipe.AddIngredient(ItemID.HallowedHeadgear);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.AncientHallowedHood);
recipe = Recipe.Create(ItemID.HallowedBar, 12);
recipe.AddIngredient(ItemID.HallowedHood);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.AncientHallowedPlateMail);
recipe = Recipe.Create(ItemID.HallowedBar, 24);
recipe.AddIngredient(ItemID.HallowedPlateMail);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.AncientHallowedGreaves);
recipe = Recipe.Create(ItemID.HallowedBar, 18);
recipe.AddIngredient(ItemID.HallowedGreaves);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.HallowedMask);
recipe = Recipe.Create(ItemID.HallowedBar, 12);
recipe.AddIngredient(ItemID.AncientHallowedMask);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.HallowedHelmet);
recipe = Recipe.Create(ItemID.HallowedBar, 12);
recipe.AddIngredient(ItemID.AncientHallowedHelmet);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.HallowedHeadgear);
recipe = Recipe.Create(ItemID.HallowedBar, 12);
recipe.AddIngredient(ItemID.AncientHallowedHeadgear);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.HallowedHood);
recipe = Recipe.Create(ItemID.HallowedBar, 12);
recipe.AddIngredient(ItemID.AncientHallowedHood);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.HallowedPlateMail);
recipe = Recipe.Create(ItemID.HallowedBar, 24);
recipe.AddIngredient(ItemID.AncientHallowedPlateMail);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.HallowedGreaves);
recipe = Recipe.Create(ItemID.HallowedBar, 18);
recipe.AddIngredient(ItemID.AncientHallowedGreaves);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();
Expand Down Expand Up @@ -1171,6 +1171,19 @@ public override void AddRecipes()
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

if (GetInstance<IOtherConfig>().CraftableRareChests)
{
recipe = Recipe.Create(ItemID.ShadowChest);
recipe.AddIngredient(ItemID.ShadowKey);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();

recipe = Recipe.Create(ItemID.ShadowKey);
recipe.AddIngredient(ItemID.ShadowChest);
recipe.AddTile(TileType<Tiles.ShimmeringStar>());
recipe.Register();
}

#region Dungeon Furniture

#region Blue to Green
Expand Down Expand Up @@ -1545,6 +1558,8 @@ public override void AddRecipes()
#region Craftable Rare Chests
if (GetInstance<IOtherConfig>().CraftableRareChests)
{
//Shadow Chest also requires this condition, but is crafted using shimmering, so it's in the shimmering section above.

recipe = Recipe.Create(ItemID.IvyChest);
recipe.AddIngredient(ItemID.RichMahogany, 8);
recipe.AddRecipeGroup(RecipeGroupID.IronBar, 2);
Expand Down
2 changes: 2 additions & 0 deletions Global/Shops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public override void GetChat(NPC npc, ref string chat)
if (npc.type == NPCID.Angler)
{
if (GetInstance<CFishingConfig>().AnglerTellsQuestCompleted)
{
Main.NewText("Quests completed: " + player.anglerQuestsFinished.ToString(), 0, 255, 255);
}

if (GetInstance<CFishingConfig>().FishCoinsRewardedForQuest > 0)
{
Expand Down
40 changes: 40 additions & 0 deletions Global/ValueModification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,46 @@ void FindNewValue(float oldChance, int newChance)
{
item.value = Item.sellPrice(0, 0, 54);
}

if (item.type == ItemID.ImpStaff)
{
item.value = Item.sellPrice(0, 0, 54);
}

if (item.type == ItemID.BeeWax)
{
item.value = Item.sellPrice(0, 0, 5);
}

if (item.type == ItemID.BeeHeadgear)
{
item.value = Item.sellPrice(0, 0, 40);
}

if (item.type == ItemID.BeeBreastplate)
{
item.value = Item.sellPrice(0, 0, 60);
}

if (item.type == ItemID.BeeGreaves)
{
item.value = Item.sellPrice(0, 0, 50);
}

if (item.type == ItemID.Beenade)
{
item.value = Item.sellPrice(0, 0, 5);
}

if (item.type == 5294) //Hive-Five
{
item.value = Item.sellPrice(0, 0, 70);
}

if (item.type == ItemID.HornetStaff)
{
item.value = Item.sellPrice(0, 0, 70);
}
#endregion
}
}
Expand Down
14 changes: 7 additions & 7 deletions Global/WorldGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ protected override void ApplyPass(GenerationProgress progress, GameConfiguration
ItemID.LuckyHorseshoe,
ItemID.CelestialMagnet
}; //Vanilla Skyware items will generate making sure to add rare items that haven't been added yet by going down the list, then it will be random.
if (!GetInstance<IOtherConfig>().FutureFledglingChestChance)
{
missingSkywareItems.Add(ItemID.CreativeWings);
}

if (!GetInstance<IOtherConfig>().FutureFledglingChestChance)
{
missingSkywareItems.Add(ItemID.CreativeWings);
}

List<int> terragrimChests = new();
List<int> nonSkywareChests = new(); //TO-DO Remove when 1.4.4+ comes out
List<int> lockedGoldChest = new();
Expand Down Expand Up @@ -715,7 +715,7 @@ void tryToPlaceMushroomChest(int mushroomBiome, int item = -1)
}
else
{
int chance = GetInstance<IOtherConfig>().FutureFledglingChestChance ? 4 : 5;
int chance = GetInstance<IOtherConfig>().FutureFledglingChestChance ? 4 : 5;
switch (WorldGen.genRand.Next(chance))
{
case 0:
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
author = Dragon3025
version = 8.13.2
version = 8.13.3
displayName = Reduced Grinding
homepage = http://forums.terraria.org/index.php?threads/reduced-grinding.51082/
hideCode = false
Expand Down

0 comments on commit b7cd3a7

Please sign in to comment.