Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Added Ninja & Obsidian armor set effects etc
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsukino-uwu committed Jun 8, 2020
1 parent 5bac147 commit 35841a2
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 6 deletions.
Binary file modified .vs/NekoTweakMod/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified .vs/NekoTweakMod/v16/.suo
Binary file not shown.
Binary file added Items/.vs/Items/v16/.suo
Binary file not shown.
6 changes: 6 additions & 0 deletions Items/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added Items/.vs/slnx.sqlite
Binary file not shown.
22 changes: 22 additions & 0 deletions Items/AddTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class AddTooltip : GlobalItem
{
if (item.type == ItemID.Shackle) // Specifies what item
{
// This code allows you to add new tooltips lines to items if they don't have one them
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enemies are more likely to target you");
// Creates a new TooltipLine for your mod with the name Tooltip0
// "Tooltip#" - A tooltip line of the item. # will be 0 for the first line, 1 for the second, etc.
Expand Down Expand Up @@ -45,6 +46,27 @@ public class AddTooltip : GlobalItem
tooltips.Add(newTooltip);
}
}
{
if(item.type == ItemID.ObsidianHelm)
{
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Increases minion damage by 5%");
tooltips.Add(newTooltip);
}
}
{
if(item.type == ItemID.ObsidianShirt)
{
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Increases minion damage by 10%");
tooltips.Add(newTooltip);
}
}
{
if(item.type == ItemID.ObsidianPants)
{
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Increases minion damage by 5%");
tooltips.Add(newTooltip);
}
}
}
}
}
11 changes: 9 additions & 2 deletions Items/ModifyEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ namespace NekoTweakMod.Items
{
public class ModifyEffect : GlobalItem
{
public override void UpdateEquip(Item item, Player player)
public override void UpdateEquip(Item item, Player player) // Allows us to modify effects on items
{
if(item.type == ItemID.SpiderMask) // Also changes the tooltip in Modifytooltip.cs for this item
if(item.type == ItemID.SpiderMask)
// Tooltip is also removed in ModifyTooltip.cs for this item
// so we don't keep the max minion tooltip on the item after the effect is removed
{
player.maxMinions -= 1; // reduces the max minion cap by 1
}
{
if(item.type == ItemID.ObsidianHelm) player.minionDamage += 0.05f; // gives 5% minion damage
if (item.type == ItemID.ObsidianShirt) player.minionDamage += 0.10f;
if (item.type == ItemID.ObsidianShirt) player.minionDamage += 0.05f;
}
}
}
}
40 changes: 40 additions & 0 deletions Items/ModifySetEffect.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;

namespace NekoTweakMod.Items
{
public class ModifySetEffect : GlobalItem
{
const string NinjaSet = "Ninja Armor"; // We need a string to change for specifying what set to change later on in the code
const string ObsidianSet = "Obsidian armor";
public override string IsArmorSet(Item head, Item body, Item legs) // Allows us to specify if these items together is a armor
{
if (head.type == ItemID.NinjaHood && body.type == ItemID.NinjaShirt && legs.type == ItemID.NinjaPants) // helmet,shirt,pants for the armor set
return NinjaSet; // sets these items as the NinjaSet string when all of them are worn together
if (head.type == ItemID.ObsidianHelm && body.type == ItemID.ObsidianShirt && legs.type == ItemID.ObsidianPants)
return ObsidianSet;
return ""; // fail safe, has to return something even if its none of the sets above
}
public override void UpdateArmorSet(Player player, string set) // allows us to change set effects
{
base.UpdateArmorSet(player, set);
if(set == NinjaSet) // checks if the items in isArmorSet is worn as a set
{
// We also have to change or remove the tooltip after doing this in ModifyTooltip.cs
// so it shows the new effect if we added one, or hide the one we removed
player.moveSpeed -= 0.20f; // -20% movemept speed so we remove the +20% the ninja set effect already had,so in this case just making it give 0%
player.minionDamage += 0.20f; // Gives +20% summon damage
player.setBonus = "Increases minion damage by 20%"; // Changes the set bonus/effect tooltip
// Only shows the set effect tooltip when all items are equiped together
}
{
if(set == ObsidianSet)
{
player.minionDamage += 0.30f;
player.setBonus = "Increases minion damage by 30%";
}
}
}
}
}
7 changes: 5 additions & 2 deletions Items/ModifyTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ public class ModifyTooltip : GlobalItem
{
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips) // Allows you to set/change all available tooltips
{
if (item.type == ItemID.FeralClaws) // Specifies what item to change, If its this specific item the code below will be used
if (item.type == ItemID.FeralClaws)
// Specifies what item to change, If its this specific item the code below will be used
// This code is for changing a tooltip that an item already has
// Look at AddTooltip.cs instead if the item don't have the Tooltip you are trying to change
{
TooltipLine line = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria");
// Grabs Name(name of the tooltip) from the tooltip "tooltip0" from a mod with the name "Terraria"
Expand All @@ -36,7 +39,7 @@ public class ModifyTooltip : GlobalItem
if (item.type == ItemID.SpiderMask)
{
TooltipLine line3 = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria");
if (line3 != null) line3.text = ""; // Removes the tooltip from the item
if (line3 != null) line3.text = ""; // Removes/hide the tooltip from the item
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Items/NoFakeChests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public override void SetDefaults(Item item)
}
} // still missing few 1.4 fake chests
} // hopefully this simple code change them to working chests~
// might have to clone the tiles and not the items
/*
if(item.type == ItemID.Fake_BlueDungeonChest) item.CloneDefaults(ItemID.DeadMansChest);
if (item.type == ItemID.Fake_BoneChest) item.CloneDefaults(ItemID.DeadMansChest);
Expand Down
2 changes: 1 addition & 1 deletion NPCs/NPCshops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class NPCshops : GlobalNPC
shop.item[nextSlot].shopCustomPrice = 10;
nextSlot++; */
shop.item[nextSlot].SetDefaults(ItemID.PygmyNecklace);
shop.item[nextSlot].shopCustomPrice = 150000;
shop.item[nextSlot].shopCustomPrice = 350000;
nextSlot++;
}
}
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
- Living Tree & Pyramid chest loot from fishing crates *still WIP*
(Finch staff & Sandstorm in a Bottle etc)

- The ninja armor now gives 20% summon damage instead of movement speed as its set bonus

- The obsidian armor now have a set effect giving 30% summon damage
Additionally the helm,shirt,pants give 5,10 & 5 % summon damage each

- Feral claws changed from "12% increased melee speed" to "melee autoswing"
(Melee Autoswing also applies to summoner whips)

Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
displayName = Neko's Tweak Mod
author = Neko
version = 0.1.2.1
version = 0.1.2.2
homepage = https://forums.terraria.org/index.php?threads/nekos-tweak-mod.93711/
buildIgnore = obj\*, bin\*, *.csproj, .git\*, .gitattributes, .gitignore, .psd, .sln, ..vs\*, LICENSE
Binary file modified obj/Debug/net45/NekoTweakMod.csprojAssemblyReference.cache
Binary file not shown.

0 comments on commit 35841a2

Please sign in to comment.