diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a82bfd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Auto-generated directories +bin/ +obj/ diff --git a/Content/BossOverrides.cs b/Content/BossOverrides.cs index 11e07a1..fd3f6c5 100644 --- a/Content/BossOverrides.cs +++ b/Content/BossOverrides.cs @@ -1,10 +1,12 @@ +using System; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.GameContent.ItemDropRules; using Continuity.Content.Items; -namespace Continuity.Content.NPCs +namespace Continuity.Content { public class PlanteraDrops : GlobalNPC { @@ -12,7 +14,35 @@ namespace Continuity.Content.NPCs { if (npc.type == NPCID.Plantera) { - npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 1, 15, 25)); + npcLoot.Add(ItemDropRule.Common(ModContent.ItemType(), 1, 25, 35)); + } + } + } + + public class PlanteraBossBag : GlobalItem + { + public override void ModifyItemLoot(Item item, ItemLoot itemLoot) + { + if (item.type == ItemID.PlanteraBossBag) + { + short[] toRemove = { + ItemID.TheAxe, + ItemID.PygmyStaff, + ItemID.Seedling, + ItemID.ThornHook, + }; + foreach (var i in toRemove) + { + itemLoot.RemoveWhere(rule => rule is CommonDropNotScalingWithLuck drop + && drop.itemId == i); + } + itemLoot.RemoveWhere(rule => rule is CommonDrop drop + && drop.itemId == ItemID.TempleKey); + + foreach (var rule in itemLoot.Get()) + { + itemLoot.RemoveWhere(rule => rule is OneFromRulesRule); + } } } } diff --git a/Content/Items/Recipes.cs b/Content/Items/Recipes.cs deleted file mode 100644 index 857d20a..0000000 --- a/Content/Items/Recipes.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Continuity.Content.Items; - -namespace Continuity.Content.Palishade -{ - public class PlanteraRecipes : ModSystem - { - public override void AddRecipes() { - // Seedler - Recipe recipe = Recipe.Create(ItemID.Seedler); - recipe.AddIngredient(ItemID.ChlorophyteBar, 12); - recipe.AddIngredient(ModContent.ItemType(), 9); - recipe.AddIngredient(331, 6); - recipe.Register(); - } - } -} diff --git a/Content/Recipes.cs b/Content/Recipes.cs new file mode 100644 index 0000000..5d03479 --- /dev/null +++ b/Content/Recipes.cs @@ -0,0 +1,88 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Continuity.Content.Items; + +namespace Continuity.Content +{ + public class PlanteraRecipes : ModSystem + { + public override void AddRecipes() { + // Seedler + Recipe recipe = Recipe.Create(ItemID.Seedler); + recipe.AddIngredient(ItemID.ChlorophyteBar, 12); + recipe.AddIngredient(ItemID.Stinger, 3); + recipe.AddIngredient(ModContent.ItemType(), 9); + recipe.AddIngredient(331, 6); + recipe.Register(); + + // The Axe + recipe = Recipe.Create(ItemID.TheAxe); + recipe.AddIngredient(ItemID.ChlorophyteBar, 15); + recipe.AddIngredient(ItemID.Stinger, 2); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(331, 3); + recipe.Register(); + + // Temple Key + recipe = Recipe.Create(ItemID.TempleKey); + recipe.AddIngredient(ItemID.ChlorophyteBar, 2); + recipe.AddIngredient(ModContent.ItemType(), 3); + recipe.Register(); + + // Nettle Burst + recipe = Recipe.Create(ItemID.NettleBurst); + recipe.AddIngredient(ItemID.ChlorophyteBar, 10); + recipe.AddIngredient(ItemID.Stinger, 4); + recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ItemID.Vine, 3); + recipe.Register(); + + // Pygmy Staff + recipe = Recipe.Create(ItemID.PygmyStaff); + recipe.AddIngredient(ItemID.ChlorophyteBar, 12); + recipe.AddIngredient(ItemID.Stinger, 4); + recipe.AddIngredient(ModContent.ItemType(), 9); + recipe.AddIngredient(ItemID.Vine, 2); + recipe.Register(); + + // Flower Pow + recipe = Recipe.Create(ItemID.FlowerPow); + recipe.AddIngredient(ItemID.ChlorophyteBar, 11); + recipe.AddIngredient(ItemID.JungleRose, 1); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.Vine, 3); + recipe.Register(); + + // Leaf Blower + recipe = Recipe.Create(ItemID.LeafBlower); + recipe.AddIngredient(ItemID.ChlorophyteBar, 10); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ItemID.Vine, 1); + recipe.AddIngredient(331, 8); + recipe.Register(); + + // Venus Magnum + recipe = Recipe.Create(ItemID.VenusMagnum); + recipe.AddIngredient(ItemID.ChlorophyteBar, 12); + recipe.AddIngredient(ItemID.Handgun, 1); + recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ItemID.Vine, 2); + recipe.Register(); + + // Grenade Launcher + recipe = Recipe.Create(ItemID.GrenadeLauncher); + recipe.AddIngredient(ItemID.ChlorophyteBar, 10); + recipe.AddRecipeGroup(RecipeGroupID.IronBar, 8); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.Register(); + + // Thorn Hook + recipe = Recipe.Create(ItemID.ThornHook); + recipe.AddIngredient(ItemID.Stinger, 3); + recipe.AddIngredient(ModContent.ItemType(), 2); + recipe.AddIngredient(ItemID.Vine, 5); + recipe.Register(); + } + } +} diff --git a/Localization/en-US_Mods.continuity.hjson b/Localization/en-US_Mods.continuity.hjson index b0992d0..4a965f9 100644 --- a/Localization/en-US_Mods.continuity.hjson +++ b/Localization/en-US_Mods.continuity.hjson @@ -3,7 +3,7 @@ Items: { Tooltip: ''' A clump of dark red cells from Plantera. - Hardens when exposed to bright light. + [c/B4202A:Hardens when exposed to bright light.] ''' DisplayName: Palishade Tissue } diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json index 494048a..b441563 100644 --- a/Properties/launchSettings.json +++ b/Properties/launchSettings.json @@ -2,13 +2,13 @@ "profiles": { "Terraria": { "commandName": "Executable", - "executablePath": "$(DotNetName)", + "executablePath": "/etc/profiles/per-user/devraza/bin/dotnet", "commandLineArgs": "$(tMLPath)", "workingDirectory": "$(tMLSteamPath)" }, "TerrariaServer": { "commandName": "Executable", - "executablePath": "$(DotNetName)", + "executablePath": "/etc/profiles/per-user/devraza/bin/dotnet", "commandLineArgs": "$(tMLServerPath)", "workingDirectory": "$(tMLSteamPath)" } diff --git a/build.txt b/build.txt index 4d912ae..d8cb9f7 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,4 @@ displayName = Continuity author = The Continuity Team -version = 0.1 \ No newline at end of file +sortAfter = CalamityMod +version = 0.1