diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 592eca4..dfcf968 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/EliteMonster.java b/src/sig/plugin/TwosideKeeper/EliteMonster.java index cef1064..bb8b1c3 100644 --- a/src/sig/plugin/TwosideKeeper/EliteMonster.java +++ b/src/sig/plugin/TwosideKeeper/EliteMonster.java @@ -45,6 +45,7 @@ public class EliteMonster { static int ENRAGE_COOLDOWN = 20*60; static int STORINGENERGY_COOLDOWN = 20*50; static int GLOW_TIME = 20*1; + static int WAIT_TIME = 20*10; Monster m; long last_rebuff_time=0; @@ -76,10 +77,10 @@ public class EliteMonster { public void runTick() { //This monster constantly gives itself its buffs as it may lose some (Debilitation mode). dontDrown(); + rebuff(); + regenerateHealth(); + moveFasterToTarget(); if (m.isValid() && targetlist.size()>0) { - rebuff(); - regenerateHealth(); - moveFasterToTarget(); weakenTeam(); retargetInAir(); destroyLiquids(2); @@ -203,6 +204,8 @@ public class EliteMonster { //Jump up to compensate. Move towards the player too. m.setVelocity((m.getLocation().getDirection()).add(new Vector(0,0.2*(l.getLocation().getY()-m.getLocation().getY()),0))); } + } else { + m.setTarget(null); } } @@ -380,10 +383,15 @@ public class EliteMonster { } private Location getNearbyFreeLocation(Location l) { + return getNearbyFreeLocation(l,3); + } + + private Location getNearbyFreeLocation(Location l, int range) { int tries = 0; - while (tries<10) { - Location testloc = l.add((Math.random()*3)-(Math.random()*6),Math.random()*5,Math.random()*3-(Math.random()*6)); + while (tries<50) { + Location testloc = l.add((Math.random()*(range*2))-(range),Math.random()*range,(Math.random()*(range*2))-(range)); Block testblock = testloc.getBlock(); + TwosideKeeper.log("Trying "+testloc, 2); if (testblock.getType()==Material.AIR && testblock.getRelative(0, 1, 0).getType()==Material.AIR) { return testloc; } @@ -423,4 +431,9 @@ public class EliteMonster { public List getTargetList() { return targetlist; } + + public void randomlyTeleport() { + Location l = getNearbyFreeLocation(m.getLocation(),24); + m.teleport(l); + } } diff --git a/src/sig/plugin/TwosideKeeper/MonsterController.java b/src/sig/plugin/TwosideKeeper/MonsterController.java index 0309fb5..c0c905c 100644 --- a/src/sig/plugin/TwosideKeeper/MonsterController.java +++ b/src/sig/plugin/TwosideKeeper/MonsterController.java @@ -69,7 +69,7 @@ public class MonsterController { ms.SetLeader(true); //Set the HP of the leader to a more proper amount. } - if (meetsConditionsToBeElite(ent)) { + if (meetsConditionsToBeElite(ent) && !minion) { Monster m = (Monster)(ent); MonsterDifficulty md = MonsterDifficulty.ELITE; TwosideKeeper.log(ChatColor.DARK_PURPLE+"Converting to Elite.", 2); @@ -143,10 +143,11 @@ public class MonsterController { private static boolean meetsConditionsToBeElite(LivingEntity ent) { if (Math.random()<=TwosideKeeper.ELITE_MONSTER_CHANCE && TwosideKeeper.LAST_ELITE_SPAWN+72000=75 && - ent.getNearbyEntities(64, 16, 64).size()<=2) { + ent.getNearbyEntities(128, 32, 128).size()<=2) { TwosideKeeper.LAST_ELITE_SPAWN=TwosideKeeper.getServerTickTime(); return true; } diff --git a/src/sig/plugin/TwosideKeeper/PlayerStructure.java b/src/sig/plugin/TwosideKeeper/PlayerStructure.java index 1b8a0d7..b6d58a0 100644 --- a/src/sig/plugin/TwosideKeeper/PlayerStructure.java +++ b/src/sig/plugin/TwosideKeeper/PlayerStructure.java @@ -89,6 +89,7 @@ public class PlayerStructure { public List deathloot = new ArrayList(); public double vendetta_amt = 0.0; public HashMap hitlist = new HashMap(); + public long lastdeath = 0; public double prev_weapondmg=0.0; public double prev_buffdmg=0.0; diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index 30aac99..d4e1836 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -2706,6 +2706,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener { pd.vendetta_amt=0.0; p.getInventory().clear(); } + for (int i=0;i