Skip to content

Commit

Permalink
Kings fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwyk committed Jan 29, 2020
1 parent adf5c08 commit a12aeb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions ClassicCraft/Entities/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1177,13 +1177,13 @@ public void CalculateAttributes()

Attributes += BonusAttributesByRace(Race, Attributes);

if (Buffs.Any(b => b.Name == "Blessing of Kings"))
if (Buffs.Any(b => b.Name.ToLower().Contains("blessing of kings")))
{
Attributes.SetValue(Attribute.Stamina, Attributes.GetValue(Attribute.Intellect) * 1.1);
Attributes.SetValue(Attribute.Stamina, Attributes.GetValue(Attribute.Stamina) * 1.1);
Attributes.SetValue(Attribute.Intellect, Attributes.GetValue(Attribute.Intellect) * 1.1);
Attributes.SetValue(Attribute.Strength, Attributes.GetValue(Attribute.Intellect) * 1.1);
Attributes.SetValue(Attribute.Agility, Attributes.GetValue(Attribute.Intellect) * 1.1);
Attributes.SetValue(Attribute.Spirit, Attributes.GetValue(Attribute.Intellect) * 1.1);
Attributes.SetValue(Attribute.Strength, Attributes.GetValue(Attribute.Strength) * 1.1);
Attributes.SetValue(Attribute.Agility, Attributes.GetValue(Attribute.Agility) * 1.1);
Attributes.SetValue(Attribute.Spirit, Attributes.GetValue(Attribute.Spirit) * 1.1);
}

Attributes.SetValue(Attribute.Health, Attributes.GetValue(Attribute.Health) + 20 + (Attributes.GetValue(Attribute.Stamina) - 20) * 10);
Expand Down
10 changes: 5 additions & 5 deletions ClassicCraft/Utility/JsonUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public static Player ToPlayer(JsonPlayer jp)

return new Player(null, ToClass(jp.Class), ToRace(jp.Race), 60, ToEquipment(jp.Weapons, jp.Equipment), null, buffs)
{
WindfuryTotem = jp.Buffs != null && jp.Buffs.Select(b => b.Name).Contains("Windfury Totem"),
WindfuryTotem = jp.Buffs != null && jp.Buffs.Any(b => b.Name.ToLower().Contains("windfury totem")),
Cooldowns = jp.Cooldowns.Where(v => v.Value == true).Select(c => c.Key).ToList()
};
}
Expand Down Expand Up @@ -317,10 +317,10 @@ public static Boss ToBoss(JsonBoss jb, double armorPen = 0)

if (debuffs != null && debuffs.Count > 0)
{
armor -= (debuffs.Contains("Expose Armor") ? 2550 : (debuffs.Contains("Sunder Armor") ? 2250 : 0))
+ (debuffs.Contains("Curse of Recklessness") ? 640 : 0)
+ (debuffs.Contains("Faerie Fire") ? 505 : 0)
+ (debuffs.Contains("Annihilator") ? 600 : 0);
armor -= (debuffs.Any(d => d.ToLower().Contains("expose armor")) ? 2550 : (debuffs.Any(d => d.ToLower().Contains("sunder armor")) ? 2250 : 0))
+ (debuffs.Any(d => d.ToLower().Contains("curse of recklessness")) ? 640 : 0)
+ (debuffs.Any(d => d.ToLower().Contains("faerie fire")) ? 505 : 0)
+ (debuffs.Any(d => d.ToLower().Contains("annihilator")) ? 600 : 0);
}

return new Boss(ToType(jb.Type), jb.Level, Math.Max(0, armor));
Expand Down

0 comments on commit a12aeb2

Please sign in to comment.