->Modified Elite spawning algorithm slightly.

->Elites no longer blind you for so long. In fact, they blind you
briefly to indicate they have targeted you (when changing targets)
->Elite monster HP increased from 1200->4800.
->Elite loot has been significantly modified and balanced. Elites drop
their gear when killed. They also drop an elite loot chest for each
player, which contains many goodies. Finally, there is a small chance to
get some extra loot that may be useful later...
->The Songsteel piece bonus has been modified. It no longer provides
Health and instead provides % Block Chance. Block Chance has a chance to
completely nullify damage, but only while blocking. Just like Dodge
Chance.
->The Dawntracker piece bonus has been modified. It no longer provides
Lifesteal and instead provides Health. The Dawntracker set bonuses have
been modified as well. It now provides % debuff resistance, Damage, and
Lifesteal.
->Weakness no longer weakens abilities.
->Fix a bug with Greed always being knocked off of items.
->Malleable Base Drop rate has been reduced significantly.
This commit is contained in:
sigonasr2 2016-08-10 21:18:15 -05:00
parent 9e44705ad1
commit 8e2039658f
10 changed files with 142 additions and 101 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.8.1r1
version: 3.8.2
commands:
money:
description: Tells the player the amount of money they are holding.

View File

@ -69,22 +69,27 @@ public class AutoUpdatePlugin implements Runnable {
if ((plugins.get(i).hash==null || !md5.equalsIgnoreCase(plugins.get(i).hash))) {
//This plugin is different! Update the hash for it. Prepare for a restart of the server!
final int ii=i;
Bukkit.getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("TwosideKeeper"), new Runnable() {
@Override
public void run() {
if (!TwosideKeeper.restarting_server) {
if (Bukkit.getOnlinePlayers().size()!=0) {
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+". The server will restart in 3 minutes!");
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+". The server will restart in 3 minutes!\n\n"+ChatColor.GRAY+ChatColor.ITALIC+"If all players leave, the update will occur immediately.");
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(ii).name+". The server will restart in 3 minutes!");
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(ii).name+". The server will restart in 3 minutes!\n\n"+ChatColor.GRAY+ChatColor.ITALIC+"If all players leave, the update will occur immediately.");
} else {
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+".");
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+"."+ChatColor.GRAY+ChatColor.ITALIC+"If all players leave, the update will occur immediately.");
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(ii).name+".");
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(ii).name+"."+ChatColor.GRAY+ChatColor.ITALIC+"If all players leave, the update will occur immediately.");
}
restarting=true;
TwosideKeeper.restarting_server=true;
//Save the new plugin hash.
} else {
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+".");
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+"."+ChatColor.GRAY+ChatColor.ITALIC+"If all players leave, the update will occur immediately.");
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(ii).name+".");
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(ii).name+"."+ChatColor.GRAY+ChatColor.ITALIC+"If all players leave, the update will occur immediately.");
}
}},1);
TwosideKeeper.log("New hash: "+md5, 2);
plugins.get(i).hash = md5;
SaveHash(plugins.get(i));

View File

