diff --git a/.classpath b/.classpath
index 77a8fb2..999fe5e 100644
--- a/.classpath
+++ b/.classpath
@@ -5,6 +5,6 @@
-
+
diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar
index 530e3dc..adda82a 100644
Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ
diff --git a/src/plugin.yml b/src/plugin.yml
index 2591e00..c033880 100644
--- a/src/plugin.yml
+++ b/src/plugin.yml
@@ -1,6 +1,6 @@
name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper
-version: 3.10.9a
+version: 3.10.9b
loadbefore: [aPlugin]
commands:
money:
diff --git a/src/sig/plugin/TwosideKeeper/ChargeZombie.java b/src/sig/plugin/TwosideKeeper/ChargeZombie.java
index 501038d..471c836 100644
--- a/src/sig/plugin/TwosideKeeper/ChargeZombie.java
+++ b/src/sig/plugin/TwosideKeeper/ChargeZombie.java
@@ -12,6 +12,7 @@ public class ChargeZombie {
Monster m;
long stuckTimer=0;
Location lastLoc = null;
+ public boolean canBreak=true;
public ChargeZombie(Monster m) {
this.m=m;
@@ -126,6 +127,9 @@ public class ChargeZombie {
public static boolean ChanceToBreak(Block b) {
int blocktoughness = 0;
switch (b.getType()) {
+ case BEDROCK: {
+ blocktoughness=999999;
+ }break;
case OBSIDIAN:{
blocktoughness=100;
}break;
diff --git a/src/sig/plugin/TwosideKeeper/CustomDamage.java b/src/sig/plugin/TwosideKeeper/CustomDamage.java
index 5a5a7fe..f1dfddb 100644
--- a/src/sig/plugin/TwosideKeeper/CustomDamage.java
+++ b/src/sig/plugin/TwosideKeeper/CustomDamage.java
@@ -1654,6 +1654,7 @@ public class CustomDamage {
}
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
pd.fulldodge=false;
+ pd.slayermegahit=false;
calculateGracefulDodgeTicks(target);
GenericFunctions.updateNoDamageTickMap(target, damager);
} else {
@@ -1742,9 +1743,9 @@ public class CustomDamage {
private static boolean PassesDodgeCheck(LivingEntity target, Entity damager) {
if ((target instanceof Player) && Math.random()0) {
@@ -1778,10 +1779,10 @@ public class CustomDamage {
if (it!=null) {
if (ArtifactAbility.containsEnchantment(ArtifactAbility.SHADOWWALKER, it) &&
p.isOnGround() && p.getLocation().getY()>=0 && p.getLocation().add(0,0,0).getBlock().getLightLevel()<=7) {
- dodgechance+=0.01*ArtifactUtils.getArtifactTier(it);
+ dodgechance=addMultiplicativeValue(dodgechance,0.01*ArtifactUtils.getArtifactTier(it));
}
if (ArtifactAbility.containsEnchantment(ArtifactAbility.DODGE, it)) {
- dodgechance+=(ArtifactAbility.calculateValue(ArtifactAbility.DODGE, ArtifactUtils.getArtifactTier(it), ArtifactAbility.getEnchantmentLevel(ArtifactAbility.DODGE, it))/100d);
+ dodgechance=addMultiplicativeValue(dodgechance,(ArtifactAbility.calculateValue(ArtifactAbility.DODGE, ArtifactUtils.getArtifactTier(it), ArtifactAbility.getEnchantmentLevel(ArtifactAbility.DODGE, it))/100d));
}
/*ItemStack equip = p.getEquipment().getArmorContents()[i];
@@ -1803,54 +1804,54 @@ public class CustomDamage {
}*/
}
}
- dodgechance+=API.getPlayerBonuses(p).getBonusDodgeChance();
+ dodgechance=addMultiplicativeValue(dodgechance,API.getPlayerBonuses(p).getBonusDodgeChance());
- dodgechance+=ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.ALIKAHN)/100d;
- dodgechance+=ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.DARNYS)/100d;
- dodgechance+=ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.JAMDAK)/100d;
- dodgechance+=ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.LORASAADI)/100d;
+ dodgechance=addMultiplicativeValue(dodgechance,ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.ALIKAHN)/100d);
+ dodgechance=addMultiplicativeValue(dodgechance,ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.DARNYS)/100d);
+ dodgechance=addMultiplicativeValue(dodgechance,ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.JAMDAK)/100d);
+ dodgechance=addMultiplicativeValue(dodgechance,ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.LORASAADI)/100d);
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
if (ArtifactAbility.containsEnchantment(ArtifactAbility.SHADOWWALKER, p.getEquipment().getItemInMainHand()) &&
p.isOnGround() && p.getLocation().getY()>=0 && p.getLocation().add(0,0,0).getBlock().getLightLevel()<=7) {
- dodgechance+=0.01*ArtifactUtils.getArtifactTier(p.getEquipment().getItemInMainHand());
+ dodgechance=addMultiplicativeValue(dodgechance,0.01*ArtifactUtils.getArtifactTier(p.getEquipment().getItemInMainHand()));
}
- dodgechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.PANROS,3,3)/100d;
+ dodgechance=addMultiplicativeValue(dodgechance,ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.PANROS,3,3)/100d);
if (p.isBlocking()) {
- dodgechance+=ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL)/100d;
+ dodgechance=addMultiplicativeValue(dodgechance,ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL)/100d);
}
- dodgechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.JAMDAK,2,2)/100d;
- dodgechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.JAMDAK,3,3)/100d;
+ dodgechance=addMultiplicativeValue(dodgechance,ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.JAMDAK,2,2)/100d);
+ dodgechance=addMultiplicativeValue(dodgechance,ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.JAMDAK,3,3)/100d);
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getArmor(p), p, ItemSet.VIXEN, 4)) {
- dodgechance+=0.2;
+ dodgechance=addMultiplicativeValue(dodgechance,0.2);
}
LivingEntity shooter = getDamagerEntity(damager);
if (shooter!=null && shooter instanceof LivingEntity) {
LivingEntity m = (LivingEntity)shooter;
if (GenericFunctions.isIsolatedTarget(m, p)) {
- dodgechance+=0.4;
+ dodgechance=addMultiplicativeValue(dodgechance,0.4);
}
}
- dodgechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.GLADOMAIN, 3, 3)/100d;
+ dodgechance=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.GLADOMAIN, 3, 3)/100d;
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.GLADOMAIN, 7)) {
- dodgechance+=(93.182445*pd.velocity)*(0.05+(0.01*ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.GLADOMAIN, 7, 4))); //For every 1m, give 5%.
+ dodgechance=addMultiplicativeValue(dodgechance,(93.182445*pd.velocity)*(0.05+(0.01*ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.GLADOMAIN, 7, 4)))); //For every 1m, give 5%.
}
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.MOONSHADOW, 7) &&
GenericFunctions.hasStealth(p)) {
- dodgechance+=0.4;
+ dodgechance=addMultiplicativeValue(dodgechance,0.4);
}
if (PlayerMode.isStriker(p) &&
93.182445*pd.velocity>4.317) {
- dodgechance+=0.2;
+ dodgechance=addMultiplicativeValue(dodgechance,0.2);
}
if (PlayerMode.isRanger(p)) {
- dodgechance+=0.4;
+ dodgechance=addMultiplicativeValue(dodgechance,0.4);
}
if (dodgechance>0.95) {
@@ -1863,6 +1864,15 @@ public class CustomDamage {
return dodgechance;
}
+ private static double addMultiplicativeValue(double numb, double val) {
+ if (numb==0) {
+ numb += val;
+ } else {
+ numb += (1-numb)*val;
+ }
+ return numb;
+ }
+
@SuppressWarnings("deprecation")
static public double CalculateDamageReduction(double basedmg,LivingEntity target,Entity damager) {
@@ -2605,31 +2615,31 @@ public class CustomDamage {
static double calculateCriticalStrikeChance(ItemStack weapon, Entity damager, String reason) {
double critchance = 0.0;
- critchance += 0.01*GenericFunctions.getAbilityValue(ArtifactAbility.CRITICAL,weapon);
+ critchance = addMultiplicativeValue(critchance,0.01*GenericFunctions.getAbilityValue(ArtifactAbility.CRITICAL,weapon));
LivingEntity shooter = getDamagerEntity(damager);
if (shooter!=null) {
if (shooter instanceof Player) {
Player p = (Player)shooter;
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
- critchance += (PlayerMode.isStriker(p)?0.2:0.0);
- critchance += ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.PANROS,4,4)/100d;
- critchance += (PlayerMode.isRanger(p)?(GenericFunctions.getPotionEffectLevel(PotionEffectType.SLOW, p)+1)*0.1:0.0);
- critchance += ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.MOONSHADOW, 5, 4)/100d;
- critchance += ItemSet.GetTotalBaseAmount(GenericFunctions.getBaubles(p), p, ItemSet.WOLFSBANE)/100d;
- critchance += API.getPlayerBonuses(p).getBonusCriticalChance();
- critchance += (pd.slayermegahit)?1.0:0.0;
+ critchance = addMultiplicativeValue(critchance,(PlayerMode.isStriker(p)?0.2:0.0));
+ critchance = addMultiplicativeValue(critchance,ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.PANROS,4,4)/100d);
+ critchance = addMultiplicativeValue(critchance,(PlayerMode.isRanger(p)?(GenericFunctions.getPotionEffectLevel(PotionEffectType.SLOW, p)+1)*0.1:0.0));
+ critchance = addMultiplicativeValue(critchance,ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.MOONSHADOW, 5, 4)/100d);
+ critchance = addMultiplicativeValue(critchance,ItemSet.GetTotalBaseAmount(GenericFunctions.getBaubles(p), p, ItemSet.WOLFSBANE)/100d);
+ critchance = addMultiplicativeValue(critchance,API.getPlayerBonuses(p).getBonusCriticalChance());
+ critchance = addMultiplicativeValue(critchance,(pd.slayermegahit)?1.0:0.0);
if (reason!=null && reason.equalsIgnoreCase("power swing")) {
- critchance += 1.0d;
+ critchance = addMultiplicativeValue(critchance,1.0d);
}
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(shooter), (Player)shooter, ItemSet.LORASYS, 1)) {
if (ItemSet.GetBaubleTier((Player)shooter)>=18 && ItemSet.GetTier(shooter.getEquipment().getItemInMainHand())>=2) {
- critchance += 0.1d;
+ critchance = addMultiplicativeValue(critchance,0.1d);
}
if (ItemSet.GetBaubleTier((Player)shooter)>=27 && ItemSet.GetTier(shooter.getEquipment().getItemInMainHand())>=3) {
- critchance += 0.2d;
+ critchance = addMultiplicativeValue(critchance,0.2d);
}
if (ItemSet.GetBaubleTier((Player)shooter)>=40 && ItemSet.GetTier(shooter.getEquipment().getItemInMainHand())>=4) {
- critchance += 0.45d;
+ critchance = addMultiplicativeValue(critchance,0.45d);
}
}
}
@@ -3131,10 +3141,10 @@ public class CustomDamage {
*/
public static double calculateCooldownReduction(Player p) {
double cooldown = 0.0;
- cooldown+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.GLADOMAIN, 2, 2)/100d;
- cooldown+=ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.VIXEN)/100d;
+ cooldown=addMultiplicativeValue(cooldown,ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getBaubles(p), p, ItemSet.GLADOMAIN, 2, 2)/100d);
+ cooldown=addMultiplicativeValue(cooldown,ItemSet.GetTotalBaseAmount(GenericFunctions.getEquipment(p), p, ItemSet.VIXEN)/100d);
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p, ItemSet.LORASYS, 1) && ItemSet.GetBaubleTier(p)>=40 && ItemSet.GetTier(p.getEquipment().getItemInMainHand())>=4) {
- cooldown += 0.45d;
+ cooldown = addMultiplicativeValue(cooldown,0.45d);
}
return cooldown;
}
@@ -3148,10 +3158,10 @@ public class CustomDamage {
if (GenericFunctions.isArtifactEquip(equip)) {
double resistamt = GenericFunctions.getAbilityValue(ArtifactAbility.STATUS_EFFECT_RESISTANCE, equip);
TwosideKeeper.log("Resist amount is "+resistamt,5);
- removechance+=resistamt;
+ removechance=addMultiplicativeValue(removechance,resistamt);
}
}
- removechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER, 2, 2);
+ removechance=addMultiplicativeValue(removechance,ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p,true), p, ItemSet.DAWNTRACKER, 2, 2));
return removechance;
}
diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java b/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java
index 5da51aa..b69b829 100644
--- a/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java
+++ b/src/sig/plugin/TwosideKeeper/HelperStructures/ArtifactAbility.java
@@ -35,8 +35,8 @@ public enum ArtifactAbility {
new double[]{0.5,0.575,0.6,0.625,0.65,0.675,0.7,0.725,0.75,0.83,0.86,0.89,0.92,0.95,1.0},10000,1,UpgradePath.BASIC,1),
LIFESTEAL("Lifesteal","Heals [VAL]% of the damage dealt to targets back to your health pool.",new double[]{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},
new double[]{0.5,0.575,0.6,0.625,0.65,0.675,0.7,0.725,0.75,0.83,0.86,0.89,0.92,0.95,1.0},1000,1,UpgradePath.WEAPON,1),
- CRITICAL("Critical","[VAL]% chance to deal critical strikes.",new double[]{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},
- new double[]{0.5,0.575,0.6,0.625,0.65,0.675,0.7,0.725,0.75,0.83,0.86,0.89,0.92,0.95,1.0},1000,1,UpgradePath.WEAPON,1),
+ CRITICAL("Critical","[VAL]% chance to deal critical strikes.",new double[]{0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5},
+ new double[]{0.5,0.575,0.6,0.625,0.65,0.675,0.7,0.725,0.75,0.83,0.86,0.89,0.92,0.95,1.0},100,1,UpgradePath.WEAPON,1),
CRIT_DMG("Crit Damage","Critical Strikes deal [200VAL]% damage.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
new double[]{0.5,0.575,0.6,0.625,0.65,0.675,0.7,0.725,0.75,0.83,0.86,0.89,0.92,0.95,1.0},10000,1,UpgradePath.WEAPON,1),
HIGHWINDER("Highwinder","While moving fast or sprinting, you deal [VAL] extra damage for every 1m of speed.",new double[]{0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5},
@@ -68,9 +68,9 @@ public enum ArtifactAbility {
new double[]{1.5,1.4,1.3,1.2,1.1,1.0,0.9,0.8,0.7,0.65,0.625,0.6,0.585,0.565,0.55},100,100,UpgradePath.ARMOR,1),
SURVIVOR("Survivor","Taking fatal damage will not kill you and instead consumes this ability, removes all debuffs, and restores your health by [VAL]%"+TemporarySkill(true),new double[]{10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10},
new double[]{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0},10,25,UpgradePath.ARMOR,1),
- DODGE("Dodge","You have a [VAL]% chance to dodge incoming damage from any damage source.",new double[]{0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.025},
- new double[]{1.0,0.95,0.9,0.85,0.8,0.75,0.7,0.65,0.6,0.55,0.5,0.45,0.35,0.25,0.2},1000,40,UpgradePath.ARMOR,1),
- GRACEFULDODGE("Graceful Dodge","Whenever a dodge occurs, you will gain [GRACEFULVAL] seconds of invulnerability."+LevelCost(10),new double[]{0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005},
+ DODGE("Dodge","You have a [VAL]% chance to dodge incoming damage from any damage source."+LevelCost(2),new double[]{0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2},
+ new double[]{1.0,0.95,0.9,0.85,0.8,0.75,0.7,0.65,0.6,0.55,0.5,0.45,0.35,0.25,0.2},100,40,UpgradePath.ARMOR,2),
+ GRACEFULDODGE("Graceful Dodge","Whenever a dodge occurs, you will gain [GRACEFULVAL] seconds of invulnerability."+LevelCost(10),new double[]{0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05,0.05},
new double[]{1.8,1.79,1.78,1.77,1.76,1.75,1.74,1.73,1.72,1.71,1.70,1.69,1.67,1.65,1.62},100,40,UpgradePath.ARMOR,10),
//Sword abilities
@@ -148,7 +148,7 @@ public enum ArtifactAbility {
;
- final static double[] decayvals = new double[]{0.5,0.575,0.6,0.625,0.65,0.675,0.7,0.725,0.75,0.83,0.86,0.89,0.92,0.95,1.0};
+ final static double[] decayvals = new double[]{0.5,0.588,0.6505,0.6990,0.7386,0.7720,0.8010,0.8266,0.8495,0.8702,0.8891,0.9225,0.9515,0.9771,1.0};
public static int LINE_SIZE=50;
String name;
@@ -224,7 +224,8 @@ public enum ArtifactAbility {
TwosideKeeper.log("Sum is "+sum, 5);
TwosideKeeper.log("Base value is "+ability.GetBaseValue(artifacttier), 4);
return sum*ability.GetBaseValue(artifacttier);*/
- return Math.pow(ability.GetBaseValue(artifacttier)*abilitylevel, ability.GetDecayValue(artifacttier));
+ //return Math.pow(ability.GetBaseValue(artifacttier)*abilitylevel, ability.GetDecayValue(artifacttier));
+ return ability.GetBaseValue(artifacttier) * Math.pow(abilitylevel, ability.GetDecayValue(artifacttier));
}
public static HashMap getEnchantments(ItemStack item) {
diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java
index 89c216c..46659e9 100644
--- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java
+++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java
@@ -4559,10 +4559,10 @@ public class GenericFunctions {
//Try to find a target to look at.
//LivingEntity target = aPlugin.API.rayTraceTargetEntity(player, 100);
Location originalloc = player.getLocation().clone();
- if (aPlugin.API.performAssassinate(player)) {
+ LivingEntity target = aPlugin.API.rayTraceTargetEntity(player, 100);
+ if (aPlugin.API.teleportPlayerBehindLivingEntity(player,target)) {
SoundUtils.playGlobalSound(player.getLocation(), Sound.BLOCK_NOTE_SNARE, 1.0f, 1.0f);
PlayerStructure pd = PlayerStructure.GetPlayerStructure(player);
- LivingEntity target = aPlugin.API.getTargetEntity(player, 100);
if (name!=Material.SKULL_ITEM || pd.lastlifesavertime+GetModifiedCooldown(TwosideKeeper.LIFESAVER_COOLDOWN,player)Players are identified as 'Slayers' by wearing no armor, and wearing a Bauble Pouch in their off hand.\n"
- + ChatColor.GRAY+"->Slayers can make use of up to 9 Baubles by placing them on their hotbar (Ideally you would want to use one slot for a weapon). Each Bauble adds a certain amount of stats to the Slayer, making them more efficient.\n"
+ + ChatColor.GRAY+"->Slayers can make use of up to 9 Baubles by placing them in their Bauble Pouch. Each Bauble adds a certain amount of stats to the Slayer, making them more efficient.\n"
+ ChatColor.WHITE+"->Slayers take a maximum of 1 Heart (2 HP) in damage from all attacks, making this mode essentially 5 lives.\n"
+ ChatColor.GRAY+"->Slayers are not affected by any Health Recovery and Health Regeneration effects. This mode only heals from kills, being out of combat for 1 minute, using the Amulet's set effect, or sleeping. However, Absorption will still work for a Slayer. Absorption hearts just get removed with normal damage calculation rules.\n"
+ ChatColor.WHITE+"->Whenever a Slayer kills a target, they recover 1 Heart (2 HP). This can be modified by a special weapon.\n"
diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java
index f1c12b1..16acbe9 100644
--- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java
+++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java
@@ -514,9 +514,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public static double DEAL_OF_THE_DAY_PCT=0.2;
public final static boolean CHRISTMASEVENT_ACTIVATED=false;
- public final static boolean CHRISTMASLINGERINGEVENT_ACTIVATED=false; //Limited Christmas drops/functionality remain while the majority of it is turned off.
+ public final static boolean CHRISTMASLINGERINGEVENT_ACTIVATED=false;
- public final static boolean ELITEGUARDIANS_ACTIVATED=true;
+ public final static boolean ELITEGUARDIANS_ACTIVATED=false;
public static final Set LIVING_ENTITY_TYPES = ImmutableSet.of(
EntityType.BAT,EntityType.BLAZE,EntityType.CAVE_SPIDER,EntityType.CHICKEN,
@@ -645,20 +645,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
}
}
- private final class ShutdownServerForUpdate implements Runnable {
- @Override
- public void run() {
- if (Bukkit.getOnlinePlayers().size()==0 && restarting_server) {
- Bukkit.savePlayers();
- aPlugin.API.discordSendRawItalicized("All players have disconnected. Server is shutting down...");
- for (int i=0;i=4) {
+ aPlugin.API.displayEndRodParticle(arrowloc, (float)0.0f, (float)0.0f, (float)0.0f, 0.0f, 1);
+ }
arrowloc=arrowloc.add(dir);
}
for (LivingEntity le : targets) {
@@ -8292,13 +8288,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
if (arr.hasMetadata("INFINITEARROW")) {
TwosideKeeper.log("Infinite Arrow 2>", 5);
}
- LivingEntity checkent = aPlugin.API.getTargetEntity(p, 100);
- if (checkent!=null && (checkent instanceof Monster)) {
- if (!livingentitydata.containsKey(checkent.getUniqueId())) {
- LivingEntityStructure newstruct = new LivingEntityStructure((Monster)checkent);
+ LivingEntity findtarget = aPlugin.API.rayTraceTargetEntity(p,100);
+ if (findtarget!=null && (findtarget instanceof Monster)) {
+ if (!livingentitydata.containsKey(findtarget.getUniqueId())) {
+ LivingEntityStructure newstruct = new LivingEntityStructure((Monster)findtarget);
newstruct.SetTarget(p);
- livingentitydata.put(checkent.getUniqueId(), newstruct);
- Monster m = (Monster)checkent;
+ livingentitydata.put(findtarget.getUniqueId(), newstruct);
+ Monster m = (Monster)findtarget;
if (!m.hasPotionEffect(PotionEffectType.GLOWING)) {
m.setTarget(p);
}
@@ -8306,18 +8302,19 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
log("Setup new target: "+p.getName(),5);
}
if (PlayerMode.isRanger(p)) {
- LivingEntity findtarget = aPlugin.API.rayTraceTargetEntity(p,100);
if (GenericFunctions.getBowMode(p)==BowMode.SNIPE) {
if (findtarget==null || !p.hasLineOfSight(findtarget)) {
arr.setVelocity(arr.getVelocity().multiply(1000));
} else {
//We found a target, we are going to disable this arrow and create an artifical arrow hit from here.
//p.getWorld().spawnArrow(aPlugin.API.getProjectedArrowHitLocation(findtarget, p), arr.get, arg2, arg3);
- Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
+ /*Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
public void run() {
arr.teleport(aPlugin.API.getProjectedArrowHitLocation(findtarget, p).subtract(arr.getVelocity()));
log("Teleported to calculated hit location: "+arr.getLocation(),5);
- }},1);
+ }},1);*/
+ CustomDamage.ApplyDamage(0, arr, findtarget, p.getEquipment().getItemInMainHand(), "Arrow");
+ arr.remove(); //Remove the arrow as we are damaging the entity directly.
}
aPlugin.API.damageItem(p.getInventory(), p.getEquipment().getItemInMainHand(), 3);
}