Wither difficulty increased.

dev
sigonasr2 11 years ago
parent 0e81c98b05
commit 8cbffd75e1
  1. 12
      BankEconomyMod/src/me/kaZep/Base/Main.java
  2. 12
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java

@ -1554,10 +1554,10 @@ public void runTick() {
if (world_entities.get(i).getType()==EntityType.WITHER) {
Wither l = (Wither)world_entities.get(i);
if (l.getCustomName()!=null && l.getCustomName().equalsIgnoreCase(ChatColor.LIGHT_PURPLE+"Mythical Wither")) {
if (l.getMaxHealth()>l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth()))) {
if (l.getMaxHealth()>l.getHealth()+10+((l.getMaxHealth()/l.getHealth()))) {
DecimalFormat df = new DecimalFormat("#0.0");
//Bukkit.broadcastMessage("Healing for "+(+5+(0.2*(l.getMaxHealth()/l.getHealth())))+" health. "+df.format(l.getHealth())+"/"+l.getMaxHealth()+" HP");
l.setHealth(l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth())));
l.setHealth(l.getHealth()+10+((l.getMaxHealth()/l.getHealth())));
}
}
}
@ -1567,10 +1567,10 @@ public void runTick() {
if (world_entities.get(i).getType()==EntityType.WITHER) {
Wither l = (Wither)world_entities.get(i);
if (l.getCustomName()!=null && l.getCustomName().equalsIgnoreCase(ChatColor.LIGHT_PURPLE+"Mythical Wither")) {
if (l.getMaxHealth()>l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth()))) {
if (l.getMaxHealth()>l.getHealth()+10+((l.getMaxHealth()/l.getHealth()))) {
DecimalFormat df = new DecimalFormat("#0.0");
//Bukkit.broadcastMessage("Healing for "+(+5+(0.2*(l.getMaxHealth()/l.getHealth())))+" health. "+df.format(l.getHealth())+"/"+l.getMaxHealth()+" HP");
l.setHealth(l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth())));
l.setHealth(l.getHealth()+10+((l.getMaxHealth()/l.getHealth())));
}
}
}
@ -1580,10 +1580,10 @@ public void runTick() {
if (world_entities.get(i).getType()==EntityType.WITHER) {
Wither l = (Wither)world_entities.get(i);
if (l.getCustomName()!=null && l.getCustomName().equalsIgnoreCase(ChatColor.LIGHT_PURPLE+"Mythical Wither")) {
if (l.getMaxHealth()>l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth()))) {
if (l.getMaxHealth()>l.getHealth()+10+((l.getMaxHealth()/l.getHealth()))) {
DecimalFormat df = new DecimalFormat("#0.0");
//Bukkit.broadcastMessage("Healing for "+(+5+(0.2*(l.getMaxHealth()/l.getHealth())))+" health. "+df.format(l.getHealth())+"/"+l.getMaxHealth()+" HP");
l.setHealth(l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth())));
l.setHealth(l.getHealth()+10+((l.getMaxHealth()/l.getHealth())));
}
}
}

@ -9992,7 +9992,7 @@ implements Listener
if (l instanceof Player) {
e.setDamage(e.getDamage()*1.45d);
if (e.getDamager() instanceof Wither) {
e.setDamage(e.getDamage()*2d);
e.setDamage(e.getDamage()*3d);
if (Math.random()<=0.75) {
l.getWorld().spawnEntity(l.getLocation(), EntityType.CREEPER);
l.getWorld().spawnEntity(l.getLocation(), EntityType.ZOMBIE);
@ -10001,9 +10001,15 @@ implements Listener
}
if (e.getEntity() instanceof Wither) {
if (l.getCustomName()!=null && l.getCustomName().equalsIgnoreCase(ChatColor.LIGHT_PURPLE+"Mythical Wither")) {
e.setDamage(e.getDamage()*0.045d);
e.setDamage(e.getDamage()*0.015d);
if (Math.random()<=0.45) {
l.setHealth(l.getHealth()+10);
}
} else {
e.setDamage(e.getDamage()*0.065d);
e.setDamage(e.getDamage()*0.035d);
if (Math.random()<=0.35) {
l.setHealth(l.getHealth()+5);
}
}
try {
Iterator<PotionEffect> effects = l.getActivePotionEffects().iterator();

Loading…
Cancel
Save