@ -25,6 +25,7 @@ import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.potion.PotionData;
import org.bukkit.potion.PotionEffect;
@ -33,6 +34,7 @@ import org.bukkit.potion.PotionType;
import org.bukkit.util.Vector;
import org.inventivetalent.glow.GlowAPI;
import sig.plugin.TwosideKeeper.HelperStructures.Loot;
import sig.plugin.TwosideKeeper.HelperStructures.MonsterDifficulty;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
@ -152,6 +154,7 @@ public class EliteMonster {
if (Math.random()<=0.2 && !p.isOnGround()) {
//p.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,20*5,-31));
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,20*5,-1));
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,10*1,7));
m.setTarget(p);
p.setFlying(false);
p.setVelocity(new Vector(0,-1,0));
@ -228,7 +231,7 @@ public class EliteMonster {
public void run() {
m.teleport(l.getLocation().add(Math.random(),Math.random(),Math.random()));
l.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,20*5,7));
l.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,20*5,7));
l.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,10*1,7));
chasing=false;
}
},20*2);
@ -255,6 +258,10 @@ public class EliteMonster {
m.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,Integer.MAX_VALUE,8),true);
m.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE,Integer.MAX_VALUE,8),true);
//m.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION,Integer.MAX_VALUE,2),true);
ItemStack helm = new ItemStack(Material.GOLD_HELMET);
m.getEquipment().setHelmet(helm);
m.getEquipment().setHelmet(Loot.GenerateMegaPiece(helm.getType(), true, true, 1));
m.getEquipment().setHelmetDropChance(1.0f);
if (!enraged) {
if (m.hasPotionEffect(PotionEffectType.INCREASE_DAMAGE)) {
m.removePotionEffect(PotionEffectType.INCREASE_DAMAGE);
@ -268,6 +275,10 @@ public class EliteMonster {
if (!targetlist.contains(damager) && (damager instanceof Player)) {
targetlist.add((Player)damager);
}
if (damager instanceof Player) {
Player p = (Player)damager;
p.addPotionEffect(new PotionEffect(PotionEffectType.WEAKNESS,20*2,9));
}
last_regen_time=TwosideKeeper.getServerTickTime();
double randomrate = 0d;
if (!chasing && NewCombat.getPercentHealthRemaining(m)<=50) {
@ -290,7 +301,7 @@ public class EliteMonster {
Player target = ChooseRandomTarget();
if (target!=null) {
if (last_storingenergy_health-m.getHealth()>0) {
storingenergy_hit=(last_storingenergy_health-m.getHealth())*90d;
storingenergy_hit=(last_storingenergy_health-m.getHealth())*1000d;
for (int i=0;i<targetlist.size();i++) {
targetlist.get(i).sendMessage(ChatColor.GOLD+"The "+m.getCustomName()+ChatColor.GOLD+"'s next hit is stronger!");
targetlist.get(i).sendMessage(ChatColor.DARK_RED+""+ChatColor.ITALIC+" \"DIE "+target.getName()+ChatColor.DARK_RED+"! DIEE!\"");
@ -414,14 +425,17 @@ public class EliteMonster {
b.getLocation().getWorld().playSound(b.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 0.7f, 1.2f);
}
storedblocks.clear();
GenericFunctions.DealDamageToNearbyPlayers(target_leap_loc, 160, radius, true, 2);
GenericFunctions.DealDamageToNearbyPlayers(target_leap_loc, 1000, radius, true, 2, m);
}
},(int)(((20*4)*(NewCombat.getPercentHealthRemaining(m)/100d))+10));
}
private Player ChooseRandomTarget() {
if (targetlist.size()>0) {
return targetlist.get((int)(Math.random() * targetlist.size()));
Player p = targetlist.get((int)(Math.random() * targetlist.size()));
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS,10*1,7));
m.setTarget(p);
return p;
} else {
return null;
}
@ -463,7 +477,7 @@ public class EliteMonster {
p.playSound(p.getLocation(), Sound.ENTITY_ZOMBIE_BREAK_DOOR_WOOD, 1.0f, 1.0f);
p.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION,20*4,0));
TwosideKeeper.log("Got hit for "+storingenergy_hit+" damage!", 2);
GenericFunctions.DealDamageToMob(NewCombat.CalculateDamageReduction(storingenergy_hit,p,m),p,m);
TwosideKeeperAPI.DealDamageToEntity(NewCombat.CalculateDamageReduction(storingenergy_hit,p,m),p,m);
storingenergy_hit=0;
}
}

View File

