Testing session changes

This commit is contained in:
Sam 2017-06-06 22:59:40 +01:00
parent 16f9364772
commit a800fee08c
9 changed files with 79 additions and 50 deletions

View File

@ -66,11 +66,11 @@ public class PumpkinBoss extends MobaBoss
private static final int CONDITION_LENGTH = 60;
private static final double CONDITION_DAMAGE_FACTOR = 1.5;
private static final int DAMAGE_RADIUS = 2;
private static final int DAMAGE_RANGE = 3;
private static final int DAMAGE_DIRECT = 8;
private static final int DAMAGE_RANGE = 2;
private static final int DAMAGE_DIRECT = 6;
private static final int DAMAGE_DIRECT_RADIUS_SQUARED = 9;
private static final int HEALTH = 200;
private static final int HEALTH_OUT_OF_COMBAT = 5;
private static final int HEALTH = 100;
private static final int HEALTH_OUT_OF_COMBAT = 2;
private static final Material[] BLOCKS = {
Material.OBSIDIAN,
Material.NETHERRACK,
@ -128,7 +128,7 @@ public class PumpkinBoss extends MobaBoss
player.playSound(player.getLocation(), Sound.WITHER_SPAWN, 1, 0.4F);
}
for (Entry<Block, Double> entry : UtilBlock.getInRadius(skeleton.getLocation(), 20).entrySet())
for (Entry<Block, Double> entry : UtilBlock.getInRadius(skeleton.getLocation(), 12).entrySet())
{
Block block = entry.getKey();
double setChance = entry.getValue();

View File

@ -18,7 +18,8 @@ public class HeroBiff extends HeroKit
private static final Perk[] PERKS = {
new SkillSword(0),
new SkillLeash(1),
new SkillBiffDash(2)
new SkillBiffDash(2),
new SkillWarHorse(3)
};
private static final ItemStack IN_HAND = new ItemStack(Material.IRON_SWORD);

View File

@ -1,6 +1,7 @@
package nautilus.game.arcade.game.games.moba.kit.biff;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilParticle;
@ -11,10 +12,9 @@ import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.game.games.moba.kit.HeroSkill;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -88,7 +88,7 @@ public class SkillBiffDash extends HeroSkill
UtilAction.velocity(player, direction);
player.getWorld().playSound(player.getLocation(), Sound.IRONGOLEM_THROW, 1, 1F);
UtilParticle.PlayParticleToAll(ParticleType.CLOUD, player.getLocation().add(0, 0.4, 0), 0.25F, 0.25F, 0.25F, 0.1F, 10, ViewDist.LONG);
UtilParticle.PlayParticleToAll(ParticleType.CLOUD, player.getLocation().add(0, 0.6, 0), 0.5F, 0.5F, 0.5F, 0.1F, 15, ViewDist.LONG);
_active.put(player, System.currentTimeMillis());
}
@ -126,8 +126,11 @@ public class SkillBiffDash extends HeroSkill
continue;
}
Block block = entity.getLocation().getBlock().getRelative(BlockFace.DOWN);
entity.getWorld().playEffect(block.getLocation().add(0.5, 0.5, 0.5), Effect.STEP_SOUND, block.getType(), block.getData());
for (int i = 0; i < 5; i++)
{
Location location = UtilAlg.getRandomLocation(entity.getEyeLocation(), 3);
entity.getWorld().playEffect(location, Effect.STEP_SOUND, Material.GRASS, 0);
}
Manager.GetDamage().NewDamageEvent(entity, player, null, DamageCause.CUSTOM, 4, false, true, false, UtilEnt.getName(player), GetName());
UtilAction.velocity(entity, new Vector(0, 0.6 + Math.random() / 2, 0));

View File

@ -41,39 +41,45 @@ public class SkillLeash extends HeroSkill
@EventHandler
public void interact(PlayerInteractEvent event)
{
if (!isSkillItem(event))
Player player = event.getPlayer();
if (!isSkillItem(event) || _leashed.containsKey(player))
{
return;
}
Player player = event.getPlayer();
List<Player> nearbyPlayers = UtilPlayer.getNearby(player.getLocation(), 3);
List<Player> nearbyPlayers = UtilPlayer.getNearby(player.getLocation(), 5);
nearbyPlayers.removeIf(other -> isTeamDamage(other, player));
if (!nearbyPlayers.isEmpty())
if (nearbyPlayers.isEmpty())
{
_leashed.put(player, nearbyPlayers);
useActiveSkill(() ->
{
for (Player leashed : _leashed.remove(player))
{
removeEffect(leashed);
}
}, player, 5000);
return;
}
_leashed.put(player, nearbyPlayers);
StringBuilder builder = new StringBuilder(F.main("Game", "You leashed "));
for (Player nearby : nearbyPlayers)
{
nearby.setLeashHolder(player);
nearby.setPullWhileLeashed(false);
nearby.setShouldBreakLeash(false);
nearby.sendMessage(F.main("Game", F.name(player.getName()) + " leashed you."));
nearby.sendMessage(F.main("Game", F.name(nearby.getName()) + " leashed you."));
builder.append(F.name(player.getName())).append(", ");
Manager.GetCondition().Factory().Slow(GetName(), nearby, player, 5, 0, false, true, true, false);
}
player.sendMessage(builder.toString());
useActiveSkill(() ->
{
for (Player leashed : _leashed.remove(player))
{
removeEffect(leashed);
}
}, player, 5000);
}
@EventHandler

