Implemented PVP Arenas, improved on PVP Balancing, fixed PVP bugs.
This commit is contained in:
parent
8570e2706f
commit
abc03b5dc7
Binary file not shown.
@ -98,7 +98,7 @@ public class AwakenedArtifact {
|
|||||||
item = setEXP(item,totalval%1000);
|
item = setEXP(item,totalval%1000);
|
||||||
item = addAP(item,totalval/1000);
|
item = addAP(item,totalval/1000);
|
||||||
double potentialred = 0.1d * getPotential(item); //5
|
double potentialred = 0.1d * getPotential(item); //5
|
||||||
potentialred *= 1d - (5d+GenericFunctions.getAbilityValue(ArtifactAbility.PRESERVATION, artifact))/100d;
|
potentialred *= 1d - (5d+GenericFunctions.getAbilityValue(ArtifactAbility.PRESERVATION, artifact,p))/100d;
|
||||||
TwosideKeeper.log("Potential is reduced by "+(potentialred)+"% from "+getPotential(item), 0);
|
TwosideKeeper.log("Potential is reduced by "+(potentialred)+"% from "+getPotential(item), 0);
|
||||||
if (getPotential(item)>potentialred) {
|
if (getPotential(item)>potentialred) {
|
||||||
item = setPotential(item,(int)(getPotential(item)-potentialred));
|
item = setPotential(item,(int)(getPotential(item)-potentialred));
|
||||||
|
@ -232,6 +232,9 @@ public class Buff {
|
|||||||
oldlv = pd.buffs.get(name).getAmplifier();
|
oldlv = pd.buffs.get(name).getAmplifier();
|
||||||
oldduration = pd.buffs.get(name).getRemainingBuffTime();
|
oldduration = pd.buffs.get(name).getRemainingBuffTime();
|
||||||
if (stacking) {
|
if (stacking) {
|
||||||
|
if (PVP.isPvPing(p)) {
|
||||||
|
oldlv=1;
|
||||||
|
}
|
||||||
buff.setStacks(buff.getAmplifier()+oldlv);
|
buff.setStacks(buff.getAmplifier()+oldlv);
|
||||||
pd.buffs.put(name, buff);
|
pd.buffs.put(name, buff);
|
||||||
return;
|
return;
|
||||||
|
@ -182,6 +182,7 @@ public class CustomDamage {
|
|||||||
dmg = CalculateDamage(damage, damager, target, weapon, reason, flags);
|
dmg = CalculateDamage(damage, damager, target, weapon, reason, flags);
|
||||||
}
|
}
|
||||||
dmg += CalculateBonusTrueDamage(damager, target, dmg);
|
dmg += CalculateBonusTrueDamage(damager, target, dmg);
|
||||||
|
dmg += CalculatePVPDamageReduction(damager,target,dmg);
|
||||||
if (damager!=null) {
|
if (damager!=null) {
|
||||||
TwosideKeeper.logHealth(target,target.getHealth(),dmg,damager);
|
TwosideKeeper.logHealth(target,target.getHealth(),dmg,damager);
|
||||||
}
|
}
|
||||||
@ -193,6 +194,12 @@ public class CustomDamage {
|
|||||||
setupDamagePropertiesForPlayer(damager,((reason!=null && reason.equalsIgnoreCase("thorns"))?IS_THORNS:0));
|
setupDamagePropertiesForPlayer(damager,((reason!=null && reason.equalsIgnoreCase("thorns"))?IS_THORNS:0));
|
||||||
if (!ev.isCancelled()) {
|
if (!ev.isCancelled()) {
|
||||||
//TwosideKeeper.log("Inside of here.", 0);
|
//TwosideKeeper.log("Inside of here.", 0);
|
||||||
|
LivingEntity shooter = getDamagerEntity(damager);
|
||||||
|
if (shooter instanceof Player && target instanceof Player) {
|
||||||
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure((Player)target);
|
||||||
|
pd.lastplayerHitBy=((Player)shooter).getName();
|
||||||
|
TwosideKeeper.log("Set last hit by to "+pd.lastplayerHitBy+" for player "+((Player)target).getName(), 2);
|
||||||
|
}
|
||||||
DealDamageToEntity(dmg, damager, target, weapon, reason, flags);
|
DealDamageToEntity(dmg, damager, target, weapon, reason, flags);
|
||||||
addToLoggerTotal(damager,dmg);
|
addToLoggerTotal(damager,dmg);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("Damage Calculations", (int)(System.nanoTime()-time));time=System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("Damage Calculations", (int)(System.nanoTime()-time));time=System.nanoTime();
|
||||||
@ -205,6 +212,20 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static double CalculatePVPDamageReduction(Entity damager, LivingEntity target, double dmg) {
|
||||||
|
double dmgIncrease=0;
|
||||||
|
LivingEntity shooter = getDamagerEntity(damager);
|
||||||
|
if (shooter!=null && shooter instanceof Player) {
|
||||||
|
Player p = (Player)shooter;
|
||||||
|
if (PVP.isPvPing(p)) {
|
||||||
|
dmgIncrease = -(dmg*0.6);
|
||||||
|
//TwosideKeeper.log("Damage reduced due to PvP from "+dmg+" to "+(dmg+dmgIncrease), 2);
|
||||||
|
return dmgIncrease; //Reduce damage by 60% in PVP.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dmgIncrease;
|
||||||
|
}
|
||||||
|
|
||||||
private static void UpdateWeaponUsedForShooting(Entity damager) {
|
private static void UpdateWeaponUsedForShooting(Entity damager) {
|
||||||
if (getDamagerEntity(damager) instanceof Player) {
|
if (getDamagerEntity(damager) instanceof Player) {
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure((Player)(getDamagerEntity(damager)));
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure((Player)(getDamagerEntity(damager)));
|
||||||
@ -220,6 +241,9 @@ public class CustomDamage {
|
|||||||
Player p = (Player)getDamagerEntity(damager);
|
Player p = (Player)getDamagerEntity(damager);
|
||||||
bonus_truedmg += API.getPlayerBonuses(p).getBonusTrueDamage();
|
bonus_truedmg += API.getPlayerBonuses(p).getBonusTrueDamage();
|
||||||
bonus_truedmg += ItemSet.HasSetBonusBasedOnSetBonusCount((Player)shooter, ItemSet.ALUSTINE, 7)?((Player)shooter).getLevel():0;
|
bonus_truedmg += ItemSet.HasSetBonusBasedOnSetBonusCount((Player)shooter, ItemSet.ALUSTINE, 7)?((Player)shooter).getLevel():0;
|
||||||
|
if (PVP.isPvPing(p)) {
|
||||||
|
bonus_truedmg += target.getMaxHealth()*0.01;
|
||||||
|
}
|
||||||
return bonus_truedmg;
|
return bonus_truedmg;
|
||||||
} else {
|
} else {
|
||||||
double bonus_truedmg = 0;
|
double bonus_truedmg = 0;
|
||||||
@ -299,7 +323,9 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dmg += addToPlayerLogger(damager,target,"Execute",(((GenericFunctions.getAbilityValue(ArtifactAbility.EXECUTION, weapon)*5.0)*(1-(target.getHealth()/target.getMaxHealth())))));
|
if (shooter!=null && shooter instanceof Player) {
|
||||||
|
dmg += addToPlayerLogger(damager,target,"Execute",(((GenericFunctions.getAbilityValue(ArtifactAbility.EXECUTION, weapon, (Player)shooter)*5.0)*(1-(target.getHealth()/target.getMaxHealth())))));
|
||||||
|
}
|
||||||
dmg += addMultiplierToPlayerLogger(damager,target,"Challenge Base Damage Mult",calculateChallengeBaseDmgIncrease(shooter,target));
|
dmg += addMultiplierToPlayerLogger(damager,target,"Challenge Base Damage Mult",calculateChallengeBaseDmgIncrease(shooter,target));
|
||||||
if (shooter instanceof Player) {
|
if (shooter instanceof Player) {
|
||||||
dmg += addToPlayerLogger(damager,target,"Tactics Bonus Damage",API.getPlayerBonuses((Player)shooter).getBonusDamage());
|
dmg += addToPlayerLogger(damager,target,"Tactics Bonus Damage",API.getPlayerBonuses((Player)shooter).getBonusDamage());
|
||||||
@ -568,7 +594,10 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dmg += calculateEnchantmentDamageIncrease(weapon,damager,target);
|
dmg += calculateEnchantmentDamageIncrease(weapon,damager,target);
|
||||||
dmg += addToPlayerLogger(damager,target,"Strike",GenericFunctions.getAbilityValue(ArtifactAbility.DAMAGE, weapon));
|
LivingEntity shooter = getDamagerEntity(damager);
|
||||||
|
if (shooter!=null && shooter instanceof Player) {
|
||||||
|
dmg += addToPlayerLogger(damager,target,"Strike",GenericFunctions.getAbilityValue(ArtifactAbility.DAMAGE, weapon, (Player)shooter));
|
||||||
|
}
|
||||||
dmg += addToPlayerLogger(damager,target,"Highwinder",calculateHighwinderDamage(weapon,damager));
|
dmg += addToPlayerLogger(damager,target,"Highwinder",calculateHighwinderDamage(weapon,damager));
|
||||||
dmg += addToPlayerLogger(damager,target,"Dancer Speed Bonus",calculateDancerSpeedDamage(weapon,damager));
|
dmg += addToPlayerLogger(damager,target,"Dancer Speed Bonus",calculateDancerSpeedDamage(weapon,damager));
|
||||||
dmg += addToPlayerLogger(damager,target,"Set Bonus",calculateSetBonusDamage(damager));
|
dmg += addToPlayerLogger(damager,target,"Set Bonus",calculateSetBonusDamage(damager));
|
||||||
@ -585,9 +614,9 @@ public class CustomDamage {
|
|||||||
Player p = (Player)damager;
|
Player p = (Player)damager;
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
if (ItemSet.GetTotalBaseAmount(p, ItemSet.DANCER)>0) {
|
if (ItemSet.GetTotalBaseAmount(p, ItemSet.DANCER)>0) {
|
||||||
dmg += 93.182445*pd.velocity*ItemSet.GetTotalBaseAmount(p, ItemSet.DANCER);
|
dmg += Math.min(93.182445*pd.velocity*ItemSet.GetTotalBaseAmount(p, ItemSet.DANCER),10);
|
||||||
pd.lasthighwinderhit=TwosideKeeper.getServerTickTime();
|
pd.lasthighwinderhit=TwosideKeeper.getServerTickTime();
|
||||||
GenericFunctions.sendActionBarMessage(p, TwosideKeeper.drawVelocityBar(pd.velocity,ItemSet.GetTotalBaseAmount(p, ItemSet.DANCER)),true);
|
GenericFunctions.sendActionBarMessage(p, TwosideKeeper.drawVelocityBar(pd.velocity,ItemSet.GetTotalBaseAmount(p, ItemSet.DANCER)/10d),true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dmg;
|
return dmg;
|
||||||
@ -788,8 +817,8 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
damage=0;
|
damage=0;
|
||||||
}
|
GenericFunctions.AttemptRevive(p, damager, damage, reason);
|
||||||
|
} else
|
||||||
if (damage>0 && GenericFunctions.AttemptRevive(p, damager, damage, reason)) {
|
if (damage>0 && GenericFunctions.AttemptRevive(p, damager, damage, reason)) {
|
||||||
damage=0;
|
damage=0;
|
||||||
}
|
}
|
||||||
@ -823,7 +852,7 @@ public class CustomDamage {
|
|||||||
TwosideKeeper.log("In here", 5);
|
TwosideKeeper.log("In here", 5);
|
||||||
//TwosideKeeper.log("Exploding Arrow", 0);
|
//TwosideKeeper.log("Exploding Arrow", 0);
|
||||||
Location hitloc = aPlugin.API.getArrowHitLocation(target, a);
|
Location hitloc = aPlugin.API.getArrowHitLocation(target, a);
|
||||||
GenericFunctions.DealExplosionDamageToEntities(hitloc, getBaseWeaponDamage(weapon,damager,target)+60, 6);
|
GenericFunctions.DealExplosionDamageToEntities(hitloc, getBaseWeaponDamage(weapon,damager,target)+60, 6, damager);
|
||||||
SoundUtils.playGlobalSound(hitloc, Sound.ENTITY_ENDERDRAGON_FIREBALL_EXPLODE, 0.5f, 1.0f);
|
SoundUtils.playGlobalSound(hitloc, Sound.ENTITY_ENDERDRAGON_FIREBALL_EXPLODE, 0.5f, 1.0f);
|
||||||
aPlugin.API.sendSoundlessExplosion(hitloc, 2);
|
aPlugin.API.sendSoundlessExplosion(hitloc, 2);
|
||||||
}
|
}
|
||||||
@ -907,7 +936,7 @@ public class CustomDamage {
|
|||||||
if ((damager!=null && damager instanceof Arrow) || (weapon!=null && weapon.getType()!=Material.BOW)) {
|
if ((damager!=null && damager instanceof Arrow) || (weapon!=null && weapon.getType()!=Material.BOW)) {
|
||||||
//TwosideKeeper.log("Entered here.", 0);
|
//TwosideKeeper.log("Entered here.", 0);
|
||||||
removePermEnchantments(p,weapon);
|
removePermEnchantments(p,weapon);
|
||||||
applyShrapnel(damager,p,target);
|
applyShrapnel(damager,p,target,reason);
|
||||||
applyDoTs(damager,p,target);
|
applyDoTs(damager,p,target);
|
||||||
}
|
}
|
||||||
//GenericFunctions.knockOffGreed(p);
|
//GenericFunctions.knockOffGreed(p);
|
||||||
@ -1174,12 +1203,12 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void applyShrapnel(Entity damager, Player p, LivingEntity target) {
|
private static void applyShrapnel(Entity damager, Player p, LivingEntity target, String reason) {
|
||||||
if (damager instanceof Projectile) {
|
if (damager instanceof Projectile && (reason==null || !reason.equalsIgnoreCase("Shrapnel Explosion"))) {
|
||||||
if (ItemSet.hasFullSet(p, ItemSet.SHARD)) {
|
if (ItemSet.hasFullSet(p, ItemSet.SHARD)) {
|
||||||
int shrapnellv = ItemSet.getHighestTierInSet(p, ItemSet.SHARD);
|
int shrapnellv = ItemSet.getHighestTierInSet(p, ItemSet.SHARD);
|
||||||
Buff.addBuff(target, "SHRAPNEL", new Buff("Shrapnel",20*10,shrapnellv,Color.RED,ChatColor.RED+"❂",false), true);
|
Buff.addBuff(target, "SHRAPNEL", new Buff("Shrapnel",20*10,shrapnellv,Color.RED,ChatColor.RED+"❂",false), true);
|
||||||
GenericFunctions.DealExplosionDamageToEntities(target.getLocation(), 40f+target.getHealth()*0.1, 2, null, "Shrapnel Explosion");
|
GenericFunctions.DealExplosionDamageToEntities(target.getLocation(), 40f+target.getHealth()*0.1, 2, damager, "Shrapnel Explosion");
|
||||||
aPlugin.API.sendSoundlessExplosion(target.getLocation(), 1);
|
aPlugin.API.sendSoundlessExplosion(target.getLocation(), 1);
|
||||||
SoundUtils.playGlobalSound(target.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.6f, 0.5f);
|
SoundUtils.playGlobalSound(target.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.6f, 0.5f);
|
||||||
}
|
}
|
||||||
@ -1888,7 +1917,7 @@ public class CustomDamage {
|
|||||||
//double finaldmg = CalculateDamageReduction(GenericFunctions.getAbilityValue(ArtifactAbility.ERUPTION, p.getEquipment().getItemInMainHand()),mon,null);
|
//double finaldmg = CalculateDamageReduction(GenericFunctions.getAbilityValue(ArtifactAbility.ERUPTION, p.getEquipment().getItemInMainHand()),mon,null);
|
||||||
//GenericFunctions.DealDamageToMob(finaldmg, mon, p, p.getEquipment().getItemInMainHand());
|
//GenericFunctions.DealDamageToMob(finaldmg, mon, p, p.getEquipment().getItemInMainHand());
|
||||||
TwosideKeeperAPI.removeNoDamageTick(p, (LivingEntity)mon);
|
TwosideKeeperAPI.removeNoDamageTick(p, (LivingEntity)mon);
|
||||||
CustomDamage.ApplyDamage(35+GenericFunctions.getAbilityValue(ArtifactAbility.ERUPTION, weapon),
|
CustomDamage.ApplyDamage(35+GenericFunctions.getAbilityValue(ArtifactAbility.ERUPTION, weapon, p),
|
||||||
p,mon,null,"Eruption",CustomDamage.NONE);
|
p,mon,null,"Eruption",CustomDamage.NONE);
|
||||||
mon.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,20,15));
|
mon.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,20,15));
|
||||||
//Attempt to dig out the blocks below.
|
//Attempt to dig out the blocks below.
|
||||||
@ -1963,7 +1992,7 @@ public class CustomDamage {
|
|||||||
//This is allowed, get the level on the weapon.
|
//This is allowed, get the level on the weapon.
|
||||||
setMonsterTarget(m,p);
|
setMonsterTarget(m,p);
|
||||||
//TwosideKeeper.log("Aggro tick time: "+(int)(GenericFunctions.getAbilityValue(ArtifactAbility.PROVOKE, weapon)*20), 0);
|
//TwosideKeeper.log("Aggro tick time: "+(int)(GenericFunctions.getAbilityValue(ArtifactAbility.PROVOKE, weapon)*20), 0);
|
||||||
setAggroGlowTickTime(m,(int)(GenericFunctions.getAbilityValue(ArtifactAbility.PROVOKE, weapon)*20));
|
setAggroGlowTickTime(m,(int)(GenericFunctions.getAbilityValue(ArtifactAbility.PROVOKE, weapon, p)*20));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2058,6 +2087,13 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (SniperSkeleton.isSniperSkeleton(m) && !TwosideKeeper.custommonsters.containsKey(m.getUniqueId())) {
|
||||||
|
TwosideKeeper.custommonsters.put(m.getUniqueId(),new SniperSkeleton(m));
|
||||||
|
} else
|
||||||
|
if (Knight.isKnight(m) && !TwosideKeeper.custommonsters.containsKey(m.getUniqueId())) {
|
||||||
|
TwosideKeeper.custommonsters.put(m.getUniqueId(),new Knight(m));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addChallengeZombieToList(m)) {return;}
|
if (addChallengeZombieToList(m)) {return;}
|
||||||
@ -2225,12 +2261,14 @@ public class CustomDamage {
|
|||||||
|
|
||||||
static List<LivingEntity> getAOEList(ItemStack weapon, LivingEntity target) {
|
static List<LivingEntity> getAOEList(ItemStack weapon, LivingEntity target) {
|
||||||
List<LivingEntity> list = new ArrayList<LivingEntity>();
|
List<LivingEntity> list = new ArrayList<LivingEntity>();
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.AOE, weapon)) {
|
if (target instanceof Player) {
|
||||||
double aoerange = 1+GenericFunctions.getAbilityValue(ArtifactAbility.AOE, weapon);
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.AOE, weapon)) {
|
||||||
if (target!=null) {
|
double aoerange = 1+GenericFunctions.getAbilityValue(ArtifactAbility.AOE, weapon, (Player)target);
|
||||||
List<Entity> nearbylist=target.getNearbyEntities(aoerange,aoerange,aoerange);
|
if (target!=null) {
|
||||||
list = trimNonLivingEntities(nearbylist);
|
List<Entity> nearbylist=target.getNearbyEntities(aoerange,aoerange,aoerange);
|
||||||
//list.remove(target);
|
list = trimNonLivingEntities(nearbylist);
|
||||||
|
//list.remove(target);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list.add(target);
|
list.add(target);
|
||||||
@ -2276,7 +2314,7 @@ public class CustomDamage {
|
|||||||
return true; //Cancel all damage events if they are dead.
|
return true; //Cancel all damage events if they are dead.
|
||||||
}
|
}
|
||||||
LivingEntity shooter = getDamagerEntity(damager);
|
LivingEntity shooter = getDamagerEntity(damager);
|
||||||
if (shooter!=null && shooter.isDead()) {
|
if ((shooter!=null && shooter.isDead()) || (target!=null && target.isDead())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
target.setLastDamage(0);
|
target.setLastDamage(0);
|
||||||
@ -2285,15 +2323,21 @@ public class CustomDamage {
|
|||||||
if (shooter instanceof Player && target instanceof Player) { //PvP Checks
|
if (shooter instanceof Player && target instanceof Player) { //PvP Checks
|
||||||
//!((Player)target).isOnline()
|
//!((Player)target).isOnline()
|
||||||
//!damager.getWorld().getPVP()
|
//!damager.getWorld().getPVP()
|
||||||
Player attacker = (Player)damager;
|
Player attacker = (Player)shooter;
|
||||||
Player defender = (Player)target;
|
Player defender = (Player)target;
|
||||||
|
if (attacker.getGameMode()==GameMode.SPECTATOR ||
|
||||||
|
attacker.getGameMode()==GameMode.CREATIVE ||
|
||||||
|
defender.getGameMode()==GameMode.SPECTATOR ||
|
||||||
|
defender.getGameMode()==GameMode.CREATIVE) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (attacker.getWorld().getPVP() && (!defender.isOnline() ||
|
if (attacker.getWorld().getPVP() && (!defender.isOnline() ||
|
||||||
PVP.isFriendly(attacker,defender) || !PVP.isPvPing(defender))) {
|
PVP.isFriendly(attacker,defender) || !PVP.isPvPing(defender))) {
|
||||||
if (PVP.isWaitingForPlayers(defender)) {
|
if (PVP.isWaitingForPlayers(defender)) {
|
||||||
PVP session = PVP.getMatch(defender);
|
PVP session = PVP.getMatch(defender);
|
||||||
session.joinMatch(attacker);
|
session.joinMatch(attacker);
|
||||||
} else
|
} else
|
||||||
if (weapon==null || (weapon.getType()==Material.AIR && weapon.isSimilar(attacker.getEquipment().getItemInMainHand()))) {
|
if (!PVP.isPvPing(defender) && (weapon==null || (weapon.getType()==Material.AIR && weapon.isSimilar(attacker.getEquipment().getItemInMainHand())))) {
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(attacker);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(attacker);
|
||||||
PlayerStructure pd2 = PlayerStructure.GetPlayerStructure(defender);
|
PlayerStructure pd2 = PlayerStructure.GetPlayerStructure(defender);
|
||||||
if (pd.lastStartedPlayerClicks+200<=TwosideKeeper.getServerTickTime() &&
|
if (pd.lastStartedPlayerClicks+200<=TwosideKeeper.getServerTickTime() &&
|
||||||
@ -2453,7 +2497,7 @@ public class CustomDamage {
|
|||||||
double duration = 0.0;
|
double duration = 0.0;
|
||||||
for (int i=0;i<equip.length;i++) {
|
for (int i=0;i<equip.length;i++) {
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GRACEFULDODGE, equip[i])) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GRACEFULDODGE, equip[i])) {
|
||||||
duration += 0.1+GenericFunctions.getAbilityValue(ArtifactAbility.GRACEFULDODGE, equip[i]);
|
duration += 0.1+GenericFunctions.getAbilityValue(ArtifactAbility.GRACEFULDODGE, equip[i], (Player)target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
duration+=ItemSet.TotalBaseAmountBasedOnSetBonusCount((Player)target,ItemSet.JAMDAK,4,4)/20d;
|
duration+=ItemSet.TotalBaseAmountBasedOnSetBonusCount((Player)target,ItemSet.JAMDAK,4,4)/20d;
|
||||||
@ -2478,7 +2522,7 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean PassesDodgeCheck(LivingEntity target, Entity damager) {
|
private static boolean PassesDodgeCheck(LivingEntity target, Entity damager) {
|
||||||
if ((target instanceof Player) && Math.random()<CalculateDodgeChance((Player)target)) {
|
if ((target instanceof Player) && !PVP.isPvPing((Player)target) && Math.random()<CalculateDodgeChance((Player)target)) {
|
||||||
Player p = (Player)target;
|
Player p = (Player)target;
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
double rawdmg = CalculateDamage(0,damager,target,null,null,NONE)*(1d/CalculateDamageReduction(1,target,damager));
|
double rawdmg = CalculateDamage(0,damager,target,null,null,NONE)*(1d/CalculateDamageReduction(1,target,damager));
|
||||||
@ -2524,7 +2568,7 @@ public class CustomDamage {
|
|||||||
dodgechance=addMultiplicativeValue(dodgechance,0.01*ArtifactUtils.getArtifactTier(it));
|
dodgechance=addMultiplicativeValue(dodgechance,0.01*ArtifactUtils.getArtifactTier(it));
|
||||||
}
|
}
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.DODGE, it)) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.DODGE, it)) {
|
||||||
dodgechance=addMultiplicativeValue(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),PVP.isPvPing(p))/100d));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ItemStack equip = p.getEquipment().getArmorContents()[i];
|
/*ItemStack equip = p.getEquipment().getArmorContents()[i];
|
||||||
@ -2605,8 +2649,8 @@ public class CustomDamage {
|
|||||||
dodgechance=0.95;
|
dodgechance=0.95;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pd.fulldodge || pd.slayermegahit ||
|
if ((pd.fulldodge || pd.slayermegahit ||
|
||||||
Buff.hasBuff(p, "BEASTWITHIN")) {
|
Buff.hasBuff(p, "BEASTWITHIN")) && !PVP.isPvPing(p)) {
|
||||||
dodgechance = 1.0;
|
dodgechance = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2638,6 +2682,7 @@ public class CustomDamage {
|
|||||||
double setbonusdiv = 0;
|
double setbonusdiv = 0;
|
||||||
double tankydiv = 0;
|
double tankydiv = 0;
|
||||||
double artifactmult = 0;
|
double artifactmult = 0;
|
||||||
|
double dodgechancemult = 0;
|
||||||
|
|
||||||
if (target instanceof LivingEntity) {
|
if (target instanceof LivingEntity) {
|
||||||
ItemStack[] armor = GenericFunctions.getEquipment(target,true);
|
ItemStack[] armor = GenericFunctions.getEquipment(target,true);
|
||||||
@ -2770,19 +2815,22 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GenericFunctions.isArtifactEquip(armor[i])) {
|
if (target instanceof Player) {
|
||||||
double reductionamt = GenericFunctions.getAbilityValue(ArtifactAbility.DAMAGE_REDUCTION, armor[i]);
|
Player p = (Player)target;
|
||||||
if (target instanceof Player &&
|
if (GenericFunctions.isArtifactEquip(armor[i])) {
|
||||||
PlayerMode.getPlayerMode((Player)target)==PlayerMode.RANGER) {
|
double reductionamt = GenericFunctions.getAbilityValue(ArtifactAbility.DAMAGE_REDUCTION, armor[i], p);
|
||||||
dmgreduction+=reductionamt/2;
|
if (target instanceof Player &&
|
||||||
} else {
|
PlayerMode.getPlayerMode((Player)target)==PlayerMode.RANGER) {
|
||||||
dmgreduction+=reductionamt;
|
dmgreduction+=reductionamt/2;
|
||||||
}
|
} else {
|
||||||
|
dmgreduction+=reductionamt;
|
||||||
|
}
|
||||||
|
|
||||||
TwosideKeeper.log("Reducing damage by "+reductionamt+"%",5);
|
TwosideKeeper.log("Reducing damage by "+reductionamt+"%",5);
|
||||||
/*if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, armor[i])) {
|
/*if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, armor[i])) {
|
||||||
dmgreduction /= ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, armor[i])?2:1;
|
dmgreduction /= ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, armor[i])?2:1;
|
||||||
}*/
|
}*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2814,7 +2862,7 @@ public class CustomDamage {
|
|||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.SHADOWWALKER, p.getEquipment().getArmorContents()[i]) &&
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.SHADOWWALKER, p.getEquipment().getArmorContents()[i]) &&
|
||||||
p.getLocation().getY()>=0 &&
|
p.getLocation().getY()>=0 &&
|
||||||
p.isOnGround() && p.getLocation().add(0,0,0).getBlock().getLightLevel()<=7) {
|
p.isOnGround() && p.getLocation().add(0,0,0).getBlock().getLightLevel()<=7) {
|
||||||
double dmgreduce = 1d-(GenericFunctions.getAbilityValue(ArtifactAbility.SHADOWWALKER, p.getEquipment().getArmorContents()[i])/100d);
|
double dmgreduce = 1d-(GenericFunctions.getAbilityValue(ArtifactAbility.SHADOWWALKER, p.getEquipment().getArmorContents()[i], p)/100d);
|
||||||
basedmg *= dmgreduce;
|
basedmg *= dmgreduce;
|
||||||
TwosideKeeper.log("Base damage became "+(dmgreduce*100)+"% of original amount.",5);
|
TwosideKeeper.log("Base damage became "+(dmgreduce*100)+"% of original amount.",5);
|
||||||
}
|
}
|
||||||
@ -2829,6 +2877,10 @@ public class CustomDamage {
|
|||||||
setbonus = ((100-ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SONGSTEEL, 4, 4))/100d);
|
setbonus = ((100-ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SONGSTEEL, 4, 4))/100d);
|
||||||
|
|
||||||
playermodediv=(PlayerMode.getPlayerMode(p)==PlayerMode.NORMAL)?0.2d:0;
|
playermodediv=(PlayerMode.getPlayerMode(p)==PlayerMode.NORMAL)?0.2d:0;
|
||||||
|
|
||||||
|
if (PVP.isPvPing(p)) {
|
||||||
|
dodgechancemult=CalculateDodgeChance(p,damager)*0.25;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Blocking: -((p.isBlocking())?ev.getDamage()*0.33:0) //33% damage will be reduced if we are blocking.
|
//Blocking: -((p.isBlocking())?ev.getDamage()*0.33:0) //33% damage will be reduced if we are blocking.
|
||||||
@ -2871,6 +2923,7 @@ public class CustomDamage {
|
|||||||
*(1d-witherdiv)
|
*(1d-witherdiv)
|
||||||
*(1d-tankydiv)
|
*(1d-tankydiv)
|
||||||
*(1d-artifactmult)
|
*(1d-artifactmult)
|
||||||
|
*(1d-dodgechancemult)
|
||||||
*setbonus
|
*setbonus
|
||||||
*((target instanceof Player && ((Player)target).isBlocking())?(PlayerMode.isDefender((Player)target))?0.30:0.50:1)
|
*((target instanceof Player && ((Player)target).isBlocking())?(PlayerMode.isDefender((Player)target))?0.30:0.50:1)
|
||||||
*((target instanceof Player)?((PlayerMode.isDefender((Player)target))?0.9:(target.getEquipment().getItemInOffHand()!=null && target.getEquipment().getItemInOffHand().getType()==Material.SHIELD)?0.95:1):1);
|
*((target instanceof Player)?((PlayerMode.isDefender((Player)target))?0.9:(target.getEquipment().getItemInOffHand()!=null && target.getEquipment().getItemInOffHand().getType()==Material.SHIELD)?0.95:1):1);
|
||||||
@ -3141,7 +3194,7 @@ public class CustomDamage {
|
|||||||
Player p = (Player)damager;
|
Player p = (Player)damager;
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.HIGHWINDER, weapon)) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.HIGHWINDER, weapon)) {
|
||||||
dmg += 93.182445*pd.velocity*GenericFunctions.getAbilityValue(ArtifactAbility.HIGHWINDER, weapon);
|
dmg += Math.min(93.182445*pd.velocity*GenericFunctions.getAbilityValue(ArtifactAbility.HIGHWINDER, weapon, p),10);
|
||||||
pd.lasthighwinderhit=TwosideKeeper.getServerTickTime();
|
pd.lasthighwinderhit=TwosideKeeper.getServerTickTime();
|
||||||
GenericFunctions.sendActionBarMessage(p, TwosideKeeper.drawVelocityBar(pd.velocity,pd.highwinderdmg),true);
|
GenericFunctions.sendActionBarMessage(p, TwosideKeeper.drawVelocityBar(pd.velocity,pd.highwinderdmg),true);
|
||||||
}
|
}
|
||||||
@ -3155,7 +3208,7 @@ public class CustomDamage {
|
|||||||
if (shooter instanceof Player) {
|
if (shooter instanceof Player) {
|
||||||
Player p = (Player)shooter;
|
Player p = (Player)shooter;
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
mult+=pd.swordcombo*GenericFunctions.getAbilityValue(ArtifactAbility.COMBO, weapon)/100d;
|
mult+=pd.swordcombo*GenericFunctions.getAbilityValue(ArtifactAbility.COMBO, weapon, p)/100d;
|
||||||
}
|
}
|
||||||
return mult;
|
return mult;
|
||||||
}
|
}
|
||||||
@ -3250,7 +3303,7 @@ public class CustomDamage {
|
|||||||
|
|
||||||
if (GenericFunctions.isArtifactEquip(weapon) &&
|
if (GenericFunctions.isArtifactEquip(weapon) &&
|
||||||
ArtifactAbility.containsEnchantment(ArtifactAbility.MARKSMAN, weapon)) {
|
ArtifactAbility.containsEnchantment(ArtifactAbility.MARKSMAN, weapon)) {
|
||||||
headshotvaly *= 1+(GenericFunctions.getAbilityValue(ArtifactAbility.MARKSMAN, weapon)/100d);
|
headshotvaly *= 1+(GenericFunctions.getAbilityValue(ArtifactAbility.MARKSMAN, weapon, p)/100d);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (proj.getTicksLived()>=4 || PlayerMode.isRanger(p)) {
|
if (proj.getTicksLived()>=4 || PlayerMode.isRanger(p)) {
|
||||||
@ -3427,7 +3480,6 @@ public class CustomDamage {
|
|||||||
|
|
||||||
static double calculateCriticalStrikeChance(ItemStack weapon, Entity damager, String reason) {
|
static double calculateCriticalStrikeChance(ItemStack weapon, Entity damager, String reason) {
|
||||||
double critchance = 0.0;
|
double critchance = 0.0;
|
||||||
critchance = addMultiplicativeValue(critchance,0.01*GenericFunctions.getAbilityValue(ArtifactAbility.CRITICAL,weapon));
|
|
||||||
LivingEntity shooter = getDamagerEntity(damager);
|
LivingEntity shooter = getDamagerEntity(damager);
|
||||||
if (shooter!=null) {
|
if (shooter!=null) {
|
||||||
if (shooter instanceof Player) {
|
if (shooter instanceof Player) {
|
||||||
@ -3440,6 +3492,7 @@ public class CustomDamage {
|
|||||||
critchance = addMultiplicativeValue(critchance,ItemSet.GetMultiplicativeTotalBaseAmount(p, ItemSet.WOLFSBANE));
|
critchance = addMultiplicativeValue(critchance,ItemSet.GetMultiplicativeTotalBaseAmount(p, ItemSet.WOLFSBANE));
|
||||||
critchance = addMultiplicativeValue(critchance,API.getPlayerBonuses(p).getBonusCriticalChance());
|
critchance = addMultiplicativeValue(critchance,API.getPlayerBonuses(p).getBonusCriticalChance());
|
||||||
critchance = addMultiplicativeValue(critchance,(pd.slayermegahit)?1.0:0.0);
|
critchance = addMultiplicativeValue(critchance,(pd.slayermegahit)?1.0:0.0);
|
||||||
|
critchance = addMultiplicativeValue(critchance,0.01*GenericFunctions.getAbilityValue(ArtifactAbility.CRITICAL,weapon,p));
|
||||||
if (reason!=null && reason.equalsIgnoreCase("power swing")) {
|
if (reason!=null && reason.equalsIgnoreCase("power swing")) {
|
||||||
critchance = addMultiplicativeValue(critchance,1.0d);
|
critchance = addMultiplicativeValue(critchance,1.0d);
|
||||||
}
|
}
|
||||||
@ -3448,10 +3501,13 @@ public class CustomDamage {
|
|||||||
int swordtier = ItemSet.GetItemTier(shooter.getEquipment().getItemInMainHand());
|
int swordtier = ItemSet.GetItemTier(shooter.getEquipment().getItemInMainHand());
|
||||||
if (baubletier>=18 && swordtier>=2) {
|
if (baubletier>=18 && swordtier>=2) {
|
||||||
critchance = addMultiplicativeValue(critchance,0.1d);
|
critchance = addMultiplicativeValue(critchance,0.1d);
|
||||||
|
TwosideKeeper.log("Crit Chance: "+critchance, 1);
|
||||||
if (baubletier>=27 && swordtier>=3) {
|
if (baubletier>=27 && swordtier>=3) {
|
||||||
critchance = addMultiplicativeValue(critchance,0.2d);
|
critchance = addMultiplicativeValue(critchance,0.2d);
|
||||||
|
TwosideKeeper.log("Crit Chance: "+critchance, 1);
|
||||||
if (baubletier>=40 && swordtier>=4) {
|
if (baubletier>=40 && swordtier>=4) {
|
||||||
critchance = addMultiplicativeValue(critchance,0.45d);
|
critchance = addMultiplicativeValue(critchance,0.45d);
|
||||||
|
TwosideKeeper.log("Crit Chance: "+critchance, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3509,9 +3565,6 @@ public class CustomDamage {
|
|||||||
|
|
||||||
public static double calculateCriticalStrikeMultiplier(Entity damager, ItemStack weapon) {
|
public static double calculateCriticalStrikeMultiplier(Entity damager, ItemStack weapon) {
|
||||||
double critdmg=1.0;
|
double critdmg=1.0;
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.CRIT_DMG, weapon)) {
|
|
||||||
critdmg+=(GenericFunctions.getAbilityValue(ArtifactAbility.CRIT_DMG,weapon))/100d;
|
|
||||||
}
|
|
||||||
if (getDamagerEntity(damager) instanceof Player) {
|
if (getDamagerEntity(damager) instanceof Player) {
|
||||||
Player p = (Player)getDamagerEntity(damager);
|
Player p = (Player)getDamagerEntity(damager);
|
||||||
if (GenericFunctions.HasFullRangerSet(p) &&
|
if (GenericFunctions.HasFullRangerSet(p) &&
|
||||||
@ -3519,6 +3572,9 @@ public class CustomDamage {
|
|||||||
GenericFunctions.getBowMode(p)==BowMode.SNIPE) {
|
GenericFunctions.getBowMode(p)==BowMode.SNIPE) {
|
||||||
critdmg+=1.0;
|
critdmg+=1.0;
|
||||||
}
|
}
|
||||||
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.CRIT_DMG, weapon)) {
|
||||||
|
critdmg+=(GenericFunctions.getAbilityValue(ArtifactAbility.CRIT_DMG,weapon, p))/100d;
|
||||||
|
}
|
||||||
critdmg+=API.getPlayerBonuses(p).getBonusCriticalDamage();
|
critdmg+=API.getPlayerBonuses(p).getBonusCriticalDamage();
|
||||||
critdmg+=ItemSet.GetTotalBaseAmount(p, ItemSet.MOONSHADOW)/100d;
|
critdmg+=ItemSet.GetTotalBaseAmount(p, ItemSet.MOONSHADOW)/100d;
|
||||||
if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.SHARD, 3)) {
|
if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.SHARD, 3)) {
|
||||||
@ -3559,6 +3615,10 @@ public class CustomDamage {
|
|||||||
MonsterController.getLivingEntityDifficulty(target)==LivingEntityDifficulty.T3_MINIBOSS) {
|
MonsterController.getLivingEntityDifficulty(target)==LivingEntityDifficulty.T3_MINIBOSS) {
|
||||||
mult = 0.1;
|
mult = 0.1;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (PVP.isPvPing((Player)target)) {
|
||||||
|
mult = 0.1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return mult;
|
return mult;
|
||||||
}
|
}
|
||||||
@ -3617,7 +3677,16 @@ public class CustomDamage {
|
|||||||
|
|
||||||
public static void setAbsorptionHearts(LivingEntity l, float new_absorption_val) {
|
public static void setAbsorptionHearts(LivingEntity l, float new_absorption_val) {
|
||||||
if (l instanceof LivingEntity) {
|
if (l instanceof LivingEntity) {
|
||||||
((org.bukkit.craftbukkit.v1_9_R1.entity.CraftLivingEntity)l).getHandle().setAbsorptionHearts(new_absorption_val);
|
if (l instanceof Player) {
|
||||||
|
Player p = (Player)l;
|
||||||
|
if (PVP.isPvPing(p)) {
|
||||||
|
((org.bukkit.craftbukkit.v1_9_R1.entity.CraftLivingEntity)l).getHandle().setAbsorptionHearts(new_absorption_val*0.25f);
|
||||||
|
} else {
|
||||||
|
((org.bukkit.craftbukkit.v1_9_R1.entity.CraftLivingEntity)l).getHandle().setAbsorptionHearts(new_absorption_val);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
((org.bukkit.craftbukkit.v1_9_R1.entity.CraftLivingEntity)l).getHandle().setAbsorptionHearts(new_absorption_val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3659,7 +3728,7 @@ public class CustomDamage {
|
|||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
if (GenericFunctions.isArtifactEquip(weapon) &&
|
if (GenericFunctions.isArtifactEquip(weapon) &&
|
||||||
ArtifactAbility.containsEnchantment(ArtifactAbility.ARMOR_PEN, weapon)) {
|
ArtifactAbility.containsEnchantment(ArtifactAbility.ARMOR_PEN, weapon)) {
|
||||||
finaldmg += dmg*(GenericFunctions.getAbilityValue(ArtifactAbility.ARMOR_PEN, weapon)/100d)*armorpenmult;
|
finaldmg += dmg*(GenericFunctions.getAbilityValue(ArtifactAbility.ARMOR_PEN, weapon, p)/100d)*armorpenmult;
|
||||||
}
|
}
|
||||||
TextUtils.outputHashmap(pd.itemsets);
|
TextUtils.outputHashmap(pd.itemsets);
|
||||||
if (GenericFunctions.HasFullRangerSet(p)
|
if (GenericFunctions.HasFullRangerSet(p)
|
||||||
@ -3714,10 +3783,10 @@ public class CustomDamage {
|
|||||||
finaldmg += dmg*(Buff.getBuff(p, "WINDCHARGE").getAmplifier()*0.01)*armorpenmult;
|
finaldmg += dmg*(Buff.getBuff(p, "WINDCHARGE").getAmplifier()*0.01)*armorpenmult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (finaldmg>=dmg) {
|
if (finaldmg*armorpenmult>=dmg) {
|
||||||
return dmg;
|
return dmg;
|
||||||
} else {
|
} else {
|
||||||
return finaldmg;
|
return finaldmg*armorpenmult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3909,7 +3978,7 @@ public class CustomDamage {
|
|||||||
|
|
||||||
/*0.0-1.0*/
|
/*0.0-1.0*/
|
||||||
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, p)/100;
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
lifestealpct += ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER, 3, 3)/100d;
|
lifestealpct += ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER, 3, 3)/100d;
|
||||||
lifestealpct += pd.lifestealstacks/100d;
|
lifestealpct += pd.lifestealstacks/100d;
|
||||||
@ -4072,14 +4141,16 @@ public class CustomDamage {
|
|||||||
*/
|
*/
|
||||||
public static double calculateCooldownReduction(Player p) {
|
public static double calculateCooldownReduction(Player p) {
|
||||||
double cooldown = 0.0;
|
double cooldown = 0.0;
|
||||||
cooldown=addMultiplicativeValue(cooldown,ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.GLADOMAIN, 2, 2)/100d);
|
if (!PVP.isPvPing(p)) {
|
||||||
cooldown=addMultiplicativeValue(cooldown,ItemSet.GetMultiplicativeTotalBaseAmount(p, ItemSet.VIXEN));
|
cooldown=addMultiplicativeValue(cooldown,ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.GLADOMAIN, 2, 2)/100d);
|
||||||
if (ItemSet.meetsSlayerSwordConditions(ItemSet.LORASYS, 40, 4, p)) {
|
cooldown=addMultiplicativeValue(cooldown,ItemSet.GetMultiplicativeTotalBaseAmount(p, ItemSet.VIXEN));
|
||||||
cooldown = addMultiplicativeValue(cooldown,0.45d);
|
if (ItemSet.meetsSlayerSwordConditions(ItemSet.LORASYS, 40, 4, p)) {
|
||||||
}
|
cooldown = addMultiplicativeValue(cooldown,0.45d);
|
||||||
cooldown=addMultiplicativeValue(cooldown,ItemSet.GetMultiplicativeTotalBaseAmount(p, ItemSet.ASSASSIN));
|
}
|
||||||
if (ItemSet.meetsSlayerSwordConditions(ItemSet.ASSASSIN, 40, 4, p)) {
|
cooldown=addMultiplicativeValue(cooldown,ItemSet.GetMultiplicativeTotalBaseAmount(p, ItemSet.ASSASSIN));
|
||||||
cooldown = addMultiplicativeValue(cooldown,0.3d);
|
if (ItemSet.meetsSlayerSwordConditions(ItemSet.ASSASSIN, 40, 4, p)) {
|
||||||
|
cooldown = addMultiplicativeValue(cooldown,0.3d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return cooldown;
|
return cooldown;
|
||||||
}
|
}
|
||||||
@ -4091,7 +4162,7 @@ public class CustomDamage {
|
|||||||
ItemStack[] equips = p.getEquipment().getArmorContents();
|
ItemStack[] equips = p.getEquipment().getArmorContents();
|
||||||
for (ItemStack equip : equips) {
|
for (ItemStack equip : equips) {
|
||||||
if (GenericFunctions.isArtifactEquip(equip)) {
|
if (GenericFunctions.isArtifactEquip(equip)) {
|
||||||
double resistamt = GenericFunctions.getAbilityValue(ArtifactAbility.STATUS_EFFECT_RESISTANCE, equip)/100d;
|
double resistamt = GenericFunctions.getAbilityValue(ArtifactAbility.STATUS_EFFECT_RESISTANCE, equip, p)/100d;
|
||||||
TwosideKeeper.log("Resist amount is "+resistamt,5);
|
TwosideKeeper.log("Resist amount is "+resistamt,5);
|
||||||
removechance=addMultiplicativeValue(removechance,resistamt);
|
removechance=addMultiplicativeValue(removechance,resistamt);
|
||||||
}
|
}
|
||||||
@ -4105,10 +4176,14 @@ public class CustomDamage {
|
|||||||
double mult = 0.0;
|
double mult = 0.0;
|
||||||
if (target!=null && shooter!=null && isBackstab(target,shooter) &&
|
if (target!=null && shooter!=null && isBackstab(target,shooter) &&
|
||||||
(shooter instanceof Player) && PlayerMode.getPlayerMode((Player)shooter)==PlayerMode.SLAYER) {
|
(shooter instanceof Player) && PlayerMode.getPlayerMode((Player)shooter)==PlayerMode.SLAYER) {
|
||||||
if (ItemSet.meetsSlayerSwordConditions(ItemSet.ASSASSIN, 27, 3, (Player)shooter)) {
|
if (!PVP.isPvPing((Player)shooter)) {
|
||||||
mult+=5.0;
|
if (ItemSet.meetsSlayerSwordConditions(ItemSet.ASSASSIN, 27, 3, (Player)shooter)) {
|
||||||
|
mult+=5.0;
|
||||||
|
} else {
|
||||||
|
mult+=2.0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mult+=2.0;
|
mult += 0.5;
|
||||||
}
|
}
|
||||||
if (ItemSet.meetsSlayerSwordConditions(ItemSet.ASSASSIN, 18, 2, (Player)shooter)) {
|
if (ItemSet.meetsSlayerSwordConditions(ItemSet.ASSASSIN, 18, 2, (Player)shooter)) {
|
||||||
Material name = ((Player)shooter).getEquipment().getItemInMainHand().getType();
|
Material name = ((Player)shooter).getEquipment().getItemInMainHand().getType();
|
||||||
@ -4187,7 +4262,7 @@ public class CustomDamage {
|
|||||||
PVP.isEnemy((Player)target, p)) {
|
PVP.isEnemy((Player)target, p)) {
|
||||||
suppressDurationMult=0.5;
|
suppressDurationMult=0.5;
|
||||||
}
|
}
|
||||||
GenericFunctions.addSuppressionTime(target, (int)(GenericFunctions.getAbilityValue(ArtifactAbility.SUPPRESS, weapon)*20*suppressDurationMult));
|
GenericFunctions.addSuppressionTime(target, (int)(GenericFunctions.getAbilityValue(ArtifactAbility.SUPPRESS, weapon, p)*20*suppressDurationMult));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,8 +17,10 @@ import net.md_5.bungee.api.chat.HoverEvent;
|
|||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import sig.plugin.TwosideKeeper.AwakenedArtifact;
|
import sig.plugin.TwosideKeeper.AwakenedArtifact;
|
||||||
import sig.plugin.TwosideKeeper.CustomDamage;
|
import sig.plugin.TwosideKeeper.CustomDamage;
|
||||||
|
import sig.plugin.TwosideKeeper.PVP;
|
||||||
import sig.plugin.TwosideKeeper.TwosideKeeper;
|
import sig.plugin.TwosideKeeper.TwosideKeeper;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||||
|
import sig.plugin.TwosideKeeper.HelperStructures.Common.PVPValue;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Utils.ArtifactUtils;
|
import sig.plugin.TwosideKeeper.HelperStructures.Utils.ArtifactUtils;
|
||||||
|
|
||||||
public enum ArtifactAbility {
|
public enum ArtifactAbility {
|
||||||
@ -27,25 +29,25 @@ public enum ArtifactAbility {
|
|||||||
//Temporary abilities: Work for 1 level and wear off afterward.
|
//Temporary abilities: Work for 1 level and wear off afterward.
|
||||||
|
|
||||||
//Weapon Abilities
|
//Weapon Abilities
|
||||||
DAMAGE("Strike","Improves Base Damage by [VAL]",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},
|
DAMAGE("Strike","Improves Base Damage by [VAL]",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},
|
||||||
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),
|
new PVPValue(30,1.0),10000,1,UpgradePath.BASIC,1),
|
||||||
ARMOR_PEN("Piercing","[VAL]% of your damage is ignored by resistances. ([PENDMG] 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},
|
ARMOR_PEN("Piercing","[VAL]% of your damage is ignored by resistances. ([PENDMG] 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},
|
||||||
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.BASIC,1),
|
new PVPValue(30,1.0),100,1,UpgradePath.BASIC,1),
|
||||||
EXECUTION("Execute","Deals [VAL] extra damage for every 20% of target's missing health.",new double[]{0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3},
|
EXECUTION("Execute","Deals [VAL] extra damage for every 20% of target's missing health.",new double[]{0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3},
|
||||||
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),
|
new PVPValue(30,0.3),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},
|
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,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),
|
new PVPValue(15,0.1),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},
|
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,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),
|
new PVPValue(30,0.5),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},
|
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,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),
|
new PVPValue(30,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},
|
HIGHWINDER("Highwinder","While moving fast or sprinting, you deal [VAL] extra damage for every 1m of speed.",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,0.05},
|
||||||
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,15,UpgradePath.WEAPON,1),
|
new PVPValue(1,0.5),10000,15,UpgradePath.WEAPON,1),
|
||||||
|
|
||||||
//Bow Abilities
|
//Bow Abilities
|
||||||
MARKSMAN("Marksman","Increases headshot hitbox size by [VAL]% .",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},
|
MARKSMAN("Marksman","Increases headshot hitbox size by [VAL]% .",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,1.0},
|
||||||
new double[]{1.0,0.975,0.95,0.875,0.85,0.825,0.8,0.775,0.75,0.725,0.70,0.675,0.65,0.55,0.45},10000,15,UpgradePath.BOW,1),
|
new PVPValue(30,1.0),10000,15,UpgradePath.BOW,1),
|
||||||
SIEGESTANCE("Siege Stance",ChatColor.GRAY+"[Unimplemented] Activate by Sneaking for three seconds. Sneak again to de-activate.\n\n"
|
/*SIEGESTANCE("Siege Stance",ChatColor.GRAY+"[Unimplemented] Activate by Sneaking for three seconds. Sneak again to de-activate.\n\n"
|
||||||
+ "Applies Slowness V and Resistance VI. While in Siege Stance you fire clusters of 7 arrows per shot. Each arrow deals [VAL] damage.",new double[]{3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0},
|
+ "Applies Slowness V and Resistance VI. While in Siege Stance you fire clusters of 7 arrows per shot. Each arrow deals [VAL] damage.",new double[]{3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,1000,UpgradePath.BOW,1),
|
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,1000,UpgradePath.BOW,1),
|
||||||
ARROWSHOWER("Arrow Shower",ChatColor.GRAY+"[Unimplemented] Shift-Left Click to activate. Applies Slowness X for three seconds while firing arrows into the sky and onto enemies in a large area in front of you. Each arrow deals [VAL] damage.",new double[]{0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7},
|
ARROWSHOWER("Arrow Shower",ChatColor.GRAY+"[Unimplemented] Shift-Left Click to activate. Applies Slowness X for three seconds while firing arrows into the sky and onto enemies in a large area in front of you. Each arrow deals [VAL] damage.",new double[]{0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7},
|
||||||
@ -53,31 +55,31 @@ public enum ArtifactAbility {
|
|||||||
TARGETING("Targeting",ChatColor.GRAY+"[Unimplemented] Left-click a mob to target them. Fire arrows to release homing missiles at your target. Each missile explodes and deals [VAL] damage.",new double[]{10,10,10,10,10,10,10,10,10,10},
|
TARGETING("Targeting",ChatColor.GRAY+"[Unimplemented] Left-click a mob to target them. Fire arrows to release homing missiles at your target. Each missile explodes and deals [VAL] damage.",new double[]{10,10,10,10,10,10,10,10,10,10},
|
||||||
new double[]{0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3},100,1000,UpgradePath.BOW,1),
|
new double[]{0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3},100,1000,UpgradePath.BOW,1),
|
||||||
ENDERTURRET("Ender Turret",ChatColor.GRAY+"[Unimplemented] Place Eyes of Ender in your hotbar to use as ammo. Each eye fired launches forward and upward before releasing a barrage of homing missiles that lock onto enemy targets. Each missile explodes and deals [VAL] damage.",new double[]{25,25,25,25,25,25,25,25,25,25},
|
ENDERTURRET("Ender Turret",ChatColor.GRAY+"[Unimplemented] Place Eyes of Ender in your hotbar to use as ammo. Each eye fired launches forward and upward before releasing a barrage of homing missiles that lock onto enemy targets. Each missile explodes and deals [VAL] damage.",new double[]{25,25,25,25,25,25,25,25,25,25},
|
||||||
new double[]{0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5},100,1000,UpgradePath.BOW,1),
|
new double[]{0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5},100,1000,UpgradePath.BOW,1),*/
|
||||||
|
|
||||||
//Armor abilities
|
//Armor abilities
|
||||||
DAMAGE_REDUCTION("Defense","Increases Base Damage reduction by [VAL]%\n\n"+PlayerMode.RANGER.getColor()+PlayerMode.RANGER.getName()+" Mode "+ChatColor.WHITE+" only receives half the effect.",new double[]{0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245},
|
DAMAGE_REDUCTION("Defense","Increases Base Damage reduction by [VAL]%\n\n"+PlayerMode.RANGER.getColor()+PlayerMode.RANGER.getName()+" Mode "+ChatColor.WHITE+" only receives half the effect.",new double[]{0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245,0.245},
|
||||||
new double[]{2.2,2.1,2.0,1.9,1.8,1.7,1.6,1.55,1.5,1.475,1.45,1.425,1.4,1.35,1.3},100,1,UpgradePath.ARMOR,1),
|
new PVPValue(80,0.245),100,1,UpgradePath.ARMOR,1),
|
||||||
HEALTH("Health","Increases Maximum Health by [VAL].\n\n"+PlayerMode.RANGER.getColor()+PlayerMode.RANGER.getName()+" Mode "+ChatColor.WHITE+" only receives half the effect.",new double[]{0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25},
|
HEALTH("Health","Increases Maximum Health by [VAL].\n\n"+PlayerMode.RANGER.getColor()+PlayerMode.RANGER.getName()+" Mode "+ChatColor.WHITE+" only receives half the effect.",new double[]{0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25},
|
||||||
new double[]{1.0,0.95,0.9,0.85,0.8,0.75,0.7,0.75,0.7,0.675,0.65,0.625,0.6,0.55,0.5},10000,1,UpgradePath.ARMOR,1),
|
new PVPValue(40,0.25),10000,1,UpgradePath.ARMOR,1),
|
||||||
HEALTH_REGEN("Regeneration","Regenerates an extra [VAL] health every 5 seconds.",new double[]{0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125},
|
HEALTH_REGEN("Regeneration","Regenerates an extra [VAL] health every 5 seconds.",new double[]{0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125},
|
||||||
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.475,0.45,0.425,0.4},10000,1,UpgradePath.ARMOR,1),
|
new PVPValue(1,0.125),10000,1,UpgradePath.ARMOR,1),
|
||||||
STATUS_EFFECT_RESISTANCE("Resistance","When a debuff is applied, there is a [VAL]% chance to remove it.",new double[]{0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25},
|
STATUS_EFFECT_RESISTANCE("Resistance","When a debuff is applied, there is a [VAL]% chance to remove it.",new double[]{0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25},
|
||||||
new double[]{4.0,3.85,3.70,3.55,3.40,3.25,3.10,2.95,2.80,2.775,2.75,2.725,2.7,2.675,2.65},100,1,UpgradePath.ARMOR,1),
|
new PVPValue(40,0.25),100,1,UpgradePath.ARMOR,1),
|
||||||
SHADOWWALKER("Shadow Walker","Increases your speed in dark areas. Damage Reduction increases by [VAL]% in dark areas. Dodge chance increases by [DODGEVAL]% in dark areas.",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},
|
SHADOWWALKER("Shadow Walker","Increases your speed in dark areas. Damage Reduction increases by [VAL]% in dark areas. Dodge chance increases by [DODGEVAL]% in dark areas.",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.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),
|
new PVPValue(0,0.2),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},
|
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),
|
new PVPValue(0,10),10,25,UpgradePath.ARMOR,1),
|
||||||
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},
|
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),
|
new PVPValue(0,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},
|
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),
|
new PVPValue(0,0.05),100,40,UpgradePath.ARMOR,10),
|
||||||
|
|
||||||
//Sword abilities
|
//Sword abilities
|
||||||
PROVOKE("Provoke","Your attacks provoke enemies for [VAL] seconds.",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},
|
PROVOKE("Provoke","Your attacks provoke enemies for [VAL] seconds.",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[]{3.0,2.9,2.8,2.7,2.6,2.5,2.4,2.3,2.2,2.1,2.0,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1},10000,10,UpgradePath.PROVOKE,1),
|
new PVPValue(0,1.0),10000,10,UpgradePath.PROVOKE,1),
|
||||||
COMBO("Belligerent","[VAL]% more damage for each successive strike on a mob. Resets after 2 seconds of no combat.",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},
|
COMBO("Belligerent","[VAL]% more damage for each successive strike on a mob. Resets after 2 seconds of no combat.",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[]{1.0,0.975,0.95,0.925,0.9,0.875,0.85,0.825,0.8,0.75,0.7,0.65,0.6,0.55,0.5},10000,40,UpgradePath.SWORD,1),
|
new PVPValue(50,0.1),10000,40,UpgradePath.SWORD,1),
|
||||||
|
|
||||||
//Pickaxe abilities
|
//Pickaxe abilities
|
||||||
/*SCAVENGE("Scavenge",ChatColor.GRAY+"[Unimplemented] Breaks off resources from armor. [VAL]% chance per hit.",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},
|
/*SCAVENGE("Scavenge",ChatColor.GRAY+"[Unimplemented] Breaks off resources from armor. [VAL]% chance per hit.",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},
|
||||||
@ -85,22 +87,22 @@ public enum ArtifactAbility {
|
|||||||
MINES("Land Mine",ChatColor.GRAY+"[Unimplemented]While in combat, throw your pickaxe to send land mines towards your enemies. On contact they deal [VAL] 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},
|
MINES("Land Mine",ChatColor.GRAY+"[Unimplemented]While in combat, throw your pickaxe to send land mines towards your enemies. On contact they deal [VAL] 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[]{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},100,1000,UpgradePath.PICKAXE,1),*/
|
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},100,1000,UpgradePath.PICKAXE,1),*/
|
||||||
MINES("Land Mine",ChatColor.GOLD+"Shift+Right-click"+ChatColor.RESET+" air to place down a land mine. Land mines detonate when enemies step near the mine location, dealing [VAL] damage. Mines will automatically detonate after 15 seconds of no activity.\n\nYou can place a maximum of "+ChatColor.GOLD+"[MINEAMT]"+ChatColor.RESET+" mine[MINEAMTPLURAL] at once.",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},
|
MINES("Land Mine",ChatColor.GOLD+"Shift+Right-click"+ChatColor.RESET+" air to place down a land mine. Land mines detonate when enemies step near the mine location, dealing [VAL] damage. Mines will automatically detonate after 15 seconds of no activity.\n\nYou can place a maximum of "+ChatColor.GOLD+"[MINEAMT]"+ChatColor.RESET+" mine[MINEAMTPLURAL] at once.",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[]{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},10000,40,UpgradePath.PICKAXE,1),
|
new PVPValue(100,1.0),10000,40,UpgradePath.PICKAXE,1),
|
||||||
OREHARVESTER("Ore Harvester",ChatColor.GOLD+"Shift+Right-click"+ChatColor.RESET+" an ore block to convert the block into a temporary buff. The buff lasts for [VAL] seconds. Duration can be stacked for longer buffs.\n\n "+DisplayOreBonus("Coal Ore","+[COALORE_BONUS]% Critical Damage")+"\n"+DisplayOreBonus("Iron Ore","+[IRONORE_BONUS]% Block Chance")+"\n"+DisplayOreBonus("Gold Ore","+[GOLDORE_BONUS]% Critical Strike Chance")+"\n"+DisplayOreBonus("Redstone Ore","+[REDSTONEORE_BONUS] Maximum Health")+"\n"+DisplayOreBonus("Lapis Lazuli Ore","+[LAPISORE_BONUS] Health Regeneration")+"\n"+DisplayOreBonus("Diamond Ore","+[COALORE_BONUS]% Damage Reduction")+"\n"+DisplayOreBonus("Emerald Ore","+[COALORE_BONUS] Base Damage")+"\n"+LevelCost(40),new double[]{10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0},
|
OREHARVESTER("Ore Harvester",ChatColor.GOLD+"Shift+Right-click"+ChatColor.RESET+" an ore block to convert the block into a temporary buff. The buff lasts for [VAL] seconds. Duration can be stacked for longer buffs.\n\n "+DisplayOreBonus("Coal Ore","+[COALORE_BONUS]% Critical Damage")+"\n"+DisplayOreBonus("Iron Ore","+[IRONORE_BONUS]% Block Chance")+"\n"+DisplayOreBonus("Gold Ore","+[GOLDORE_BONUS]% Critical Strike Chance")+"\n"+DisplayOreBonus("Redstone Ore","+[REDSTONEORE_BONUS] Maximum Health")+"\n"+DisplayOreBonus("Lapis Lazuli Ore","+[LAPISORE_BONUS] Health Regeneration")+"\n"+DisplayOreBonus("Diamond Ore","+[COALORE_BONUS]% Damage Reduction")+"\n"+DisplayOreBonus("Emerald Ore","+[COALORE_BONUS] Base Damage")+"\n"+LevelCost(40),new double[]{10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0},
|
||||||
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},10000,100,UpgradePath.PICKAXE,40),
|
new PVPValue(100,10.0),10000,100,UpgradePath.PICKAXE,40),
|
||||||
IMPACT("Impact","Damaging an enemy deals [VAL]% of an enemy's health as bonus physical damage on hit."+LevelCost(5),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},
|
IMPACT("Impact","Damaging an enemy deals [VAL]% of an enemy's health as bonus physical damage on hit."+LevelCost(5),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[]{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},250,20,UpgradePath.PICKAXE,5),
|
new PVPValue(100,1.0),250,20,UpgradePath.PICKAXE,5),
|
||||||
FORCESTRIKE("Force Strike","Perform an attack that slams an enemy against a wall. Enemies take [FORCESTRIKEVAL] damage on a successful slam, crumbling the walls behind them.\n\n"+ChatColor.YELLOW+"15 second cooldown",new double[]{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.0},
|
FORCESTRIKE("Force Strike","Perform an attack that slams an enemy against a wall. Enemies take [FORCESTRIKEVAL] damage on a successful slam, crumbling the walls behind them.\n\n"+ChatColor.YELLOW+"15 second cooldown",new double[]{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.0},
|
||||||
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},10000,350,UpgradePath.PICKAXE,1),
|
new PVPValue(100,2.0),10000,350,UpgradePath.PICKAXE,1),
|
||||||
|
|
||||||
//Shovel abilities
|
//Shovel abilities
|
||||||
SUPPRESS("Suppression","Suppresses a mob on hit for [VAL] seconds.\n\n"
|
SUPPRESS("Suppression","Suppresses a mob on hit for [VAL] seconds.\n\n"
|
||||||
+ "Suppression prevents movement, attacking, exploding, and teleportation."+LevelCost(10),new double[]{0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02},
|
+ "Suppression prevents movement, attacking, exploding, and teleportation."+LevelCost(10),new double[]{0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02},
|
||||||
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},100,10,UpgradePath.SHOVEL,10),
|
new PVPValue(10,0.02),100,10,UpgradePath.SHOVEL,10),
|
||||||
ERUPTION("Eruption","Sneak while Left-clicking a mob to damage mobs for [ERUPTIONVAL] damage and knock them up. The eruption also destroys the ground beneath you.",new double[]{3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0},
|
ERUPTION("Eruption","Sneak while Left-clicking a mob to damage mobs for [ERUPTIONVAL] damage and knock them up. The eruption also destroys the ground beneath you.",new double[]{3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0},
|
||||||
new double[]{1.0,0.925,0.85,0.775,0.7,0.625,0.55,0.475,0.45,0.425,0.4,0.375,0.35,0.325,0.3},10000,40,UpgradePath.SHOVEL,1),
|
new PVPValue(30,3.0),10000,40,UpgradePath.SHOVEL,1),
|
||||||
EARTHWAVE("Earth Wave","While in mid-air, right-click to instantly slam into the ground and launch soft blocks. This attack ignores fall damage. The larger the fall, the larger the wave.\n\nDeals [EARTHWAVEVAL] damage to every enemy hit by the wave. Deals double damage and knocks up on soft blocks.",new double[]{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.0},
|
EARTHWAVE("Earth Wave","While in mid-air, right-click to instantly slam into the ground and launch soft blocks. This attack ignores fall damage. The larger the fall, the larger the wave.\n\nDeals [EARTHWAVEVAL] damage to every enemy hit by the wave. Deals double damage and knocks up on soft blocks.",new double[]{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.0},
|
||||||
new double[]{2.4,2.2,2.0,1.9,1.8,1.7,1.6,1.5,1.4,1.2,1.1,1.0,0.9,0.8,0.7},10000,100,UpgradePath.SHOVEL,1),
|
new PVPValue(30,2.0),10000,100,UpgradePath.SHOVEL,1),
|
||||||
|
|
||||||
//Axe abilities
|
//Axe abilities
|
||||||
/*BREAKDOWN("Break Down",ChatColor.GRAY+"[Unimplemented] Breaks down armor on mobs. Each hit has a [VAL]% chance to remove a piece of armor from a mob.",new double[]{3,3,3,3,3,3,3,3,3,3},
|
/*BREAKDOWN("Break Down",ChatColor.GRAY+"[Unimplemented] Breaks down armor on mobs. Each hit has a [VAL]% chance to remove a piece of armor from a mob.",new double[]{3,3,3,3,3,3,3,3,3,3},
|
||||||
@ -109,63 +111,62 @@ public enum ArtifactAbility {
|
|||||||
new double[]{0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8},100,1000,UpgradePath.AXE,1),*/
|
new double[]{0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8},100,1000,UpgradePath.AXE,1),*/
|
||||||
DAMAGEPOOL("Damage Pool Recovery","Removes [VAL] points from Barbarian's Damage Pool with each attack.",
|
DAMAGEPOOL("Damage Pool Recovery","Removes [VAL] points from Barbarian's Damage Pool with each attack.",
|
||||||
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.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[]{},10000,1,UpgradePath.AXE,1),
|
new PVPValue(30,0.5),10000,1,UpgradePath.AXE,1),
|
||||||
LIFESTACK("Life Stack","Increases Barbarian's lifesteal stacks by [VAL] per hit.",
|
LIFESTACK("Life Stack","Increases Barbarian's lifesteal stacks by [VAL] per hit.",
|
||||||
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.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[]{},10000,1,UpgradePath.AXE,1),
|
new PVPValue(30,0.5),10000,1,UpgradePath.AXE,1),
|
||||||
LIFESUCK("Life Sucker","Directly heals [VAL]% of damage dealt as health, with a maximum of [LIFESUCKVAL] health healed per hit."+LevelCost(3),
|
LIFESUCK("Life Sucker","Directly heals [VAL]% of damage dealt as health, with a maximum of [LIFESUCKVAL] health healed per hit."+LevelCost(3),
|
||||||
new double[]{0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8},
|
new double[]{0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8},
|
||||||
new double[]{},100,40,UpgradePath.AXE,3),
|
new PVPValue(30,0.8),100,40,UpgradePath.AXE,3),
|
||||||
HIGHDIVE("High Dive","Sneak while pressing the drop key to become rooted for 3 seconds, storing [VAL]% damage taken and gaining 100% knockback resistance. Then leap up high into the air and slam the ground. High Dive increases the base damage of Barbarian's Leaping Strike by the amount of damage stored."+LevelCost(3),
|
HIGHDIVE("High Dive","Sneak while pressing the drop key to become rooted for 3 seconds, storing [VAL]% damage taken and gaining 100% knockback resistance. Then leap up high into the air and slam the ground. High Dive increases the base damage of Barbarian's Leaping Strike by the amount of damage stored."+LevelCost(3),
|
||||||
new double[]{0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8},
|
new double[]{0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8},
|
||||||
new double[]{},100,100,UpgradePath.AXE,3),
|
new PVPValue(30,0.8),100,100,UpgradePath.AXE,3),
|
||||||
|
|
||||||
//Scythe abilities
|
//Scythe abilities
|
||||||
AOE("Area of Effect","Deals damage to targets up to [AOEVAL]m from the main target hit.",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},
|
AOE("Area of Effect","Deals damage to targets up to [AOEVAL]m from the main target hit.",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[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.9,0.7,0.5},10000,1,UpgradePath.SCYTHE,1),
|
new PVPValue(3,1.0),10000,1,UpgradePath.SCYTHE,1),
|
||||||
DEATHMARK("Death Mark","Applies a Death Mark stack to enemies hit. Death mark stacks last for 5 seconds, and refresh on each hit.\n\nMarks can be detonated at any time by right-clicking. Targets killed with Death Mark resets the cooldown. Targets not killed lose half their Death Mark stacks.\n\n Each death mark stack applied deals [VAL] true 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},
|
DEATHMARK("Death Mark","Applies a Death Mark stack to enemies hit. Death mark stacks last for 5 seconds, and refresh on each hit.\n\nMarks can be detonated at any time by right-clicking. Targets killed with Death Mark resets the cooldown. Targets not killed lose half their Death Mark stacks.\n\n Each death mark stack applied deals [VAL] true 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.6,0.575,0.55,0.525,0.5,0.475,0.45,0.425,0.4,0.375,0.35,0.325,0.3,0.275,0.25},10000,10,UpgradePath.SCYTHE,1),
|
new PVPValue(3,1.0),10000,10,UpgradePath.SCYTHE,1),
|
||||||
CRIPPLE("Cripple","Every 10 death marks applied on a monster increases damage dealt from all damage sources by [VAL]%.",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},
|
CRIPPLE("Cripple","Every 10 death marks applied on a monster increases damage dealt from all damage sources by [VAL]%.",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.3,0.3,0.27,0.27,0.24,0.24,0.21,0.21,0.18,0.18},100,1000,UpgradePath.SCYTHE,1),
|
new PVPValue(1,1.0),100,1000,UpgradePath.SCYTHE,1),
|
||||||
|
|
||||||
//General abilities
|
//General abilities
|
||||||
AUTOREPAIR("Auto Repair","1% chance every second to repair [VAL] durability to the artifact item\n\nThe item must be sitting in your hotbar or must be equipped for this ability to work. This ability is less effective with no sunlight!",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},
|
AUTOREPAIR("Auto Repair","1% chance every second to repair [VAL] durability to the artifact item\n\nThe item must be sitting in your hotbar or must be equipped for this ability to work. This ability is less effective with no sunlight!",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[]{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},10000,1,UpgradePath.ALL,1),
|
new PVPValue(30,1.0),10000,1,UpgradePath.ALL,1),
|
||||||
GREED("Greed","Increases Drop rate by [VAL]% . Health is halved, health regeneration is halved. Each kill has a [GREEDCHANCE]% chance to consume the Greed buff."+TemporarySkill(true),new double[]{10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,15.0,15.0,15.0,20.0,25.0,30.0,40.0},
|
GREED("Greed","Increases Drop rate by [VAL]% . Health is halved, health regeneration is halved. Each kill has a [GREEDCHANCE]% chance to consume the Greed buff."+TemporarySkill(true),new double[]{10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,10.0,15.0,15.0,15.0,20.0,25.0,30.0,40.0},
|
||||||
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,10,UpgradePath.ALL,1),
|
new PVPValue(0,10.0),10,10,UpgradePath.ALL,1),
|
||||||
GROWTH("Growth","Sets the Potential of your Artifact to 20%."+TemporarySkill(false),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},
|
GROWTH("Growth","Sets the Potential of your Artifact to 20%."+TemporarySkill(false),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[]{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},1,10,UpgradePath.ALL,1),
|
new PVPValue(0,1.0),1,10,UpgradePath.ALL,1),
|
||||||
/*REMOVE_CURSE("Remove Curse",ChatColor.GRAY+"[Unimplemented] Removes a level of a curse from the Artifact.",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},
|
/*REMOVE_CURSE("Remove Curse",ChatColor.GRAY+"[Unimplemented] Removes a level of a curse from the Artifact.",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},
|
||||||
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},1,1000,UpgradePath.ALL),*/
|
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},1,1000,UpgradePath.ALL),*/
|
||||||
PRESERVATION("Preservation","Potential decays [POTVAL]% slower.",new double[]{0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90},
|
PRESERVATION("Preservation","Potential decays [POTVAL]% slower.",new double[]{0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90,0.90},
|
||||||
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},100,1,UpgradePath.ALL,1),
|
new PVPValue(100,0.9),100,1,UpgradePath.ALL,1),
|
||||||
/*EXP_MULT("Mega XP",ChatColor.GRAY+"[Unimplemented] Increases experience dropped from monsters by [VAL]% .",new double[]{5,5,5,5,5,5,5,5,5,5,5,5,5,5,5},
|
/*EXP_MULT("Mega XP",ChatColor.GRAY+"[Unimplemented] Increases experience dropped from monsters by [VAL]% .",new double[]{5,5,5,5,5,5,5,5,5,5,5,5,5,5,5},
|
||||||
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},100,1000,UpgradePath.ALL),*/
|
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},100,1000,UpgradePath.ALL),*/
|
||||||
|
|
||||||
//Bad stuff
|
//Bad stuff
|
||||||
REDUCEDMG("Weakness","[VAL]% Decrease in Base Damage.",new double[]{8,8,8,8,8,8,8,8,8,8},
|
REDUCEDMG("Weakness","[VAL]% Decrease in Base Damage.",new double[]{8,8,8,8,8,8,8,8,8,8},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,3,UpgradePath.ALL,1),
|
new PVPValue(30,8),100,3,UpgradePath.ALL,1),
|
||||||
REDUCEDEF("Imperil","[VAL]% Decrease in Damage Reduction",new double[]{8,8,8,8,8,8,8,8,8,8},
|
REDUCEDEF("Imperil","[VAL]% Decrease in Damage Reduction",new double[]{8,8,8,8,8,8,8,8,8,8},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,5,UpgradePath.ALL,1),
|
new PVPValue(30,8),100,5,UpgradePath.ALL,1),
|
||||||
LIFE_REDUCTION("Health Cut","[VAL]% decrease in maximum health.",new double[]{30,30,30,30,30,30,30,30,30,30},
|
LIFE_REDUCTION("Health Cut","[VAL]% decrease in maximum health.",new double[]{30,30,30,30,30,30,30,30,30,30},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,5,UpgradePath.ALL,1),
|
new PVPValue(30,30),100,5,UpgradePath.ALL,1),
|
||||||
LOWER_DEFENSE("Debilitate","[VAL]% decrease in damage reduction.",new double[]{30,30,30,30,30,30,30,30,30,30},
|
LOWER_DEFENSE("Debilitate","[VAL]% decrease in damage reduction.",new double[]{30,30,30,30,30,30,30,30,30,30},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,5,UpgradePath.ALL,1),
|
new PVPValue(30,30),100,5,UpgradePath.ALL,1),
|
||||||
TELEPORT("Teleport","[VAL]% chance to teleport the player to a random location on artifact experience gain.",new double[]{3,3,3,3,3,3,3,3,3,3},
|
TELEPORT("Teleport","[VAL]% chance to teleport the player to a random location on artifact experience gain.",new double[]{3,3,3,3,3,3,3,3,3,3},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,10,UpgradePath.ALL,1),
|
new PVPValue(30,3),100,10,UpgradePath.ALL,1),
|
||||||
DRAINING("Draining","[VAL]% chance to remove a level of experience on artifact experience gain.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
|
DRAINING("Draining","[VAL]% chance to remove a level of experience on artifact experience gain.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,10,UpgradePath.ALL,1),
|
new PVPValue(30,1.0),100,10,UpgradePath.ALL,1),
|
||||||
NOREGEN("Weary","No health regenerates.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
|
NOREGEN("Weary","No health regenerates.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,15,UpgradePath.ALL,1),
|
new PVPValue(30,1.0),100,15,UpgradePath.ALL,1),
|
||||||
STARVATION("Starvation","[VAL]% chance to cause [HUNGERVAL] seconds of Hunger on experience gain.",new double[]{5,5,5,5,5,5,5,5,5,5},
|
STARVATION("Starvation","[VAL]% chance to cause [HUNGERVAL] seconds of Hunger on experience gain.",new double[]{5,5,5,5,5,5,5,5,5,5},
|
||||||
new double[]{0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1},100,15,UpgradePath.ALL,1),
|
new PVPValue(30,5),100,15,UpgradePath.ALL,1),
|
||||||
BURN("Flammable","All burn damage deals x[VAL] damage.",new double[]{4.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0},
|
BURN("Flammable","All burn damage deals x[VAL] damage.",new double[]{4.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},100,25,UpgradePath.ALL,1),
|
new PVPValue(30,0.4),100,25,UpgradePath.ALL,1),
|
||||||
FROZEN("Frozen","Player will be inflicted with increasing levels of slowness and fatigue until finally frozen and killed.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
|
FROZEN("Frozen","Player will be inflicted with increasing levels of slowness and fatigue until finally frozen and killed.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},1,45,UpgradePath.ALL,1),
|
new PVPValue(30,1.0),1,45,UpgradePath.ALL,1),
|
||||||
PETRIFICATION("Petrification","Player will be inflicted with increasing levels of slowness and fatigue until finally petrified and killed.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
|
PETRIFICATION("Petrification","Player will be inflicted with increasing levels of slowness and fatigue until finally petrified and killed.",new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},
|
||||||
new double[]{1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0},1,45,UpgradePath.ALL,1),
|
new PVPValue(30,1.0),1,45,UpgradePath.ALL,1),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
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};
|
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};
|
||||||
@ -179,18 +180,23 @@ public enum ArtifactAbility {
|
|||||||
int requirement;
|
int requirement;
|
||||||
UpgradePath upgrade;
|
UpgradePath upgrade;
|
||||||
int apcost;
|
int apcost;
|
||||||
|
PVPValue pvpval;
|
||||||
|
|
||||||
ArtifactAbility(String name, String desc, double[] baseval, double[] decayval, int maxlv, int requirement, UpgradePath upgrade, int apcost) {
|
ArtifactAbility(String name, String desc, double[] baseval, PVPValue pvpval, int maxlv, int requirement, UpgradePath upgrade, int apcost) {
|
||||||
this.name=name;
|
this.name=name;
|
||||||
this.desc=desc;
|
this.desc=desc;
|
||||||
this.baseval=baseval;
|
this.baseval=baseval;
|
||||||
this.decayval=decayval;
|
|
||||||
this.maxlv=maxlv;
|
this.maxlv=maxlv;
|
||||||
this.requirement=requirement;
|
this.requirement=requirement;
|
||||||
AwakenedArtifact.ability_map.put(this,this.name);
|
AwakenedArtifact.ability_map.put(this,this.name);
|
||||||
AwakenedArtifact.name_map.put(this.name,this);
|
AwakenedArtifact.name_map.put(this.name,this);
|
||||||
this.upgrade=upgrade;
|
this.upgrade=upgrade;
|
||||||
this.apcost=apcost;
|
this.apcost=apcost;
|
||||||
|
this.pvpval=pvpval;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PVPValue getPVPValue() {
|
||||||
|
return pvpval;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String LevelCost(int i) {
|
private static String LevelCost(int i) {
|
||||||
@ -215,12 +221,22 @@ public enum ArtifactAbility {
|
|||||||
|
|
||||||
public double GetBaseValue(int tier) {
|
public double GetBaseValue(int tier) {
|
||||||
if (tier<=0) {tier=1;}
|
if (tier<=0) {tier=1;}
|
||||||
return this.baseval[tier-1];
|
if (tier-1<this.baseval.length) {
|
||||||
|
return this.baseval[tier-1];
|
||||||
|
} else {
|
||||||
|
TwosideKeeper.log("WARNING! Base value for tier "+tier+" does not exist for ability "+this.name()+"! Falling back to highest possible value.", 1);
|
||||||
|
return this.baseval[this.baseval.length-1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double GetDecayValue(int tier) {
|
public double GetDecayValue(int tier) {
|
||||||
if (tier<=0) {tier=1;}
|
if (tier<=0) {tier=1;}
|
||||||
return decayvals[tier-1];
|
if (tier-1<decayvals.length) {
|
||||||
|
return decayvals[tier-1];
|
||||||
|
} else {
|
||||||
|
TwosideKeeper.log("WARNING! Decay value for tier "+tier+" does not exist for decayvals array! Falling back to highest possible value.", 1);
|
||||||
|
return decayvals[decayvals.length-1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetMaxLevel() {
|
public int GetMaxLevel() {
|
||||||
@ -231,23 +247,6 @@ public enum ArtifactAbility {
|
|||||||
return requirement;
|
return requirement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static double calculateValue(ArtifactAbility ability, int artifacttier, int abilitylevel) {
|
|
||||||
double sum=0;
|
|
||||||
TwosideKeeper.log("Ability "+ability.GetName(), 4);
|
|
||||||
/*for(int i=0;i<abilitylevel;i++){
|
|
||||||
TwosideKeeper.log("Old Sum:"+sum+"::i:"+i, 5);
|
|
||||||
sum+=1d/(1d+(ability.GetDecayValue(artifacttier)*(double)i));
|
|
||||||
TwosideKeeper.log("New Sum:"+sum+"::i:"+i, 5);
|
|
||||||
}
|
|
||||||
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 ability.GetBaseValue(artifacttier) * Math.pow(abilitylevel, ability.GetDecayValue(artifacttier));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HashMap<ArtifactAbility,Integer> getEnchantments(ItemStack item) {
|
public static HashMap<ArtifactAbility,Integer> getEnchantments(ItemStack item) {
|
||||||
HashMap<ArtifactAbility,Integer> abilities = new HashMap<ArtifactAbility,Integer>();
|
HashMap<ArtifactAbility,Integer> abilities = new HashMap<ArtifactAbility,Integer>();
|
||||||
if (GenericFunctions.isArtifactEquip(item)) {
|
if (GenericFunctions.isArtifactEquip(item)) {
|
||||||
@ -518,7 +517,7 @@ public enum ArtifactAbility {
|
|||||||
tc.addExtra(ac);
|
tc.addExtra(ac);
|
||||||
tc.addExtra(" to open up the ability upgrade menu.");;*/
|
tc.addExtra(" to open up the ability upgrade menu.");;*/
|
||||||
p.spigot().sendMessage(tc);
|
p.spigot().sendMessage(tc);
|
||||||
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getInventory().getItem(GenericFunctions.CalculateSlot(item,p))).getUpgradePath(), CustomDamage.getBaseWeaponDamage(item, p, null), item,GenericFunctions.CalculateSlot(item,p)));
|
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getInventory().getItem(GenericFunctions.CalculateSlot(item,p))).getUpgradePath(), CustomDamage.getBaseWeaponDamage(item, p, null), item,GenericFunctions.CalculateSlot(item,p),p));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ability.GetMaxLevel()<=level) {
|
if (ability.GetMaxLevel()<=level) {
|
||||||
@ -536,7 +535,7 @@ public enum ArtifactAbility {
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TextComponent DisplayAbility(ArtifactAbility ability, double playerdmgval, ItemStack targetitem, int slot) {
|
public static TextComponent DisplayAbility(ArtifactAbility ability, double playerdmgval, ItemStack targetitem, int slot, Player p) {
|
||||||
boolean unlocked=true;
|
boolean unlocked=true;
|
||||||
String lockedreason = "";
|
String lockedreason = "";
|
||||||
if (AwakenedArtifact.getLV(targetitem)<ability.GetMinLevel() || getEnchantmentLevel(ability,targetitem)>=ability.GetMaxLevel() || AwakenedArtifact.getAP(targetitem)<ability.getAPCost()) {
|
if (AwakenedArtifact.getLV(targetitem)<ability.GetMinLevel() || getEnchantmentLevel(ability,targetitem)>=ability.GetMaxLevel() || AwakenedArtifact.getAP(targetitem)<ability.getAPCost()) {
|
||||||
@ -555,9 +554,9 @@ public enum ArtifactAbility {
|
|||||||
}
|
}
|
||||||
String displaystring = "";
|
String displaystring = "";
|
||||||
if (enchantlevel>0) {
|
if (enchantlevel>0) {
|
||||||
displaystring = displayDescriptionUpgrade(ability,ArtifactUtils.getArtifactTier(targetitem),enchantlevel,enchantlevel+1,playerdmgval);
|
displaystring = displayDescriptionUpgrade(ability,ArtifactUtils.getArtifactTier(targetitem),enchantlevel,enchantlevel+1,playerdmgval, PVP.isPvPing(p));
|
||||||
} else {
|
} else {
|
||||||
displaystring = displayDescription(ability,ArtifactUtils.getArtifactTier(targetitem),enchantlevel+1,playerdmgval);
|
displaystring = displayDescription(ability,ArtifactUtils.getArtifactTier(targetitem),enchantlevel+1,playerdmgval, PVP.isPvPing(p));
|
||||||
}
|
}
|
||||||
TextComponent tc = new TextComponent(((unlocked)?ChatColor.GREEN:ChatColor.RED)+"["+ability.GetName()+" "+(enchantlevel+1)+"] ");
|
TextComponent tc = new TextComponent(((unlocked)?ChatColor.GREEN:ChatColor.RED)+"["+ability.GetName()+" "+(enchantlevel+1)+"] ");
|
||||||
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,new ComponentBuilder(WordUtils.wrap(ChatColor.BLUE+ability.GetName()+"\n\n"+displaystring+((lockedreason.equalsIgnoreCase(""))?"":"\n\n"),LINE_SIZE,"\n",true)+WordUtils.wrap(lockedreason,LINE_SIZE,"\n"+net.md_5.bungee.api.ChatColor.GRAY,true)).create()));
|
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,new ComponentBuilder(WordUtils.wrap(ChatColor.BLUE+ability.GetName()+"\n\n"+displaystring+((lockedreason.equalsIgnoreCase(""))?"":"\n\n"),LINE_SIZE,"\n",true)+WordUtils.wrap(lockedreason,LINE_SIZE,"\n"+net.md_5.bungee.api.ChatColor.GRAY,true)).create()));
|
||||||
@ -574,11 +573,11 @@ public enum ArtifactAbility {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TextComponent GenerateMenu(UpgradePath path, double playerdmgval, ItemStack targetitem) {
|
public static TextComponent GenerateMenu(UpgradePath path, double playerdmgval, ItemStack targetitem, Player p) {
|
||||||
return GenerateMenu(path,playerdmgval,targetitem,0);
|
return GenerateMenu(path,playerdmgval,targetitem,0,p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TextComponent GenerateMenu(UpgradePath path, double playerdmgval, ItemStack targetitem, int slot) {
|
public static TextComponent GenerateMenu(UpgradePath path, double playerdmgval, ItemStack targetitem, int slot, Player p) {
|
||||||
TextComponent msg1 = new TextComponent("Choose an ability to upgrade "+((targetitem.hasItemMeta() && targetitem.getItemMeta().hasDisplayName())?targetitem.getItemMeta().getDisplayName():GenericFunctions.UserFriendlyMaterialName(targetitem))+ChatColor.RESET+":\n\n");
|
TextComponent msg1 = new TextComponent("Choose an ability to upgrade "+((targetitem.hasItemMeta() && targetitem.getItemMeta().hasDisplayName())?targetitem.getItemMeta().getDisplayName():GenericFunctions.UserFriendlyMaterialName(targetitem))+ChatColor.RESET+":\n\n");
|
||||||
int i=0;
|
int i=0;
|
||||||
TextComponent text = new TextComponent("");
|
TextComponent text = new TextComponent("");
|
||||||
@ -590,83 +589,83 @@ public enum ArtifactAbility {
|
|||||||
path==UpgradePath.FISHING_ROD ||
|
path==UpgradePath.FISHING_ROD ||
|
||||||
path==UpgradePath.SCYTHE ||
|
path==UpgradePath.SCYTHE ||
|
||||||
path==UpgradePath.BASIC) {
|
path==UpgradePath.BASIC) {
|
||||||
text=DisplayAbility(DAMAGE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(DAMAGE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(ARMOR_PEN,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(ARMOR_PEN,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(EXECUTION,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(EXECUTION,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
if (path!=UpgradePath.BASIC) {
|
if (path!=UpgradePath.BASIC) {
|
||||||
text=DisplayAbility(LIFESTEAL,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(LIFESTEAL,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(CRITICAL,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(CRITICAL,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(CRIT_DMG,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(CRIT_DMG,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(HIGHWINDER,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(HIGHWINDER,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
if (path==UpgradePath.SWORD) {
|
if (path==UpgradePath.SWORD) {
|
||||||
text=DisplayAbility(PROVOKE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(PROVOKE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(COMBO,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(COMBO,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
} else
|
} else
|
||||||
if (path==UpgradePath.AXE) {
|
if (path==UpgradePath.AXE) {
|
||||||
text=DisplayAbility(PROVOKE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(PROVOKE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
//text=DisplayAbility(BREAKDOWN,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
//text=DisplayAbility(BREAKDOWN,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
//text=DisplayAbility(BUTCHERY,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
//text=DisplayAbility(BUTCHERY,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
if (TwosideKeeper.NEWARTIFACTABILITIES_ACTIVATED) {
|
if (TwosideKeeper.NEWARTIFACTABILITIES_ACTIVATED) {
|
||||||
text=DisplayAbility(DAMAGEPOOL,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(DAMAGEPOOL,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(LIFESTACK,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(LIFESTACK,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(LIFESUCK,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(LIFESUCK,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(HIGHDIVE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(HIGHDIVE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (path==UpgradePath.FISHING_ROD) {
|
if (path==UpgradePath.FISHING_ROD) {
|
||||||
} else
|
} else
|
||||||
if (path==UpgradePath.BOW) {
|
if (path==UpgradePath.BOW) {
|
||||||
text=DisplayAbility(MARKSMAN,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(MARKSMAN,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(SIEGESTANCE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
/*text=DisplayAbility(SIEGESTANCE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(ARROWSHOWER,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(ARROWSHOWER,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(TARGETING,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(TARGETING,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(ENDERTURRET,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(ENDERTURRET,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}*/
|
||||||
} else
|
} else
|
||||||
if (path==UpgradePath.SCYTHE) {
|
if (path==UpgradePath.SCYTHE) {
|
||||||
text=DisplayAbility(AOE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(AOE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(DEATHMARK,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(DEATHMARK,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (path==UpgradePath.ARMOR //Armor category.
|
if (path==UpgradePath.ARMOR //Armor category.
|
||||||
) {
|
) {
|
||||||
text=DisplayAbility(DAMAGE_REDUCTION,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(DAMAGE_REDUCTION,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(HEALTH,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(HEALTH,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(HEALTH_REGEN,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(HEALTH_REGEN,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(STATUS_EFFECT_RESISTANCE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(STATUS_EFFECT_RESISTANCE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(SHADOWWALKER,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(SHADOWWALKER,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(SURVIVOR,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(SURVIVOR,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(DODGE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(DODGE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(GRACEFULDODGE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(GRACEFULDODGE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
} else
|
} else
|
||||||
if (path==UpgradePath.TOOL || //Tool category.
|
if (path==UpgradePath.TOOL || //Tool category.
|
||||||
path==UpgradePath.SHOVEL ||
|
path==UpgradePath.SHOVEL ||
|
||||||
path==UpgradePath.PICKAXE
|
path==UpgradePath.PICKAXE
|
||||||
) {
|
) {
|
||||||
text=DisplayAbility(DAMAGE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(DAMAGE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(ARMOR_PEN,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(ARMOR_PEN,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(EXECUTION,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(EXECUTION,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
if (path==UpgradePath.SHOVEL) {
|
if (path==UpgradePath.SHOVEL) {
|
||||||
text=DisplayAbility(SUPPRESS,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(SUPPRESS,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(ERUPTION,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(ERUPTION,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(EARTHWAVE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(EARTHWAVE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
} else
|
} else
|
||||||
if (path==UpgradePath.PICKAXE) {
|
if (path==UpgradePath.PICKAXE) {
|
||||||
//text=DisplayAbility(SCAVENGE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
//text=DisplayAbility(SCAVENGE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
if (TwosideKeeper.NEWARTIFACTABILITIES_ACTIVATED) {
|
if (TwosideKeeper.NEWARTIFACTABILITIES_ACTIVATED) {
|
||||||
text=DisplayAbility(MINES,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(MINES,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(OREHARVESTER,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(OREHARVESTER,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(IMPACT,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(IMPACT,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(FORCESTRIKE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(FORCESTRIKE,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
text=DisplayAbility(GREED,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(GREED,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(AUTOREPAIR,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(AUTOREPAIR,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(GROWTH,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(GROWTH,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
//text=DisplayAbility(REMOVE_CURSE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
//text=DisplayAbility(REMOVE_CURSE,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
text=DisplayAbility(PRESERVATION,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
text=DisplayAbility(PRESERVATION,playerdmgval,targetitem,slot,p);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
//text=DisplayAbility(EXP_MULT,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
//text=DisplayAbility(EXP_MULT,playerdmgval,targetitem,slot);msg1.addExtra(text);if(!text.getText().equalsIgnoreCase("")){++i;}if(i%4==0){msg1.addExtra("\n");}
|
||||||
|
|
||||||
return msg1;
|
return msg1;
|
||||||
@ -676,42 +675,42 @@ public enum ArtifactAbility {
|
|||||||
return ChatColor.LIGHT_PURPLE+oretype+": "+ChatColor.YELLOW+" "+bonus;
|
return ChatColor.LIGHT_PURPLE+oretype+": "+ChatColor.YELLOW+" "+bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String displayDescription(ArtifactAbility ability, int tier, int abilitylv, double playerdmgval) { //Level to display information for.
|
public static String displayDescription(ArtifactAbility ability, int tier, int abilitylv, double playerdmgval, boolean pvp) { //Level to display information for.
|
||||||
String msg = ability.GetDescription();
|
String msg = ability.GetDescription();
|
||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
msg=msg.replace("[VAL]", ChatColor.BLUE+df.format(calculateValue(ability,tier,abilitylv))+ChatColor.RESET);
|
msg=msg.replace("[VAL]", ChatColor.BLUE+df.format(calculateValue(ability,tier,abilitylv,pvp))+ChatColor.RESET);
|
||||||
msg=msg.replace("[200VAL]", ChatColor.BLUE+df.format(200+calculateValue(ability,tier,abilitylv))+ChatColor.RESET);
|
msg=msg.replace("[200VAL]", ChatColor.BLUE+df.format(200+calculateValue(ability,tier,abilitylv,pvp))+ChatColor.RESET);
|
||||||
msg=msg.replace("[PENDMG]", ChatColor.BLUE+df.format(calculateValue(ability,tier,abilitylv)/100*playerdmgval)+ChatColor.RESET); //Based on multiplying [VAL] by the base damage value.
|
msg=msg.replace("[PENDMG]", ChatColor.BLUE+df.format(calculateValue(ability,tier,abilitylv,pvp)/100*playerdmgval)+ChatColor.RESET); //Based on multiplying [VAL] by the base damage value.
|
||||||
msg=msg.replace("[HUNGERVAL]", ChatColor.BLUE+df.format(10*abilitylv)+ChatColor.RESET);
|
msg=msg.replace("[HUNGERVAL]", ChatColor.BLUE+df.format(10*abilitylv)+ChatColor.RESET);
|
||||||
msg=msg.replace("[FATALDMG]", ChatColor.BLUE+df.format(120*abilitylv)+ChatColor.RESET);
|
msg=msg.replace("[FATALDMG]", ChatColor.BLUE+df.format(120*abilitylv)+ChatColor.RESET);
|
||||||
msg=msg.replace("[REPAIRCHANCE]", ChatColor.BLUE+df.format(tier/3)+ChatColor.RESET);
|
msg=msg.replace("[REPAIRCHANCE]", ChatColor.BLUE+df.format(tier/3)+ChatColor.RESET);
|
||||||
msg=msg.replace("[DODGEVAL]", ChatColor.BLUE+df.format(tier)+ChatColor.RESET);
|
msg=msg.replace("[DODGEVAL]", ChatColor.BLUE+df.format(tier)+ChatColor.RESET);
|
||||||
msg=msg.replace("[GREEDCHANCE]", ChatColor.BLUE+df.format(8-(tier/2d))+ChatColor.RESET);
|
msg=msg.replace("[GREEDCHANCE]", ChatColor.BLUE+df.format(8-(tier/2d))+ChatColor.RESET);
|
||||||
msg=msg.replace("[ERUPTIONVAL]", ChatColor.BLUE+df.format(35+calculateValue(ability,tier,abilitylv))+ChatColor.RESET);
|
msg=msg.replace("[ERUPTIONVAL]", ChatColor.BLUE+df.format(35+calculateValue(ability,tier,abilitylv,pvp))+ChatColor.RESET);
|
||||||
msg=msg.replace("[EARTHWAVEVAL]", ChatColor.BLUE+df.format(20+calculateValue(ability,tier,abilitylv))+ChatColor.RESET);
|
msg=msg.replace("[EARTHWAVEVAL]", ChatColor.BLUE+df.format(20+calculateValue(ability,tier,abilitylv,pvp))+ChatColor.RESET);
|
||||||
msg=msg.replace("[AOEVAL]", ChatColor.BLUE+df.format(1+calculateValue(ability,tier,abilitylv))+ChatColor.RESET);
|
msg=msg.replace("[AOEVAL]", ChatColor.BLUE+df.format(1+calculateValue(ability,tier,abilitylv,pvp))+ChatColor.RESET);
|
||||||
msg=msg.replace("[POTVAL]", ChatColor.BLUE+df.format(5+calculateValue(ability,tier,abilitylv))+ChatColor.RESET);
|
msg=msg.replace("[POTVAL]", ChatColor.BLUE+df.format(5+calculateValue(ability,tier,abilitylv,pvp))+ChatColor.RESET);
|
||||||
msg=msg.replace("[GRACEFULVAL]", ChatColor.BLUE+df.format(0.1+calculateValue(ability,tier,abilitylv))+ChatColor.RESET);
|
msg=msg.replace("[GRACEFULVAL]", ChatColor.BLUE+df.format(0.1+calculateValue(ability,tier,abilitylv,pvp))+ChatColor.RESET);
|
||||||
msg=msg.replace("[FORCESTRIKEVAL]", ChatColor.BLUE+df.format(60+calculateValue(ability,tier,abilitylv))+ChatColor.RESET);
|
msg=msg.replace("[FORCESTRIKEVAL]", ChatColor.BLUE+df.format(60+calculateValue(ability,tier,abilitylv,pvp))+ChatColor.RESET);
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
public static String displayDescriptionUpgrade(ArtifactAbility ability, int tier, int fromlv, int tolv, double playerdmgval) { //Level to display information for.
|
public static String displayDescriptionUpgrade(ArtifactAbility ability, int tier, int fromlv, int tolv, double playerdmgval, boolean pvp) { //Level to display information for.
|
||||||
String msg = ability.GetDescription();
|
String msg = ability.GetDescription();
|
||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
msg=msg.replace("[VAL]", DisplayChangedValue(df.format(calculateValue(ability,tier,fromlv)),df.format(calculateValue(ability,tier,tolv))));
|
msg=msg.replace("[VAL]", DisplayChangedValue(df.format(calculateValue(ability,tier,fromlv,pvp)),df.format(calculateValue(ability,tier,tolv,pvp))));
|
||||||
msg=msg.replace("[200VAL]", ChatColor.BLUE+DisplayChangedValue(df.format(200+calculateValue(ability,tier,fromlv)),df.format(200+calculateValue(ability,tier,tolv)))+ChatColor.RESET);
|
msg=msg.replace("[200VAL]", ChatColor.BLUE+DisplayChangedValue(df.format(200+calculateValue(ability,tier,fromlv,pvp)),df.format(200+calculateValue(ability,tier,tolv,pvp)))+ChatColor.RESET);
|
||||||
msg=msg.replace("[PENDMG]", DisplayChangedValue(df.format(calculateValue(ability,tier,fromlv)/100*playerdmgval),df.format(calculateValue(ability,tier,tolv)/100*playerdmgval))); //Based on multiplying [VAL] by the base damage value.
|
msg=msg.replace("[PENDMG]", DisplayChangedValue(df.format(calculateValue(ability,tier,fromlv,pvp)/100*playerdmgval),df.format(calculateValue(ability,tier,tolv,pvp)/100*playerdmgval))); //Based on multiplying [VAL] by the base damage value.
|
||||||
msg=msg.replace("[HUNGERVAL]", DisplayBadChangedValue(df.format(10*fromlv),df.format(10*tolv)));
|
msg=msg.replace("[HUNGERVAL]", DisplayBadChangedValue(df.format(10*fromlv),df.format(10*tolv)));
|
||||||
msg=msg.replace("[FATALDMG]", DisplayChangedValue(df.format(120-fromlv),df.format(120-tolv)));
|
msg=msg.replace("[FATALDMG]", DisplayChangedValue(df.format(120-fromlv),df.format(120-tolv)));
|
||||||
msg=msg.replace("[REPAIRCHANCE]", df.format(tier/3));
|
msg=msg.replace("[REPAIRCHANCE]", df.format(tier/3));
|
||||||
msg=msg.replace("[DODGEVAL]", df.format(tier));
|
msg=msg.replace("[DODGEVAL]", df.format(tier));
|
||||||
msg=msg.replace("[GREEDCHANCE]", ChatColor.BLUE+df.format(8-(tier/2d))+ChatColor.RESET);
|
msg=msg.replace("[GREEDCHANCE]", ChatColor.BLUE+df.format(8-(tier/2d))+ChatColor.RESET);
|
||||||
msg=msg.replace("[ERUPTIONVAL]", DisplayChangedValue(df.format(35+calculateValue(ability,tier,fromlv))+ChatColor.RESET,df.format(35+calculateValue(ability,tier,tolv))+ChatColor.RESET));
|
msg=msg.replace("[ERUPTIONVAL]", DisplayChangedValue(df.format(35+calculateValue(ability,tier,fromlv,pvp))+ChatColor.RESET,df.format(35+calculateValue(ability,tier,tolv,pvp))+ChatColor.RESET));
|
||||||
msg=msg.replace("[EARTHWAVEVAL]", DisplayChangedValue(df.format(20+calculateValue(ability,tier,fromlv))+ChatColor.RESET,df.format(20+calculateValue(ability,tier,tolv))+ChatColor.RESET));
|
msg=msg.replace("[EARTHWAVEVAL]", DisplayChangedValue(df.format(20+calculateValue(ability,tier,fromlv,pvp))+ChatColor.RESET,df.format(20+calculateValue(ability,tier,tolv,pvp))+ChatColor.RESET));
|
||||||
msg=msg.replace("[AOEVAL]", DisplayChangedValue(df.format(1+calculateValue(ability,tier,fromlv))+ChatColor.RESET,df.format(1+calculateValue(ability,tier,tolv))+ChatColor.RESET));
|
msg=msg.replace("[AOEVAL]", DisplayChangedValue(df.format(1+calculateValue(ability,tier,fromlv,pvp))+ChatColor.RESET,df.format(1+calculateValue(ability,tier,tolv,pvp))+ChatColor.RESET));
|
||||||
msg=msg.replace("[POTVAL]", DisplayChangedValue(df.format(5+calculateValue(ability,tier,fromlv))+ChatColor.RESET,df.format(5+calculateValue(ability,tier,tolv))+ChatColor.RESET));
|
msg=msg.replace("[POTVAL]", DisplayChangedValue(df.format(5+calculateValue(ability,tier,fromlv,pvp))+ChatColor.RESET,df.format(5+calculateValue(ability,tier,tolv,pvp))+ChatColor.RESET));
|
||||||
msg=msg.replace("[GRACEFULVAL]", DisplayChangedValue(df.format(0.1+calculateValue(ability,tier,fromlv))+ChatColor.RESET,df.format(0.1+calculateValue(ability,tier,tolv))+ChatColor.RESET));
|
msg=msg.replace("[GRACEFULVAL]", DisplayChangedValue(df.format(0.1+calculateValue(ability,tier,fromlv,pvp))+ChatColor.RESET,df.format(0.1+calculateValue(ability,tier,tolv,pvp))+ChatColor.RESET));
|
||||||
msg=msg.replace("[FORCESTRIKEVAL]", DisplayChangedValue(df.format(60+calculateValue(ability,tier,fromlv))+ChatColor.RESET,df.format(60+calculateValue(ability,tier,tolv))+ChatColor.RESET));
|
msg=msg.replace("[FORCESTRIKEVAL]", DisplayChangedValue(df.format(60+calculateValue(ability,tier,fromlv,pvp))+ChatColor.RESET,df.format(60+calculateValue(ability,tier,tolv,pvp))+ChatColor.RESET));
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -722,4 +721,23 @@ public enum ArtifactAbility {
|
|||||||
return ChatColor.DARK_RED+""+ChatColor.STRIKETHROUGH+val1+ChatColor.RESET+ChatColor.RED+val2+ChatColor.DARK_RED+ChatColor.BOLD+"v"+ChatColor.RESET;
|
return ChatColor.DARK_RED+""+ChatColor.STRIKETHROUGH+val1+ChatColor.RESET+ChatColor.RED+val2+ChatColor.DARK_RED+ChatColor.BOLD+"v"+ChatColor.RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static double calculateValue(ArtifactAbility ab, int artifactTier, int enchantmentLevel, boolean pvp) {
|
||||||
|
double sum=0;
|
||||||
|
TwosideKeeper.log("Ability "+ab.GetName(), 4);
|
||||||
|
/*for(int i=0;i<abilitylevel;i++){
|
||||||
|
TwosideKeeper.log("Old Sum:"+sum+"::i:"+i, 5);
|
||||||
|
sum+=1d/(1d+(ability.GetDecayValue(artifacttier)*(double)i));
|
||||||
|
TwosideKeeper.log("New Sum:"+sum+"::i:"+i, 5);
|
||||||
|
}
|
||||||
|
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));
|
||||||
|
if (pvp) {
|
||||||
|
return ab.pvpval.getBaseValue() * Math.pow(ab.pvpval.getPointValue(),ab.GetDecayValue(15));
|
||||||
|
} else {
|
||||||
|
return ab.GetBaseValue(artifactTier) * Math.pow(enchantmentLevel, ab.GetDecayValue(artifactTier));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -2751,7 +2751,7 @@ public class GenericFunctions {
|
|||||||
for (int i=0;i<9;i++) {
|
for (int i=0;i<9;i++) {
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.AUTOREPAIR, p.getInventory().getItem(i))) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.AUTOREPAIR, p.getInventory().getItem(i))) {
|
||||||
//Chance to auto repair.
|
//Chance to auto repair.
|
||||||
double repairamt = ArtifactAbility.calculateValue(ArtifactAbility.AUTOREPAIR, ArtifactUtils.getArtifactTier(p.getInventory().getItem(i)), ArtifactAbility.getEnchantmentLevel(ArtifactAbility.AUTOREPAIR, p.getInventory().getItem(i)));
|
double repairamt = ArtifactAbility.calculateValue(ArtifactAbility.AUTOREPAIR, ArtifactUtils.getArtifactTier(p.getInventory().getItem(i)), ArtifactAbility.getEnchantmentLevel(ArtifactAbility.AUTOREPAIR, p.getInventory().getItem(i)),PVP.isPvPing(p));
|
||||||
if (Math.random() <= repairamt%1) {
|
if (Math.random() <= repairamt%1) {
|
||||||
repairamt++;
|
repairamt++;
|
||||||
}
|
}
|
||||||
@ -2777,7 +2777,7 @@ public class GenericFunctions {
|
|||||||
ItemStack equip = contents[i];
|
ItemStack equip = contents[i];
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.AUTOREPAIR, equip)) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.AUTOREPAIR, equip)) {
|
||||||
//Chance to auto repair.
|
//Chance to auto repair.
|
||||||
double repairamt = ArtifactAbility.calculateValue(ArtifactAbility.AUTOREPAIR, ArtifactUtils.getArtifactTier(equip), ArtifactAbility.getEnchantmentLevel(ArtifactAbility.AUTOREPAIR, equip));
|
double repairamt = ArtifactAbility.calculateValue(ArtifactAbility.AUTOREPAIR, ArtifactUtils.getArtifactTier(equip), ArtifactAbility.getEnchantmentLevel(ArtifactAbility.AUTOREPAIR, equip),PVP.isPvPing(p));
|
||||||
if (Math.random() <= repairamt%1) {
|
if (Math.random() <= repairamt%1) {
|
||||||
repairamt++;
|
repairamt++;
|
||||||
}
|
}
|
||||||
@ -2849,6 +2849,15 @@ public class GenericFunctions {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean searchforStartingWith(List<String> stringy, String searchfor) {
|
||||||
|
for (int i=0;i<stringy.size();i++) {
|
||||||
|
if (stringy.get(i).startsWith(searchfor)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static int getPotionEffectLevel(PotionEffectType type, LivingEntity ent) {
|
public static int getPotionEffectLevel(PotionEffectType type, LivingEntity ent) {
|
||||||
if (ent.hasPotionEffect(type)) {
|
if (ent.hasPotionEffect(type)) {
|
||||||
for (PotionEffect pe : ent.getActivePotionEffects()) {
|
for (PotionEffect pe : ent.getActivePotionEffects()) {
|
||||||
@ -3031,8 +3040,16 @@ public class GenericFunctions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static double getAbilityValue(ArtifactAbility ab, ItemStack weapon) {
|
public static double getAbilityValue(ArtifactAbility ab, ItemStack weapon) {
|
||||||
|
return getAbilityValue(ab,weapon,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double getAbilityValue(ArtifactAbility ab, ItemStack weapon, Player p) {
|
||||||
if (isArtifactEquip(weapon)) {
|
if (isArtifactEquip(weapon)) {
|
||||||
return ArtifactAbility.calculateValue(ab, ArtifactUtils.getArtifactTier(weapon), ArtifactAbility.getEnchantmentLevel(ab, weapon));
|
if (PVP.isPvPing(p)) {
|
||||||
|
return ArtifactAbility.calculateValue(ab, 15, ab.getPVPValue().getPointValue(), true);
|
||||||
|
} else {
|
||||||
|
return ArtifactAbility.calculateValue(ab, ArtifactUtils.getArtifactTier(weapon), ArtifactAbility.getEnchantmentLevel(ab, weapon), false);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
@ -3601,7 +3618,7 @@ public class GenericFunctions {
|
|||||||
if (GenericFunctions.isHardenedItem(item)) {
|
if (GenericFunctions.isHardenedItem(item)) {
|
||||||
newlore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+GenericFunctions.getHardenedItemBreaks(item));
|
newlore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+GenericFunctions.getHardenedItemBreaks(item));
|
||||||
}
|
}
|
||||||
newlore.addAll(ItemSet.GenerateLore(set, tier));
|
newlore.addAll(ItemSet.GenerateLore(set, tier, null));
|
||||||
ItemMeta m = item.getItemMeta();
|
ItemMeta m = item.getItemMeta();
|
||||||
m.setLore(newlore);
|
m.setLore(newlore);
|
||||||
item.setItemMeta(m);
|
item.setItemMeta(m);
|
||||||
@ -3764,7 +3781,7 @@ public class GenericFunctions {
|
|||||||
if (equips_with_survivor.size()>0) {
|
if (equips_with_survivor.size()>0) {
|
||||||
ItemStack equip = equips_with_survivor.get((int)(Math.random()*equips_with_survivor.size()));
|
ItemStack equip = equips_with_survivor.get((int)(Math.random()*equips_with_survivor.size()));
|
||||||
//We can revive!
|
//We can revive!
|
||||||
RevivePlayer(p, Math.min(p.getMaxHealth()*(getAbilityValue(ArtifactAbility.SURVIVOR,equip)/100d),p.getMaxHealth()));
|
RevivePlayer(p, Math.min(p.getMaxHealth()*(getAbilityValue(ArtifactAbility.SURVIVOR,equip,p)/100d),p.getMaxHealth()));
|
||||||
ArtifactAbility.removeEnchantment(ArtifactAbility.SURVIVOR, equip);
|
ArtifactAbility.removeEnchantment(ArtifactAbility.SURVIVOR, equip);
|
||||||
//AwakenedArtifact.setLV(equip, AwakenedArtifact.getLV(equip)-1, p);
|
//AwakenedArtifact.setLV(equip, AwakenedArtifact.getLV(equip)-1, p);
|
||||||
AwakenedArtifact.setMaxAP(equip, AwakenedArtifact.getMaxAP(equip)-1);
|
AwakenedArtifact.setMaxAP(equip, AwakenedArtifact.getMaxAP(equip)-1);
|
||||||
@ -3872,6 +3889,10 @@ public class GenericFunctions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void RevivePlayer(Player p, double healdmg) {
|
public static void RevivePlayer(Player p, double healdmg) {
|
||||||
|
RevivePlayer(p,healdmg,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void RevivePlayer(Player p, double healdmg, boolean completeRespawn) {
|
||||||
p.setHealth(Math.min(healdmg,p.getMaxHealth()));
|
p.setHealth(Math.min(healdmg,p.getMaxHealth()));
|
||||||
SoundUtils.playLocalSound(p, Sound.BLOCK_REDSTONE_TORCH_BURNOUT, 1.0f, 1.5f);
|
SoundUtils.playLocalSound(p, Sound.BLOCK_REDSTONE_TORCH_BURNOUT, 1.0f, 1.5f);
|
||||||
for (PotionEffect eff : p.getActivePotionEffects()) {
|
for (PotionEffect eff : p.getActivePotionEffects()) {
|
||||||
@ -3882,11 +3903,22 @@ public class GenericFunctions {
|
|||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (String s : Buff.getBuffData(p).keySet()) {
|
||||||
|
Buff b = Buff.getBuffData(p).get(s);
|
||||||
|
if (b.isDebuff()) {
|
||||||
|
/*TwosideKeeper.ScheduleRemoval(Buff.getBuffData(m), s);
|
||||||
|
return;*/
|
||||||
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
Buff.removeBuff(p, s);
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
pd.slayermodehp = Math.min(healdmg,p.getMaxHealth());
|
pd.slayermodehp = Math.min(healdmg,p.getMaxHealth());
|
||||||
pd.vendetta_amt=0;
|
pd.vendetta_amt=0;
|
||||||
pd.lastvendettastack=0;
|
pd.lastvendettastack=0;
|
||||||
pd.thorns_amt=0;
|
pd.thorns_amt=0;
|
||||||
|
pd.damagepool=0;
|
||||||
p.setFireTicks(0);
|
p.setFireTicks(0);
|
||||||
CustomDamage.addIframe(40, p);
|
CustomDamage.addIframe(40, p);
|
||||||
GenericFunctions.sendActionBarMessage(p, "");
|
GenericFunctions.sendActionBarMessage(p, "");
|
||||||
@ -3908,7 +3940,8 @@ public class GenericFunctions {
|
|||||||
//nearbyentities.addAll();
|
//nearbyentities.addAll();
|
||||||
final double rangeSquared=range*range;
|
final double rangeSquared=range*range;
|
||||||
for (Entity ent: l.getWorld().getNearbyEntities(l, range, range, range)) {
|
for (Entity ent: l.getWorld().getNearbyEntities(l, range, range, range)) {
|
||||||
if (ent instanceof LivingEntity) {
|
if (ent instanceof LivingEntity &&
|
||||||
|
l.getWorld().equals(ent.getWorld())) {
|
||||||
//double damage_mult = 2.0d/(l.distance(nearbyentities.get(i).getLocation())+1.0);
|
//double damage_mult = 2.0d/(l.distance(nearbyentities.get(i).getLocation())+1.0);
|
||||||
double dmg;
|
double dmg;
|
||||||
double damage_mult=Math.max(0d, 1 - l.distanceSquared(ent.getLocation())/rangeSquared);
|
double damage_mult=Math.max(0d, 1 - l.distanceSquared(ent.getLocation())/rangeSquared);
|
||||||
@ -4227,7 +4260,8 @@ public class GenericFunctions {
|
|||||||
for (int i=-x/2;i<x/2+1;i++) {
|
for (int i=-x/2;i<x/2+1;i++) {
|
||||||
for (int j=-y/2;j<y/2+1;j++) {
|
for (int j=-y/2;j<y/2+1;j++) {
|
||||||
for (int k=-z/2;k<z/2+1;k++) {
|
for (int k=-z/2;k<z/2+1;k++) {
|
||||||
if (!isNaturalBlock(b.getRelative(i, j, k))) {
|
if (!isNaturalBlock(b.getRelative(i, j, k)) && !isNaturalUndergroundBlock(b.getRelative(i, j, k))) {
|
||||||
|
TwosideKeeper.log(b.getRelative(i, j, k).getType()+" is not a natural block!", 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4236,16 +4270,32 @@ public class GenericFunctions {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isNaturalUndergroundBlock(Block b) {
|
||||||
|
if (b.getLocation().getBlockY()<64 &&
|
||||||
|
(b.getType().name().contains("_ORE"))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isNaturalBlock(Block b) {
|
public static boolean isNaturalBlock(Block b) {
|
||||||
if (b.getType()==Material.DIRT ||
|
if (b.getType()==Material.AIR ||
|
||||||
|
b.getType()==Material.DIRT ||
|
||||||
b.getType()==Material.SOIL ||
|
b.getType()==Material.SOIL ||
|
||||||
b.getType()==Material.MYCEL ||
|
b.getType()==Material.MYCEL ||
|
||||||
b.getType()==Material.SAND ||
|
b.getType()==Material.SAND ||
|
||||||
b.getType()==Material.SANDSTONE ||
|
b.getType()==Material.SANDSTONE ||
|
||||||
b.getType()==Material.AIR ||
|
|
||||||
b.getType()==Material.CLAY ||
|
b.getType()==Material.CLAY ||
|
||||||
b.getType()==Material.GRASS ||
|
b.getType()==Material.GRASS ||
|
||||||
b.getType()==Material.STONE ||
|
b.getType()==Material.STONE ||
|
||||||
|
b.getType()==Material.SNOW ||
|
||||||
|
b.getType()==Material.GRAVEL ||
|
||||||
|
b.getType()==Material.GRASS ||
|
||||||
|
b.getType()==Material.LONG_GRASS ||
|
||||||
|
b.getType()==Material.YELLOW_FLOWER ||
|
||||||
|
b.getType()==Material.RED_ROSE ||
|
||||||
|
b.getType()==Material.DEAD_BUSH ||
|
||||||
|
b.getType()==Material.STATIONARY_WATER ||
|
||||||
/*b.getType()==Material.WATER ||
|
/*b.getType()==Material.WATER ||
|
||||||
b.getType()==Material.LAVA ||*/
|
b.getType()==Material.LAVA ||*/
|
||||||
b.getType()==Material.NETHERRACK ||
|
b.getType()==Material.NETHERRACK ||
|
||||||
@ -4522,7 +4572,9 @@ public class GenericFunctions {
|
|||||||
Buff b = buffdata.get(key);
|
Buff b = buffdata.get(key);
|
||||||
if (b.isDebuff()) {
|
if (b.isDebuff()) {
|
||||||
if (Math.random()<=removechance/100 && b.buffCanBeRemoved()) {
|
if (Math.random()<=removechance/100 && b.buffCanBeRemoved()) {
|
||||||
Buff.removeBuff(p, key);
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin,()->{
|
||||||
|
Buff.removeBuff(p, key);
|
||||||
|
},1);
|
||||||
p.sendMessage(ChatColor.DARK_GRAY+"You successfully resisted the application of "+ChatColor.WHITE+GenericFunctions.CapitalizeFirstLetters(b.getDisplayName().replace("_", " ")));
|
p.sendMessage(ChatColor.DARK_GRAY+"You successfully resisted the application of "+ChatColor.WHITE+GenericFunctions.CapitalizeFirstLetters(b.getDisplayName().replace("_", " ")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4732,17 +4784,19 @@ public class GenericFunctions {
|
|||||||
}
|
}
|
||||||
pd.lastassassinatetime=TwosideKeeper.getServerTickTime();
|
pd.lastassassinatetime=TwosideKeeper.getServerTickTime();
|
||||||
pd.lastusedassassinate=TwosideKeeper.getServerTickTime();
|
pd.lastusedassassinate=TwosideKeeper.getServerTickTime();
|
||||||
if (ItemSet.HasSetBonusBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 5)) {
|
if (!PVP.isPvPing(player)) {
|
||||||
GenericFunctions.addIFrame(player, (int)ItemSet.TotalBaseAmountBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 5, 4));
|
if (ItemSet.HasSetBonusBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 5)) {
|
||||||
} else {
|
GenericFunctions.addIFrame(player, (int)ItemSet.TotalBaseAmountBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 5, 4));
|
||||||
GenericFunctions.addIFrame(player, 10);
|
} else {
|
||||||
|
GenericFunctions.addIFrame(player, 10);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ItemSet.HasSetBonusBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 3)) {
|
if (ItemSet.HasSetBonusBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 3)) {
|
||||||
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.SPEED, 100, 4, player);
|
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.SPEED, 100, 4, player);
|
||||||
GenericFunctions.addSuppressionTime(target, (int)ItemSet.TotalBaseAmountBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 3, 3));
|
GenericFunctions.addSuppressionTime(target, (int)ItemSet.TotalBaseAmountBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 3, 3));
|
||||||
}
|
}
|
||||||
if (ItemSet.HasSetBonusBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 7) &&
|
if (ItemSet.HasSetBonusBasedOnSetBonusCount(player, ItemSet.WOLFSBANE, 7) &&
|
||||||
target.getLocation().distanceSquared(originalloc)<=25) {
|
target!=null && originalloc!=null && target.getLocation().distanceSquared(originalloc)<=25) {
|
||||||
pd.lastassassinatetime = TwosideKeeper.getServerTickTime()-GetModifiedCooldown(TwosideKeeper.ASSASSINATE_COOLDOWN,player)+40;
|
pd.lastassassinatetime = TwosideKeeper.getServerTickTime()-GetModifiedCooldown(TwosideKeeper.ASSASSINATE_COOLDOWN,player)+40;
|
||||||
if (name!=Material.SKULL_ITEM || pd.lastlifesavertime+GetModifiedCooldown(TwosideKeeper.LIFESAVER_COOLDOWN,player)<TwosideKeeper.getServerTickTime()) { //Don't overwrite life saver cooldowns.
|
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, 40);
|
aPlugin.API.sendCooldownPacket(player, name, 40);
|
||||||
@ -5554,7 +5608,7 @@ public class GenericFunctions {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void dropItem(ItemStack oldMainHand, Location l) {
|
public static Item dropItem(ItemStack oldMainHand, Location l) {
|
||||||
Chunk c = l.getChunk();
|
Chunk c = l.getChunk();
|
||||||
TwosideKeeper.temporary_chunks.add(c);
|
TwosideKeeper.temporary_chunks.add(c);
|
||||||
Item it = null;
|
Item it = null;
|
||||||
@ -5566,7 +5620,7 @@ public class GenericFunctions {
|
|||||||
}
|
}
|
||||||
} while (it==null || !it.isValid());
|
} while (it==null || !it.isValid());
|
||||||
TwosideKeeper.temporary_chunks.remove(c);
|
TwosideKeeper.temporary_chunks.remove(c);
|
||||||
c.unload();
|
return it;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void removeAggroFromNearbyTargets(Player p) {
|
public static void removeAggroFromNearbyTargets(Player p) {
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package sig.plugin.TwosideKeeper.HelperStructures.Common;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class PVPValue {
|
||||||
|
int points; //Number of points in this value.
|
||||||
|
double baseval; //The base value of this ability.
|
||||||
|
|
||||||
|
public PVPValue(int points, double baseval) {
|
||||||
|
this.points=points;
|
||||||
|
this.baseval=baseval;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPointValue() {
|
||||||
|
return points;
|
||||||
|
}
|
||||||
|
public double getBaseValue() {
|
||||||
|
return baseval;
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package sig.plugin.TwosideKeeper.HelperStructures;
|
package sig.plugin.TwosideKeeper.HelperStructures;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -15,6 +16,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
|
|
||||||
import aPlugin.API;
|
import aPlugin.API;
|
||||||
import sig.plugin.TwosideKeeper.CustomDamage;
|
import sig.plugin.TwosideKeeper.CustomDamage;
|
||||||
|
import sig.plugin.TwosideKeeper.PVP;
|
||||||
import sig.plugin.TwosideKeeper.PlayerStructure;
|
import sig.plugin.TwosideKeeper.PlayerStructure;
|
||||||
import sig.plugin.TwosideKeeper.TwosideKeeper;
|
import sig.plugin.TwosideKeeper.TwosideKeeper;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Common.BaublePouch;
|
import sig.plugin.TwosideKeeper.HelperStructures.Common.BaublePouch;
|
||||||
@ -23,38 +25,38 @@ import sig.plugin.TwosideKeeper.HelperStructures.Utils.DebugUtils;
|
|||||||
import sig.plugin.TwosideKeeper.HelperStructures.Utils.TextUtils;
|
import sig.plugin.TwosideKeeper.HelperStructures.Utils.TextUtils;
|
||||||
|
|
||||||
public enum ItemSet {
|
public enum ItemSet {
|
||||||
PANROS(1,1, 6,4, 10,10, 20,10),
|
PANROS(1,1, 6,4, 10,10, 20,10, 1,6,10,20),
|
||||||
SONGSTEEL(4,2, 6,2, 8,8, 20,10),
|
SONGSTEEL(4,2, 6,2, 8,8, 20,10, 4, 6, 8, 20),
|
||||||
DAWNTRACKER(2,2, 20,10, 10,5, 10,5),
|
DAWNTRACKER(2,2, 20,10, 10,5, 10,5, 2, 20, 10, 10),
|
||||||
LORASYS(2,2, 0,0, 0,0, 0,0),
|
LORASYS(2,2, 0,0, 0,0, 0,0, 2, 0, 0, 0),
|
||||||
JAMDAK(3,3, 5,1, 10,1, 10,2), //Graceful Dodge is in ticks.
|
JAMDAK(3,3, 5,1, 10,1, 10,2, 3, 5, 10, 10), //Graceful Dodge is in ticks.
|
||||||
DARNYS(2,1, 10,5, 20,5, 1,1),
|
DARNYS(2,1, 10,5, 20,5, 1,1, 2, 10 ,20 ,1),
|
||||||
ALIKAHN(3,1, 15,6, 30,10, 1,1),
|
ALIKAHN(3,1, 15,6, 30,10, 1,1, 3, 15 ,30, 1),
|
||||||
LORASAADI(4,1, 4,2, 8,6, 8,3),
|
LORASAADI(4,1, 4,2, 8,6, 8,3, 4, 4, 8, 8),
|
||||||
MOONSHADOW(6,3, 1,1, 8,8, 15,7),
|
MOONSHADOW(6,3, 1,1, 8,8, 15,7, 6, 1, 8, 15),
|
||||||
GLADOMAIN(1,1, 12,4, 8,4, 1,1),
|
GLADOMAIN(1,1, 12,4, 8,4, 1,1, 1, 12, 8, 1),
|
||||||
WOLFSBANE(3,2, 15,10, 10,5, 15,10),
|
WOLFSBANE(3,2, 15,10, 10,5, 15,10, 3, 15, 10, 15),
|
||||||
ALUSTINE(3,2, 300,-30, 50,-5, 6,2),
|
ALUSTINE(3,2, 300,-30, 50,-5, 6,2, 3, 300, 50, 6),
|
||||||
DASHER(5,5, 3,3, 5,5, 0,0),
|
DASHER(5,5, 3,3, 5,5, 0,0, 5, 3, 5, 0),
|
||||||
DANCER(5,1, 3,3, 5,5, 0,0),
|
DANCER(2,1, 3,3, 5,5, 0,0, 5, 3, 5, 0),
|
||||||
PRANCER(5,5, 3,3, 5,5, 0,0),
|
PRANCER(3,1, 3,3, 5,5, 0,0, 5, 3, 5, 0),
|
||||||
VIXEN(5,4, 3,3, 5,5, 0,0),
|
VIXEN(5,4, 3,3, 5,5, 0,0, 5, 3, 5, 0),
|
||||||
COMET(10,10, 10,10, 2,1, 0,0),
|
COMET(10,10, 10,10, 2,1, 0,0, 10, 10, 2, 0),
|
||||||
CUPID(10,5, 10,10, 2,1, 0,0),
|
CUPID(10,5, 10,10, 2,1, 0,0, 10, 10, 2, 0),
|
||||||
DONNER(5,5, 10,10, 2,1, 0,0),
|
DONNER(5,5, 10,10, 2,1, 0,0, 5, 10, 2, 0),
|
||||||
BLITZEN(10,10, 3,3, 5,5, 0,0),
|
BLITZEN(10,10, 3,3, 5,5, 0,0, 10, 3, 5, 0),
|
||||||
RUDOLPH(5,5, 10,10, 2,1, 0,0),
|
RUDOLPH(5,5, 10,10, 2,1, 0,0, 5, 10, 2, 0),
|
||||||
OLIVE(3,2, 10,10, 2,1, 0,0),
|
OLIVE(3,2, 10,10, 2,1, 0,0, 3, 10, 2, 0),
|
||||||
WINDRY(2,2, 1,1, 1,0, 1,0),
|
WINDRY(2,2, 1,1, 1,0, 1,0, 2, 1, 1, 1),
|
||||||
LUCI(2,2, 4,4, 1,0, 1,0),
|
LUCI(2,2, 4,4, 1,0, 1,0, 2, 4, 1, 1),
|
||||||
SHARD(2,1, 10,10, 20,20, 10,10),
|
SHARD(2,1, 10,10, 20,20, 10,10, 2, 10, 20, 10),
|
||||||
TOXIN(2,2, 20,5, 10,3, 10,3),
|
TOXIN(2,2, 20,5, 10,3, 10,3, 2, 20, 10, 10),
|
||||||
PROTECTOR(5,2, 10,5, 10,10, 1,1),
|
PROTECTOR(5,2, 10,5, 10,10, 1,1, 5, 10, 10, 1),
|
||||||
SUSTENANCE(8,4, 2,2, 1,1, 10,10),
|
SUSTENANCE(8,4, 2,2, 1,1, 10,10, 8, 2, 1, 10),
|
||||||
LEGION(3,1, 12,12, 1,1, 1,1),
|
LEGION(3,1, 12,12, 1,1, 1,1, 3, 12, 1, 1),
|
||||||
PRIDE(10,10, 2,1, 2,2, 1,1),
|
PRIDE(10,10, 2,1, 2,2, 1,1, 10, 2, 2, 1),
|
||||||
ASSASSIN(5,5, 0,0, 0,0, 0,0),
|
ASSASSIN(5,5, 0,0, 0,0, 0,0, 5, 0, 0, 0),
|
||||||
STEALTH(5,5, 0,0, 0,0, 0,0);
|
STEALTH(5,5, 0,0, 0,0, 0,0, 5, 0, 0, 0);
|
||||||
|
|
||||||
final static String WINDCHARGE_LABEL = ChatColor.BOLD+""+ChatColor.GRAY+"Wind Charge"+ChatColor.RESET;
|
final static String WINDCHARGE_LABEL = ChatColor.BOLD+""+ChatColor.GRAY+"Wind Charge"+ChatColor.RESET;
|
||||||
final static String WINDCHARGE_PLURAL_LABEL = ChatColor.BOLD+""+ChatColor.GRAY+"Wind Charges"+ChatColor.RESET;
|
final static String WINDCHARGE_PLURAL_LABEL = ChatColor.BOLD+""+ChatColor.GRAY+"Wind Charges"+ChatColor.RESET;
|
||||||
@ -72,6 +74,10 @@ public enum ItemSet {
|
|||||||
int increase_val_bonus3;
|
int increase_val_bonus3;
|
||||||
int baseval_bonus4;
|
int baseval_bonus4;
|
||||||
int increase_val_bonus4;
|
int increase_val_bonus4;
|
||||||
|
int pvp_baseval1;
|
||||||
|
int pvp_baseval2;
|
||||||
|
int pvp_baseval3;
|
||||||
|
int pvp_baseval4;
|
||||||
|
|
||||||
public static final ItemSet[] RANGER = new ItemSet[]{
|
public static final ItemSet[] RANGER = new ItemSet[]{
|
||||||
ItemSet.JAMDAK,
|
ItemSet.JAMDAK,
|
||||||
@ -134,6 +140,26 @@ public enum ItemSet {
|
|||||||
this.increase_val_bonus4=increase_val4;
|
this.increase_val_bonus4=increase_val4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ItemSet(int baseval,int increase_val,
|
||||||
|
int baseval2,int increase_val2,
|
||||||
|
int baseval3,int increase_val3,
|
||||||
|
int baseval4,int increase_val4,
|
||||||
|
int pvpval1,int pvpval2,
|
||||||
|
int pvpval3,int pvpval4) {
|
||||||
|
this.baseval=baseval;
|
||||||
|
this.increase_val=increase_val;
|
||||||
|
this.baseval_bonus2=baseval2;
|
||||||
|
this.increase_val_bonus2=increase_val2;
|
||||||
|
this.baseval_bonus3=baseval3;
|
||||||
|
this.increase_val_bonus3=increase_val3;
|
||||||
|
this.baseval_bonus4=baseval4;
|
||||||
|
this.increase_val_bonus4=increase_val4;
|
||||||
|
this.pvp_baseval1 = pvpval1;
|
||||||
|
this.pvp_baseval2 = pvpval2;
|
||||||
|
this.pvp_baseval3 = pvpval3;
|
||||||
|
this.pvp_baseval4 = pvpval4;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isSetItem(ItemStack item) {
|
public static boolean isSetItem(ItemStack item) {
|
||||||
return GetItemSet(item)!=null;
|
return GetItemSet(item)!=null;
|
||||||
}
|
}
|
||||||
@ -144,7 +170,7 @@ public enum ItemSet {
|
|||||||
item.getItemMeta().hasLore()) {
|
item.getItemMeta().hasLore()) {
|
||||||
List<String> lore = item.getItemMeta().getLore();
|
List<String> lore = item.getItemMeta().getLore();
|
||||||
for (int i=0;i<lore.size();i++) {
|
for (int i=0;i<lore.size();i++) {
|
||||||
if (lore.get(i).contains(ChatColor.GOLD+""+ChatColor.BOLD+"T") && !lore.get(i).contains("Recipe")) {
|
if (lore.get(i).startsWith(ChatColor.GOLD+""+ChatColor.BOLD+"T") && lore.get(i).contains("Set") && !lore.get(i).contains("Recipe")) {
|
||||||
//This is the tier line.
|
//This is the tier line.
|
||||||
return ItemSet.valueOf(lore.get(i).replace(ChatColor.GOLD+""+ChatColor.BOLD+"T", "").split(" ")[1].toUpperCase());
|
return ItemSet.valueOf(lore.get(i).replace(ChatColor.GOLD+""+ChatColor.BOLD+"T", "").split(" ")[1].toUpperCase());
|
||||||
}
|
}
|
||||||
@ -194,28 +220,49 @@ public enum ItemSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int GetBaseAmount(ItemSet set, int tier, int stat) {
|
public static int GetBaseAmount(ItemSet set, int tier, int stat, Player p) {
|
||||||
//stat will be 1 for the base value, 2 for the 2-piece set bonus, 3 for the 3-piece set bonus, and 4 for the 4-piece set bonus.
|
//stat will be 1 for the base value, 2 for the 2-piece set bonus, 3 for the 3-piece set bonus, and 4 for the 4-piece set bonus.
|
||||||
switch (stat) {
|
if (!PVP.isPvPing(p)) {
|
||||||
case 1:{
|
switch (stat) {
|
||||||
return set.baseval+((tier-1)*set.increase_val);
|
case 1:{
|
||||||
|
return set.baseval+((tier-1)*set.increase_val);
|
||||||
|
}
|
||||||
|
case 2:{
|
||||||
|
return set.baseval_bonus2+((tier-1)*set.increase_val_bonus2);
|
||||||
|
}
|
||||||
|
case 3:{
|
||||||
|
return set.baseval_bonus3+((tier-1)*set.increase_val_bonus3);
|
||||||
|
}
|
||||||
|
case 4:{
|
||||||
|
return set.baseval_bonus4+((tier-1)*set.increase_val_bonus4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case 2:{
|
} else {
|
||||||
return set.baseval_bonus2+((tier-1)*set.increase_val_bonus2);
|
switch (stat) {
|
||||||
}
|
case 1:{
|
||||||
case 3:{
|
return set.pvp_baseval1;
|
||||||
return set.baseval_bonus3+((tier-1)*set.increase_val_bonus3);
|
}
|
||||||
}
|
case 2:{
|
||||||
case 4:{
|
return set.pvp_baseval2;
|
||||||
return set.baseval_bonus4+((tier-1)*set.increase_val_bonus4);
|
}
|
||||||
|
case 3:{
|
||||||
|
return set.pvp_baseval3;
|
||||||
|
}
|
||||||
|
case 4:{
|
||||||
|
return set.pvp_baseval4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TwosideKeeper.log(ChatColor.RED+"Error occurred while attempting to grab the Base Amount!!!", 1);
|
TwosideKeeper.log(ChatColor.RED+"Error occurred while attempting to grab the Base Amount!!!", 1);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetBaseAmount(int tier) {
|
public int GetBaseAmount(int tier, Player p) {
|
||||||
return baseval+((tier-1)*increase_val);
|
if (!PVP.isPvPing(p)) {
|
||||||
|
return baseval+((tier-1)*increase_val);
|
||||||
|
} else {
|
||||||
|
return pvp_baseval1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int GetSetCount(ItemSet set, Player p) {
|
public static int GetSetCount(ItemSet set, Player p) {
|
||||||
@ -283,7 +330,7 @@ public enum ItemSet {
|
|||||||
if (pd.itemsets.containsKey(set.name())) {
|
if (pd.itemsets.containsKey(set.name())) {
|
||||||
HashMap<Integer,Integer> tiermap = pd.itemsets.get(set.name());
|
HashMap<Integer,Integer> tiermap = pd.itemsets.get(set.name());
|
||||||
for (Integer tier : tiermap.keySet()) {
|
for (Integer tier : tiermap.keySet()) {
|
||||||
val += set.GetBaseAmount(tier)*tiermap.get(tier);
|
val += set.GetBaseAmount(tier,p)*tiermap.get(tier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
@ -345,62 +392,62 @@ public enum ItemSet {
|
|||||||
HashMap<Integer,Integer> tiermap = pd.itemsets.get(set.name());
|
HashMap<Integer,Integer> tiermap = pd.itemsets.get(set.name());
|
||||||
for (Integer tier : tiermap.keySet()) {
|
for (Integer tier : tiermap.keySet()) {
|
||||||
if (tiermap.get(tier)>=count) {
|
if (tiermap.get(tier)>=count) {
|
||||||
amt+=ItemSet.GetBaseAmount(set, tier, set_bonus);
|
amt+=ItemSet.GetBaseAmount(set, tier, set_bonus, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return amt;
|
return amt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Collection<? extends String> GenerateLore(ItemSet set, int tier) {
|
public static Collection<? extends String> GenerateLore(ItemSet set, int tier, Player p) {
|
||||||
List<String> lore = new ArrayList<String>();
|
List<String> lore = new ArrayList<String>();
|
||||||
switch (set) {
|
switch (set) {
|
||||||
case PANROS:{
|
case PANROS:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Striker Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Striker Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Panros Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Panros Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Damage");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+" Damage");
|
||||||
}break;
|
}break;
|
||||||
case SONGSTEEL:{
|
case SONGSTEEL:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Defender Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Defender Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Songsteel Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Songsteel Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Block Chance");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Block Chance");
|
||||||
}break;
|
}break;
|
||||||
case DAWNTRACKER:{
|
case DAWNTRACKER:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Dawntracker Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Dawntracker Set");
|
||||||
if (((ItemSet.GetBaseAmount(set, tier, 1))/3)>0) {
|
if (((ItemSet.GetBaseAmount(set, tier, 1, p))/3)>0) {
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Health");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+" Health");
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
case LORASYS:{
|
case LORASYS:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Lorasys Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Lorasys Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Damage");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+" Damage");
|
||||||
}break;
|
}break;
|
||||||
case JAMDAK:{
|
case JAMDAK:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Jamdak Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Jamdak Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Dodge Chance");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Dodge Chance");
|
||||||
}break;
|
}break;
|
||||||
case DARNYS:{
|
case DARNYS:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Darnys Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Darnys Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Dodge Chance");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Dodge Chance");
|
||||||
}break;
|
}break;
|
||||||
case ALIKAHN:{
|
case ALIKAHN:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Alikahn Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Alikahn Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Dodge Chance");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Dodge Chance");
|
||||||
}break;
|
}break;
|
||||||
case LORASAADI:{
|
case LORASAADI:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Lorasaadi Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Lorasaadi Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Dodge Chance");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Dodge Chance");
|
||||||
}break;
|
}break;
|
||||||
case GLADOMAIN:{
|
case GLADOMAIN:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Amulet");
|
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Amulet");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Gladomain Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Gladomain Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" HP");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+" HP");
|
||||||
lore.add("");
|
lore.add("");
|
||||||
lore.add(ChatColor.GRAY+" Must be inserted into a "+ChatColor.BLUE+"Bauble Pouch");
|
lore.add(ChatColor.GRAY+" Must be inserted into a "+ChatColor.BLUE+"Bauble Pouch");
|
||||||
lore.add(ChatColor.GRAY+" to benefit from the effects.");
|
lore.add(ChatColor.GRAY+" to benefit from the effects.");
|
||||||
@ -409,7 +456,7 @@ public enum ItemSet {
|
|||||||
case MOONSHADOW:{
|
case MOONSHADOW:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Trinket");
|
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Trinket");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Moonshadow Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Moonshadow Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Crit Damage");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Crit Damage");
|
||||||
lore.add("");
|
lore.add("");
|
||||||
lore.add(ChatColor.GRAY+" Must be inserted into a "+ChatColor.BLUE+"Bauble Pouch");
|
lore.add(ChatColor.GRAY+" Must be inserted into a "+ChatColor.BLUE+"Bauble Pouch");
|
||||||
lore.add(ChatColor.GRAY+" to benefit from the effects.");
|
lore.add(ChatColor.GRAY+" to benefit from the effects.");
|
||||||
@ -418,7 +465,7 @@ public enum ItemSet {
|
|||||||
case WOLFSBANE:{
|
case WOLFSBANE:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Ornament");
|
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Ornament");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Wolfsbane Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Wolfsbane Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Critical Chance");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Critical Chance");
|
||||||
lore.add("");
|
lore.add("");
|
||||||
lore.add(ChatColor.GRAY+" Must be inserted into a "+ChatColor.BLUE+"Bauble Pouch");
|
lore.add(ChatColor.GRAY+" Must be inserted into a "+ChatColor.BLUE+"Bauble Pouch");
|
||||||
lore.add(ChatColor.GRAY+" to benefit from the effects.");
|
lore.add(ChatColor.GRAY+" to benefit from the effects.");
|
||||||
@ -427,7 +474,7 @@ public enum ItemSet {
|
|||||||
case ALUSTINE:{
|
case ALUSTINE:{
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Charm");
|
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Charm");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Alustine Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Alustine Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% EXP Gain");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% EXP Gain");
|
||||||
lore.add("");
|
lore.add("");
|
||||||
lore.add(ChatColor.GRAY+" Must be inserted into a "+ChatColor.BLUE+"Bauble Pouch");
|
lore.add(ChatColor.GRAY+" Must be inserted into a "+ChatColor.BLUE+"Bauble Pouch");
|
||||||
lore.add(ChatColor.GRAY+" to benefit from the effects.");
|
lore.add(ChatColor.GRAY+" to benefit from the effects.");
|
||||||
@ -436,102 +483,103 @@ public enum ItemSet {
|
|||||||
case BLITZEN:
|
case BLITZEN:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Attack Rate");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Attack Rate");
|
||||||
break;
|
break;
|
||||||
case COMET:
|
case COMET:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Regeneration to Party Members");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Regeneration to Party Members");
|
||||||
break;
|
break;
|
||||||
case CUPID:
|
case CUPID:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"Absorbs "+ItemSet.GetBaseAmount(set, tier, 1)+"% of Damage Taken from Party Members");
|
lore.add(ChatColor.YELLOW+"Absorbs "+ItemSet.GetBaseAmount(set, tier, 1, p)+"% of Damage Taken from Party Members");
|
||||||
break;
|
break;
|
||||||
case DANCER:
|
case DANCER:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Damage per 1m of Movement Speed");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
|
lore.add(ChatColor.YELLOW+"+"+df.format(ItemSet.GetBaseAmount(set, tier, 1, p)/10d)+" Damage per 1m of Movement Speed");
|
||||||
break;
|
break;
|
||||||
case DASHER:
|
case DASHER:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Movement Speed");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Movement Speed");
|
||||||
break;
|
break;
|
||||||
case DONNER:
|
case DONNER:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"Attacking aggros enemies for "+ItemSet.GetBaseAmount(set, tier, 1)+" seconds");
|
lore.add(ChatColor.YELLOW+"Attacking aggros enemies for "+ItemSet.GetBaseAmount(set, tier, 1, p)+" seconds");
|
||||||
break;
|
break;
|
||||||
case OLIVE:
|
case OLIVE:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"When blocking, attackers take "+ItemSet.GetBaseAmount(set, tier, 1)+" True Damage");
|
lore.add(ChatColor.YELLOW+"When blocking, attackers take "+ItemSet.GetBaseAmount(set, tier, 1, p)+" True Damage");
|
||||||
break;
|
break;
|
||||||
case PRANCER:
|
case PRANCER:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"Deals +"+ItemSet.GetBaseAmount(set, tier, 1)+" Additional Damage in Mid-Air");
|
lore.add(ChatColor.YELLOW+"Deals +"+ItemSet.GetBaseAmount(set, tier, 1, p)+" Additional Damage in Mid-Air");
|
||||||
break;
|
break;
|
||||||
case RUDOLPH:
|
case RUDOLPH:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"In Dark Areas, gain "+ItemSet.GetBaseAmount(set, tier, 1)+"% Damage Reduction");
|
lore.add(ChatColor.YELLOW+"In Dark Areas, gain "+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Damage Reduction");
|
||||||
break;
|
break;
|
||||||
case VIXEN:
|
case VIXEN:
|
||||||
lore.add(ChatColor.BLUE+"Holiday Gear");
|
lore.add(ChatColor.BLUE+"Holiday Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Cooldown Reduction");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Cooldown Reduction");
|
||||||
break;
|
break;
|
||||||
case WINDRY:
|
case WINDRY:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Striker Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Striker Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" "+GenericFunctions.CapitalizeFirstLetters(set.name())+" Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Damage");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+" Damage");
|
||||||
break;
|
break;
|
||||||
case ASSASSIN:
|
case ASSASSIN:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Assassin Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Assassin Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Cooldown Reduction");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Cooldown Reduction");
|
||||||
break;
|
break;
|
||||||
case LEGION:
|
case LEGION:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Legion Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Legion Set");
|
||||||
lore.add(ChatColor.YELLOW+"-"+ItemSet.GetBaseAmount(set, tier, 1)+"% Damage Pool Reduction");
|
lore.add(ChatColor.YELLOW+"-"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Damage Pool Reduction");
|
||||||
break;
|
break;
|
||||||
case LUCI:
|
case LUCI:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Striker Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Striker Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Luci Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Luci Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Damage Reduction");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Damage Reduction");
|
||||||
break;
|
break;
|
||||||
case PRIDE:
|
case PRIDE:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Pride Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Pride Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Lifesteal Stacks");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Lifesteal Stacks");
|
||||||
break;
|
break;
|
||||||
case PROTECTOR:
|
case PROTECTOR:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Defender Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Defender Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Protector Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Protector Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Damage Reduction");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Damage Reduction");
|
||||||
break;
|
break;
|
||||||
case SHARD:
|
case SHARD:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Shard Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Shard Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Dodge Chance");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Dodge Chance");
|
||||||
break;
|
break;
|
||||||
case STEALTH:
|
case STEALTH:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Stealth Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Stealth Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Movement Speed");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Movement Speed");
|
||||||
break;
|
break;
|
||||||
case SUSTENANCE:
|
case SUSTENANCE:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Defender Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Defender Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Sustenance Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Sustenance Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Health");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+" Health");
|
||||||
break;
|
break;
|
||||||
case TOXIN:
|
case TOXIN:
|
||||||
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
lore.add(ChatColor.LIGHT_PURPLE+"Ranger Gear");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Toxin Set");
|
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Toxin Set");
|
||||||
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Debuff Chance");
|
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1, p)+"% Debuff Chance");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -540,9 +588,9 @@ public enum ItemSet {
|
|||||||
switch (set) {
|
switch (set) {
|
||||||
case PANROS:{
|
case PANROS:{
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Dodge Chance");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Dodge Chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Critical Chance");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+"% Critical Chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Powered Line Drive"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Powered Line Drive"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
||||||
lore.add(ChatColor.WHITE+" +15 Damage");
|
lore.add(ChatColor.WHITE+" +15 Damage");
|
||||||
@ -556,9 +604,9 @@ public enum ItemSet {
|
|||||||
lore.add(ABILITY_LABEL+"Rejuvenation"+ABILITY_LABEL_END+" by 2 seconds.");
|
lore.add(ABILITY_LABEL+"Rejuvenation"+ABILITY_LABEL_END+" by 2 seconds.");
|
||||||
lore.add(ChatColor.WHITE+""+ChatColor.ITALIC+"");
|
lore.add(ChatColor.WHITE+""+ChatColor.ITALIC+"");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Max Health");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Max Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Absorption Health (30 seconds)");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Absorption Health (30 seconds)");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Damage Reduction");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+"% Damage Reduction");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Vendetta"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Vendetta"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Blocking stores 40% of mitigation damage.");
|
lore.add(ChatColor.GRAY+" Blocking stores 40% of mitigation damage.");
|
||||||
lore.add(ChatColor.GRAY+" 1% of damage is stored as thorns true damage.");
|
lore.add(ChatColor.GRAY+" 1% of damage is stored as thorns true damage.");
|
||||||
@ -569,9 +617,9 @@ public enum ItemSet {
|
|||||||
}break;
|
}break;
|
||||||
case DAWNTRACKER:{
|
case DAWNTRACKER:{
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Debuff Resistance");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Debuff Resistance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Lifesteal");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Lifesteal");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Max Health");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+" Max Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - +50% Armor Penetration");
|
lore.add(ChatColor.DARK_AQUA+" 5 - +50% Armor Penetration");
|
||||||
lore.add(ChatColor.WHITE+" +15 Damage");
|
lore.add(ChatColor.WHITE+" +15 Damage");
|
||||||
lore.add(ChatColor.WHITE+" "+ABILITY_LABEL+" Powered Mock"+ABILITY_LABEL_END);
|
lore.add(ChatColor.WHITE+" "+ABILITY_LABEL+" Powered Mock"+ABILITY_LABEL_END);
|
||||||
@ -611,10 +659,10 @@ public enum ItemSet {
|
|||||||
}break;
|
}break;
|
||||||
case JAMDAK: {
|
case JAMDAK: {
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Dodge Chance");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Dodge Chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Dodge Chance");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Dodge Chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+(ItemSet.GetBaseAmount(set, tier, 4)/20d)+"s Graceful Dodge");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+(ItemSet.GetBaseAmount(set, tier, 4, p)/20d)+"s Graceful Dodge");
|
||||||
lore.add(ChatColor.GRAY+" Gives you invulnerability and "+(ItemSet.GetBaseAmount(set, tier, 4)/4)+" absorption");
|
lore.add(ChatColor.GRAY+" Gives you invulnerability and "+(ItemSet.GetBaseAmount(set, tier, 4, p)/4)+" absorption");
|
||||||
lore.add(ChatColor.GRAY+" health for each successful dodge.");
|
lore.add(ChatColor.GRAY+" health for each successful dodge.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Boosts All Modes of Ranger"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Boosts All Modes of Ranger"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
||||||
@ -625,11 +673,11 @@ public enum ItemSet {
|
|||||||
}break;
|
}break;
|
||||||
case DARNYS: {
|
case DARNYS: {
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Damage Reduction");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Damage Reduction");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Damage Reduction");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Damage Reduction");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" Swift Aegis "+WorldShop.toRomanNumeral(ItemSet.GetBaseAmount(set, tier, 4)));
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" Swift Aegis "+WorldShop.toRomanNumeral(ItemSet.GetBaseAmount(set, tier, 4, p)));
|
||||||
lore.add(ChatColor.GRAY+" Builds "+ItemSet.GetBaseAmount(set, tier, 4)+" stack"+((ItemSet.GetBaseAmount(set, tier, 4))!=1?"s":"")+" of Resist");
|
lore.add(ChatColor.GRAY+" Builds "+ItemSet.GetBaseAmount(set, tier, 4, p)+" stack"+((ItemSet.GetBaseAmount(set, tier, 4, p))!=1?"s":"")+" of Resist");
|
||||||
lore.add(ChatColor.GRAY+" ("+(ItemSet.GetBaseAmount(set, tier, 4)*10)+"% Damage Reduction) every 5 seconds of sprinting,");
|
lore.add(ChatColor.GRAY+" ("+(ItemSet.GetBaseAmount(set, tier, 4, p)*10)+"% Damage Reduction) every 5 seconds of sprinting,");
|
||||||
lore.add(ChatColor.GRAY+" and with every Tumble. Each hit taken removes one");
|
lore.add(ChatColor.GRAY+" and with every Tumble. Each hit taken removes one");
|
||||||
lore.add(ChatColor.GRAY+" stack of Resist. Caps at Resist 10. Lasts 20 seconds.");
|
lore.add(ChatColor.GRAY+" stack of Resist. Caps at Resist 10. Lasts 20 seconds.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Boosts All Modes of Ranger"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Boosts All Modes of Ranger"+ABILITY_LABEL_END);
|
||||||
@ -641,9 +689,9 @@ public enum ItemSet {
|
|||||||
}break;
|
}break;
|
||||||
case ALIKAHN: {
|
case ALIKAHN: {
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Max Health");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Max Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Max Health");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Max Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Regen / 5 seconds");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+" Regen / 5 seconds");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Boosts All Modes of Ranger"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Boosts All Modes of Ranger"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
||||||
lore.add(ChatColor.WHITE+" +15 Damage");
|
lore.add(ChatColor.WHITE+" +15 Damage");
|
||||||
@ -653,9 +701,9 @@ public enum ItemSet {
|
|||||||
}break;
|
}break;
|
||||||
case LORASAADI:{
|
case LORASAADI:{
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Execution Damage");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+" Execution Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" per 20% Missing Health");
|
lore.add(ChatColor.DARK_AQUA+" per 20% Missing Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Boosts All Modes of Ranger"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Boosts All Modes of Ranger"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
lore.add(ChatColor.WHITE+" +50% Armor Penetration");
|
||||||
@ -666,8 +714,8 @@ public enum ItemSet {
|
|||||||
}break;
|
}break;
|
||||||
case GLADOMAIN:{
|
case GLADOMAIN:{
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Cooldown Reduction");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Cooldown Reduction");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Dodge Chance");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Dodge Chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Life Saver ");
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Life Saver ");
|
||||||
lore.add(ChatColor.GRAY+" When about to be killed, puts you into");
|
lore.add(ChatColor.GRAY+" When about to be killed, puts you into");
|
||||||
lore.add(ChatColor.GRAY+" stealth, applies Speed IV for 10 seconds, adds");
|
lore.add(ChatColor.GRAY+" stealth, applies Speed IV for 10 seconds, adds");
|
||||||
@ -678,14 +726,14 @@ public enum ItemSet {
|
|||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"A successful Assassination grants 100%");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"A successful Assassination grants 100%");
|
||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Critical Strike Chance and 100% Dodge");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Critical Strike Chance and 100% Dodge");
|
||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"chance for the next hit. Dodge Chance");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"chance for the next hit. Dodge Chance");
|
||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"increases by +"+(5+ItemSet.GetBaseAmount(set, tier, 4))+"% per 1m/sec of movement");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"increases by +"+(5+ItemSet.GetBaseAmount(set, tier, 4, p))+"% per 1m/sec of movement");
|
||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"speed.");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"speed.");
|
||||||
}break;
|
}break;
|
||||||
case MOONSHADOW:{
|
case MOONSHADOW:{
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" Applies Poison "+WorldShop.toRomanNumeral(ItemSet.GetBaseAmount(set, tier, 2))+ChatColor.GRAY+" (0:15)");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" Applies Poison "+WorldShop.toRomanNumeral(ItemSet.GetBaseAmount(set, tier, 2, p))+ChatColor.GRAY+" (0:15)");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Critical Chance");
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+"% Critical Chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 7 - "+ChatColor.WHITE+" Provides the Following Bonuses:");
|
lore.add(ChatColor.DARK_AQUA+" 7 - "+ChatColor.WHITE+" Provides the Following Bonuses:");
|
||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Strength Cap Increases to 40. 2 Stacks per kill.");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Strength Cap Increases to 40. 2 Stacks per kill.");
|
||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Successful Assassinations apply damage");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Successful Assassinations apply damage");
|
||||||
@ -697,10 +745,10 @@ public enum ItemSet {
|
|||||||
}break;
|
}break;
|
||||||
case WOLFSBANE:{
|
case WOLFSBANE:{
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" Recovers "+ItemSet.GetBaseAmount(set, tier, 2)+"% Cooldown on Assassination per kill");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" Recovers "+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Cooldown on Assassination per kill");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" Applies Speed V when Assassination is casted. Suppresses");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" Applies Speed V when Assassination is casted. Suppresses");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" the target for "+(ItemSet.GetBaseAmount(set, tier, 3)/20d)+"s");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" the target for "+(ItemSet.GetBaseAmount(set, tier, 3, p)/20d)+"s");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Gain "+(ItemSet.GetBaseAmount(set, tier, 4)/20d)+" seconds of invulnerability after");
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Gain "+(ItemSet.GetBaseAmount(set, tier, 4, p)/20d)+" seconds of invulnerability after");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Assassination is casted.");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Assassination is casted.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 7 - "+ChatColor.WHITE+" Provides the Following Bonuses:");
|
lore.add(ChatColor.DARK_AQUA+" 7 - "+ChatColor.WHITE+" Provides the Following Bonuses:");
|
||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Backstabs heal 2 HP (1 Heart). Assassination cooldown reduced");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Backstabs heal 2 HP (1 Heart). Assassination cooldown reduced");
|
||||||
@ -709,13 +757,13 @@ public enum ItemSet {
|
|||||||
case ALUSTINE:{
|
case ALUSTINE:{
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" Gain immunity to Explosions.");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" Gain immunity to Explosions.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Consumes "+ChatColor.YELLOW+ItemSet.GetBaseAmount(set, tier, 2)+" XP"+ChatColor.WHITE+" per absorbed hit.");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Consumes "+ChatColor.YELLOW+ItemSet.GetBaseAmount(set, tier, 2, p)+" XP"+ChatColor.WHITE+" per absorbed hit.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.GRAY+ChatColor.ITALIC+"Must have at least "+ChatColor.YELLOW+ChatColor.ITALIC+ItemSet.GetBaseAmount(set, tier, 2)+" XP"+ChatColor.GRAY+ChatColor.ITALIC+" to trigger.");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.GRAY+ChatColor.ITALIC+"Must have at least "+ChatColor.YELLOW+ChatColor.ITALIC+ItemSet.GetBaseAmount(set, tier, 2, p)+" XP"+ChatColor.GRAY+ChatColor.ITALIC+" to trigger.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" Resists all fire, poison, bleeding, infection and wither damage.");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" Resists all fire, poison, bleeding, infection and wither damage.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Consumes "+ChatColor.YELLOW+ItemSet.GetBaseAmount(set, tier, 3)+" XP"+ChatColor.WHITE+" per absorbed hit.");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Consumes "+ChatColor.YELLOW+ItemSet.GetBaseAmount(set, tier, 3, p)+" XP"+ChatColor.WHITE+" per absorbed hit.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.GRAY+ChatColor.ITALIC+"Must have at least "+ChatColor.YELLOW+ChatColor.ITALIC+ItemSet.GetBaseAmount(set, tier, 3)+" XP"+ChatColor.GRAY+ChatColor.ITALIC+" to trigger.");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.GRAY+ChatColor.ITALIC+"Must have at least "+ChatColor.YELLOW+ChatColor.ITALIC+ItemSet.GetBaseAmount(set, tier, 3, p)+" XP"+ChatColor.GRAY+ChatColor.ITALIC+" to trigger.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Backstabs spill "+ChatColor.YELLOW+ItemSet.GetBaseAmount(set, tier, 4)+" XP"+ChatColor.WHITE+" out from the target hit.");
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Backstabs spill "+ChatColor.YELLOW+ItemSet.GetBaseAmount(set, tier, 4, p)+" XP"+ChatColor.WHITE+" out from the target hit.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Collecting experience has a "+Math.min((ItemSet.GetBaseAmount(set, tier, 4)/20d)*100d,100)+"% chance");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" Collecting experience has a "+Math.min((ItemSet.GetBaseAmount(set, tier, 4, p)/20d)*100d,100)+"% chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" to restore 2 HP (1 Heart).");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.WHITE+" to restore 2 HP (1 Heart).");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 7 - "+ChatColor.WHITE+" Provides the Following Bonuses:");
|
lore.add(ChatColor.DARK_AQUA+" 7 - "+ChatColor.WHITE+" Provides the Following Bonuses:");
|
||||||
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Deals true damage equal to the number");
|
lore.add(ChatColor.GRAY+" "+ChatColor.WHITE+"Deals true damage equal to the number");
|
||||||
@ -724,16 +772,16 @@ public enum ItemSet {
|
|||||||
}break;
|
}break;
|
||||||
case BLITZEN:
|
case BLITZEN:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Storm Onward!"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Storm Onward!"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Attacks occasionally send Lightning bolts");
|
lore.add(ChatColor.GRAY+" Attacks occasionally send Lightning bolts");
|
||||||
lore.add(ChatColor.GRAY+" down on foes dealing true damage.");
|
lore.add(ChatColor.GRAY+" down on foes dealing true damage.");
|
||||||
break;
|
break;
|
||||||
case COMET:
|
case COMET:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" More Health For You"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" More Health For You"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Right-Clicking players will take away");
|
lore.add(ChatColor.GRAY+" Right-Clicking players will take away");
|
||||||
lore.add(ChatColor.GRAY+" 10% of your health to heal 20% of");
|
lore.add(ChatColor.GRAY+" 10% of your health to heal 20% of");
|
||||||
@ -741,8 +789,8 @@ public enum ItemSet {
|
|||||||
break;
|
break;
|
||||||
case CUPID:
|
case CUPID:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Linked for Life"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Linked for Life"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Right-Clicking players will link yourself");
|
lore.add(ChatColor.GRAY+" Right-Clicking players will link yourself");
|
||||||
lore.add(ChatColor.GRAY+" to them. Teleporting via any means sends");
|
lore.add(ChatColor.GRAY+" to them. Teleporting via any means sends");
|
||||||
@ -750,55 +798,55 @@ public enum ItemSet {
|
|||||||
break;
|
break;
|
||||||
case DANCER:
|
case DANCER:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Can't Catch Me!"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Can't Catch Me!"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Changing your movement direction constantly");
|
lore.add(ChatColor.GRAY+" Changing your movement direction constantly");
|
||||||
lore.add(ChatColor.GRAY+" makes you invulnerable to incoming attacks.");
|
lore.add(ChatColor.GRAY+" makes you invulnerable to incoming attacks.");
|
||||||
break;
|
break;
|
||||||
case DASHER:
|
case DASHER:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Marathon Runner"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Marathon Runner"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Sprinting will restore missing hunger.");
|
lore.add(ChatColor.GRAY+" Sprinting will restore missing hunger.");
|
||||||
break;
|
break;
|
||||||
case DONNER:
|
case DONNER:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Come At Me"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Come At Me"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Monsters attacking your party members");
|
lore.add(ChatColor.GRAY+" Monsters attacking your party members");
|
||||||
lore.add(ChatColor.GRAY+" will automatically be provoked to you.");
|
lore.add(ChatColor.GRAY+" will automatically be provoked to you.");
|
||||||
break;
|
break;
|
||||||
case OLIVE:
|
case OLIVE:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Right Back At You"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Right Back At You"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Gain 20 Absorption Health each time");
|
lore.add(ChatColor.GRAY+" Gain 20 Absorption Health each time");
|
||||||
lore.add(ChatColor.GRAY+" damage is taken. (30 sec cooldown)");
|
lore.add(ChatColor.GRAY+" damage is taken. (30 sec cooldown)");
|
||||||
break;
|
break;
|
||||||
case PRANCER:
|
case PRANCER:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Will You Just Sit Down?"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Will You Just Sit Down?"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Your next strike ignores 50% of the");
|
lore.add(ChatColor.GRAY+" Your next strike ignores 50% of the");
|
||||||
lore.add(ChatColor.GRAY+" target's armor. (10 sec cooldown)");
|
lore.add(ChatColor.GRAY+" target's armor. (10 sec cooldown)");
|
||||||
break;
|
break;
|
||||||
case RUDOLPH:
|
case RUDOLPH:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Light the Way"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Light the Way"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" You and your party gain Permanent");
|
lore.add(ChatColor.GRAY+" You and your party gain Permanent");
|
||||||
lore.add(ChatColor.GRAY+" Night Vision.");
|
lore.add(ChatColor.GRAY+" Night Vision.");
|
||||||
break;
|
break;
|
||||||
case VIXEN:
|
case VIXEN:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" Damage");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Untouchable, Unkillable"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Untouchable, Unkillable"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Increases Dodge Chance by 20%. Dodging");
|
lore.add(ChatColor.GRAY+" Increases Dodge Chance by 20%. Dodging");
|
||||||
lore.add(ChatColor.GRAY+" successfully restores 10% of your max");
|
lore.add(ChatColor.GRAY+" successfully restores 10% of your max");
|
||||||
@ -808,9 +856,9 @@ public enum ItemSet {
|
|||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Attacks build up "+WINDCHARGE_PLURAL_LABEL+".");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Attacks build up "+WINDCHARGE_PLURAL_LABEL+".");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+" "+WINDCHARGE_PLURAL_LABEL+" cap at "+(tier*10)+" stacks");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+" "+WINDCHARGE_PLURAL_LABEL+" cap at "+(tier*10)+" stacks");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" "+(ItemSet.GetBaseAmount(set, tier, 2)!=1?WINDCHARGE_PLURAL_LABEL:WINDCHARGE_LABEL)+" per hit");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" "+(ItemSet.GetBaseAmount(set, tier, 2, p)!=1?WINDCHARGE_PLURAL_LABEL:WINDCHARGE_LABEL)+" per hit");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Armor Pen per "+WINDCHARGE_LABEL);
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Armor Pen per "+WINDCHARGE_LABEL);
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Critical Chance per "+WINDCHARGE_LABEL);
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+"% Critical Chance per "+WINDCHARGE_LABEL);
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Wind Slash"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Wind Slash"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Press the drop key to send a Wind Slash forward,");
|
lore.add(ChatColor.GRAY+" Press the drop key to send a Wind Slash forward,");
|
||||||
lore.add(ChatColor.GRAY+" knocking up all targets hit and dealing "+tier);
|
lore.add(ChatColor.GRAY+" knocking up all targets hit and dealing "+tier);
|
||||||
@ -853,10 +901,10 @@ public enum ItemSet {
|
|||||||
break;
|
break;
|
||||||
case LEGION:
|
case LEGION:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Lifesteal");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Lifesteal");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Damage per 10 Weapon Charges");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Damage per 10 Weapon Charges");
|
||||||
lore.add(ChatColor.AQUA+" ( Max. 200 stacks - "+(ItemSet.GetBaseAmount(set, tier, 3)*20)+"% Damage )");
|
lore.add(ChatColor.AQUA+" ( Max. 200 stacks - "+(ItemSet.GetBaseAmount(set, tier, 3, p)*20)+"% Damage )");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Damage per 100 Damage Pool Stacks");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+"% Damage per 100 Damage Pool Stacks");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Undying Rage"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Undying Rage"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" When taking fatal damage, removes all Damage");
|
lore.add(ChatColor.GRAY+" When taking fatal damage, removes all Damage");
|
||||||
lore.add(ChatColor.GRAY+" Pool stacks and prevents your health from");
|
lore.add(ChatColor.GRAY+" Pool stacks and prevents your health from");
|
||||||
@ -873,10 +921,10 @@ public enum ItemSet {
|
|||||||
break;
|
break;
|
||||||
case LUCI:
|
case LUCI:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Dodge Chance");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Dodge Chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" Adds "+ItemSet.GetBaseAmount(set, tier, 3)+"% Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" Adds "+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.GRAY+" for every 1% Dodge Chance");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.GRAY+" for every 1% Dodge Chance");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" Adds "+ItemSet.GetBaseAmount(set, tier, 4)+"% Damage");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" Adds "+ItemSet.GetBaseAmount(set, tier, 4, p)+"% Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.GRAY+" for every 1% Damage Reduction");
|
lore.add(ChatColor.DARK_AQUA+" "+ChatColor.GRAY+" for every 1% Damage Reduction");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Beast Within"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Beast Within"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Press the drop key to obtain a buff lasting "+(tier+BEASTWITHIN_DURATION));
|
lore.add(ChatColor.GRAY+" Press the drop key to obtain a buff lasting "+(tier+BEASTWITHIN_DURATION));
|
||||||
@ -892,12 +940,12 @@ public enum ItemSet {
|
|||||||
break;
|
break;
|
||||||
case PRIDE:
|
case PRIDE:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+(ItemSet.GetBaseAmount(set, tier, 2)/2)+" Weapon Charges when left-clicking.");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+(ItemSet.GetBaseAmount(set, tier, 2, p)/2)+" Weapon Charges when left-clicking.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" "+ABILITY_LABEL+"Power Swing"+ABILITY_LABEL_END+" (Right-Click) provides double");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" "+ABILITY_LABEL+"Power Swing"+ABILITY_LABEL_END+" (Right-Click) provides double");
|
||||||
lore.add(" "+ChatColor.WHITE+" the lifesteal stacks and increases Regeneration");
|
lore.add(" "+ChatColor.WHITE+" the lifesteal stacks and increases Regeneration");
|
||||||
lore.add(" "+ChatColor.WHITE+" level by "+ItemSet.GetBaseAmount(set, tier, 3)+" for 15 seconds. (Max. 10 Levels)");
|
lore.add(" "+ChatColor.WHITE+" level by "+ItemSet.GetBaseAmount(set, tier, 3, p)+" for 15 seconds. (Max. 10 Levels)");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" "+ABILITY_LABEL+"Forceful Strike"+ABILITY_LABEL_END+" (Shift+Left-Click) applies");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" "+ABILITY_LABEL+"Forceful Strike"+ABILITY_LABEL_END+" (Shift+Left-Click) applies");
|
||||||
lore.add(" "+ChatColor.WHITE+" Poison "+ItemSet.GetBaseAmount(set, tier, 4)+" to everything it hits for 15 seconds.");
|
lore.add(" "+ChatColor.WHITE+" Poison "+ItemSet.GetBaseAmount(set, tier, 4, p)+" to everything it hits for 15 seconds.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" "+ABILITY_LABEL+"Sweep Up"+ABILITY_LABEL_END+" (Shift+Right-Click) heals");
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" "+ABILITY_LABEL+"Sweep Up"+ABILITY_LABEL_END+" (Shift+Right-Click) heals");
|
||||||
lore.add(" "+ChatColor.WHITE+" half the health it deals as HP directly.");
|
lore.add(" "+ChatColor.WHITE+" half the health it deals as HP directly.");
|
||||||
lore.add(ChatColor.GRAY+" ");
|
lore.add(ChatColor.GRAY+" ");
|
||||||
@ -912,10 +960,10 @@ public enum ItemSet {
|
|||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+PlayerMode.SLAYER.getColor()+PlayerMode.SLAYER.getName()+"s"+ChatColor.GOLD+" do not benefit from party effects");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+PlayerMode.SLAYER.getColor()+PlayerMode.SLAYER.getName()+"s"+ChatColor.GOLD+" do not benefit from party effects");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"of this set. "+PlayerMode.RANGER.getColor()+PlayerMode.RANGER.getName()+"s"+ChatColor.GOLD+" receive only half the effects.");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"of this set. "+PlayerMode.RANGER.getColor()+PlayerMode.RANGER.getName()+"s"+ChatColor.GOLD+" receive only half the effects.");
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Damage Reduction to other party members");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Damage Reduction to other party members");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Health to other party members.");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Health to other party members.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Reinforce"+ABILITY_LABEL_END+" - Each hit taken restores");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ABILITY_LABEL+" Reinforce"+ABILITY_LABEL_END+" - Each hit taken restores");
|
||||||
lore.add(" "+ChatColor.WHITE+" "+ItemSet.GetBaseAmount(set, tier, 4)+" Health to other party members.");
|
lore.add(" "+ChatColor.WHITE+" "+ItemSet.GetBaseAmount(set, tier, 4, p)+" Health to other party members.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Unstoppable Team"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Unstoppable Team"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Press the swap item key to channel for 3 seconds,");
|
lore.add(ChatColor.GRAY+" Press the swap item key to channel for 3 seconds,");
|
||||||
lore.add(ChatColor.GRAY+" creating a "+(tier*20)+" Health shield for 30");
|
lore.add(ChatColor.GRAY+" creating a "+(tier*20)+" Health shield for 30");
|
||||||
@ -928,9 +976,9 @@ public enum ItemSet {
|
|||||||
break;
|
break;
|
||||||
case SHARD:
|
case SHARD:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Headshot Damage");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Headshot Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Critical Damage");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Critical Damage");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Health");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+" Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Shrapnel Bombs"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Shrapnel Bombs"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" When projectiles land or hit a target, they explode");
|
lore.add(ChatColor.GRAY+" When projectiles land or hit a target, they explode");
|
||||||
lore.add(ChatColor.GRAY+" into shrapnel, dealing damage to all nearby targets");
|
lore.add(ChatColor.GRAY+" into shrapnel, dealing damage to all nearby targets");
|
||||||
@ -969,11 +1017,11 @@ public enum ItemSet {
|
|||||||
break;
|
break;
|
||||||
case SUSTENANCE:
|
case SUSTENANCE:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+" to Regeneration Pool every hit taken");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+" to Regeneration Pool every hit taken");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+" Regeneration Level"+(ItemSet.GetBaseAmount(set, tier, 3)==1?"":"s")+" per hit");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+" Regeneration Level"+(ItemSet.GetBaseAmount(set, tier, 3, p)==1?"":"s")+" per hit");
|
||||||
lore.add(ChatColor.GRAY+" (Max. Regeneration "+WorldShop.toRomanNumeral(Math.min(2*tier,10))+")");
|
lore.add(ChatColor.GRAY+" (Max. Regeneration "+WorldShop.toRomanNumeral(Math.min(2*tier,10))+")");
|
||||||
lore.add(ChatColor.GRAY+" Decays at 1 Regeneration Level per second.");
|
lore.add(ChatColor.GRAY+" Decays at 1 Regeneration Level per second.");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Healing per Regeneration tick");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+"% Healing per Regeneration tick");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Share the Life"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Share the Life"+ABILITY_LABEL_END);
|
||||||
lore.add(ChatColor.GRAY+" Increases the Regeneration Pool for other party");
|
lore.add(ChatColor.GRAY+" Increases the Regeneration Pool for other party");
|
||||||
lore.add(ChatColor.GRAY+" members by "+(tier)+" whenever you get hit.");
|
lore.add(ChatColor.GRAY+" members by "+(tier)+" whenever you get hit.");
|
||||||
@ -983,13 +1031,13 @@ public enum ItemSet {
|
|||||||
break;
|
break;
|
||||||
case TOXIN:
|
case TOXIN:
|
||||||
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
lore.add(ChatColor.GOLD+""+ChatColor.ITALIC+"Set Bonus:");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2)+"% Chance of projectiles applying Bleeding "+WorldShop.toRomanNumeral(tier)+" to target (15 sec).");
|
lore.add(ChatColor.DARK_AQUA+" 2 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 2, p)+"% Chance of projectiles applying Bleeding "+WorldShop.toRomanNumeral(tier)+" to target (15 sec).");
|
||||||
lore.add(ChatColor.GRAY+" (Bleed deals faster damage over time compared to Poison.");
|
lore.add(ChatColor.GRAY+" (Bleed deals faster damage over time compared to Poison.");
|
||||||
lore.add(ChatColor.GRAY+" it is not affected by Poison Resistance.)");
|
lore.add(ChatColor.GRAY+" it is not affected by Poison Resistance.)");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Chance of projectiles applying Infection "+WorldShop.toRomanNumeral(tier)+" to target (10 sec).");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3, p)+"% Chance of projectiles applying Infection "+WorldShop.toRomanNumeral(tier)+" to target (10 sec).");
|
||||||
lore.add(ChatColor.GRAY+" (Infection deals damage over time and applies all debuffs");
|
lore.add(ChatColor.GRAY+" (Infection deals damage over time and applies all debuffs");
|
||||||
lore.add(ChatColor.GRAY+" this target has to nearby targets.)");
|
lore.add(ChatColor.GRAY+" this target has to nearby targets.)");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Chance of projectiles applying Cripple "+WorldShop.toRomanNumeral(tier)+" to target (10 sec).");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4, p)+"% Chance of projectiles applying Cripple "+WorldShop.toRomanNumeral(tier)+" to target (10 sec).");
|
||||||
lore.add(ChatColor.GRAY+" (Cripple slows the target and decreases target's damage");
|
lore.add(ChatColor.GRAY+" (Cripple slows the target and decreases target's damage");
|
||||||
lore.add(ChatColor.GRAY+" output by 10% per level.)");
|
lore.add(ChatColor.GRAY+" output by 10% per level.)");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Fire Cesspool"+ABILITY_LABEL_END);
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ABILITY_LABEL+" Fire Cesspool"+ABILITY_LABEL_END);
|
||||||
@ -1139,7 +1187,11 @@ public enum ItemSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return highest;
|
if (PVP.isPvPing(p)) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return highest;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1176,10 +1228,26 @@ public enum ItemSet {
|
|||||||
HashMap<Integer,Integer> tiermap = pd.itemsets.get(set.name());
|
HashMap<Integer,Integer> tiermap = pd.itemsets.get(set.name());
|
||||||
for (Integer tier : tiermap.keySet()) {
|
for (Integer tier : tiermap.keySet()) {
|
||||||
for (int i=0;i<tiermap.get(tier);i++) {
|
for (int i=0;i<tiermap.get(tier);i++) {
|
||||||
val = CustomDamage.addMultiplicativeValue(val, set.GetBaseAmount(tier)/100d);
|
val = CustomDamage.addMultiplicativeValue(val, set.GetBaseAmount(tier,p)/100d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isTrinketSet(ItemSet is) {
|
||||||
|
for (ItemSet tr : TRINKET) {
|
||||||
|
if (is == tr) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isAssassinSet(ItemSet is) {
|
||||||
|
if (is == ItemSet.ASSASSIN || is == ItemSet.LORASYS || is == ItemSet.STEALTH) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -703,7 +703,7 @@ public class Loot {
|
|||||||
int tier = tierbonus;
|
int tier = tierbonus;
|
||||||
do {tier++;} while(Math.random()<=0.25);
|
do {tier++;} while(Math.random()<=0.25);
|
||||||
if (allowed) {
|
if (allowed) {
|
||||||
lore.addAll(ItemSet.GenerateLore(set,tier));
|
lore.addAll(ItemSet.GenerateLore(set,tier,null));
|
||||||
ItemMeta m = item.getItemMeta();
|
ItemMeta m = item.getItemMeta();
|
||||||
m.setLore(lore);
|
m.setLore(lore);
|
||||||
m.setDisplayName(set_name);
|
m.setDisplayName(set_name);
|
||||||
|
@ -195,61 +195,67 @@ public class LivingEntityStructure {
|
|||||||
// SETTING THE GLOW DIRECTLY ANYMORE!
|
// SETTING THE GLOW DIRECTLY ANYMORE!
|
||||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
for (Player p : Bukkit.getOnlinePlayers()) {
|
||||||
//if (p!=null && p.isValid() && !p.isDead()) {
|
//if (p!=null && p.isValid() && !p.isDead()) {
|
||||||
if (isImportantGlowEnemy) {
|
if (p!=null && p.isOnline()) {
|
||||||
if (TwosideKeeper.custommonsters.containsKey(m.getUniqueId()) &&
|
if (isImportantGlowEnemy) {
|
||||||
TwosideKeeper.custommonsters.get(m.getUniqueId()).getGlowColor()!=null) {
|
if (TwosideKeeper.custommonsters.containsKey(m.getUniqueId()) &&
|
||||||
CustomMonster cm = TwosideKeeper.custommonsters.get(m.getUniqueId());
|
TwosideKeeper.custommonsters.get(m.getUniqueId()).getGlowColor()!=null) {
|
||||||
if (cm.getGlowColor()!=null) {
|
CustomMonster cm = TwosideKeeper.custommonsters.get(m.getUniqueId());
|
||||||
setGlow(p,cm.getGlowColor());
|
if (cm.getGlowColor()!=null) {
|
||||||
}
|
setGlow(p,cm.getGlowColor());
|
||||||
}
|
|
||||||
else
|
|
||||||
if (GenericFunctions.isSuppressed(m)) {
|
|
||||||
setGlow(p,GlowAPI.Color.BLACK);
|
|
||||||
} else
|
|
||||||
if (Channel.isChanneling(m)) {
|
|
||||||
setGlow(p,GlowAPI.Color.YELLOW);
|
|
||||||
} else
|
|
||||||
if (getElite()) {
|
|
||||||
boolean handled=false;
|
|
||||||
for (EliteMonster em : TwosideKeeper.elitemonsters) {
|
|
||||||
if (em.getMonster().equals(m)) {
|
|
||||||
setGlow(p,em.getGlow());
|
|
||||||
handled=true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!handled) {
|
else
|
||||||
setGlow(p,GlowAPI.Color.DARK_PURPLE);
|
if (GenericFunctions.isSuppressed(m)) {
|
||||||
|
setGlow(p,GlowAPI.Color.BLACK);
|
||||||
|
} else
|
||||||
|
if (Channel.isChanneling(m)) {
|
||||||
|
setGlow(p,GlowAPI.Color.YELLOW);
|
||||||
|
} else
|
||||||
|
if (getElite()) {
|
||||||
|
boolean handled=false;
|
||||||
|
for (EliteMonster em : TwosideKeeper.elitemonsters) {
|
||||||
|
if (em.getMonster().equals(m)) {
|
||||||
|
setGlow(p,em.getGlow());
|
||||||
|
handled=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!handled) {
|
||||||
|
setGlow(p,GlowAPI.Color.DARK_PURPLE);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if (getLeader() || (m instanceof Monster && GenericFunctions.isBossMonster((Monster)m))) {
|
||||||
|
//TwosideKeeper.log("Monster "+GenericFunctions.getDisplayName(m)+" is a Leader. Set the Glow.", 0);
|
||||||
|
setGlow(p,GlowAPI.Color.DARK_RED);
|
||||||
|
//TwosideKeeper.log("Is glowing? "+GlowAPI.isGlowing(m, p)+", Glow color list contains key? "+glowcolorlist.containsKey(p.getUniqueId()), 0);
|
||||||
|
} else
|
||||||
|
if (GenericFunctions.isIsolatedTarget(m, p)) {
|
||||||
|
setGlow(p,GlowAPI.Color.WHITE);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//No glow.
|
||||||
|
//setGlow(p,null);
|
||||||
|
if (glowcolorlist.containsKey(p.getUniqueId())) {
|
||||||
|
GlowAPI.setGlowing(m, null, p);
|
||||||
|
glowcolorlist.remove(p.getUniqueId());
|
||||||
|
}
|
||||||
|
isImportantGlowEnemy=false;
|
||||||
}
|
}
|
||||||
} else
|
//}
|
||||||
if (getLeader() || (m instanceof Monster && GenericFunctions.isBossMonster((Monster)m))) {
|
|
||||||
//TwosideKeeper.log("Monster "+GenericFunctions.getDisplayName(m)+" is a Leader. Set the Glow.", 0);
|
|
||||||
setGlow(p,GlowAPI.Color.DARK_RED);
|
|
||||||
//TwosideKeeper.log("Is glowing? "+GlowAPI.isGlowing(m, p)+", Glow color list contains key? "+glowcolorlist.containsKey(p.getUniqueId()), 0);
|
|
||||||
} else
|
|
||||||
if (GenericFunctions.isIsolatedTarget(m, p)) {
|
|
||||||
setGlow(p,GlowAPI.Color.WHITE);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
//No glow.
|
|
||||||
//setGlow(p,null);
|
|
||||||
if (glowcolorlist.containsKey(p.getUniqueId())) {
|
|
||||||
GlowAPI.setGlowing(m, null, p);
|
|
||||||
glowcolorlist.remove(p.getUniqueId());
|
|
||||||
}
|
|
||||||
isImportantGlowEnemy=false;
|
|
||||||
}
|
}
|
||||||
//}
|
if (!GlowAPI.isGlowing(m, p) && glowcolorlist.containsKey(p.getUniqueId())) {
|
||||||
}
|
//TwosideKeeper.log("Set glow of "+GenericFunctions.getDisplayName(m)+" to "+glowcolorlist.get(p.getUniqueId()), 0);
|
||||||
if (!GlowAPI.isGlowing(m, p) && glowcolorlist.containsKey(p.getUniqueId())) {
|
|
||||||
//TwosideKeeper.log("Set glow of "+GenericFunctions.getDisplayName(m)+" to "+glowcolorlist.get(p.getUniqueId()), 0);
|
|
||||||
GlowAPI.setGlowing(m, glowcolorlist.get(p.getUniqueId()), p);
|
|
||||||
} else
|
|
||||||
if (m!=null && p!=null && GlowAPI.isGlowing(m, p) && (GlowAPI.getGlowColor(m, p)==null || !glowcolorlist.get(p.getUniqueId()).equals(GlowAPI.getGlowColor(m, p)))) {
|
|
||||||
if (GlowAPI.getGlowColor(m, p)==null) {
|
|
||||||
GlowAPI.setGlowing(m, null, p);
|
|
||||||
} else {
|
|
||||||
GlowAPI.setGlowing(m, glowcolorlist.get(p.getUniqueId()), p);
|
GlowAPI.setGlowing(m, glowcolorlist.get(p.getUniqueId()), p);
|
||||||
|
} else
|
||||||
|
try {
|
||||||
|
if (m!=null && p!=null && GlowAPI.isGlowing(m, p) && (GlowAPI.getGlowColor(m, p)==null || !glowcolorlist.get(p.getUniqueId()).equals(GlowAPI.getGlowColor(m, p)))) {
|
||||||
|
if (GlowAPI.getGlowColor(m, p)==null) {
|
||||||
|
GlowAPI.setGlowing(m, null, p);
|
||||||
|
} else {
|
||||||
|
GlowAPI.setGlowing(m, glowcolorlist.get(p.getUniqueId()), p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (NullPointerException npe) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -937,9 +937,9 @@ public class Knight extends GenericBoss{
|
|||||||
|
|
||||||
public static boolean randomlyConvertAsKnight(LivingEntity m, boolean force) {
|
public static boolean randomlyConvertAsKnight(LivingEntity m, boolean force) {
|
||||||
if ((TwosideKeeper.MINIBOSSES_ACTIVATED &&
|
if ((TwosideKeeper.MINIBOSSES_ACTIVATED &&
|
||||||
TwosideKeeper.LAST_SPECIAL_SPAWN+(3000/Math.max(Bukkit.getOnlinePlayers().size(),1))<=TwosideKeeper.getServerTickTime() &&
|
//TwosideKeeper.LAST_SPECIAL_SPAWN+(3000/Math.max(Bukkit.getOnlinePlayers().size(),1))<=TwosideKeeper.getServerTickTime() &&
|
||||||
!m.getWorld().getName().contains("Instance") &&
|
!m.getWorld().getName().contains("Instance") &&
|
||||||
Math.random()<=0.015 &&
|
Math.random()<=0.05 &&
|
||||||
TwosideKeeper.elitemonsters.size()==0 &&
|
TwosideKeeper.elitemonsters.size()==0 &&
|
||||||
//GenericBoss.bossCount()==0 &&
|
//GenericBoss.bossCount()==0 &&
|
||||||
GenericFunctions.AllNaturalBlocks(m.getLocation().getBlock(),16,8,16)) || force) {
|
GenericFunctions.AllNaturalBlocks(m.getLocation().getBlock(),16,8,16)) || force) {
|
||||||
|
@ -671,11 +671,11 @@ public class SniperSkeleton extends GenericBoss{
|
|||||||
|
|
||||||
public static boolean randomlyConvertAsSniperSkeleton(LivingEntity m, boolean force) {
|
public static boolean randomlyConvertAsSniperSkeleton(LivingEntity m, boolean force) {
|
||||||
if ((TwosideKeeper.MINIBOSSES_ACTIVATED &&
|
if ((TwosideKeeper.MINIBOSSES_ACTIVATED &&
|
||||||
TwosideKeeper.LAST_SPECIAL_SPAWN+(3000/Math.max(Bukkit.getOnlinePlayers().size(),1))<=TwosideKeeper.getServerTickTime() &&
|
//TwosideKeeper.LAST_SPECIAL_SPAWN+(3000/Math.max(Bukkit.getOnlinePlayers().size(),1))<=TwosideKeeper.getServerTickTime() &&
|
||||||
!m.getWorld().getName().contains("Instance") &&
|
!m.getWorld().getName().contains("Instance") &&
|
||||||
Math.random()<=0.015 &&
|
Math.random()<=0.035 &&
|
||||||
TwosideKeeper.elitemonsters.size()==0 &&
|
TwosideKeeper.elitemonsters.size()==0 &&
|
||||||
//GenericBoss.bossCount()==0 &&
|
GenericBoss.bossCount()<2 &&
|
||||||
GenericFunctions.AllNaturalBlocks(m.getLocation().getBlock(),16,8,16)) || force) {
|
GenericFunctions.AllNaturalBlocks(m.getLocation().getBlock(),16,8,16)) || force) {
|
||||||
Skeleton s = (Skeleton)m;
|
Skeleton s = (Skeleton)m;
|
||||||
s.setSkeletonType(SkeletonType.NORMAL);
|
s.setSkeletonType(SkeletonType.NORMAL);
|
||||||
|
@ -7,8 +7,14 @@ import java.util.UUID;
|
|||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Chunk;
|
||||||
|
import org.bukkit.ChunkSnapshot;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.boss.BarColor;
|
||||||
|
import org.bukkit.boss.BarFlag;
|
||||||
|
import org.bukkit.boss.BarStyle;
|
||||||
|
import org.bukkit.boss.BossBar;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
@ -17,6 +23,8 @@ import net.md_5.bungee.api.chat.ClickEvent;
|
|||||||
import net.md_5.bungee.api.chat.ComponentBuilder;
|
import net.md_5.bungee.api.chat.ComponentBuilder;
|
||||||
import net.md_5.bungee.api.chat.HoverEvent;
|
import net.md_5.bungee.api.chat.HoverEvent;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
|
||||||
|
import sig.plugin.TwosideKeeper.HelperStructures.Utils.DebugUtils;
|
||||||
import sig.plugin.TwosideKeeper.HelperStructures.Utils.TextUtils;
|
import sig.plugin.TwosideKeeper.HelperStructures.Utils.TextUtils;
|
||||||
|
|
||||||
public class PVP {
|
public class PVP {
|
||||||
@ -25,7 +33,9 @@ public class PVP {
|
|||||||
List<String> losers = new ArrayList<String>();
|
List<String> losers = new ArrayList<String>();
|
||||||
PVPOption style;
|
PVPOption style;
|
||||||
PVPOption battlefield;
|
PVPOption battlefield;
|
||||||
|
PVPArena currentArena;
|
||||||
CHOICEENGINE state;
|
CHOICEENGINE state;
|
||||||
|
public static List<PVPArena> arenas;
|
||||||
long timer;
|
long timer;
|
||||||
private long lastSelected=0;
|
private long lastSelected=0;
|
||||||
int scorelimit;
|
int scorelimit;
|
||||||
@ -34,6 +44,9 @@ public class PVP {
|
|||||||
long timelimit;
|
long timelimit;
|
||||||
long nextRoundTime=0;
|
long nextRoundTime=0;
|
||||||
boolean scorematch = false; //If true, uses score limit. If false uses timer.
|
boolean scorematch = false; //If true, uses score limit. If false uses timer.
|
||||||
|
BossBar matchTimer = null;
|
||||||
|
int duration = 0;
|
||||||
|
boolean isTeamMatch=false;
|
||||||
|
|
||||||
//NEUTRAL team
|
//NEUTRAL team
|
||||||
//Team1
|
//Team1
|
||||||
@ -42,9 +55,11 @@ public class PVP {
|
|||||||
public PVP(Player...players) {
|
public PVP(Player...players) {
|
||||||
for (Player p : players) {
|
for (Player p : players) {
|
||||||
this.players.put(p.getName(),new PVPPlayer());
|
this.players.put(p.getName(),new PVPPlayer());
|
||||||
|
//Bukkit.getServer().broadcastMessage(ChatColor.GREEN+"Waiting for any additional players to join the PVP Match...");
|
||||||
|
//Bukkit.getServer().broadcastMessage(ChatColor.GREEN+"Players must click on "+getParticipants()+" to join in.");
|
||||||
p.sendMessage(ChatColor.GREEN+"Waiting for any additional players to join the PVP Match...");
|
p.sendMessage(ChatColor.GREEN+"Waiting for any additional players to join the PVP Match...");
|
||||||
p.sendMessage(ChatColor.GREEN+"Players must click on a participant to join in.");
|
|
||||||
}
|
}
|
||||||
|
Bukkit.getServer().broadcastMessage(ChatColor.GREEN+"A new PvP Match Request is underway. Click on "+getParticipants(true)+" to join in.");
|
||||||
state = CHOICEENGINE.WAITFORPLAYERS;
|
state = CHOICEENGINE.WAITFORPLAYERS;
|
||||||
timer = TwosideKeeper.getServerTickTime();
|
timer = TwosideKeeper.getServerTickTime();
|
||||||
}
|
}
|
||||||
@ -67,19 +82,19 @@ public class PVP {
|
|||||||
|
|
||||||
private void leaveMatch(String s) {
|
private void leaveMatch(String s) {
|
||||||
TwosideKeeper.ScheduleRemoval(players,s);
|
TwosideKeeper.ScheduleRemoval(players,s);
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
for (String ss : players.keySet()) {
|
||||||
for (String ss : players.keySet()) {
|
Player pl = Bukkit.getPlayer(ss);
|
||||||
Player pl = Bukkit.getPlayer(ss);
|
if (pl!=null && pl.isValid() && pl.isOnline() && !s.equalsIgnoreCase(ss)) {
|
||||||
if (pl!=null && pl.isValid() && pl.isOnline()) {
|
pl.sendMessage(ChatColor.YELLOW+ss+" has left the match. Current Participants: "+ChatColor.YELLOW+getParticipants());
|
||||||
pl.sendMessage(ChatColor.YELLOW+ss+" has left the match. Current Participants: "+ChatColor.YELLOW+getParticipants());
|
|
||||||
} else {
|
|
||||||
leaveMatch(ss);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, 2);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getParticipants() {
|
private String getParticipants() {
|
||||||
|
return getParticipants(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getParticipants(boolean OR) {
|
||||||
StringBuilder sb = new StringBuilder("");
|
StringBuilder sb = new StringBuilder("");
|
||||||
int count=0;
|
int count=0;
|
||||||
for (String s : players.keySet()) {
|
for (String s : players.keySet()) {
|
||||||
@ -87,11 +102,11 @@ public class PVP {
|
|||||||
sb.append(s);
|
sb.append(s);
|
||||||
} else {
|
} else {
|
||||||
if (players.size()==2) {
|
if (players.size()==2) {
|
||||||
sb.append(" and ");
|
sb.append(" "+(OR?"or":"and")+" ");
|
||||||
sb.append(s);
|
sb.append(s);
|
||||||
} else {
|
} else {
|
||||||
if (count+1==players.size()) {
|
if (count+1==players.size()) {
|
||||||
sb.append(", and ");
|
sb.append(", "+(OR?"or":"and")+" ");
|
||||||
sb.append(s);
|
sb.append(s);
|
||||||
} else {
|
} else {
|
||||||
sb.append(", ");
|
sb.append(", ");
|
||||||
@ -105,6 +120,9 @@ public class PVP {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean runTick() {
|
public boolean runTick() {
|
||||||
|
removeInactivePlayers();
|
||||||
|
moveToActiveSpectatorTarget();
|
||||||
|
movePlayersOutsideArenaBackIn();
|
||||||
switch (state) {
|
switch (state) {
|
||||||
/*case ACCEPTREQUEST:{
|
/*case ACCEPTREQUEST:{
|
||||||
if (timer+200<=TwosideKeeper.getServerTickTime()) {
|
if (timer+200<=TwosideKeeper.getServerTickTime()) {
|
||||||
@ -157,6 +175,7 @@ public class PVP {
|
|||||||
}
|
}
|
||||||
if (players.size()>2 && style.name().contains("ROUNDS")) {
|
if (players.size()>2 && style.name().contains("ROUNDS")) {
|
||||||
state = CHOICEENGINE.WAITFORTEAMCHOICES;
|
state = CHOICEENGINE.WAITFORTEAMCHOICES;
|
||||||
|
isTeamMatch=true;
|
||||||
lastSelected=TwosideKeeper.getServerTickTime();
|
lastSelected=TwosideKeeper.getServerTickTime();
|
||||||
resetPlayerChoices();
|
resetPlayerChoices();
|
||||||
DisplayTeamChoices();
|
DisplayTeamChoices();
|
||||||
@ -200,26 +219,38 @@ public class PVP {
|
|||||||
case WAITFORSTAGECHOICES:{
|
case WAITFORSTAGECHOICES:{
|
||||||
if (timer+400<=TwosideKeeper.getServerTickTime() || allPlayersPicked()) {
|
if (timer+400<=TwosideKeeper.getServerTickTime() || allPlayersPicked()) {
|
||||||
if (players.size()>=2) {
|
if (players.size()>=2) {
|
||||||
List<PVPOption> choices = new ArrayList<PVPOption>();
|
List<Object> choices = new ArrayList<Object>();
|
||||||
for (String s : players.keySet()) {
|
for (String s : players.keySet()) {
|
||||||
if (players.containsKey(s)) {
|
if (players.containsKey(s)) {
|
||||||
PVPPlayer pp = players.get(s);
|
PVPPlayer pp = players.get(s);
|
||||||
|
if (pp.arenaChoice!=-1) {
|
||||||
|
choices.add(pp.arenaChoice);
|
||||||
|
} else
|
||||||
if (pp.choice!=PVPOption.NONE) {
|
if (pp.choice!=PVPOption.NONE) {
|
||||||
choices.add(pp.choice);
|
choices.add(pp.choice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (choices.size()==0) {
|
if (choices.size()==0) {
|
||||||
PVPOption[] options = new PVPOption[]{PVPOption.OPENWORLD,PVPOption.SMALLBATTLEFIELD,
|
PVPOption[] options = new PVPOption[]{PVPOption.OPENWORLD};
|
||||||
PVPOption.AQUATICFORT,PVPOption.NETHERFORTRESS,PVPOption.THEEND};
|
|
||||||
battlefield = options[(int)(Math.random()*options.length)];
|
battlefield = options[(int)(Math.random()*options.length)];
|
||||||
} else {
|
} else {
|
||||||
battlefield = choices.get((int)(Math.random()*choices.size()));
|
int choice = (int)(Math.random()*choices.size());
|
||||||
|
if (choices.get(choice) instanceof PVPOption) {
|
||||||
|
battlefield = PVPOption.OPENWORLD;
|
||||||
|
currentArena=null;
|
||||||
|
} else {
|
||||||
|
currentArena = arenas.get((Integer)(choices.get(choice)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (String s : players.keySet()) {
|
for (String s : players.keySet()) {
|
||||||
Player p = Bukkit.getPlayer(s);
|
Player p = Bukkit.getPlayer(s);
|
||||||
if (p!=null && p.isValid() && p.isOnline()) {
|
if (p!=null && p.isValid() && p.isOnline()) {
|
||||||
p.sendMessage(ChatColor.YELLOW+battlefield.getTitle()+ChatColor.GREEN+" has been voted as the battlefield for this PVP match!");
|
if (currentArena==null) {
|
||||||
|
p.sendMessage(ChatColor.YELLOW+battlefield.getTitle()+ChatColor.GREEN+" has been voted as the battlefield for this PVP match!");
|
||||||
|
} else {
|
||||||
|
p.sendMessage(ChatColor.YELLOW+currentArena.getArenaName()+ChatColor.GREEN+" has been voted as the battlefield for this PVP match!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state = CHOICEENGINE.PREPAREFORBATTLE;
|
state = CHOICEENGINE.PREPAREFORBATTLE;
|
||||||
@ -250,14 +281,20 @@ public class PVP {
|
|||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
case FIGHTING:{
|
case FIGHTING:{
|
||||||
removeInactivePlayers();
|
updateBar();
|
||||||
if (conditionsToWin() || notEnoughPlayers()) {
|
if (conditionsToWin() || notEnoughPlayers()) {
|
||||||
StringBuilder sb = PrepareCurrentScores();
|
if (players.size()>0) {
|
||||||
Bukkit.getServer().broadcastMessage(sb.toString());
|
StringBuilder sb = PrepareCurrentScores();
|
||||||
aPlugin.API.discordSendRaw("```"+sb.toString()+"```");
|
Bukkit.getServer().broadcastMessage(sb.toString());
|
||||||
|
aPlugin.API.discordSendRaw("```"+sb.toString()+"```");
|
||||||
|
}
|
||||||
computeWinner();
|
computeWinner();
|
||||||
|
TwosideKeeper.log("Players: "+players, 1);
|
||||||
announceWinner();
|
announceWinner();
|
||||||
resetTeams();
|
resetTeams();
|
||||||
|
if (matchTimer!=null) {
|
||||||
|
matchTimer.removeAll();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
setupNextRound();
|
setupNextRound();
|
||||||
@ -274,6 +311,65 @@ public class PVP {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void movePlayersOutsideArenaBackIn() {
|
||||||
|
if (currentArena!=null) {
|
||||||
|
for (String s : players.keySet()) {
|
||||||
|
PVPPlayer pp = players.get(s);
|
||||||
|
Player p = Bukkit.getPlayer(s);
|
||||||
|
if (p!=null && pp.isAlive) {
|
||||||
|
if (!currentArena.insideBounds(p.getLocation())) {
|
||||||
|
p.teleport(currentArena.pickRandomLocation());
|
||||||
|
p.sendMessage(ChatColor.RED+"You cannot leave the arena!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void moveToActiveSpectatorTarget() {
|
||||||
|
for (String s : players.keySet()) {
|
||||||
|
Player p = Bukkit.getPlayer(s);
|
||||||
|
if (p!=null && p.getGameMode()==GameMode.SPECTATOR) {
|
||||||
|
//This is a spectator. Verify if they are watching an alive target.
|
||||||
|
if (p.getSpectatorTarget()!=null &&
|
||||||
|
p.getSpectatorTarget() instanceof Player) {
|
||||||
|
Player watching = (Player)p.getSpectatorTarget();
|
||||||
|
if (watching.isDead() && (players.containsKey(watching.getName()) &&
|
||||||
|
!players.get(watching.getName()).isAlive)) {
|
||||||
|
ChooseNewSpectatorTarget(p);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ChooseNewSpectatorTarget(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChooseNewSpectatorTarget(Player p) {
|
||||||
|
for (String s : players.keySet()) {
|
||||||
|
PVPPlayer pp = players.get(s);
|
||||||
|
if (pp.isAlive && Bukkit.getPlayer(s)!=null) {
|
||||||
|
p.setSpectatorTarget(Bukkit.getPlayer(s));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateBar() {
|
||||||
|
if (matchTimer!=null) {
|
||||||
|
if ((timelimit - TwosideKeeper.getServerTickTime())<=20*60) {
|
||||||
|
matchTimer.setColor(BarColor.RED);
|
||||||
|
}
|
||||||
|
matchTimer.setProgress(Math.max((timelimit - TwosideKeeper.getServerTickTime()) / (double)duration,0));
|
||||||
|
matchTimer.removeAll();
|
||||||
|
for (String s : players.keySet()) {
|
||||||
|
Player p = Bukkit.getPlayer(s);
|
||||||
|
if (p!=null && p.isOnline()) {
|
||||||
|
matchTimer.addPlayer(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void setupNextRound() {
|
private void setupNextRound() {
|
||||||
boolean deadTeam=false;
|
boolean deadTeam=false;
|
||||||
if (scorematch) {
|
if (scorematch) {
|
||||||
@ -318,7 +414,15 @@ public class PVP {
|
|||||||
p.setGameMode(GameMode.SURVIVAL);
|
p.setGameMode(GameMode.SURVIVAL);
|
||||||
Location myLoc = p.getLocation().clone();
|
Location myLoc = p.getLocation().clone();
|
||||||
//myLoc.setY(p.getLocation().getChunk().getChunkSnapshot().getHighestBlockYAt(Math.floorMod(p.getLocation().getBlockX(),16), Math.floorMod(p.getLocation().getBlockZ(),16)));
|
//myLoc.setY(p.getLocation().getChunk().getChunkSnapshot().getHighestBlockYAt(Math.floorMod(p.getLocation().getBlockX(),16), Math.floorMod(p.getLocation().getBlockZ(),16)));
|
||||||
p.teleport(pp.startingLoc);
|
if (currentArena==null) {
|
||||||
|
p.teleport(pp.startingLoc.add(Math.random()*32-16,0,Math.random()*32-16));
|
||||||
|
Chunk c = p.getLocation().getChunk();
|
||||||
|
ChunkSnapshot cs = c.getChunkSnapshot();
|
||||||
|
int highestY = cs.getHighestBlockYAt(Math.floorMod(p.getLocation().getBlockX(),16), Math.floorMod(p.getLocation().getBlockZ(),16));
|
||||||
|
p.teleport(p.getLocation().add(0, highestY-p.getLocation().getBlockY()+2, 0));
|
||||||
|
} else {
|
||||||
|
p.teleport(currentArena.pickRandomLocation());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 120);
|
}, 120);
|
||||||
}
|
}
|
||||||
@ -329,7 +433,7 @@ public class PVP {
|
|||||||
private StringBuilder PrepareCurrentScores() {
|
private StringBuilder PrepareCurrentScores() {
|
||||||
StringBuilder sb = new StringBuilder("\n\n");
|
StringBuilder sb = new StringBuilder("\n\n");
|
||||||
sb.append("------- PVP Match -------\n");
|
sb.append("------- PVP Match -------\n");
|
||||||
if ((scorematch && players.size()==2) || (!scorematch)) {
|
if ((scorematch && !isTeamMatch) || (!scorematch)) {
|
||||||
DisplaySortedScoreboard(sb);
|
DisplaySortedScoreboard(sb);
|
||||||
} else {
|
} else {
|
||||||
DisplayTeamScoreboard(sb);
|
DisplayTeamScoreboard(sb);
|
||||||
@ -413,11 +517,18 @@ public class PVP {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resetTeams() {
|
private void resetTeams() {
|
||||||
|
currentArena=null;
|
||||||
for (String s : players.keySet()) {
|
for (String s : players.keySet()) {
|
||||||
PVP.setTeam("NEUTRAL", s);
|
PVP.setTeam("NEUTRAL", s);
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
if (Bukkit.getPlayer(s)!=null && Bukkit.getPlayer(s).isOnline()) {
|
if (Bukkit.getPlayer(s)!=null && Bukkit.getPlayer(s).isOnline()) {
|
||||||
Bukkit.getPlayer(s).setGameMode(GameMode.SURVIVAL);
|
Bukkit.getPlayer(s).setGameMode(GameMode.SURVIVAL);
|
||||||
|
Player p = Bukkit.getPlayer(s);
|
||||||
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
|
TwosideKeeper.setPlayerMaxHealth(p, p.getHealth()/p.getMaxHealth(), true);
|
||||||
|
p.teleport(pd.locBeforeInstance);
|
||||||
|
pd.locBeforeInstance=null;
|
||||||
|
GenericFunctions.RevivePlayer(p, p.getMaxHealth());
|
||||||
}
|
}
|
||||||
}, 5);
|
}, 5);
|
||||||
}
|
}
|
||||||
@ -426,6 +537,12 @@ public class PVP {
|
|||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
if (Bukkit.getPlayer(s)!=null && Bukkit.getPlayer(s).isOnline()) {
|
if (Bukkit.getPlayer(s)!=null && Bukkit.getPlayer(s).isOnline()) {
|
||||||
Bukkit.getPlayer(s).setGameMode(GameMode.SURVIVAL);
|
Bukkit.getPlayer(s).setGameMode(GameMode.SURVIVAL);
|
||||||
|
Player p = Bukkit.getPlayer(s);
|
||||||
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
|
TwosideKeeper.setPlayerMaxHealth(p, p.getHealth()/p.getMaxHealth(), true);
|
||||||
|
p.teleport(pd.locBeforeInstance);
|
||||||
|
pd.locBeforeInstance=null;
|
||||||
|
GenericFunctions.RevivePlayer(p, p.getMaxHealth());
|
||||||
}
|
}
|
||||||
}, 5);
|
}, 5);
|
||||||
}
|
}
|
||||||
@ -488,6 +605,7 @@ public class PVP {
|
|||||||
private void announceWinner() {
|
private void announceWinner() {
|
||||||
String firstPlayer = null;
|
String firstPlayer = null;
|
||||||
determineWinnerByEliminatingLosers();
|
determineWinnerByEliminatingLosers();
|
||||||
|
TwosideKeeper.log("Players: "+players, 1);
|
||||||
for (String s : players.keySet()) {
|
for (String s : players.keySet()) {
|
||||||
firstPlayer = s;
|
firstPlayer = s;
|
||||||
break;
|
break;
|
||||||
@ -497,6 +615,7 @@ public class PVP {
|
|||||||
List<Player> winners = PVP.getTeammates(p);
|
List<Player> winners = PVP.getTeammates(p);
|
||||||
List<String> winnernames = new ArrayList<String>();
|
List<String> winnernames = new ArrayList<String>();
|
||||||
for (Player pl : winners) {
|
for (Player pl : winners) {
|
||||||
|
TwosideKeeper.log("Adding "+pl.getName()+" to winners.", 1);
|
||||||
winnernames.add(pl.getName());
|
winnernames.add(pl.getName());
|
||||||
}
|
}
|
||||||
StringBuilder sb = new StringBuilder(ChatColor.GREEN+"Congratulations to "+ChatColor.YELLOW);
|
StringBuilder sb = new StringBuilder(ChatColor.GREEN+"Congratulations to "+ChatColor.YELLOW);
|
||||||
@ -512,7 +631,7 @@ public class PVP {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void determineWinnerByEliminatingLosers() {
|
private void determineWinnerByEliminatingLosers() {
|
||||||
if (players.size()==2) {
|
if (!isTeamMatch) {
|
||||||
String higherscoreplayer = "";
|
String higherscoreplayer = "";
|
||||||
int higherscore = Integer.MIN_VALUE;
|
int higherscore = Integer.MIN_VALUE;
|
||||||
for (String s : players.keySet()) {
|
for (String s : players.keySet()) {
|
||||||
@ -572,7 +691,16 @@ public class PVP {
|
|||||||
scorematch=true;
|
scorematch=true;
|
||||||
} else {
|
} else {
|
||||||
int minutes = Integer.parseInt(style.name().replaceAll("MIN", ""));
|
int minutes = Integer.parseInt(style.name().replaceAll("MIN", ""));
|
||||||
timelimit = TwosideKeeper.getServerTickTime() + (20*60*minutes);
|
duration = (20*60*minutes);
|
||||||
|
timelimit = TwosideKeeper.getServerTickTime() + duration;
|
||||||
|
matchTimer = Bukkit.createBossBar("Time Remaining", BarColor.GREEN, BarStyle.SEGMENTED_10, BarFlag.CREATE_FOG);
|
||||||
|
matchTimer.setProgress((timelimit - TwosideKeeper.getServerTickTime()) / (double)duration);
|
||||||
|
for (String s : players.keySet()) {
|
||||||
|
Player p = Bukkit.getPlayer(s);
|
||||||
|
if (p!=null && p.isOnline()) {
|
||||||
|
matchTimer.addPlayer(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
scorematch=false;
|
scorematch=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -621,11 +749,21 @@ public class PVP {
|
|||||||
pp.startingLoc = baseloc;
|
pp.startingLoc = baseloc;
|
||||||
}
|
}
|
||||||
if (Bukkit.getPlayer(s)!=null) {
|
if (Bukkit.getPlayer(s)!=null) {
|
||||||
|
Player p = Bukkit.getPlayer(s);
|
||||||
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
|
pd.locBeforeInstance = p.getLocation();
|
||||||
|
p.setHealth(p.getMaxHealth());
|
||||||
|
TwosideKeeper.setPlayerMaxHealth(p, p.getHealth()/p.getMaxHealth(), true);
|
||||||
if (pp.team!=0) {
|
if (pp.team!=0) {
|
||||||
PVP.setTeam(s+"_TEAM"+pp.team, Bukkit.getPlayer(s));
|
String firstMember = GetFirstMemberOfTeam(pp.team);
|
||||||
|
PVP.setTeam(firstMember+"_TEAM"+pp.team, Bukkit.getPlayer(s));
|
||||||
} else {
|
} else {
|
||||||
PVP.setTeam(s+"_PVP", Bukkit.getPlayer(s));
|
PVP.setTeam(s+"_PVP", Bukkit.getPlayer(s));
|
||||||
}
|
}
|
||||||
|
if (currentArena!=null) {
|
||||||
|
p.teleport(currentArena.pickRandomLocation());
|
||||||
|
}
|
||||||
|
//TwosideKeeper.log("Set team of "+s+" to "+PVP.getTeam(Bukkit.getPlayer(s)), 2);
|
||||||
pp.lastLoc = Bukkit.getPlayer(s).getLocation().clone();
|
pp.lastLoc = Bukkit.getPlayer(s).getLocation().clone();
|
||||||
Bukkit.getPlayer(s).sendMessage(ChatColor.GREEN+"The PVP Match between "+getParticipants()+" has begun!");
|
Bukkit.getPlayer(s).sendMessage(ChatColor.GREEN+"The PVP Match between "+getParticipants()+" has begun!");
|
||||||
}
|
}
|
||||||
@ -633,6 +771,18 @@ public class PVP {
|
|||||||
aPlugin.API.discordSendRawItalicized("The PVP Match between **"+getParticipants()+"** has begun!");
|
aPlugin.API.discordSendRawItalicized("The PVP Match between **"+getParticipants()+"** has begun!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String GetFirstMemberOfTeam(int team) {
|
||||||
|
for (String s : players.keySet()) {
|
||||||
|
PVPPlayer pp = players.get(s);
|
||||||
|
if (pp.team==team) {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TwosideKeeper.log("WARNING! Could not get first member of team. This should not be happening!",1);
|
||||||
|
DebugUtils.showStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private void DisplayStageChoices() {
|
private void DisplayStageChoices() {
|
||||||
for (String s : players.keySet()) {
|
for (String s : players.keySet()) {
|
||||||
Player p = Bukkit.getPlayer(s);
|
Player p = Bukkit.getPlayer(s);
|
||||||
@ -640,10 +790,14 @@ public class PVP {
|
|||||||
p.sendMessage(ChatColor.GREEN+"Please pick a type of PVP Stage:");
|
p.sendMessage(ChatColor.GREEN+"Please pick a type of PVP Stage:");
|
||||||
p.sendMessage("");
|
p.sendMessage("");
|
||||||
TextComponent tc = PVPOption.OPENWORLD.getComponent();
|
TextComponent tc = PVPOption.OPENWORLD.getComponent();
|
||||||
tc.addExtra(" ");tc.addExtra(PVPOption.SMALLBATTLEFIELD.getComponent());
|
int arenaID = 0;
|
||||||
|
for (PVPArena arena : arenas) {
|
||||||
|
tc.addExtra(" ");tc.addExtra(arena.getComponent(arenaID++));
|
||||||
|
}
|
||||||
|
/*tc.addExtra(" ");tc.addExtra(PVPOption.SMALLBATTLEFIELD.getComponent());
|
||||||
tc.addExtra(" ");tc.addExtra(PVPOption.AQUATICFORT.getComponent());
|
tc.addExtra(" ");tc.addExtra(PVPOption.AQUATICFORT.getComponent());
|
||||||
tc.addExtra("\n");tc.addExtra(PVPOption.NETHERFORTRESS.getComponent());
|
tc.addExtra("\n");tc.addExtra(PVPOption.NETHERFORTRESS.getComponent());
|
||||||
tc.addExtra(" ");tc.addExtra(PVPOption.THEEND.getComponent());
|
tc.addExtra(" ");tc.addExtra(PVPOption.THEEND.getComponent());*/
|
||||||
p.spigot().sendMessage(tc);
|
p.spigot().sendMessage(tc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -676,6 +830,7 @@ public class PVP {
|
|||||||
tc.addExtra("\n");tc.addExtra(PVPOption.MIN10.getComponent());
|
tc.addExtra("\n");tc.addExtra(PVPOption.MIN10.getComponent());
|
||||||
p.spigot().sendMessage(tc);
|
p.spigot().sendMessage(tc);
|
||||||
}
|
}
|
||||||
|
GenericFunctions.deAggroNearbyTargets(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -689,13 +844,21 @@ public class PVP {
|
|||||||
private boolean allPlayersPicked() {
|
private boolean allPlayersPicked() {
|
||||||
for (String p : players.keySet()) {
|
for (String p : players.keySet()) {
|
||||||
PVPPlayer pp = players.get(p);
|
PVPPlayer pp = players.get(p);
|
||||||
if (pp.choice==PVPOption.NONE) {
|
if (pp.choice==PVPOption.NONE && pp.arenaChoice==-1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addStageChoice(Player p, String choice) {
|
||||||
|
if (players.containsKey(p.getName())) {
|
||||||
|
PVPPlayer pp = players.get(p.getName());
|
||||||
|
pp.arenaChoice = 9000-Integer.parseInt(choice);
|
||||||
|
p.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Your choice for "+ChatColor.GREEN+arenas.get(pp.arenaChoice).getArenaName()+ChatColor.RESET+" has been entered.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void addChoice(Player p, String choice) {
|
public void addChoice(Player p, String choice) {
|
||||||
if (players.containsKey(p.getName())) {
|
if (players.containsKey(p.getName())) {
|
||||||
PVPPlayer pp = players.get(p.getName());
|
PVPPlayer pp = players.get(p.getName());
|
||||||
@ -840,8 +1003,17 @@ public class PVP {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isPvPing(Player p) {
|
public static boolean isPvPing(Player p) {
|
||||||
addPlayerToTeamStructure(p);
|
if (p!=null) {
|
||||||
return !teams.get(p.getName()).equalsIgnoreCase("NEUTRAL") || PVP.getMatch(p)!=null;
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
|
if (pd.temporaryPVP) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
addPlayerToTeamStructure(p);
|
||||||
|
return !teams.get(p.getName()).equalsIgnoreCase("NEUTRAL") || PVP.getMatch(p)!=null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Player> getTeammates(Player p) {
|
public static List<Player> getTeammates(Player p) {
|
||||||
@ -901,7 +1073,7 @@ public class PVP {
|
|||||||
public static boolean isEnemy(Player p, Player checkEnemy) {
|
public static boolean isEnemy(Player p, Player checkEnemy) {
|
||||||
addPlayerToTeamStructure(p);
|
addPlayerToTeamStructure(p);
|
||||||
addPlayerToTeamStructure(checkEnemy);
|
addPlayerToTeamStructure(checkEnemy);
|
||||||
return !getTeam(p).equalsIgnoreCase(getTeam(checkEnemy)) && !getTeam(checkEnemy).equalsIgnoreCase("NEUTRAL");
|
return !getTeam(p).equalsIgnoreCase(getTeam(checkEnemy)) && !getTeam(checkEnemy).equalsIgnoreCase("NEUTRAL") && !getTeam(p).equalsIgnoreCase("NEUTRAL");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendPvPRequest(Player attacker, Player defender) {
|
public static void sendPvPRequest(Player attacker, Player defender) {
|
||||||
@ -928,18 +1100,56 @@ public class PVP {
|
|||||||
PVPPlayer myself = players.get(p.getName());
|
PVPPlayer myself = players.get(p.getName());
|
||||||
if (!scorematch) {
|
if (!scorematch) {
|
||||||
myself.score--;
|
myself.score--;
|
||||||
|
StringBuilder sb = PrepareCurrentScores();
|
||||||
|
//myself.respawnTimer = TwosideKeeper.getServerTickTime()+120;
|
||||||
|
pd.customtitle.modifySmallCenterTitle(ChatColor.GREEN+"Respawning...", 100);
|
||||||
|
for (int i=0;i<5;i++) {
|
||||||
|
final int counter = i;
|
||||||
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (p!=null && p.isOnline()) {
|
||||||
|
pd.customtitle.modifyLargeCenterTitle(ChatColor.GREEN+Integer.toString(5-counter), 20);
|
||||||
|
pd.customtitle.update();
|
||||||
|
}
|
||||||
|
}, 20*i);
|
||||||
|
}
|
||||||
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
|
if (p!=null && p.isOnline()) {
|
||||||
|
myself.isAlive=true;
|
||||||
|
p.setGameMode(GameMode.SURVIVAL);
|
||||||
|
Location myLoc = p.getLocation().clone();
|
||||||
|
//myLoc.setY(p.getLocation().getChunk().getChunkSnapshot().getHighestBlockYAt(Math.floorMod(p.getLocation().getBlockX(),16), Math.floorMod(p.getLocation().getBlockZ(),16)));
|
||||||
|
if (currentArena==null) {
|
||||||
|
p.teleport(myself.startingLoc.add(Math.random()*32-16,0,Math.random()*32-16));
|
||||||
|
Chunk c = p.getLocation().getChunk();
|
||||||
|
ChunkSnapshot cs = c.getChunkSnapshot();
|
||||||
|
int highestY = cs.getHighestBlockYAt(Math.floorMod(p.getLocation().getBlockX(),16), Math.floorMod(p.getLocation().getBlockZ(),16));
|
||||||
|
p.teleport(p.getLocation().add(0, highestY-p.getLocation().getBlockY()+2, 0));
|
||||||
|
} else {
|
||||||
|
p.teleport(currentArena.pickRandomLocation());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 120);
|
||||||
|
for (String s : players.keySet()) {
|
||||||
|
Player pl = Bukkit.getPlayer(s);
|
||||||
|
if (pl!=null && pl.isOnline()) {
|
||||||
|
pl.sendMessage(sb.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
myself.isAlive=false;
|
myself.isAlive=false;
|
||||||
p.setGameMode(GameMode.SPECTATOR);
|
p.setGameMode(GameMode.SPECTATOR);
|
||||||
p.setSpectatorTarget(Bukkit.getPlayer(killedByPlayer));
|
p.setSpectatorTarget(Bukkit.getPlayer(killedByPlayer));
|
||||||
p.sendMessage(" Killed by "+ChatColor.RED+killedByPlayer+ChatColor.RESET+".");
|
p.sendMessage(" Killed by "+ChatColor.RED+killedByPlayer+ChatColor.RESET+".");
|
||||||
|
Player killerp = Bukkit.getPlayer(pd.lastplayerHitBy);
|
||||||
|
if (killerp!=null) {
|
||||||
|
killerp.sendMessage(" Killed "+ChatColor.GREEN+p.getName()+ChatColor.RESET+".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*if (getPlayersInTeam(1).contains(killer)) {
|
/*if (getPlayersInTeam(1).contains(killer)) {
|
||||||
team1score++;
|
team1score++;
|
||||||
} else {
|
} else {
|
||||||
team2score++;
|
team2score++;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -948,6 +1158,7 @@ class PVPPlayer {
|
|||||||
Location startingLoc;
|
Location startingLoc;
|
||||||
Location lastLoc;
|
Location lastLoc;
|
||||||
PVPOption choice;
|
PVPOption choice;
|
||||||
|
int arenaChoice;
|
||||||
int team;
|
int team;
|
||||||
boolean isAlive;
|
boolean isAlive;
|
||||||
long respawnTimer;
|
long respawnTimer;
|
||||||
@ -959,6 +1170,8 @@ class PVPPlayer {
|
|||||||
lastLoc=null;
|
lastLoc=null;
|
||||||
team=0;
|
team=0;
|
||||||
isAlive=true;
|
isAlive=true;
|
||||||
|
respawnTimer=0;
|
||||||
|
arenaChoice=-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
91
src/sig/plugin/TwosideKeeper/PVPArena.java
Normal file
91
src/sig/plugin/TwosideKeeper/PVPArena.java
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
package sig.plugin.TwosideKeeper;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
|
import net.md_5.bungee.api.chat.ComponentBuilder;
|
||||||
|
import net.md_5.bungee.api.chat.HoverEvent;
|
||||||
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
|
||||||
|
public class PVPArena {
|
||||||
|
Location startCorner;
|
||||||
|
Location endCorner;
|
||||||
|
String name;
|
||||||
|
String desc;
|
||||||
|
|
||||||
|
public PVPArena(Location startCorner, Location endCorner, String arenaName, String desc) {
|
||||||
|
this.startCorner = new Location(startCorner.getWorld(),Math.min(startCorner.getBlockX(), endCorner.getBlockX()),Math.min(startCorner.getBlockY(), endCorner.getBlockY()),Math.min(startCorner.getBlockZ(), endCorner.getBlockZ()));
|
||||||
|
this.endCorner = new Location(startCorner.getWorld(),Math.max(startCorner.getBlockX(), endCorner.getBlockX()),Math.max(startCorner.getBlockY(), endCorner.getBlockY()),Math.max(startCorner.getBlockZ(), endCorner.getBlockZ()));
|
||||||
|
this.name=arenaName;
|
||||||
|
this.desc=desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location getStartCorner() {
|
||||||
|
return startCorner;
|
||||||
|
}
|
||||||
|
public Location getEndCorner() {
|
||||||
|
return endCorner;
|
||||||
|
}
|
||||||
|
public String getArenaName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public boolean insideBounds(Location loc) {
|
||||||
|
return (loc.getBlockX()>startCorner.getBlockX() &&
|
||||||
|
loc.getBlockX()<endCorner.getBlockX() &&
|
||||||
|
loc.getBlockY()>startCorner.getBlockY() &&
|
||||||
|
loc.getBlockY()<endCorner.getBlockY() &&
|
||||||
|
loc.getBlockZ()>startCorner.getBlockZ() &&
|
||||||
|
loc.getBlockZ()<endCorner.getBlockZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location pickRandomLocation() {
|
||||||
|
//Pick a random point.
|
||||||
|
int tries=50; //Number of tries before we give up and drop them in.
|
||||||
|
|
||||||
|
int randomx = ((int)(Math.random()*(endCorner.getBlockX()-startCorner.getBlockX()))) + 1;
|
||||||
|
int randomz = ((int)(Math.random()*(endCorner.getBlockZ()-startCorner.getBlockZ()))) + 1;
|
||||||
|
int y = endCorner.getBlockY()-startCorner.getBlockY()-1;
|
||||||
|
Location finalloc = null;
|
||||||
|
while (tries>0) {
|
||||||
|
//Find a safe Y Location
|
||||||
|
int ytries=50;
|
||||||
|
while (ytries>0) {
|
||||||
|
Block testBlock = startCorner.clone().add(randomx,y-1,randomz).getBlock();
|
||||||
|
if (testBlock.isLiquid() || !testBlock.getType().isSolid()) {
|
||||||
|
y--;
|
||||||
|
ytries--;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finalloc = new Location(startCorner.getWorld(),
|
||||||
|
startCorner.getBlockX()+randomx,
|
||||||
|
startCorner.getBlockY()+y,
|
||||||
|
startCorner.getBlockZ()+randomz);
|
||||||
|
if (!finalloc.getBlock().isLiquid() &&
|
||||||
|
insideBounds(finalloc)) {
|
||||||
|
return finalloc.clone();
|
||||||
|
} else {
|
||||||
|
tries--;
|
||||||
|
randomx = ((int)(Math.random()*(endCorner.getBlockX()-startCorner.getBlockX()))) + 1;
|
||||||
|
randomz = ((int)(Math.random()*(endCorner.getBlockZ()-startCorner.getBlockZ()))) + 1;
|
||||||
|
y = endCorner.getBlockX()-startCorner.getBlockX()-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TwosideKeeper.log("WARNING! Could not find a safe random location. Dropping them in with what we got...", 1);
|
||||||
|
return finalloc.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextComponent getComponent(int index) {
|
||||||
|
TextComponent tc = new TextComponent("["+name+"]");
|
||||||
|
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND,"/pvp _ARENA_ "+(9000+index)+""));
|
||||||
|
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,new ComponentBuilder(desc).create()));
|
||||||
|
return tc;
|
||||||
|
}
|
||||||
|
}
|
@ -173,6 +173,9 @@ public class PlayerStructure {
|
|||||||
public long lastStartedPlayerClicks = 0;
|
public long lastStartedPlayerClicks = 0;
|
||||||
public int pvpState = 0; //1=Selecting Type, 2=Selecting Stage
|
public int pvpState = 0; //1=Selecting Type, 2=Selecting Stage
|
||||||
public int pvpChoice = 0;
|
public int pvpChoice = 0;
|
||||||
|
public boolean temporaryPVP=false; //Used for /stats PVP emulation.
|
||||||
|
public Location arenaLocRef=null;
|
||||||
|
public Location playerLocRef=null;
|
||||||
/*State 1
|
/*State 1
|
||||||
* 1: Best of 3 Rounds
|
* 1: Best of 3 Rounds
|
||||||
* 2: Best of 5 Rounds
|
* 2: Best of 5 Rounds
|
||||||
@ -274,6 +277,7 @@ public class PlayerStructure {
|
|||||||
public boolean isAFKState = false;
|
public boolean isAFKState = false;
|
||||||
public int unafkLength = 0;
|
public int unafkLength = 0;
|
||||||
public int gracePeriod = 0;
|
public int gracePeriod = 0;
|
||||||
|
public long lastActiveActivity = 0; //Includes disenchanting / alchemizing.
|
||||||
|
|
||||||
//Prevent Automatic AFK moving the camera just to avoid the system.
|
//Prevent Automatic AFK moving the camera just to avoid the system.
|
||||||
public long lastAdjustmentReading = 0; //When the last adjustment reading started.
|
public long lastAdjustmentReading = 0; //When the last adjustment reading started.
|
||||||
@ -797,7 +801,7 @@ public class PlayerStructure {
|
|||||||
public static double getAFKMultiplier(Player p) { //Returns how harsh the AFK'ing multiplier is on a player.
|
public static double getAFKMultiplier(Player p) { //Returns how harsh the AFK'ing multiplier is on a player.
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
double mult = 1;
|
double mult = 1;
|
||||||
mult += Math.min(Math.pow(pd.actionRecords, 1.25)-1,1000);
|
mult += Math.max(Math.min(Math.pow(pd.actionRecords/10, 1.05)-1,1000),0);
|
||||||
return mult;
|
return mult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,8 @@ public class DPSChallengeRoom extends Room{
|
|||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
pd.locBeforeInstance = p.getLocation().clone();
|
pd.locBeforeInstance = p.getLocation().clone();
|
||||||
pd.inTankChallengeRoom=true;
|
pd.inTankChallengeRoom=true;
|
||||||
p.teleport(new Location(instance,ROOM_WIDTH/2,24,ROOM_LENGTH/2));
|
p.teleport(new Location(instance,ROOM_WIDTH/2,4,ROOM_LENGTH/2));
|
||||||
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.LEVITATION, 20*4, -30, p, true);
|
//GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.LEVITATION, 20*4, -30, p, true);
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
setupChallengeRoom();
|
setupChallengeRoom();
|
||||||
}, 5);
|
}, 5);
|
||||||
|
@ -54,13 +54,13 @@ public class ParkourChallengeRoom extends Room{
|
|||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
pd.locBeforeInstance = p.getLocation().clone();
|
pd.locBeforeInstance = p.getLocation().clone();
|
||||||
pd.inParkourChallengeRoom=true;
|
pd.inParkourChallengeRoom=true;
|
||||||
p.teleport(new Location(instance,ROOM_WIDTH/2,24,ROOM_LENGTH/2));
|
//GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.LEVITATION, 20*4, -30, p, true);
|
||||||
|
p.teleport(new Location(instance,ROOM_WIDTH/2,4,ROOM_LENGTH/2));
|
||||||
storedinv = Bukkit.createInventory(p, 63);
|
storedinv = Bukkit.createInventory(p, 63);
|
||||||
for (int i=0;i<p.getInventory().getSize();i++) {
|
for (int i=0;i<p.getInventory().getSize();i++) {
|
||||||
storedinv.setItem(i, p.getInventory().getItem(i));
|
storedinv.setItem(i, p.getInventory().getItem(i));
|
||||||
}
|
}
|
||||||
p.getInventory().clear();
|
p.getInventory().clear();
|
||||||
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.LEVITATION, 20*4, -30, p, true);
|
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
setupChallengeRoom();
|
setupChallengeRoom();
|
||||||
}, 5);
|
}, 5);
|
||||||
@ -99,6 +99,7 @@ public class ParkourChallengeRoom extends Room{
|
|||||||
if (p!=null && p.isValid()) {
|
if (p!=null && p.isValid()) {
|
||||||
verifySign();
|
verifySign();
|
||||||
updateLava();
|
updateLava();
|
||||||
|
updateBlockAboveChest();
|
||||||
finishCourse();
|
finishCourse();
|
||||||
if (roomFinished) {
|
if (roomFinished) {
|
||||||
return false;
|
return false;
|
||||||
@ -110,6 +111,13 @@ public class ParkourChallengeRoom extends Room{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void updateBlockAboveChest() {
|
||||||
|
Block b = instance.getBlockAt(ROOM_WIDTH/2, 2, ROOM_LENGTH/2);
|
||||||
|
if (b.getType()!=Material.AIR) {
|
||||||
|
b.setType(Material.AIR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void finishCourse() {
|
private void finishCourse() {
|
||||||
//TwosideKeeper.log(p.getLocation().getBlockY()+","+p.getLocation().getBlock().getRelative(0, -1, 0).getType(), 0);
|
//TwosideKeeper.log(p.getLocation().getBlockY()+","+p.getLocation().getBlock().getRelative(0, -1, 0).getType(), 0);
|
||||||
if (p.getLocation().getBlockY()>=81 &&
|
if (p.getLocation().getBlockY()>=81 &&
|
||||||
|
@ -57,8 +57,8 @@ public class TankChallengeRoom extends Room {
|
|||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
pd.locBeforeInstance = p.getLocation().clone();
|
pd.locBeforeInstance = p.getLocation().clone();
|
||||||
pd.inTankChallengeRoom=true;
|
pd.inTankChallengeRoom=true;
|
||||||
p.teleport(new Location(instance,ROOM_WIDTH/2,24,ROOM_LENGTH/2));
|
p.teleport(new Location(instance,ROOM_WIDTH/2,4,ROOM_LENGTH/2));
|
||||||
GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.LEVITATION, 20*4, -30, p, true);
|
//GenericFunctions.logAndApplyPotionEffectToEntity(PotionEffectType.LEVITATION, 20*4, -30, p, true);
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
setupChallengeRoom();
|
setupChallengeRoom();
|
||||||
}, 5);
|
}, 5);
|
||||||
|
@ -57,6 +57,6 @@ public class SpleefManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean playerIsPlayingSpleef(Player p) {
|
public static boolean playerIsPlayingSpleef(Player p) {
|
||||||
return PlayerStructure.GetPlayerStructure(p).isPlayingSpleef;
|
return PlayerStructure.GetPlayerStructure(p).isPlayingSpleef || PlayerStructure.GetPlayerStructure(p).inTankChallengeRoom;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -152,6 +152,7 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
|||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
|
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
|
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||||
import org.bukkit.event.player.PlayerToggleSprintEvent;
|
import org.bukkit.event.player.PlayerToggleSprintEvent;
|
||||||
import org.bukkit.event.server.ServerCommandEvent;
|
import org.bukkit.event.server.ServerCommandEvent;
|
||||||
@ -454,6 +455,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
public static CustomPotion HARDENING_VIAL;
|
public static CustomPotion HARDENING_VIAL;
|
||||||
public static ItemStack DEAL_OF_THE_DAY_ITEM;
|
public static ItemStack DEAL_OF_THE_DAY_ITEM;
|
||||||
public static ShapelessRecipe BAUBLE_POUCH_RECIPE;
|
public static ShapelessRecipe BAUBLE_POUCH_RECIPE;
|
||||||
|
public static int ARENA_ID = 0;
|
||||||
|
|
||||||
public static int DAMAGE_LOG = 0; //Goes up to 8, then starts at 0 again.
|
public static int DAMAGE_LOG = 0; //Goes up to 8, then starts at 0 again.
|
||||||
public static File DAMAGE_LOG_FILE;
|
public static File DAMAGE_LOG_FILE;
|
||||||
@ -1028,13 +1030,21 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
double regenamt = GetNaturalRegen(p);
|
double regenamt = GetNaturalRegen(p);
|
||||||
if (p.getHealth()<p.getMaxHealth() &&
|
if (p.getHealth()<p.getMaxHealth() &&
|
||||||
p.getFoodLevel()>=16) {
|
p.getFoodLevel()>=16) {
|
||||||
GenericFunctions.HealEntity(p, regenamt);
|
if (PVP.isPvPing(p)) {
|
||||||
|
GenericFunctions.HealEntity(p, regenamt*0.1);
|
||||||
|
} else {
|
||||||
|
GenericFunctions.HealEntity(p, regenamt);
|
||||||
|
}
|
||||||
pd.last_regen_time=TwosideKeeper.getServerTickTime();
|
pd.last_regen_time=TwosideKeeper.getServerTickTime();
|
||||||
}
|
}
|
||||||
if (pd.regenpool>0) {
|
if (pd.regenpool>0) {
|
||||||
double healamt = Math.min(pd.regenpool, regenamt);
|
double healamt = Math.min(pd.regenpool, regenamt);
|
||||||
pd.regenpool = Math.max(pd.regenpool-regenamt, 0);
|
pd.regenpool = Math.max(pd.regenpool-regenamt, 0);
|
||||||
GenericFunctions.HealEntity(p, healamt);
|
if (PVP.isPvPing(p)) {
|
||||||
|
GenericFunctions.HealEntity(p, healamt*0.1);
|
||||||
|
} else {
|
||||||
|
GenericFunctions.HealEntity(p, healamt);
|
||||||
|
}
|
||||||
GenericFunctions.sendActionBarMessage(p, "");
|
GenericFunctions.sendActionBarMessage(p, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1075,7 +1085,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
List<Integer> diffs = new ArrayList<Integer>();
|
List<Integer> diffs = new ArrayList<Integer>();
|
||||||
for (int i=0;i<9;i++) {
|
for (int i=0;i<9;i++) {
|
||||||
ItemStack item = p.getInventory().getItem(i);
|
ItemStack item = p.getInventory().getItem(i);
|
||||||
if (ItemUtils.isValidItem(item) && GenericFunctions.isEquip(item)) {
|
if (ItemUtils.isValidItem(item) && GenericFunctions.isEquip(item) && pd.durability.get(i)!=-1) {
|
||||||
diffs.add(item.getDurability()-pd.durability.get(i));
|
diffs.add(item.getDurability()-pd.durability.get(i));
|
||||||
if (item.getDurability()-pd.durability.get(i)>0) {
|
if (item.getDurability()-pd.durability.get(i)>0) {
|
||||||
TwosideKeeper.log("Difference dected in item slot #"+i+" for Player "+p.getName(), 2);
|
TwosideKeeper.log("Difference dected in item slot #"+i+" for Player "+p.getName(), 2);
|
||||||
@ -1094,7 +1104,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
if (ItemUtils.isValidItem(item) && GenericFunctions.isEquip(item)) {
|
if (ItemUtils.isValidItem(item) && GenericFunctions.isEquip(item)) {
|
||||||
pd.durability.add((int)item.getDurability());
|
pd.durability.add((int)item.getDurability());
|
||||||
} else {
|
} else {
|
||||||
pd.durability.add(0);
|
pd.durability.add(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1110,7 +1120,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
final ItemStack[] equips = GenericFunctions.getEquipment(p);
|
final ItemStack[] equips = GenericFunctions.getEquipment(p);
|
||||||
for (ItemStack equip : equips) {
|
for (ItemStack equip : equips) {
|
||||||
if (GenericFunctions.isArtifactEquip(equip)) {
|
if (GenericFunctions.isArtifactEquip(equip)) {
|
||||||
double regenamt = GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH_REGEN, equip);
|
double regenamt = GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH_REGEN, equip, p);
|
||||||
totalregen += regenamt;
|
totalregen += regenamt;
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, equip)) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, equip)) {
|
||||||
totalregen /= ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, equip)?2:1;
|
totalregen /= ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, equip)?2:1;
|
||||||
@ -1211,6 +1221,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
habitat_data = new Habitation();
|
habitat_data = new Habitation();
|
||||||
habitat_data.loadLocationHashesFromConfig();
|
habitat_data.loadLocationHashesFromConfig();
|
||||||
|
|
||||||
|
PVP.arenas = new ArrayList<PVPArena>();
|
||||||
|
|
||||||
LastClearStructureTime = getServerTickTime();
|
LastClearStructureTime = getServerTickTime();
|
||||||
|
|
||||||
TwosideRecyclingCenter = new RecyclingCenter();
|
TwosideRecyclingCenter = new RecyclingCenter();
|
||||||
@ -1642,6 +1654,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
session.addChoice(p,args[1]);
|
session.addChoice(p,args[1]);
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
case "_ARENA_":{
|
||||||
|
Player p = (Player)sender;
|
||||||
|
PVP session = PVP.getMatch(p);
|
||||||
|
if (session!=null) {
|
||||||
|
session.addStageChoice(p,args[1]);
|
||||||
|
}
|
||||||
|
}break;
|
||||||
case "_TEAM_":{
|
case "_TEAM_":{
|
||||||
Player p = (Player)sender;
|
Player p = (Player)sender;
|
||||||
PVP session = PVP.getMatch(p);
|
PVP session = PVP.getMatch(p);
|
||||||
@ -1679,6 +1698,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
if (args[0].equalsIgnoreCase("offhand")) {
|
if (args[0].equalsIgnoreCase("offhand")) {
|
||||||
showPlayerStats(p,sender,"offhand");
|
showPlayerStats(p,sender,"offhand");
|
||||||
} else
|
} else
|
||||||
|
if (args[0].equalsIgnoreCase("pvp")) {
|
||||||
|
showPlayerStats(p,sender,"pvp");
|
||||||
|
} else
|
||||||
if (args[0].equalsIgnoreCase("all")) {
|
if (args[0].equalsIgnoreCase("all")) {
|
||||||
showPlayerStats(p,sender,"all");
|
showPlayerStats(p,sender,"all");
|
||||||
} else {
|
} else {
|
||||||
@ -1694,6 +1716,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
if (args[0].equalsIgnoreCase("offhand")) {
|
if (args[0].equalsIgnoreCase("offhand")) {
|
||||||
showPlayerStats((Player)sender,"offhand");
|
showPlayerStats((Player)sender,"offhand");
|
||||||
} else
|
} else
|
||||||
|
if (args[0].equalsIgnoreCase("pvp")) {
|
||||||
|
showPlayerStats((Player)sender,"pvp");
|
||||||
|
} else
|
||||||
if (args[0].equalsIgnoreCase("all")) {
|
if (args[0].equalsIgnoreCase("all")) {
|
||||||
showPlayerStats((Player)sender,"all");
|
showPlayerStats((Player)sender,"all");
|
||||||
} else
|
} else
|
||||||
@ -2430,6 +2455,99 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
tankchallenge_records.resetRecords();
|
tankchallenge_records.resetRecords();
|
||||||
tankchallenge_recordsHOF.resetRecords();
|
tankchallenge_recordsHOF.resetRecords();
|
||||||
}break;
|
}break;
|
||||||
|
case "ARTIFACTS":{
|
||||||
|
int vals = 0;
|
||||||
|
for (ArtifactItemType ait : ArtifactItemType.values()) {
|
||||||
|
ItemStack newitem = ArtifactItemType.getTypeFromData(vals).getTieredItem(1);
|
||||||
|
|
||||||
|
//Add more information for this.
|
||||||
|
newitem = AwakenedArtifact.convertToAwakenedArtifact(newitem, 1, vals);
|
||||||
|
TwosideKeeperAPI.addArtifactEXP(newitem, 1000000, p);
|
||||||
|
GenericFunctions.giveItem(p, newitem);
|
||||||
|
vals++;
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
case "ITEMSETS":{
|
||||||
|
int tier = 5;
|
||||||
|
if (args.length==2) {
|
||||||
|
tier = Integer.parseInt(args[1]);
|
||||||
|
}
|
||||||
|
List<ItemStack> items = new ArrayList<ItemStack>();
|
||||||
|
for (ItemSet is : ItemSet.values()) {
|
||||||
|
if (ItemSet.isTrinketSet(is)) {
|
||||||
|
ItemStack item = TwosideKeeperAPI.generateSetPiece(Material.SKULL_ITEM, is, true, tier);
|
||||||
|
setTier(item,tier);
|
||||||
|
item.setAmount(9);
|
||||||
|
items.add(item);
|
||||||
|
} else {
|
||||||
|
if (ItemSet.isAssassinSet(is)) {
|
||||||
|
ItemStack item = TwosideKeeperAPI.generateSetPiece(Material.GOLD_SWORD, is, true, tier);
|
||||||
|
setTier(item,tier);
|
||||||
|
items.add(item);
|
||||||
|
} else {
|
||||||
|
ItemStack item = TwosideKeeperAPI.generateSetPiece(Material.GOLD_SWORD, is, true, tier);
|
||||||
|
setTier(item,tier);
|
||||||
|
items.add(item);
|
||||||
|
item = TwosideKeeperAPI.generateSetPiece(Material.GOLD_HELMET, is, true, tier);
|
||||||
|
setTier(item,tier);
|
||||||
|
items.add(item);
|
||||||
|
item = TwosideKeeperAPI.generateSetPiece(Material.GOLD_CHESTPLATE, is, true, tier);
|
||||||
|
setTier(item,tier);
|
||||||
|
items.add(item);
|
||||||
|
item = TwosideKeeperAPI.generateSetPiece(Material.GOLD_LEGGINGS, is, true, tier);
|
||||||
|
setTier(item,tier);
|
||||||
|
items.add(item);
|
||||||
|
item = TwosideKeeperAPI.generateSetPiece(Material.GOLD_BOOTS, is, true, tier);
|
||||||
|
setTier(item,tier);
|
||||||
|
items.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Inventory itemset_inv = Bukkit.createInventory(p, ((((items.size()-1)/9)+1)*9), "Item Sets");
|
||||||
|
itemset_inv.addItem(items.toArray(new ItemStack[items.size()]));
|
||||||
|
p.openInventory(itemset_inv);
|
||||||
|
}break;
|
||||||
|
case "ARTIFACTTIER":{
|
||||||
|
if (args.length==2) {
|
||||||
|
ItemUtils.ModifyLoreLineContainingSubstring(p.getEquipment().getItemInMainHand(), ChatColor.GOLD+""+ChatColor.BOLD+"T", ChatColor.GOLD+""+ChatColor.BOLD+"T"+Integer.parseInt(args[1])+" Artifact");
|
||||||
|
} else {
|
||||||
|
p.sendMessage("/fix ARTIFACTTIER <tier>");
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
case "DEFINEARENA":{
|
||||||
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
|
if (pd.arenaLocRef==null) {
|
||||||
|
Set<Material> types = null;
|
||||||
|
pd.arenaLocRef = p.getTargetBlock(types, 100).getLocation().clone();
|
||||||
|
pd.playerLocRef=p.getLocation().clone();
|
||||||
|
p.sendMessage(ChatColor.LIGHT_PURPLE+"Set Ref Location of Arena corner 1 to "+pd.arenaLocRef);
|
||||||
|
} else {
|
||||||
|
if (args.length==3) {
|
||||||
|
Set<Material> types = null;
|
||||||
|
PVPArena arena = new PVPArena(pd.arenaLocRef,p.getTargetBlock(types, 100).getLocation().clone(),
|
||||||
|
args[1],args[2]);
|
||||||
|
PVP.arenas.add(arena);
|
||||||
|
p.sendMessage(ChatColor.LIGHT_PURPLE+"Set Ref Location of Arena corner 2 to "+p.getTargetBlock(types, 100).getLocation().clone());
|
||||||
|
p.sendMessage(ChatColor.YELLOW+"Successfully created Arena "+arena.getArenaName()+" with Description "+arena.getDescription());
|
||||||
|
p.teleport(pd.playerLocRef);
|
||||||
|
pd.playerLocRef=null;
|
||||||
|
pd.arenaLocRef=null;
|
||||||
|
} else {
|
||||||
|
if (args.length==2) {
|
||||||
|
if (args[1].equalsIgnoreCase("exit")) {
|
||||||
|
p.teleport(pd.playerLocRef);
|
||||||
|
pd.playerLocRef=null;
|
||||||
|
pd.arenaLocRef=null;
|
||||||
|
p.sendMessage("Arena creation cancelled.");
|
||||||
|
} else {
|
||||||
|
p.sendMessage("Use /fix DEFINEARENA exit to quit.");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
p.sendMessage("Use /fix DEFINEARENA <name> <description> to define the arena.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//LivingEntity m = MonsterController.convertMonster((Monster)p.getWorld().spawnEntity(p.getLocation(),EntityType.ZOMBIE), MonsterDifficulty.ELITE);
|
//LivingEntity m = MonsterController.convertMonster((Monster)p.getWorld().spawnEntity(p.getLocation(),EntityType.ZOMBIE), MonsterDifficulty.ELITE);
|
||||||
@ -2696,11 +2814,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
Player p = Bukkit.getPlayer(sender.getName());
|
Player p = Bukkit.getPlayer(sender.getName());
|
||||||
if (Integer.parseInt(args[1])>=900) {
|
if (Integer.parseInt(args[1])>=900) {
|
||||||
if (p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900]!=null) {
|
if (p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900]!=null) {
|
||||||
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900]).getUpgradePath(), CustomDamage.getBaseWeaponDamage(p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900], p, null), p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900],Integer.parseInt(args[1])));
|
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900]).getUpgradePath(), CustomDamage.getBaseWeaponDamage(p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900], p, null), p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900],Integer.parseInt(args[1]),p));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (p.getInventory().getItem(Integer.parseInt(args[1]))!=null && GenericFunctions.isArtifactEquip(p.getInventory().getItem(Integer.parseInt(args[1])))) {
|
if (p.getInventory().getItem(Integer.parseInt(args[1]))!=null && GenericFunctions.isArtifactEquip(p.getInventory().getItem(Integer.parseInt(args[1])))) {
|
||||||
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getInventory().getItem(Integer.parseInt(args[1]))).getUpgradePath(), CustomDamage.getBaseWeaponDamage(p.getInventory().getItem(Integer.parseInt(args[1])), p, null), p.getInventory().getItem(Integer.parseInt(args[1])),Integer.parseInt(args[1])));
|
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getInventory().getItem(Integer.parseInt(args[1]))).getUpgradePath(), CustomDamage.getBaseWeaponDamage(p.getInventory().getItem(Integer.parseInt(args[1])), p, null), p.getInventory().getItem(Integer.parseInt(args[1])),Integer.parseInt(args[1]),p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@ -2727,7 +2845,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
p.getEquipment().getItemInMainHand().getType()!=Material.AIR
|
p.getEquipment().getItemInMainHand().getType()!=Material.AIR
|
||||||
&& GenericFunctions.isArtifactEquip(p.getEquipment().getItemInMainHand())) {
|
&& GenericFunctions.isArtifactEquip(p.getEquipment().getItemInMainHand())) {
|
||||||
p.sendMessage("");p.sendMessage("");
|
p.sendMessage("");p.sendMessage("");
|
||||||
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getEquipment().getItemInMainHand()).getUpgradePath(), CustomDamage.CalculateDamageReduction(1,p,null), p.getEquipment().getItemInMainHand()));
|
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getEquipment().getItemInMainHand()).getUpgradePath(), CustomDamage.CalculateDamageReduction(1,p,null), p.getEquipment().getItemInMainHand(),p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -2899,6 +3017,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
private void setTier(ItemStack piece, int tier) {
|
||||||
|
TwosideKeeperAPI.setItemTier(piece, tier);
|
||||||
|
}
|
||||||
private void CreateDarkReveriePool(Player p, int tier) {
|
private void CreateDarkReveriePool(Player p, int tier) {
|
||||||
AreaEffectCloud aec = (AreaEffectCloud)p.getWorld().spawnEntity(p.getLocation(), EntityType.AREA_EFFECT_CLOUD);
|
AreaEffectCloud aec = (AreaEffectCloud)p.getWorld().spawnEntity(p.getLocation(), EntityType.AREA_EFFECT_CLOUD);
|
||||||
aec.setColor(Color.BLACK);
|
aec.setColor(Color.BLACK);
|
||||||
@ -3223,7 +3344,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.NIGHT_VISION,ev.getPlayer());
|
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.NIGHT_VISION,ev.getPlayer());
|
||||||
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.LEVITATION,ev.getPlayer());
|
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.LEVITATION,ev.getPlayer());
|
||||||
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.JUMP,ev.getPlayer());
|
GenericFunctions.logAndRemovePotionEffectFromEntity(PotionEffectType.JUMP,ev.getPlayer());
|
||||||
if (TwosideKeeper.SERVER_TYPE!=ServerType.TEST) {
|
if (TwosideKeeper.SERVER_TYPE!=ServerType.TEST || ev.getPlayer().getGameMode()==GameMode.SPECTATOR) {
|
||||||
ev.getPlayer().setGameMode(GameMode.SURVIVAL);
|
ev.getPlayer().setGameMode(GameMode.SURVIVAL);
|
||||||
}
|
}
|
||||||
runServerHeartbeat.UpdatePlayerScoreboardAndHealth(ev.getPlayer());
|
runServerHeartbeat.UpdatePlayerScoreboardAndHealth(ev.getPlayer());
|
||||||
@ -3251,6 +3372,14 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
p.sendMessage("--------------------");
|
p.sendMessage("--------------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
||||||
|
public void onPlayerFlight(PlayerToggleFlightEvent ev) {
|
||||||
|
Player p = ev.getPlayer();
|
||||||
|
if (ev.isFlying() && PVP.isPvPing(p)) {
|
||||||
|
ev.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
||||||
public void onPlayerLeave(PlayerQuitEvent ev) {
|
public void onPlayerLeave(PlayerQuitEvent ev) {
|
||||||
Player p = ev.getPlayer();
|
Player p = ev.getPlayer();
|
||||||
@ -3274,7 +3403,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
for (UUID id : livingentitydata.keySet()) {
|
for (UUID id : livingentitydata.keySet()) {
|
||||||
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(livingentitydata.get(id).m);
|
LivingEntityStructure les = LivingEntityStructure.GetLivingEntityStructure(livingentitydata.get(id).m);
|
||||||
les.setGlow(ev.getPlayer(), null);
|
if (les!=null) {
|
||||||
|
les.setGlow(ev.getPlayer(), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Player pl :Bukkit.getOnlinePlayers()) {
|
for (Player pl :Bukkit.getOnlinePlayers()) {
|
||||||
@ -3283,6 +3414,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*PVP session = PVP.getMatch(p);
|
||||||
|
if (session!=null) {
|
||||||
|
if (session.matchTimer!=null) {
|
||||||
|
session.matchTimer.removePlayer(p);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
//Bukkit.getScheduler().scheduleSyncDelayedTask(this, new ShutdownServerForUpdate(),5);
|
//Bukkit.getScheduler().scheduleSyncDelayedTask(this, new ShutdownServerForUpdate(),5);
|
||||||
|
|
||||||
//Find the player that is getting removed.
|
//Find the player that is getting removed.
|
||||||
@ -3309,6 +3447,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
if (ev.getMessage().length()>=1) {
|
if (ev.getMessage().length()>=1) {
|
||||||
//See if we're using a bank terminal.
|
//See if we're using a bank terminal.
|
||||||
Player thisp = ev.getPlayer();
|
Player thisp = ev.getPlayer();
|
||||||
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(thisp);
|
||||||
|
pd.afkLength = Math.min(pd.afkLength+5, 60);
|
||||||
if (banksessions.containsKey(thisp.getUniqueId())) {
|
if (banksessions.containsKey(thisp.getUniqueId())) {
|
||||||
switch (((BankSession)banksessions.get(ev.getPlayer().getUniqueId())).GetState()) {
|
switch (((BankSession)banksessions.get(ev.getPlayer().getUniqueId())).GetState()) {
|
||||||
case WITHDRAW:{
|
case WITHDRAW:{
|
||||||
@ -4023,6 +4163,13 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
pd.adjustmentReading++;
|
pd.adjustmentReading++;
|
||||||
|
|
||||||
|
if (ev.getClickedBlock()!=null && (ev.getClickedBlock().getType()==Material.ENCHANTMENT_TABLE ||
|
||||||
|
ev.getClickedBlock().getType()==Material.CAULDRON) && ev.getAction()==Action.LEFT_CLICK_BLOCK &&
|
||||||
|
p.isSneaking()) {
|
||||||
|
//We are alchemizing or disenchanting.
|
||||||
|
pd.lastActiveActivity = TwosideKeeper.getServerTickTime();
|
||||||
|
}
|
||||||
|
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -4208,7 +4355,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
weapon.toString().contains("SPADE")) {
|
weapon.toString().contains("SPADE")) {
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.EARTHWAVE, weapon) &&
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.EARTHWAVE, weapon) &&
|
||||||
pd.lastusedearthwave+10<TwosideKeeper.getServerTickTime()) {
|
pd.lastusedearthwave+10<TwosideKeeper.getServerTickTime()) {
|
||||||
dmg = 20+GenericFunctions.getAbilityValue(ArtifactAbility.EARTHWAVE, weapon);
|
dmg = 20+GenericFunctions.getAbilityValue(ArtifactAbility.EARTHWAVE, weapon, p);
|
||||||
int falldist = 0;
|
int falldist = 0;
|
||||||
Location checkloc = p.getLocation().clone();
|
Location checkloc = p.getLocation().clone();
|
||||||
while (checkloc.add(0,-1,0).getBlock().getType()==Material.AIR) {
|
while (checkloc.add(0,-1,0).getBlock().getType()==Material.AIR) {
|
||||||
@ -5112,7 +5259,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(player); //Make sure it's off cooldown.
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(player); //Make sure it's off cooldown.
|
||||||
if (pd.last_deathmark+GenericFunctions.GetModifiedCooldown(TwosideKeeper.DEATHMARK_COOLDOWN,player)<getServerTickTime()) {
|
if (pd.last_deathmark+GenericFunctions.GetModifiedCooldown(TwosideKeeper.DEATHMARK_COOLDOWN,player)<getServerTickTime()) {
|
||||||
if (ArtifactAbility.getEnchantmentLevel(ArtifactAbility.DEATHMARK, player.getEquipment().getItemInMainHand())>0) {
|
if (ArtifactAbility.getEnchantmentLevel(ArtifactAbility.DEATHMARK, player.getEquipment().getItemInMainHand())>0) {
|
||||||
double dmg = GenericFunctions.getAbilityValue(ArtifactAbility.DEATHMARK, player.getEquipment().getItemInMainHand());
|
double dmg = GenericFunctions.getAbilityValue(ArtifactAbility.DEATHMARK, player.getEquipment().getItemInMainHand(), player);
|
||||||
//Look for nearby mobs up to 10 blocks away.
|
//Look for nearby mobs up to 10 blocks away.
|
||||||
List<Entity> nearby = player.getNearbyEntities(10, 10, 10);
|
List<Entity> nearby = player.getNearbyEntities(10, 10, 10);
|
||||||
boolean reset=false;
|
boolean reset=false;
|
||||||
@ -5178,6 +5325,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
public void onBlockPlace(BlockPlaceEvent ev) {
|
public void onBlockPlace(BlockPlaceEvent ev) {
|
||||||
|
|
||||||
TwosideSpleefGames.PassEvent(ev);
|
TwosideSpleefGames.PassEvent(ev);
|
||||||
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(ev.getPlayer());
|
||||||
|
if (pd.inTankChallengeRoom) {
|
||||||
|
ev.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (CustomItem.isDailyToken(ev.getItemInHand())) {
|
if (CustomItem.isDailyToken(ev.getItemInHand())) {
|
||||||
ev.setCancelled(true);
|
ev.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
@ -8235,11 +8387,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
for (int i=0;i<p.getEquipment().getArmorContents().length;i++) {
|
for (int i=0;i<p.getEquipment().getArmorContents().length;i++) {
|
||||||
ItemStack equip = p.getEquipment().getArmorContents()[i];
|
ItemStack equip = p.getEquipment().getArmorContents()[i];
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, equip)) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, equip)) {
|
||||||
dropmult+=GenericFunctions.getAbilityValue(ArtifactAbility.GREED, equip)/100d;
|
dropmult+=GenericFunctions.getAbilityValue(ArtifactAbility.GREED, equip,p)/100d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())) {
|
||||||
dropmult+=GenericFunctions.getAbilityValue(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())/100d;
|
dropmult+=GenericFunctions.getAbilityValue(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand(),p)/100d;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//TwosideKeeper.log("killedByPlayer flag set to false.", 0);
|
//TwosideKeeper.log("killedByPlayer flag set to false.", 0);
|
||||||
@ -9060,36 +9212,41 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
/**
|
/**
|
||||||
* EXPERIMENTAL BLOCK ANTI-LAG CODE.
|
* EXPERIMENTAL BLOCK ANTI-LAG CODE.
|
||||||
*/
|
*/
|
||||||
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
if (!ev.getPlayer().isSneaking()) {
|
||||||
Block baseblock = ev.getPlayer().getLocation().getBlock().getRelative(0, 1, 0);
|
Material checktype = ev.getBlock().getType();
|
||||||
Block targetblock = ev.getBlock();
|
if (GenericFunctions.isNaturalBlock(ev.getBlock())) {
|
||||||
Vector diffs = new Vector(targetblock.getLocation().getBlockX()-baseblock.getLocation().getBlockX(),
|
Bukkit.getScheduler().runTaskLater(TwosideKeeper.plugin, ()->{
|
||||||
targetblock.getLocation().getBlockY()-baseblock.getLocation().getBlockY(),
|
Block baseblock = ev.getPlayer().getLocation().getBlock().getRelative(0, 1, 0);
|
||||||
targetblock.getLocation().getBlockZ()-baseblock.getLocation().getBlockZ());
|
Block targetblock = ev.getBlock();
|
||||||
//TwosideKeeper.log("Vector is "+diffs, 1);
|
Vector diffs = new Vector(targetblock.getLocation().getBlockX()-baseblock.getLocation().getBlockX(),
|
||||||
diffs = diffs.multiply(1d/largestVector(diffs));
|
targetblock.getLocation().getBlockY()-baseblock.getLocation().getBlockY(),
|
||||||
Location pointerloc = p.getLocation().add(new Vector(0,p.getEyeHeight()+0.01,0));
|
targetblock.getLocation().getBlockZ()-baseblock.getLocation().getBlockZ());
|
||||||
//TwosideKeeper.log("Vector is "+diffs, 1);
|
//TwosideKeeper.log("Vector is "+diffs, 1);
|
||||||
int iterations = 0;
|
diffs = diffs.multiply(1d/largestVector(diffs));
|
||||||
int distance = (int)baseblock.getLocation().distance(targetblock.getLocation())+1;
|
Location pointerloc = p.getLocation().add(new Vector(0,p.getEyeHeight()+0.01,0));
|
||||||
while (iterations<distance && (pointerloc.getBlockX()!=targetblock.getLocation().getBlockX() ||
|
//TwosideKeeper.log("Vector is "+diffs, 1);
|
||||||
pointerloc.getBlockY()!=targetblock.getLocation().getBlockY() ||
|
int iterations = 0;
|
||||||
pointerloc.getBlockZ()!=targetblock.getLocation().getBlockZ())) {
|
int distance = (int)baseblock.getLocation().distance(targetblock.getLocation())+1;
|
||||||
//TwosideKeeper.log("Deleting pointer block: "+pointerloc, 1);
|
while (iterations<distance && (pointerloc.getBlockX()!=targetblock.getLocation().getBlockX() ||
|
||||||
if (pointerloc.getBlock().getType()!=Material.AIR &&
|
pointerloc.getBlockY()!=targetblock.getLocation().getBlockY() ||
|
||||||
!pointerloc.getBlock().isLiquid() &&
|
pointerloc.getBlockZ()!=targetblock.getLocation().getBlockZ())) {
|
||||||
pointerloc.getBlock().getType().isSolid()
|
//TwosideKeeper.log("Deleting pointer block: "+pointerloc, 1);
|
||||||
/*targetblock.getType()==pointerloc.getBlock().getType()*/) {
|
if (pointerloc.getBlock().getType()!=Material.AIR &&
|
||||||
TwosideKeeper.log("WARNING! Block "+pointerloc.getBlock()+" did not break properly! Breaking manually...", 1);
|
!pointerloc.getBlock().isLiquid() &&
|
||||||
pointerloc.getBlock().breakNaturally();
|
pointerloc.getBlock().getType().isSolid() &&
|
||||||
}
|
checktype==pointerloc.getBlock().getType()) {
|
||||||
pointerloc.add(diffs);
|
TwosideKeeper.log("WARNING! Block "+pointerloc.getBlock()+" did not break properly! Breaking manually...", 1);
|
||||||
iterations++;
|
pointerloc.getBlock().breakNaturally();
|
||||||
}
|
}
|
||||||
if (iterations==50) {
|
pointerloc.add(diffs);
|
||||||
TwosideKeeper.log("WARNING! Reached 50 iterations and cancelled.", 1);
|
iterations++;
|
||||||
}
|
}
|
||||||
}, 1);
|
if (iterations==50) {
|
||||||
|
TwosideKeeper.log("WARNING! Reached 50 iterations and cancelled.", 1);
|
||||||
|
}
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ev.getBlock().getType()==Material.CHEST ||
|
if (ev.getBlock().getType()==Material.CHEST ||
|
||||||
ev.getBlock().getType()==Material.TRAPPED_CHEST) {
|
ev.getBlock().getType()==Material.TRAPPED_CHEST) {
|
||||||
@ -11194,6 +11351,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
if (EquipmentUpdated(p) || force) {
|
if (EquipmentUpdated(p) || force) {
|
||||||
TwosideKeeper.log("Equipment updated. Checking health...", 5);
|
TwosideKeeper.log("Equipment updated. Checking health...", 5);
|
||||||
double hp=10; //Get the base max health.
|
double hp=10; //Get the base max health.
|
||||||
|
double bonushp=0; //Bonus Health.
|
||||||
//Get all equips.
|
//Get all equips.
|
||||||
ItemStack[] equipment = {p.getInventory().getHelmet(),p.getInventory().getChestplate(),p.getInventory().getLeggings(),p.getInventory().getBoots()};
|
ItemStack[] equipment = {p.getInventory().getHelmet(),p.getInventory().getChestplate(),p.getInventory().getLeggings(),p.getInventory().getBoots()};
|
||||||
double maxdeduction=1;
|
double maxdeduction=1;
|
||||||
@ -11225,16 +11383,16 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Is Block Form Check", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Is Block Form Check", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
if (equip.getType().toString().contains("LEATHER")) {
|
if (equip.getType().toString().contains("LEATHER")) {
|
||||||
//This is a leather piece.
|
//This is a leather piece.
|
||||||
hp+=ARMOR_LEATHER_HP;
|
bonushp+=ARMOR_LEATHER_HP;
|
||||||
} else if (equip.getType().toString().contains("IRON")) {
|
} else if (equip.getType().toString().contains("IRON")) {
|
||||||
//This is an iron piece.
|
//This is an iron piece.
|
||||||
hp+=(is_block_form)?ARMOR_IRON2_HP:ARMOR_IRON_HP;
|
bonushp+=(is_block_form)?ARMOR_IRON2_HP:ARMOR_IRON_HP;
|
||||||
} else if (equip.getType().toString().contains("GOLD")) {
|
} else if (equip.getType().toString().contains("GOLD")) {
|
||||||
//This is a gold piece.
|
//This is a gold piece.
|
||||||
hp+=(is_block_form)?ARMOR_GOLD2_HP:ARMOR_GOLD_HP;
|
bonushp+=(is_block_form)?ARMOR_GOLD2_HP:ARMOR_GOLD_HP;
|
||||||
} else if (equip.getType().toString().contains("DIAMOND")) {
|
} else if (equip.getType().toString().contains("DIAMOND")) {
|
||||||
//This is a diamond piece.
|
//This is a diamond piece.
|
||||||
hp+=(is_block_form)?ARMOR_DIAMOND2_HP:ARMOR_DIAMOND_HP;
|
bonushp+=(is_block_form)?ARMOR_DIAMOND2_HP:ARMOR_DIAMOND_HP;
|
||||||
}
|
}
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Increase Health for Block Armor", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Increase Health for Block Armor", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
}
|
}
|
||||||
@ -11242,11 +11400,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
//log("Add in "+GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH, equip),5);
|
//log("Add in "+GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH, equip),5);
|
||||||
if (PlayerMode.getPlayerMode(p)==PlayerMode.RANGER) {
|
if (PlayerMode.getPlayerMode(p)==PlayerMode.RANGER) {
|
||||||
long time = System.nanoTime();
|
long time = System.nanoTime();
|
||||||
hp += (double)GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH, equip)/2;
|
hp += (double)GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH, equip,p)/2;
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Increase Health for Ranger Armor", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Increase Health for Ranger Armor", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
} else {
|
} else {
|
||||||
long time = System.nanoTime();
|
long time = System.nanoTime();
|
||||||
hp += (double)GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH, equip);
|
hp += (double)GenericFunctions.getAbilityValue(ArtifactAbility.HEALTH, equip,p);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Increase Health for Normal Armor", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Increase Health for Normal Armor", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11262,7 +11420,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
long time = System.nanoTime();
|
long time = System.nanoTime();
|
||||||
//Check the hotbar for set equips.
|
//Check the hotbar for set equips.
|
||||||
hp+=ItemSet.GetTotalBaseAmount(p, ItemSet.GLADOMAIN);
|
bonushp+=ItemSet.GetTotalBaseAmount(p, ItemSet.GLADOMAIN);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Gladomain Set Increase", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Gladomain Set Increase", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
log("Health is now "+hp,5);
|
log("Health is now "+hp,5);
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())) {
|
||||||
@ -11272,20 +11430,20 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
log("maxdeduction is "+maxdeduction,5);
|
log("maxdeduction is "+maxdeduction,5);
|
||||||
|
|
||||||
if (PlayerMode.isDefender(p)) {
|
if (PlayerMode.isDefender(p)) {
|
||||||
hp+=10;
|
bonushp+=10;
|
||||||
}
|
}
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Defender HP and Regeneration", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Defender HP and Regeneration", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
if (PlayerMode.isBarbarian(p)) {
|
if (PlayerMode.isBarbarian(p)) {
|
||||||
double red = 1-CustomDamage.CalculateDamageReduction(1,p,null);
|
double red = 1-CustomDamage.CalculateDamageReduction(1,p,null);
|
||||||
hp+=(red*2)*100;
|
bonushp+=(red*2)*100;
|
||||||
}
|
}
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Barbarian HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Barbarian HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
|
|
||||||
|
|
||||||
hp+=ItemSet.GetTotalBaseAmount(p, ItemSet.DAWNTRACKER);
|
bonushp+=ItemSet.GetTotalBaseAmount(p, ItemSet.DAWNTRACKER);
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER, 4, 4);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER, 4, 4);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Dawntracker HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Dawntracker HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SONGSTEEL, 2, 2);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SONGSTEEL, 2, 2);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Songsteel HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Songsteel HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -11297,35 +11455,35 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.ALIKAHN, 2, 2)+ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.ALIKAHN, 3, 3);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.ALIKAHN, 2, 2)+ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.ALIKAHN, 3, 3);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Alikahn HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Alikahn HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.COMET, 2, 2);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.COMET, 2, 2);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Comet HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Comet HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.CUPID, 2, 2);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.CUPID, 2, 2);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Cupid HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Cupid HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DONNER, 2, 2);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DONNER, 2, 2);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Donner HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Donner HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.RUDOLPH, 2, 2);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.RUDOLPH, 2, 2);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Rudolph HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Rudolph HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.OLIVE, 2, 2);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.OLIVE, 2, 2);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Olive HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Olive HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DASHER, 3, 3);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DASHER, 3, 3);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Dasher HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Dasher HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DANCER, 3, 3);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DANCER, 3, 3);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Dancer HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Dancer HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.PRANCER, 3, 3);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.PRANCER, 3, 3);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Prancer HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Prancer HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.VIXEN, 3, 3);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.VIXEN, 3, 3);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Vixen HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Vixen HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.BLITZEN, 3, 3);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.BLITZEN, 3, 3);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Blitzen HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Blitzen HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
/*hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.ALIKAHN, 4, 4)+
|
/*bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.ALIKAHN, 4, 4)+
|
||||||
ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DARNYS, 4, 4)+
|
ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DARNYS, 4, 4)+
|
||||||
ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.LORASAADI, 4, 4)+
|
ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.LORASAADI, 4, 4)+
|
||||||
ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.JAMDAK, 4, 4);*/
|
ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.JAMDAK, 4, 4);*/
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SHARD, 4, 4);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SHARD, 4, 4);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Shard HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Shard HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
hp+=ItemSet.GetTotalBaseAmount(p, ItemSet.SUSTENANCE);
|
bonushp+=ItemSet.GetTotalBaseAmount(p, ItemSet.SUSTENANCE);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Sustenance HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Sustenance HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER,6) ||
|
if (ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER,6) ||
|
||||||
ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.LEGION,6) ||
|
ItemSet.HasSetBonusBasedOnSetBonusCount(p, ItemSet.LEGION,6) ||
|
||||||
@ -11354,9 +11512,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (Player pl : PartyManager.getPartyMembers(p)) {
|
for (Player pl : PartyManager.getPartyMembers(p)) {
|
||||||
if (!pl.equals(p)) {
|
if (pl!=null && p!=null && !pl.equals(p)) {
|
||||||
//TwosideKeeper.log("Found a Defender: "+pl.getName(), 0);
|
//TwosideKeeper.log("Found a Defender: "+pl.getName(), 0);
|
||||||
hp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(pl, ItemSet.PROTECTOR, 3, 3)*ItemSet.GetPlayerModeSpecificMult(p);
|
bonushp+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(pl, ItemSet.PROTECTOR, 3, 3)*ItemSet.GetPlayerModeSpecificMult(p);
|
||||||
//TwosideKeeper.log("Increased health by: "+(ItemSet.TotalBaseAmountBasedOnSetBonusCount(pl, ItemSet.PROTECTOR, 3, 3)*ItemSet.GetPlayerModeSpecificMult(p))+" HP.", 0);
|
//TwosideKeeper.log("Increased health by: "+(ItemSet.TotalBaseAmountBasedOnSetBonusCount(pl, ItemSet.PROTECTOR, 3, 3)*ItemSet.GetPlayerModeSpecificMult(p))+" HP.", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -11364,10 +11522,16 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
if (PlayerMode.getPlayerMode(p)==PlayerMode.NORMAL) {
|
if (PlayerMode.getPlayerMode(p)==PlayerMode.NORMAL) {
|
||||||
TwosideKeeper.log("Player Mode is Normal.", 5);
|
TwosideKeeper.log("Player Mode is Normal.", 5);
|
||||||
hp+=10;
|
bonushp+=10;
|
||||||
}
|
}
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Adventurer Mode HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Adventurer Mode HP Calculation", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
|
|
||||||
|
hp+=bonushp*(PVP.isPvPing(p)?PlayerMode.isRanger(p)?0.25:0.5:1);
|
||||||
|
|
||||||
|
if (PlayerMode.isSlayer(p) && PVP.isPvPing(p)) {
|
||||||
|
hp/=2;
|
||||||
|
}
|
||||||
|
|
||||||
if (Buff.hasBuff(p, "DARKSUBMISSION")) {
|
if (Buff.hasBuff(p, "DARKSUBMISSION")) {
|
||||||
Buff b = Buff.getBuff(p, "DARKSUBMISSION");
|
Buff b = Buff.getBuff(p, "DARKSUBMISSION");
|
||||||
if (b.getAmplifier()>=50) {
|
if (b.getAmplifier()>=50) {
|
||||||
@ -11378,9 +11542,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
hp*=maxdeduction;
|
hp*=maxdeduction;
|
||||||
|
|
||||||
p.resetMaxHealth();
|
p.resetMaxHealth();
|
||||||
if (p.getHealth()>=hp) {
|
if (p.getHealth()>=hp) {
|
||||||
p.setHealth(hp);
|
p.setHealth(hp);
|
||||||
}
|
}
|
||||||
p.setMaxHealth(hp);
|
p.setMaxHealth(hp);
|
||||||
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Reset Health", (int)(System.nanoTime()-time));time = System.nanoTime();
|
TwosideKeeper.HeartbeatLogger.AddEntry("----====]> Reset Health", (int)(System.nanoTime()-time));time = System.nanoTime();
|
||||||
if (!p.isDead()) {
|
if (!p.isDead()) {
|
||||||
@ -11624,6 +11788,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
public void showPlayerStats(Player p, CommandSender receiver, String additional) {
|
public void showPlayerStats(Player p, CommandSender receiver, String additional) {
|
||||||
PlayerStructure pd = (PlayerStructure)playerdata.get(p.getUniqueId());
|
PlayerStructure pd = (PlayerStructure)playerdata.get(p.getUniqueId());
|
||||||
|
if (additional.equalsIgnoreCase("pvp")) {
|
||||||
|
pd.temporaryPVP=true;
|
||||||
|
}
|
||||||
double store1=CustomDamage.CalculateDamageReduction(1,p,null);
|
double store1=CustomDamage.CalculateDamageReduction(1,p,null);
|
||||||
double store2=CustomDamage.getBaseWeaponDamage((additional.equalsIgnoreCase("offhand"))?p.getEquipment().getItemInOffHand():p.getEquipment().getItemInMainHand(), p, null);
|
double store2=CustomDamage.getBaseWeaponDamage((additional.equalsIgnoreCase("offhand"))?p.getEquipment().getItemInOffHand():p.getEquipment().getItemInMainHand(), p, null);
|
||||||
pd.damagedealt=store2;
|
pd.damagedealt=store2;
|
||||||
@ -11714,6 +11881,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
} else {
|
} else {
|
||||||
receiver.sendMessage("----------");
|
receiver.sendMessage("----------");
|
||||||
}
|
}
|
||||||
|
pd.temporaryPVP=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TextComponent DisplayPerks(ItemStack item,String type,Player p, int slot, boolean all) {
|
public static TextComponent DisplayPerks(ItemStack item,String type,Player p, int slot, boolean all) {
|
||||||
@ -11741,7 +11909,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
ArtifactAbility ab = (ArtifactAbility)enchants.keySet().toArray()[i];
|
ArtifactAbility ab = (ArtifactAbility)enchants.keySet().toArray()[i];
|
||||||
//p.sendMessage(ChatColor.BLUE+ab.GetName()+" "+(int)enchants.values().toArray()[i]);
|
//p.sendMessage(ChatColor.BLUE+ab.GetName()+" "+(int)enchants.values().toArray()[i]);
|
||||||
TextComponent tc1 = new TextComponent(ChatColor.GREEN+"["+ab.GetName()+" "+(int)enchants.values().toArray()[i]+"] ");
|
TextComponent tc1 = new TextComponent(ChatColor.GREEN+"["+ab.GetName()+" "+(int)enchants.values().toArray()[i]+"] ");
|
||||||
tc1.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,new ComponentBuilder(WordUtils.wrap(ArtifactAbility.displayDescription(ab, ArtifactUtils.getArtifactTier(item), (int)enchants.values().toArray()[i], CustomDamage.getBaseWeaponDamage(item, p, null)),ArtifactAbility.LINE_SIZE,"\n",true)).create()));
|
tc1.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,new ComponentBuilder(WordUtils.wrap(ArtifactAbility.displayDescription(ab, ArtifactUtils.getArtifactTier(item), (int)enchants.values().toArray()[i], CustomDamage.getBaseWeaponDamage(item, p, null),PVP.isPvPing(p)),ArtifactAbility.LINE_SIZE,"\n",true)).create()));
|
||||||
j++;
|
j++;
|
||||||
if (j>=4 && i!=enchants.size()-1) {
|
if (j>=4 && i!=enchants.size()-1) {
|
||||||
tc1.addExtra("\n");
|
tc1.addExtra("\n");
|
||||||
@ -11797,7 +11965,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
public static String drawVelocityBar(double vel,double additionaldmg) {
|
public static String drawVelocityBar(double vel,double additionaldmg) {
|
||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
StringBuilder finalstring = new StringBuilder(ChatColor.BLUE+"Velocity - |||||||||||||||||||| "+(((vel*93.182445)>4.317)?ChatColor.BLUE:ChatColor.RED)+df.format(vel*93.182445)+"m/sec "+ChatColor.YELLOW+"(+"+df.format(additionaldmg*(vel*93.182445))+" dmg)");
|
StringBuilder finalstring = new StringBuilder(ChatColor.BLUE+"Velocity - |||||||||||||||||||| "+(((vel*93.182445)>4.317)?ChatColor.BLUE:ChatColor.RED)+df.format(vel*93.182445)+"m/sec "+ChatColor.YELLOW+"(+"+df.format(Math.min(additionaldmg*(vel*93.182445),10))+" dmg)");
|
||||||
finalstring.insert(((vel*93.182445)<20)?(int)((vel*93.182445)+12):31, ChatColor.GRAY+"");
|
finalstring.insert(((vel*93.182445)<20)?(int)((vel*93.182445)+12):31, ChatColor.GRAY+"");
|
||||||
return finalstring.toString();
|
return finalstring.toString();
|
||||||
}
|
}
|
||||||
|
@ -208,6 +208,9 @@ public final class TwosideKeeperAPI {
|
|||||||
public static double getArtifactAbilityValue(ArtifactAbility ability, ItemStack item) {
|
public static double getArtifactAbilityValue(ArtifactAbility ability, ItemStack item) {
|
||||||
return GenericFunctions.getAbilityValue(ability, item);
|
return GenericFunctions.getAbilityValue(ability, item);
|
||||||
}
|
}
|
||||||
|
public static double getArtifactAbilityValue(ArtifactAbility ability, ItemStack item, Player p) {
|
||||||
|
return GenericFunctions.getAbilityValue(ability, item, p);
|
||||||
|
}
|
||||||
public static ItemStack removeAllArtifactAbilityPoints(ItemStack item) {
|
public static ItemStack removeAllArtifactAbilityPoints(ItemStack item) {
|
||||||
return ArtifactAbility.removeAllEnchantments(item);
|
return ArtifactAbility.removeAllEnchantments(item);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ public class aPluginAPIWrapper {
|
|||||||
|
|
||||||
public static boolean playerIsActive(Player p) {
|
public static boolean playerIsActive(Player p) {
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
if (pd.lastLocationChange+(20*pd.afkLength)<TwosideKeeper.getServerTickTime() || pd.tooConsistentAdjustments) {
|
if (pd.lastActiveActivity+20<TwosideKeeper.getServerTickTime() && (pd.lastLocationChange+(20*pd.afkLength)<TwosideKeeper.getServerTickTime() || pd.tooConsistentAdjustments)) {
|
||||||
if (!pd.isAFKState) {
|
if (!pd.isAFKState) {
|
||||||
pd.isAFKState=true;
|
pd.isAFKState=true;
|
||||||
TwosideKeeper.log(">>Player "+p.getName()+" has been detected as AFK.", 2);
|
TwosideKeeper.log(">>Player "+p.getName()+" has been detected as AFK.", 2);
|
||||||
|
@ -405,7 +405,8 @@ final public class runServerHeartbeat implements Runnable {
|
|||||||
pd.lastLocationChange = TwosideKeeper.getServerTickTime();
|
pd.lastLocationChange = TwosideKeeper.getServerTickTime();
|
||||||
pd.adjustmentReading++;
|
pd.adjustmentReading++;
|
||||||
pd.unafkLength = Math.min(pd.unafkLength+1, 60);
|
pd.unafkLength = Math.min(pd.unafkLength+1, 60);
|
||||||
if (pd.unafkLength==60) {
|
if (pd.unafkLength>=30) {
|
||||||
|
pd.unafkLength = Math.min(pd.unafkLength+1, 60);
|
||||||
pd.afkLength = Math.min(pd.afkLength+1, 60);
|
pd.afkLength = Math.min(pd.afkLength+1, 60);
|
||||||
//TwosideKeeper.log("AFK Length: "+pd.afkLength, 2);
|
//TwosideKeeper.log("AFK Length: "+pd.afkLength, 2);
|
||||||
}
|
}
|
||||||
@ -863,7 +864,7 @@ final public class runServerHeartbeat implements Runnable {
|
|||||||
private void ManageHighwinder(Player p, PlayerStructure pd) {
|
private void ManageHighwinder(Player p, PlayerStructure pd) {
|
||||||
pd.highwinder=ArtifactAbility.containsEnchantment(ArtifactAbility.HIGHWINDER, p.getEquipment().getItemInMainHand());
|
pd.highwinder=ArtifactAbility.containsEnchantment(ArtifactAbility.HIGHWINDER, p.getEquipment().getItemInMainHand());
|
||||||
if (pd.highwinder) {
|
if (pd.highwinder) {
|
||||||
pd.highwinderdmg=GenericFunctions.getAbilityValue(ArtifactAbility.HIGHWINDER, p.getEquipment().getItemInMainHand());
|
pd.highwinderdmg=GenericFunctions.getAbilityValue(ArtifactAbility.HIGHWINDER, p.getEquipment().getItemInMainHand(), p);
|
||||||
}
|
}
|
||||||
if (93.182445*pd.velocity>4.317) {
|
if (93.182445*pd.velocity>4.317) {
|
||||||
pd.velocity/=2;
|
pd.velocity/=2;
|
||||||
@ -1135,11 +1136,13 @@ final public class runServerHeartbeat implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void runVacuumCubeSuckup(Player p, List<UUID> ignoredItems) {
|
public static void runVacuumCubeSuckup(Player p, List<UUID> ignoredItems) {
|
||||||
|
long time1 = System.nanoTime();
|
||||||
if (InventoryUtils.isCarryingVacuumCube(p)) {
|
if (InventoryUtils.isCarryingVacuumCube(p)) {
|
||||||
//Suck up nearby item entities.
|
//Suck up nearby item entities.
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
List<Entity> ents = p.getNearbyEntities(6, 6, 6);
|
List<Entity> ents = p.getNearbyEntities(6, 6, 6);
|
||||||
int count=0;
|
int count=0;
|
||||||
|
List<Item> itemsToInsert = new ArrayList<Item>();
|
||||||
for (Entity ent : ents) {
|
for (Entity ent : ents) {
|
||||||
if (ent instanceof Item && GenericFunctions.itemCanBeSuckedUp((Item)ent,p)) {
|
if (ent instanceof Item && GenericFunctions.itemCanBeSuckedUp((Item)ent,p)) {
|
||||||
//Pull towards the player.
|
//Pull towards the player.
|
||||||
@ -1168,38 +1171,15 @@ final public class runServerHeartbeat implements Runnable {
|
|||||||
if (deltaz<-0.25) {
|
if (deltaz<-0.25) {
|
||||||
zvel=SPD*(Math.min(10, Math.abs(deltaz)));
|
zvel=SPD*(Math.min(10, Math.abs(deltaz)));
|
||||||
}
|
}
|
||||||
|
long collectiontime = System.nanoTime();
|
||||||
|
time1 = System.nanoTime();
|
||||||
if (Math.abs(deltax)<=1 &&
|
if (Math.abs(deltax)<=1 &&
|
||||||
Math.abs(deltay)<=1 &&
|
Math.abs(deltay)<=1 &&
|
||||||
Math.abs(deltaz)<=1 &&
|
Math.abs(deltaz)<=1 &&
|
||||||
InventoryUtils.hasFullInventory(p) &&
|
InventoryUtils.hasFullInventory(p) &&
|
||||||
((Item)ent).getPickupDelay()<=0) {
|
((Item)ent).getPickupDelay()<=0) {
|
||||||
//Collect this item.
|
|
||||||
if (((Item)ent).getItemStack().getType().isBlock()) {
|
if (((Item)ent).getItemStack().getType().isBlock()) {
|
||||||
events.PlayerManualPickupItemEvent ev = new events.PlayerManualPickupItemEvent(p, ((Item) ent).getItemStack());
|
itemsToInsert.add(((Item)ent));
|
||||||
Bukkit.getPluginManager().callEvent(ev);
|
|
||||||
if (!ev.isCancelled()) {
|
|
||||||
ItemStack[] remaining = InventoryUtils.insertItemsInVacuumCube(p, ((Item) ent).getItemStack());
|
|
||||||
if (remaining.length==0) {
|
|
||||||
SoundUtils.playGlobalSound(p.getLocation(), Sound.ENTITY_ITEM_PICKUP, 0.6f, SoundUtils.DetermineItemPitch(((Item) ent).getItemStack()));
|
|
||||||
TwosideKeeper.PlayPickupParticle(p,(Item)ent);
|
|
||||||
InventoryUpdateEvent.TriggerUpdateInventoryEvent(ev.getPlayer(),ev.getItemStack(),UpdateReason.PICKEDUPITEM);
|
|
||||||
ent.remove();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
InventoryUpdateEvent.TriggerUpdateInventoryEvent(ev.getPlayer(),ev.getItemStack(),UpdateReason.PICKEDUPITEM);
|
|
||||||
ent.remove();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
if (ent.isValid()) {
|
|
||||||
if (ignoredItems.contains(ent.getUniqueId())) {
|
|
||||||
pd.ignoreItemsList.add(ent.getUniqueId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (count>8) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ent.setVelocity(new Vector(xvel,yvel,zvel));
|
ent.setVelocity(new Vector(xvel,yvel,zvel));
|
||||||
@ -1221,7 +1201,48 @@ final public class runServerHeartbeat implements Runnable {
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (itemsToInsert.size()>0) {
|
||||||
|
List<Item> itemsToRemove = new ArrayList<Item>();
|
||||||
|
for (Item it : itemsToInsert) {
|
||||||
|
events.PlayerManualPickupItemEvent ev = new events.PlayerManualPickupItemEvent(p, it.getItemStack());
|
||||||
|
Bukkit.getPluginManager().callEvent(ev);
|
||||||
|
if (ev.isCancelled()) {
|
||||||
|
InventoryUpdateEvent.TriggerUpdateInventoryEvent(ev.getPlayer(),ev.getItemStack(),UpdateReason.PICKEDUPITEM);
|
||||||
|
it.remove();
|
||||||
|
itemsToRemove.add(it);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<ItemStack> itemstacks = new ArrayList<ItemStack>();
|
||||||
|
for (Item it : itemsToInsert) {
|
||||||
|
if (it.isValid()) {
|
||||||
|
itemstacks.add(it.getItemStack());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item[] item = itemsToInsert.toArray(new Item[itemsToInsert.size()]);
|
||||||
|
ItemStack[] items = itemstacks.toArray(new ItemStack[itemstacks.size()]);
|
||||||
|
ItemStack[] remaining = InventoryUtils.insertItemsInVacuumCube(p, items);
|
||||||
|
for (Item it : item) {
|
||||||
|
it.remove();
|
||||||
|
}
|
||||||
|
for (ItemStack itemstack : remaining) {
|
||||||
|
Item it = GenericFunctions.dropItem(itemstack, p.getLocation());
|
||||||
|
if (!ignoredItems.contains(it.getUniqueId())) {
|
||||||
|
pd.ignoreItemsList.add(it.getUniqueId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//TwosideKeeper.HeartbeatLogger.AddEntry("VAC -> Insert item into Vacuum Cube", (int)(System.nanoTime()-time1));time1=System.nanoTime();
|
||||||
|
if (remaining.length<items.length) {
|
||||||
|
SoundUtils.playGlobalSound(p.getLocation(), Sound.ENTITY_ITEM_PICKUP, 0.6f, 1.0f);
|
||||||
|
//TwosideKeeper.PlayPickupParticle(p,(Item)ent);
|
||||||
|
//TwosideKeeper.HeartbeatLogger.AddEntry("VAC -> Inventory Update Trigger", (int)(System.nanoTime()-time1));time1=System.nanoTime();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//Collect this item.
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
TwosideKeeper.HeartbeatLogger.AddEntry("VAC -> Entire Check", (int)(System.nanoTime()-time1));time1=System.nanoTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PopRandomLavaBlock(Player p) {
|
private void PopRandomLavaBlock(Player p) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user