Include off-hand for Dawntracker set checks.
This commit is contained in:
parent
5aa4319a86
commit
fc6dbded2c
Binary file not shown.
@ -307,7 +307,7 @@ public class CustomDamage {
|
|||||||
private static double getDamageFromBarbarianSetBonus(LivingEntity target) {
|
private static double getDamageFromBarbarianSetBonus(LivingEntity target) {
|
||||||
if (target instanceof Player) {
|
if (target instanceof Player) {
|
||||||
Player p = (Player)target;
|
Player p = (Player)target;
|
||||||
return (ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER)+1)/3;
|
return (ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER)+1)/3;
|
||||||
}
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
@ -1022,7 +1022,7 @@ public class CustomDamage {
|
|||||||
public static void IncreaseWeaponCharges(Player p, int amt) {
|
public static void IncreaseWeaponCharges(Player p, int amt) {
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
if (pd.rage_time<=TwosideKeeper.getServerTickTime()) {
|
if (pd.rage_time<=TwosideKeeper.getServerTickTime()) {
|
||||||
if (ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER)) {
|
if (ItemSet.hasFullSet(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER)) {
|
||||||
amt*=2;
|
amt*=2;
|
||||||
}
|
}
|
||||||
pd.weaponcharges+=amt;
|
pd.weaponcharges+=amt;
|
||||||
@ -1032,7 +1032,7 @@ public class CustomDamage {
|
|||||||
|
|
||||||
public static void IncreaseLifestealStacks(Player p, int amt) {
|
public static void IncreaseLifestealStacks(Player p, int amt) {
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
if (ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER)) {
|
if (ItemSet.hasFullSet(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER)) {
|
||||||
amt*=2;
|
amt*=2;
|
||||||
}
|
}
|
||||||
pd.lifestealstacks=Math.min(100,pd.lifestealstacks+amt*((pd.rage_time>TwosideKeeper.getServerTickTime())?2:1));
|
pd.lifestealstacks=Math.min(100,pd.lifestealstacks+amt*((pd.rage_time>TwosideKeeper.getServerTickTime())?2:1));
|
||||||
@ -2634,7 +2634,7 @@ public class CustomDamage {
|
|||||||
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.PANROS, 5)) {
|
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.PANROS, 5)) {
|
||||||
finaldmg += dmg*0.5;
|
finaldmg += dmg*0.5;
|
||||||
} else
|
} else
|
||||||
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER, 5)) {
|
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER, 5)) {
|
||||||
finaldmg += dmg*0.5;
|
finaldmg += dmg*0.5;
|
||||||
} else
|
} else
|
||||||
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.LORASYS, 1)) {
|
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.LORASYS, 1)) {
|
||||||
@ -2833,7 +2833,7 @@ public class CustomDamage {
|
|||||||
public static double calculateLifeStealAmount(Player p, ItemStack weapon, String reason) {
|
public static double calculateLifeStealAmount(Player p, ItemStack weapon, String reason) {
|
||||||
double lifestealpct = GenericFunctions.getAbilityValue(ArtifactAbility.LIFESTEAL, weapon)/100;
|
double lifestealpct = GenericFunctions.getAbilityValue(ArtifactAbility.LIFESTEAL, weapon)/100;
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
lifestealpct += ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER, 3, 3)/100d;
|
lifestealpct += ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER, 3, 3)/100d;
|
||||||
lifestealpct += pd.lifestealstacks/100d;
|
lifestealpct += pd.lifestealstacks/100d;
|
||||||
lifestealpct += API.getPlayerBonuses(p).getBonusLifesteal();
|
lifestealpct += API.getPlayerBonuses(p).getBonusLifesteal();
|
||||||
if (reason!=null && reason.equalsIgnoreCase("power swing")) {
|
if (reason!=null && reason.equalsIgnoreCase("power swing")) {
|
||||||
@ -2997,7 +2997,7 @@ public class CustomDamage {
|
|||||||
removechance+=resistamt;
|
removechance+=resistamt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
removechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER, 2, 2);
|
removechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER, 2, 2);
|
||||||
return removechance;
|
return removechance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3079,7 +3079,7 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int GetDamageReductionFromDawntrackerPieces(Player p) {
|
public static int GetDamageReductionFromDawntrackerPieces(Player p) {
|
||||||
return (ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER))/3;
|
return (ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER))/3;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static double increaseDamageDealtByFireTicks(Player p, double damage, String reason) {
|
private static double increaseDamageDealtByFireTicks(Player p, double damage, String reason) {
|
||||||
|
@ -4063,7 +4063,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
ev.getPlayer().getEquipment().setItemInMainHand(ev.getItemDrop().getItemStack());
|
ev.getPlayer().getEquipment().setItemInMainHand(ev.getItemDrop().getItemStack());
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(ev.getPlayer());
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(ev.getPlayer());
|
||||||
Player p = ev.getPlayer();
|
Player p = ev.getPlayer();
|
||||||
boolean hasFullSet = ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER);
|
boolean hasFullSet = ItemSet.hasFullSet(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER);
|
||||||
if (PlayerMode.getPlayerMode(p)==PlayerMode.BARBARIAN &&
|
if (PlayerMode.getPlayerMode(p)==PlayerMode.BARBARIAN &&
|
||||||
((hasFullSet && pd.last_mock+GenericFunctions.GetModifiedCooldown(TwosideKeeper.MOCK_COOLDOWN/2,ev.getPlayer())<=TwosideKeeper.getServerTickTime()) || pd.last_mock+GenericFunctions.GetModifiedCooldown(TwosideKeeper.MOCK_COOLDOWN,ev.getPlayer())<=TwosideKeeper.getServerTickTime())) {
|
((hasFullSet && pd.last_mock+GenericFunctions.GetModifiedCooldown(TwosideKeeper.MOCK_COOLDOWN/2,ev.getPlayer())<=TwosideKeeper.getServerTickTime()) || pd.last_mock+GenericFunctions.GetModifiedCooldown(TwosideKeeper.MOCK_COOLDOWN,ev.getPlayer())<=TwosideKeeper.getServerTickTime())) {
|
||||||
pd.last_mock=getServerTickTime();
|
pd.last_mock=getServerTickTime();
|
||||||
@ -8240,7 +8240,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER, 4, 4);
|
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER, 4, 4);
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL, 2, 2);
|
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL, 2, 2);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user