View File

@ -6,12 +6,15 @@ import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.game.games.moba.kit.HeroSkill;
import nautilus.game.arcade.game.games.moba.util.MobaConstants;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.FixedMetadataValue;
import java.util.HashSet;
import java.util.Iterator;
@ -33,7 +36,9 @@ public class SkillWarHorse extends HeroSkill
public SkillWarHorse(int slot)
{
super("Cavalry Charge", DESCRIPTION, SKILL_ITEM, slot, ActionType.ANY);
setCooldown(45000);
setDropItemActivate(true);
}
@EventHandler
@ -60,9 +65,12 @@ public class SkillWarHorse extends HeroSkill
UtilEnt.vegetate(horse);
horse.setJumpStrength(0);
horse.setMaxDomestication(1);
horse.setDomestication(horse.getMaxDomestication());
horse.getInventory().setArmor(HORSE_ARMOUR);
horse.setOwner(player);
horse.setPassenger(player);
horse.setMetadata(MobaConstants.TEAM_METADATA, new FixedMetadataValue(Manager.getPlugin(), Manager.GetGame().GetTeam(player).GetName()));
Manager.GetGame().CreatureAllowOverride = false;
@ -88,7 +96,13 @@ public class SkillWarHorse extends HeroSkill
data.Horse.remove();
iterator.remove();
}
//else if ()
else
{
Player player = data.Owner;
Location target = player.getLocation().getDirection().multiply(3).toLocation(player.getWorld());
UtilEnt.CreatureMoveFast(data.Horse, target, 3F);
}
}
}

View File

@ -32,7 +32,7 @@ public class SkillNinjaBlade extends HeroSkill
};
private static final ItemStack SKILL_ITEM = new ItemStack(Material.NETHER_STAR);
private static final ItemStack ACTIVE_ITEM = new ItemBuilder(Material.DIAMOND_SWORD)
.setTitle(C.cGreenB + "NINJA BLADE")
.setTitle(C.cGreenB + "ENDER BLADE")
.setUnbreakable(true)
.build();
private static final int ACTIVE_SLOT = 0;

View File

@ -17,6 +17,9 @@ import nautilus.game.arcade.game.games.moba.structure.tower.TowerDestroyEvent;
import nautilus.game.arcade.game.games.moba.util.MobaConstants;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.Sign;
import org.bukkit.entity.PigZombie;
import org.bukkit.entity.Player;
import org.bukkit.entity.Zombie;
@ -162,21 +165,26 @@ public class MinionManager implements Listener
ArrayList<Location> path = new ArrayList<>(_host.WorldData.GetDataLocs(MobaConstants.MINION_PATH));
ArrayList<Location> organisedPath = new ArrayList<>(path.size());
while (organisedPath.size() != path.size())
while (!path.isEmpty())
{
Location closest = UtilAlg.findClosest(start, path);
Location dataPoint = UtilAlg.findClosest(start, path);
if (closest == null)
{
// Rra rro Shaggy
continue;
}
organisedPath.add(closest);
start = closest;
organisedPath.add(dataPoint);
path.remove(dataPoint);
start = dataPoint;
}
// Step 3 - Put the ordered path inside the map
_path = path;
_path = organisedPath;
// int i = 0;
// for (Location location : _path)
// {
// Block block = location.getBlock();
// block.setType(Material.SIGN_POST);
// Sign sign = (Sign) block.getState();
// sign.setLine(0, "P" + i++);
// sign.update();
// }
}
}

View File

@ -235,19 +235,16 @@ public class MinionWave implements Listener
{
for (MobaBoss boss : _host.getBossManager().getBosses())
{
if (boss.isDead())
if (boss.isDead() || !(boss instanceof WitherBoss))
{
continue;
}
if (boss instanceof WitherBoss)
{
WitherBoss witherBoss = (WitherBoss) boss;
WitherBoss witherBoss = (WitherBoss) boss;
if (witherBoss.getTeam().equals(_owner))
{
continue;
}
if (witherBoss.getTeam().equals(_owner))
{
continue;
}
Location location = boss.getEntity().getLocation();

View File

@ -154,7 +154,7 @@ public class CapturePoint
player.playSound(player.getLocation(), Sound.GHAST_SCREAM2, 1, 1.0F);
}
_host.Announce(F.main("Game", "Team " + highest.GetFormattedName() + C.mBody + " is capturing the " + _colour + _name + C.mBody + "Beacon!"), false);
_host.Announce(F.main("Game", "Team " + highest.GetFormattedName() + C.mBody + " is capturing the " + _colour + _name + C.mBody + " Beacon!"), false);
//UtilTextMiddle.display("", "Team " + highest.GetFormattedName() + C.cWhite + " is capturing beacon " + _colour + _name, 0, 30, 10);
}