Skip to content

Commit

Permalink
0.1.2.4 fixed weapons doing too much damage in normal mode and fixed …
Browse files Browse the repository at this point in the history
…armor having a damage penalty
  • Loading branch information
Jack authored and Jack committed Aug 19, 2020
1 parent 5a1d88e commit 773600f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
10 changes: 5 additions & 5 deletions Helpers/Calc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public static float Damage(object attack, object defense)
float multiplier3 = Table.Effectiveness[attackQuatrinary, defenseTertiary];

float dmg = multiplier1 * multiplier2 * multiplier3;
if (dmg != 0)
if (!Main.expertMode)
dmg = (dmg + dmg + 1) / 3;
//if (dmg != 0)
// if (!Main.expertMode)
// dmg = (dmg + dmg + 1) / 3;
return dmg;
}

Expand All @@ -69,8 +69,8 @@ public static float STAB(object attack, object defense)
else if (defenseTertiary == attackQuatrinary)
multiplier *= ModContent.GetInstance<Config>().STAB;
}
if (!Main.expertMode)
multiplier = (multiplier + 1) / 2;
//if (!Main.expertMode)
// multiplier = (multiplier + 1) / 2;
return multiplier;
}

Expand Down
29 changes: 16 additions & 13 deletions Items/Weather.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,23 @@ public override void ModifyWeaponDamage(Item item, Player player, ref float add,

public override void ModifyTooltips(Item item, List<TooltipLine> tooltips)
{
string bonusOrPenalty = string.Empty;
if (weatherMult > 1)
bonusOrPenalty = "bonus";
else if (weatherMult < 1)
bonusOrPenalty = "penalty";
if (weatherMult != 1)
if (item.damage > 0)
{
var line = new TooltipLine(mod, "weatherMult", $"{weatherReason} {bonusOrPenalty}: {Math.Round((weatherMult - 1) * 100)}%");
tooltips.Add(line);
}
if (boostMult != 1)
{
var line = new TooltipLine(mod, "weatherMult", $"Held Item bonus: {Math.Round((boostMult - 1) * 100)}%");
tooltips.Add(line);
string bonusOrPenalty = string.Empty;
if (weatherMult > 1)
bonusOrPenalty = "bonus";
else if (weatherMult < 1)
bonusOrPenalty = "penalty";
if (weatherMult != 1)
{
var line = new TooltipLine(mod, "weatherMult", $"{weatherReason} {bonusOrPenalty}: {Math.Round((weatherMult - 1) * 100)}%");
tooltips.Add(line);
}
if (boostMult != 1)
{
var line = new TooltipLine(mod, "weatherMult", $"Held Item bonus: {Math.Round((boostMult - 1) * 100)}%");
tooltips.Add(line);
}
}
}
}
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 = CrimsonTek
version = 0.1.2.3
version = 0.1.2.4
displayName = TerraTyping
homepage = https://discord.gg/RvPGKwz
buildIgnore= *.sln, *csproj, *.user, obj\*, bin\*, .vs\*
4 changes: 4 additions & 0 deletions description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Mod Homepage: https://discord.gg/RvPGKwz

Version History:

v0.1.2.4
- Fixed weapons doing more damage than they should in normal mode
- Armor no longer shows a "damage penalty", despite not being weapons

v0.1.2.3
- Fixed weapons having too much damage

Expand Down

0 comments on commit 773600f

Please sign in to comment.