@ -22,6 +22,7 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.ExperienceOrb;
import org.bukkit.entity.Guardian;
import org.bukkit.entity.Item;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Player;
@ -62,6 +63,7 @@ import sig.plugin.TwosideKeeper.MonsterStructure;
import sig.plugin.TwosideKeeper.NewCombat;
import sig.plugin.TwosideKeeper.PlayerStructure;
import sig.plugin.TwosideKeeper.TwosideKeeper;
import sig.plugin.TwosideKeeper.TwosideKeeperAPI;
import sig.plugin.TwosideKeeper.HelperStructures.ArtifactAbility;
import sig.plugin.TwosideKeeper.HelperStructures.BowMode;
import sig.plugin.TwosideKeeper.HelperStructures.ItemSet;
@ -2643,15 +2645,20 @@ public class GenericFunctions {
NewCombat.addToPlayerLogger(damager,reason,dmg);
NewCombat.addToLoggerTotal(damager, dmg);
}
if (target!=null) {
(target).setLastDamage(0);
(target).setNoDamageTicks(0);
(target).setMaximumNoDamageTicks(0);
}
if (shooter!=null) {
if (!(shooter instanceof Monster) || !(target instanceof Monster)) {
TwosideKeeper.log(GenericFunctions.GetEntityDisplayName(shooter)+"->"+
GenericFunctions.GetEntityDisplayName(target)+ChatColor.WHITE+": Damage dealt was "+dmg,4);
GenericFunctions.GetEntityDisplayName(target)+ChatColor.WHITE+": Damage dealt was "+dmg,3);
}
} else {
if (!(target instanceof Monster)) {
TwosideKeeper.log(reason+"->"+
GenericFunctions.GetEntityDisplayName(target)+ChatColor.WHITE+": Damage dealt was "+dmg,4);
GenericFunctions.GetEntityDisplayName(target)+ChatColor.WHITE+": Damage dealt was "+dmg,3);
}
}
double oldhp=((LivingEntity)target).getHealth();
@ -2690,8 +2697,8 @@ public class GenericFunctions {
ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, item)) {
TwosideKeeper.log("Found one.",5);
int tier = item.getEnchantmentLevel(Enchantment.LUCK);
item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED);
if (Math.random()<=((16-tier)*0.1d)/100d) {p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item)));
if (Math.random()<=((16-tier)*0.1d)/100d) {
item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED);p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item)));
brokeone=true;
break;
}
@ -2703,8 +2710,9 @@ public class GenericFunctions {
if (isArtifactEquip(item) &&
ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, item)) {
int tier = item.getEnchantmentLevel(Enchantment.LUCK);
if (Math.random()<=((16-tier)*0.1d)/100d) {
item = ArtifactAbility.downgradeEnchantment(p, item, ArtifactAbility.GREED);
if (Math.random()<=((11-tier)*5)/100d) {p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item)));
p.sendMessage(ChatColor.DARK_AQUA+"A level of "+ChatColor.YELLOW+"Greed"+ChatColor.DARK_AQUA+" has been knocked off of your "+((item.hasItemMeta() && item.getItemMeta().hasDisplayName())?item.getItemMeta().getDisplayName():UserFriendlyMaterialName(item)));
brokeone=true;
}
}
@ -3338,11 +3346,11 @@ public class GenericFunctions {
}
}
public static void DealDamageToNearbyPlayers(Location l, double basedmg, int range) {
DealDamageToNearbyPlayers(l,basedmg,range,false,0);
public static void DealDamageToNearbyPlayers(Location l, double basedmg, int range, Entity damager) {
DealDamageToNearbyPlayers(l,basedmg,range,false,0,damager);
}
public static void DealDamageToNearbyPlayers(Location l, double basedmg, int range, boolean knockup, double knockupamt) {
public static void DealDamageToNearbyPlayers(Location l, double basedmg, int range, boolean knockup, double knockupamt, Entity damager) {
List<Entity> nearbyentities = new ArrayList<Entity>();
nearbyentities.addAll(l.getWorld().getNearbyEntities(l, range, range, range));
for (int i=0;i<nearbyentities.size();i++) {
@ -3360,7 +3368,8 @@ public class GenericFunctions {
dodgechance = NewCombat.CalculateDodgeChance(p);
if (Math.random()>dodgechance) {
TwosideKeeper.log("Dealt "+basedmg+" raw damage.", 5);
DealDamageToMob(NewCombat.CalculateDamageReduction(basedmg,p,null),(LivingEntity)nearbyentities.get(i),null,null,"Slam");
//DealDamageToMob(NewCombat.CalculateDamageReduction(basedmg,p,null),(LivingEntity)nearbyentities.get(i),null,null,"Slam");
TwosideKeeperAPI.DealDamageToEntity(NewCombat.CalculateDamageReduction(basedmg,p,null), (Player)nearbyentities.get(i), damager);
if (knockup) {
p.setVelocity(new Vector(0,knockupamt,0));
}
@ -3465,9 +3474,28 @@ public class GenericFunctions {
b.getType()==Material.LAVA ||
b.getType()==Material.NETHERRACK ||
b.getType()==Material.ENDER_STONE ||
b.getType()==Material.COBBLESTONE) {
b.getType()==Material.COBBLESTONE ||
b.getType()==Material.LOG ||
b.getType()==Material.LOG_2 ||
b.getType()==Material.LEAVES ||
b.getType()==Material.LEAVES_2 ||
b.getType()==Material.STATIONARY_LAVA ||
b.getType()==Material.STATIONARY_WATER) {
return true;
}
return false;
}
public static boolean giveItem(Player p, ItemStack... items) {
HashMap<Integer,ItemStack> remaining = p.getInventory().addItem(items);
if (remaining.isEmpty()) {
return true;
} else {
for (Integer i : remaining.keySet()) {
Item it = p.getWorld().dropItem(p.getLocation(), remaining.get(i));
it.setInvulnerable(true);
}
return false;
}
}
}

View File

@ -15,8 +15,8 @@ import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
public enum ItemSet {
PANROS(1,1, 3,2, 10,10, 20,10),
SONGSTEEL(4,4, 6,2, 8,4, 20,10),
DAWNTRACKER(3,2, 2,1, 6,4, 4,2),
SONGSTEEL(4,2, 6,2, 8,4, 20,10),
DAWNTRACKER(4,4, 6,4, 20,20, 20,20),
LORASYS(0,0, 0,0, 0,0, 0,0);
int baseval;
@ -194,12 +194,12 @@ public enum ItemSet {
case SONGSTEEL:{
lore.add(ChatColor.LIGHT_PURPLE+"Defender Gear");
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Songsteel Set");
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Health");
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Block Chance");
}break;
case DAWNTRACKER:{
lore.add(ChatColor.LIGHT_PURPLE+"Barbarian Gear");
lore.add(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+" Dawntracker Set");
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+"% Lifesteal");
lore.add(ChatColor.YELLOW+"+"+ItemSet.GetBaseAmount(set, tier, 1)+" Health");
}break;
case LORASYS:{
lore.add(ChatColor.LIGHT_PURPLE+"Slayer Gear");
@ -234,8 +234,8 @@ public enum ItemSet {
case DAWNTRACKER:{
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+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Lifesteal");
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Damage");
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Debuff Resistance");
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+"% Lifesteal");
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Powered Mock");
lore.add(ChatColor.GRAY+" Mock debuff duration increases from");
lore.add(ChatColor.GRAY+" 10->20 seconds, making it stackable.");

View File

@ -182,40 +182,23 @@ public enum MonsterDifficulty {
),
ELITE(
new LootStructure[]{ //Common Loot
new LootStructure(Material.EMERALD_BLOCK),
new LootStructure(Material.DIAMOND_BLOCK),
new LootStructure(Material.GOLD_BLOCK),
new LootStructure(Material.REDSTONE_BLOCK),
new LootStructure(Material.IRON_BLOCK),
new LootStructure(Material.LAPIS_BLOCK),
new LootStructure(Material.BOW, false),
new LootStructure(Material.FISHING_ROD, false),
new LootStructure(Material.DIAMOND_SWORD, false),
new LootStructure(Material.DIAMOND_AXE, false),
new LootStructure(Material.DIAMOND_PICKAXE, false),
new LootStructure(Material.DIAMOND_HOE, false),
new LootStructure(Material.DIAMOND_SPADE, false),
new LootStructure(Material.DIAMOND_CHESTPLATE, false),
new LootStructure(Material.DIAMOND_LEGGINGS, false),
new LootStructure(Material.DIAMOND_BOOTS, false),
new LootStructure(Material.DIAMOND_HELMET, false),
new LootStructure(Material.EMERALD),
new LootStructure(Material.DIAMOND),
new LootStructure(Material.GOLD_INGOT),
new LootStructure(Material.REDSTONE),
new LootStructure(Material.IRON_INGOT),
new LootStructure(Material.LEATHER_HELMET,3),
new LootStructure(Material.LEATHER_CHESTPLATE,3),
new LootStructure(Material.LEATHER_LEGGINGS,3),
new LootStructure(Material.LEATHER_BOOTS,3),
},
new LootStructure[]{ //Rare Loot
new LootStructure(Material.BOW, false),
new LootStructure(Material.FISHING_ROD, true),
new LootStructure(Material.GOLD_SWORD, true, 1),
new LootStructure(Material.GOLD_AXE, true, 1),
new LootStructure(Material.GOLD_PICKAXE, true, 1),
new LootStructure(Material.GOLD_HOE, true, 1),
new LootStructure(Material.GOLD_SPADE, true, 1),
new LootStructure(Material.GOLD_CHESTPLATE, true, 1),
new LootStructure(Material.GOLD_LEGGINGS, true, 1),
new LootStructure(Material.GOLD_BOOTS, true, 1),
new LootStructure(Material.GOLD_HELMET, true, 1),
new LootStructure(Material.EMERALD_BLOCK),
new LootStructure(Material.DIAMOND_BLOCK),
new LootStructure(Material.GOLD_BLOCK),
new LootStructure(Material.REDSTONE_BLOCK),
new LootStructure(Material.IRON_BLOCK),
new LootStructure(Material.LAPIS_BLOCK),
new LootStructure(Material.LEATHER_HELMET,4),
new LootStructure(Material.LEATHER_CHESTPLATE,4),
new LootStructure(Material.LEATHER_LEGGINGS,4),
@ -224,15 +207,6 @@ public enum MonsterDifficulty {
new LootStructure[]{ //Legendary Loot
new LootStructure(Material.PRISMARINE_SHARD),
new LootStructure(Material.POTION),
new LootStructure(Material.GOLD_SWORD, true, 2),
new LootStructure(Material.GOLD_AXE, true, 2),
new LootStructure(Material.GOLD_PICKAXE, true, 2),
new LootStructure(Material.GOLD_HOE, true, 2),
new LootStructure(Material.GOLD_SPADE, true, 2),
new LootStructure(Material.GOLD_CHESTPLATE, true, 2),
new LootStructure(Material.GOLD_LEGGINGS, true, 2),
new LootStructure(Material.GOLD_BOOTS, true, 2),
new LootStructure(Material.GOLD_HELMET, true, 2),
}
);

View File

@ -534,6 +534,7 @@ public class MonsterController {
m.getEquipment().setChestplateDropChance(1.0f);
m.getEquipment().setLeggingsDropChance(1.0f);
m.getEquipment().setHelmetDropChance(1.0f);
m.getEquipment().setItemInMainHandDropChance(1.0f);
}break;
default:{
if (Math.random()<0.1) {
@ -757,7 +758,7 @@ public class MonsterController {
SetupCustomName(ChatColor.DARK_PURPLE+"Elite",m);
//m.setCustomName(ChatColor.DARK_AQUA+"Dangerous Mob");
//m.setCustomNameVisible(true);
m.setMaxHealth(m.getHealth()*60.0);
m.setMaxHealth(4800);
m.setHealth(m.getMaxHealth());
GlowAPI.setGlowing(m, Color.DARK_PURPLE, Bukkit.getOnlinePlayers());
if (isAllowedToEquipItems(m)) {

View File

@ -120,8 +120,8 @@ public class NewCombat {
if (shooter!=null) {
totaldmg += calculateMobBaseDamage((LivingEntity)shooter, target);
//totaldmg += CalculateWeaponDamage(shooter, target);
bonusmult *= calculateMonsterDifficultyMultiplier(shooter);
totaldmg += CalculateWeaponDamage(shooter, target);
//bonusmult *= calculateMonsterDifficultyMultiplier(shooter);
} else {
totaldmg = 1.0;
}
@ -544,9 +544,6 @@ public class NewCombat {
dmg = ItemSet.TotalBaseAmountBasedOnSetBonusCount(p,ItemSet.DAWNTRACKER,2,2);
addToPlayerLogger(ent,"Set Bonus",dmg);
basedmg += dmg;
dmg = ItemSet.TotalBaseAmountBasedOnSetBonusCount(p,ItemSet.DAWNTRACKER,4,4);
addToPlayerLogger(ent,"Set Bonus",dmg);
basedmg += dmg;
}
if (GenericFunctions.isHardenedItem(weapon) && !GenericFunctions.isArtifactEquip(weapon)) {
@ -602,6 +599,11 @@ public class NewCombat {
setPlayerTarget(damager,target,headshot,preemptive);
if (shooter instanceof Monster) {
basedmg = 1.0 *calculateMonsterDifficultyMultiplier(shooter);
TwosideKeeper.log("New Base damage is "+basedmg, 2);
}
return basedmg * basemult;
}
@ -943,7 +945,7 @@ public class NewCombat {
double mult1 = 1.0+(GenericFunctions.getPotionEffectLevel(PotionEffectType.INCREASE_DAMAGE, damager)+1)*0.1;
addMultiplierToPlayerLogger(damager,"STRENGTH Mult",mult1);
mult *= mult1;
/*
int weaknesslv = Math.abs(GenericFunctions.getPotionEffectLevel(PotionEffectType.WEAKNESS, damager))+1;
if (weaknesslv<=10) {
mult1 = 1.0-(weaknesslv*0.1);
@ -952,7 +954,7 @@ public class NewCombat {
} else {
addMultiplierToPlayerLogger(damager,ChatColor.RED+"WEAKNESS Mult",0.0);
mult = 0.0;
}
}*/
return mult;
}
@ -1231,13 +1233,13 @@ public class NewCombat {
basedmg *= dmgreduce;
TwosideKeeper.log("Base damage became "+(dmgreduce*100)+"% of original amount.",5);
}
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getArmorContents()[i])) {
/*if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getArmorContents()[i])) {
dmgreduction /= ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getArmorContents()[i])?2:1;
}*/
}
}
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())) {
/*if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())) {
dmgreduction /= ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())?2:1;
}
}*/
setbonus = ((100-ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SONGSTEEL, 4, 4))/100d);
}
@ -1294,7 +1296,7 @@ public class NewCombat {
}
}
}
lifestealpct += ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER, 3, 3)/100d;
lifestealpct += ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER, 4, 4)/100d;
return lifestealpct;
}
@ -1564,6 +1566,9 @@ public class NewCombat {
}
dodgechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p,ItemSet.PANROS,3,3)/100d;
if (p.isBlocking()) {
dodgechance+=ItemSet.GetTotalBaseAmount(p, ItemSet.SONGSTEEL)/100d;
}
if (GenericFunctions.isStriker(p) &&
pd.velocity>0) {

View File

@ -610,6 +610,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
removechance+=resistamt;
}
}
removechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.DAWNTRACKER, 3, 3);
log("Remove chance is "+removechance,5);
int longestdur=0;
PotionEffectType type=null;
@ -4180,7 +4181,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
if (amt>500) {
testamt=500;
}
if (val<=((double)testamt/(double)65)*(0.00125)*ARTIFACT_RARITY) {
if (val<=((double)testamt/(double)65)*(4.1666666666666666666666666666667e-4)*ARTIFACT_RARITY) {
Item it = ev.getPlayer().getWorld().dropItemNaturally(ev.getPlayer().getLocation(), Artifact.createArtifactItem(ArtifactItem.MALLEABLE_BASE));
it.setPickupDelay(0);
it.setInvulnerable(true);
@ -4492,6 +4493,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
isBoss=GenericFunctions.isBossMonster(m);
isElite=GenericFunctions.isEliteMonster(m);
if (isElite) {
isBoss=true;
}
if (killedByPlayer && GenericFunctions.isCoreMonster(m) && Math.random()<RARE_DROP_RATE*dropmult*ARTIFACT_RARITY) {
switch ((int)(Math.random()*4)) {
case 0:{
@ -4554,12 +4559,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
Player pl = participants.get(i);
ExperienceOrb exp = GenericFunctions.spawnXP(pl.getLocation(), ev.getDroppedExp()*300);
exp.setInvulnerable(true);
/*List<ItemStack> generatedloot = MonsterController.getMonsterDifficulty((Monster)ev.getEntity()).RandomizeDrops(dropmult/participants.size(),false,false);
for (int j=0;j<generatedloot.size();j++) {
Item it = pl.getWorld().dropItemNaturally(pl.getLocation(),generatedloot.get(j));
it.setInvulnerable(true);
log("Dropping "+generatedloot.get(j).toString(),2);
}*/
GenericFunctions.giveItem(p,aPlugin.API.getEliteBox());
log("Dropping "+aPlugin.API.getEliteBox().toString(),2);
if (participants_list.length()<1) {
participants_list.append(pl.getName());
} else {
@ -4673,6 +4674,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
case ELITE:
totalexp=ev.getDroppedExp()*300;
final Monster mer2 = m;
for (int i=0;i<originaldroplist.size();i++) {
Item it = deathloc.getWorld().dropItemNaturally(mer2.getLocation(), originaldroplist.get(i));
it.setInvulnerable(true);
}
for (int i=0;i<drop.size();i++) {
Item it = deathloc.getWorld().dropItemNaturally(mer2.getLocation(), drop.get(i));
it.setInvulnerable(true);
@ -6345,7 +6350,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
for (int i=0;i<GenericFunctions.getEquipment(p).length;i++) {
ItemSet set = ItemSet.GetSet(GenericFunctions.getEquipment(p)[i]);
if (set!=null) {
if (set==ItemSet.SONGSTEEL) {
if (set==ItemSet.DAWNTRACKER) {
hp += set.GetBaseAmount(GenericFunctions.getEquipment(p)[i]);
}
}
@ -6368,6 +6373,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
hp*=maxdeduction;
p.resetMaxHealth();
if (p.getHealth()>=hp) {
p.setHealth(hp);
}
@ -6671,7 +6677,15 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
receiver.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Damage Reduction: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+df.format((1.0-store1)*100)+"%");
receiver.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Life Steal: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+df.format(NewCombat.calculateLifeStealAmount(p)*100)+"%");
receiver.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Critical Strike Chance: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+df.format((NewCombat.calculateCriticalStrikeChance(p.getEquipment().getItemInMainHand(), p))*100)+"%");
if (GenericFunctions.isDefender(p)) {
double dodgechance=0.0;
if (!p.isBlocking()) {
dodgechance+=ItemSet.GetTotalBaseAmount(p, ItemSet.SONGSTEEL)/100d;
}
receiver.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Block Chance: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+df.format((NewCombat.CalculateDodgeChance(p)+dodgechance)*100)+"%");
} else {
receiver.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Dodge Chance: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+df.format((NewCombat.CalculateDodgeChance(p))*100)+"%");
}
TextComponent f = new TextComponent(ChatColor.GRAY+""+ChatColor.ITALIC+"Current Mode: ");
f.addExtra(GenericFunctions.PlayerModeName(p));
if (receiver instanceof Player) {