+>Added pickup animation for picking up arrows.
+>Improved stats of many artifact abilities. Scaling is much more progressive and less random than previously. Percentage-based artifact abilities have a cap of 100 artifact levels now. >Fixed the bug allowing Slayers to continue to perfect dodge when hit by non-entity damage sources. >Dodge Chance, Critical Strike Chance, Cooldown Reduction, and Debuff Resistance all now apply their stats multiplicatively instead of additively. >The particles for Piercing arrows now starts further away from the player so their view is no longer obscured by them. >Fixed a display bug with the particles of Piercing arrows going through solid blocks. ->The Dodge Artifact Ability now requires 2 AP per level.
This commit is contained in:
parent
5d6182a393
commit
73e685092f
@ -5,6 +5,6 @@
|
||||
<classpathentry kind="lib" path="D:/Documents/Test Server/plugins/AutoPluginUpdate.jar"/>
|
||||
<classpathentry kind="lib" path="D:/Documents/Test Server/plugins/GlowAPI_v1.4.4.jar"/>
|
||||
<classpathentry kind="lib" path="D:/Documents/Test Server/spigot-1.9.2-R0.1-SNAPSHOT.jar"/>
|
||||
<classpathentry kind="lib" path="D:/Documents/Test Server/plugins/aPlugin (95).jar"/>
|
||||
<classpathentry kind="lib" path="D:/Documents/Test Server/plugins/aPlugin (97).jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
name: TwosideKeeper
|
||||
main: sig.plugin.TwosideKeeper.TwosideKeeper
|
||||
version: 3.10.9a
|
||||
version: 3.10.9b
|
||||
loadbefore: [aPlugin]
|
||||
commands:
|
||||
money:
|
||||
|
@ -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;
|
||||
|
@ -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()<CalculateDodgeChance((Player)target)) {
|
||||
Player p = (Player)target;
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
double rawdmg = CalculateDamage(0,damager,target,null,null,NONE)*(1d/CalculateDamageReduction(1,target,damager));
|
||||
if (p.isBlocking() && ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.SONGSTEEL)) {
|
||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||
ApplyVendettaStackTimer(pd);
|
||||
pd.vendetta_amt+=((1-CalculateDamageReduction(1,target,damager))*(rawdmg*0.40));
|
||||
if (TwosideKeeper.getMaxThornsLevelOnEquipment(target)>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;
|
||||
}
|
||||
|
||||
|
@ -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<ArtifactAbility,Integer> getEnchantments(ItemStack item) {
|
||||
|
@ -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)<TwosideKeeper.getServerTickTime()) { //Don't overwrite life saver cooldowns.
|
||||
aPlugin.API.sendCooldownPacket(player, name, GetModifiedCooldown(TwosideKeeper.ASSASSINATE_COOLDOWN,player));
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public enum PlayerMode {
|
||||
SLAYER(ChatColor.DARK_BLUE,"SL","Slayer",
|
||||
ChatColor.DARK_BLUE+""+ChatColor.BOLD+"Slayer mode Perks: "+ChatColor.RESET+"\n"
|
||||
+ ChatColor.WHITE+"->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"
|
||||
|
@ -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<EntityType> 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<Bukkit.getWorlds().size();i++) {
|
||||
Bukkit.getWorlds().get(i).save();
|
||||
}
|
||||
Bukkit.shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final class ReapplyAbsorptionHeartsFromSet implements Runnable {
|
||||
public void run(){
|
||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
||||
@ -706,10 +692,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
if (numb<=0.5) {
|
||||
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_ENDERMEN_TELEPORT, 1.0f, 1.0f);
|
||||
m.teleport(m.getLocation().add(0,0,Math.random()*6-3));
|
||||
} else
|
||||
{
|
||||
SoundUtils.playGlobalSound(m.getLocation(), Sound.ENTITY_ENDERMEN_TELEPORT, 1.0f, 1.0f);
|
||||
m.teleport(m.getLocation().add(0,Math.random()*6-3,0));
|
||||
}
|
||||
cz.stuckTimer=0;
|
||||
}
|
||||
@ -752,10 +734,18 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
for (LivingEntity ent : ents) {
|
||||
if (!ent.equals(m)) {
|
||||
ent.setVelocity(new Vector(0,0.5,0));
|
||||
if (chargezombies.containsKey(ent.getUniqueId())) {
|
||||
ChargeZombie cz2 = chargezombies.get(ent.getUniqueId());
|
||||
cz2.canBreak=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ChargeZombie.BreakBlocksAroundArea(cz.m,1);
|
||||
if (cz.canBreak) {
|
||||
ChargeZombie.BreakBlocksAroundArea(cz.m,1);
|
||||
} else {
|
||||
cz.canBreak=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (CustomMonster cs : custommonsters.values()) {
|
||||
@ -1816,13 +1806,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
//Arrow newar = p.getWorld().spawnArrow(p.getLocation(), p.getLocation().getDirection(), 1f, 12f);
|
||||
//GenericFunctions.setBowMode(p.getEquipment().getItemInMainHand(), BowMode.SNIPE);
|
||||
//p.sendMessage("This is bow mode "+GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand()));
|
||||
/*for (int i=0;i<p.getEquipment().getArmorContents().length;i++) {
|
||||
for (int i=0;i<p.getEquipment().getArmorContents().length;i++) {
|
||||
if (GenericFunctions.isArtifactEquip(p.getEquipment().getArmorContents()[i]) &&
|
||||
GenericFunctions.isArtifactArmor(p.getEquipment().getArmorContents()[i])) {
|
||||
AwakenedArtifact.addPotentialEXP(p.getEquipment().getArmorContents()[i], 999999, p);
|
||||
}
|
||||
}*/
|
||||
GenericFunctions.giveItem(p, TwosideKeeperAPI.generateSetPiece(Material.GOLD_AXE, ItemSet.DAWNTRACKER, true, 2));
|
||||
}
|
||||
//GenericFunctions.giveItem(p, TwosideKeeperAPI.generateSetPiece(Material.GOLD_AXE, ItemSet.DAWNTRACKER, true, 2));
|
||||
/*TwosideKeeper.log("Suppressed: "+GenericFunctions.isSuppressed(p),1);
|
||||
TwosideKeeper.log("Suppression Time: "+GenericFunctions.getSuppressionTime(p), 1);
|
||||
GenericFunctions.setSuppressionTime(p, 20);
|
||||
@ -4731,8 +4721,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
//ev.getPlayer().getEquipment().setItemInMainHand(ev.getItemDrop().getItemStack());
|
||||
GenericFunctions.PerformAssassinate(ev.getPlayer(),ev.getItemDrop().getItemStack().getType());
|
||||
//ev.getPlayer().getEquipment().setItemInMainHand(new ItemStack(Material.AIR));
|
||||
} else {
|
||||
TwosideKeeper.log("Not time yet! have to wait "+((pd.lastassassinatetime+GenericFunctions.GetModifiedCooldown(TwosideKeeper.ASSASSINATE_COOLDOWN,ev.getPlayer()))-TwosideKeeper.getServerTickTime())+" more ticks.", 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -7637,6 +7625,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
if (a.hasMetadata("QUADRUPLE_DAMAGE_ARR")) {item=Recipes.getArrowFromMeta("QUADRUPLE_DAMAGE_ARR"); specialarrow=true;} else
|
||||
if (a.hasMetadata("DOUBLE_DAMAGE_ARR")) {item=Recipes.getArrowFromMeta("DOUBLE_DAMAGE_ARR"); specialarrow=true;}
|
||||
if (specialarrow) {
|
||||
PlayPickupParticle(ev.getPlayer(),ev.getItem());
|
||||
ev.getItem().remove();
|
||||
SoundUtils.playGlobalSound(ev.getPlayer().getLocation(), Sound.ENTITY_ITEM_PICKUP, 0.6f, SoundUtils.DetermineItemPitch(item));
|
||||
ev.setCancelled(true);
|
||||
@ -7646,6 +7635,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
}
|
||||
ItemStack collect = CustomItem.convertArrowEntityFromMeta(ev.getArrow());
|
||||
if (collect!=null) {
|
||||
PlayPickupParticle(ev.getPlayer(),ev.getItem());
|
||||
ev.getItem().remove();
|
||||
SoundUtils.playGlobalSound(ev.getPlayer().getLocation(), Sound.ENTITY_ITEM_PICKUP, 0.6f, SoundUtils.DetermineItemPitch(item));
|
||||
AddToPlayerInventory(collect, p);
|
||||
@ -7654,6 +7644,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
PlayPickupParticle(ev.getPlayer(),ev.getItem());
|
||||
}
|
||||
|
||||
public void AddToPlayerInventory(ItemStack item, Player p) {
|
||||
@ -8088,7 +8079,12 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
Location arrowloc = arr.getLocation().clone();
|
||||
Vector dir = arr.getVelocity().clone();
|
||||
for (int i=0;i<100;i++) {
|
||||
aPlugin.API.displayEndRodParticle(arrowloc, (float)0.0f, (float)0.0f, (float)0.0f, 0.0f, 1);
|
||||
if (arrowloc.getBlock().getType().isSolid()) {
|
||||
break;
|
||||
}
|
||||
if (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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user