Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
- Sky Crates now have a 25% chance of dropping Sky Mill.
- Made an Angler Potion: Causes the angler to have a new quest for you right away.
- Reduced war potion cost from 7 to 5 powders (which is 1 mushroom).
  • Loading branch information
dragon3025 authored Nov 12, 2018
1 parent 9b151f0 commit 22f80e4
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 3 deletions.
16 changes: 14 additions & 2 deletions Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace ReducedGrinding
{
public static class Config
{
static string filename = "Reduced Grinding v4.31.json";
static string filename = "Reduced Grinding v4.32.json";

public static float BagBoneRattleIncrease = 0.2f;
public static float BagFishronWingsIncrease = 0.1f;
Expand All @@ -29,6 +29,7 @@ public static class Config
public static float WoodenIronAndGoldCrateLivingWoodWand = 0.10f;
public static float WoodenIronAndGoldCrateWaterWalkingBoots = 0.10f;
public static float WoodenIronAndGoldCrateWaterFlippers = 0.10f;
public static float SkyCrateSkyMill = 0.25f;
public static float PresentDogWhistle = 0.00f;
public static float PresentToolbox = 0.00f;
public static float PresentHandWarmer = 0.00f;
Expand Down Expand Up @@ -429,13 +430,16 @@ public static class Config
public static bool UseSandstormPotionRecipe = true;
public static int SandstormPotionBlinkrootCost = 1;
public static int SandstormPotionSandBlockCost = 1;
public static bool UseAnglerPotionRecipe = true;
public static int AnglerPotionSpecularFishCost = 1;
public static int AnglerPotionMoonglowCost = 1;

public static float BattlePotionSpawnrateMultiplier = 1f;
public static float BattlePotionMaxSpawnsMultiplier = 1f;
public static bool UseWarPotionRecipe = true;
public static float WarPotionSpawnrateMultiplier = 10f;
public static float WarPotionMaxSpawnsMultiplier = 10f;
public static int WarPotionPowderCost = 7;
public static int WarPotionPowderCost = 5;
public static int WarPotionDurationInFrames = 25200;

public static int NewCharacterMiningPotions = 3;
Expand Down Expand Up @@ -545,6 +549,7 @@ static bool ReadConfig()
Configuration.Get("WoodenIronAndGoldCrateLivingWoodWand", ref WoodenIronAndGoldCrateLivingWoodWand);
Configuration.Get("WoodenIronAndGoldCrateWaterWalkingBoots", ref WoodenIronAndGoldCrateWaterWalkingBoots);
Configuration.Get("WoodenIronAndGoldCrateWaterFlippers", ref WoodenIronAndGoldCrateWaterFlippers);
Configuration.Get("SkyCrateSkyMill", ref SkyCrateSkyMill);
Configuration.Get("PresentDogWhistle", ref PresentDogWhistle);
Configuration.Get("PresentToolbox ", ref PresentToolbox);
Configuration.Get("PresentHandWarmer", ref PresentHandWarmer);
Expand Down Expand Up @@ -944,6 +949,9 @@ static bool ReadConfig()
Configuration.Get("UseSandstormPotionRecipe", ref UseSandstormPotionRecipe);
Configuration.Get("SandstormPotionBlinkrootCost", ref SandstormPotionBlinkrootCost);
Configuration.Get("SandstormPotionSandBlockCost", ref SandstormPotionSandBlockCost);
Configuration.Get("UseAnglerPotionRecipe", ref UseAnglerPotionRecipe);
Configuration.Get("AnglerPotionSpecularFishCost", ref AnglerPotionSpecularFishCost);
Configuration.Get("AnglerPotionMoonglowCost", ref AnglerPotionMoonglowCost);

Configuration.Get("BattlePotionSpawnrateMultiplier", ref BattlePotionSpawnrateMultiplier);
Configuration.Get("BattlePotionMaxSpawnsMultiplier", ref BattlePotionMaxSpawnsMultiplier);
Expand Down Expand Up @@ -1054,6 +1062,7 @@ static void CreateConfig()
Configuration.Put("WoodenIronAndGoldCrateLivingWoodWand", WoodenIronAndGoldCrateLivingWoodWand);
Configuration.Put("WoodenIronAndGoldCrateWaterWalkingBoots", WoodenIronAndGoldCrateWaterWalkingBoots);
Configuration.Put("WoodenIronAndGoldCrateWaterFlippers", WoodenIronAndGoldCrateWaterFlippers);
Configuration.Put("SkyCrateSkyMill", SkyCrateSkyMill);
Configuration.Put("PresentDogWhistle", PresentDogWhistle);
Configuration.Put("PresentToolbox ", PresentToolbox);
Configuration.Put("PresentHandWarmer", PresentHandWarmer);
Expand Down Expand Up @@ -1453,6 +1462,9 @@ static void CreateConfig()
Configuration.Put("UseSandstormPotionRecipe", UseSandstormPotionRecipe);
Configuration.Put("SandstormPotionBlinkrootCost", SandstormPotionBlinkrootCost);
Configuration.Put("SandstormPotionSandBlockCost", SandstormPotionSandBlockCost);
Configuration.Put("UseAnglerPotionRecipe", UseAnglerPotionRecipe);
Configuration.Put("AnglerPotionSpecularFishCost", AnglerPotionSpecularFishCost);
Configuration.Put("AnglerPotionMoonglowCost", AnglerPotionMoonglowCost);

Configuration.Put("BattlePotionSpawnrateMultiplier", BattlePotionSpawnrateMultiplier);
Configuration.Put("BattlePotionMaxSpawnsMultiplier", BattlePotionMaxSpawnsMultiplier);
Expand Down
57 changes: 57 additions & 0 deletions Items/Angler_Potion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace ReducedGrinding.Items
{
public class Angler_Potion : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Angler Potion");
Tooltip.SetDefault("One botle of this will make the Angler want to give you a new fishing quest right away.");
}

public override void SetDefaults()
{
item.width = 20;
item.height = 30;
item.maxStack = 30;
item.rare = 0;
item.useAnimation = 45;
item.useTime = 45;
item.useStyle = 4;
item.value = (Config.RainPotionWaterleafCost * 200);
item.UseSound = SoundID.Item3;
item.consumable = true;
}

public override bool CanUseItem(Player player)
{
return true;
}

public override bool UseItem(Player player)
{
Main.NewText("The angler has a new quest for you.", 0, 128, 255);
Main.AnglerQuestSwap();
return true;
}

public override void AddRecipes()
{
if (Config.UseAnglerPotionRecipe)
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater, 1);
if (Config.AnglerPotionSpecularFishCost > 0)
recipe.AddIngredient(2309, Config.AnglerPotionSpecularFishCost);
if (Config.AnglerPotionMoonglowCost > 0)
recipe.AddIngredient(314, Config.AnglerPotionMoonglowCost);
recipe.AddTile(TileID.Bottles);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
}
Binary file added Items/Angler_Potion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions ReducedGrinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ public override void OpenVanillaBag(string context, Player player, int arg)
}
}
}
if (arg == 3206) //Sky Crate
{
if (Config.SkyCrateSkyMill > 0)
{
if (Main.rand.Next(10000)+1 <= Config.SkyCrateSkyMill*10000)
{
player.QuickSpawnItem(2197, 1); //Sky Mill
}
}
}
if (arg == ItemID.WoodenCrate || arg == ItemID.IronCrate || arg == ItemID.GoldenCrate)
{
if (Config.WoodenIronAndGoldCrateLivingLoom > 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 = 4.31
version = 4.32
displayName = Reduced Grinding
homepage = http://forums.terraria.org/index.php?threads/reduced-grinding.51082/
hideCode = false
Expand Down

0 comments on commit 22f80e4

Please sign in to comment.