More testing feedback
This commit is contained in:
parent
8a9e113389
commit
c34bf77dc9
@ -99,7 +99,7 @@ public class Moba extends TeamGame
|
||||
PrepareFreeze = false;
|
||||
PrepareTime = PREPARE_TIME;
|
||||
DeathOut = false;
|
||||
DeathSpectateSecs = 10;
|
||||
DeathSpectateSecs = 12;
|
||||
HungerSet = 20;
|
||||
DamageFall = false;
|
||||
|
||||
@ -170,14 +170,15 @@ public class Moba extends TeamGame
|
||||
})
|
||||
.setSuffix((perspective, subject) ->
|
||||
{
|
||||
if (!IsAlive(subject))
|
||||
GameState state = GetState();
|
||||
GameTeam perspectiveTeam = GetTeam(perspective);
|
||||
GameTeam subjectTeam = GetTeam(subject);
|
||||
|
||||
if (!IsAlive(subject) || subjectTeam == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
GameState state = GetState();
|
||||
GameTeam perspectiveTeam = GetTeam(perspective);
|
||||
GameTeam subjectTeam = GetTeam(subject);
|
||||
MobaPlayer mobaPlayer = getMobaData(subject);
|
||||
String suffix;
|
||||
|
||||
|
@ -69,8 +69,8 @@ public class PumpkinBoss extends MobaBoss
|
||||
private static final int DAMAGE_RANGE = 3;
|
||||
private static final int DAMAGE_DIRECT = 8;
|
||||
private static final int DAMAGE_DIRECT_RADIUS_SQUARED = 9;
|
||||
private static final int HEALTH = 400;
|
||||
private static final int HEALTH_OUT_OF_COMBAT = 10;
|
||||
private static final int HEALTH = 200;
|
||||
private static final int HEALTH_OUT_OF_COMBAT = 5;
|
||||
private static final Material[] BLOCKS = {
|
||||
Material.OBSIDIAN,
|
||||
Material.NETHERRACK,
|
||||
@ -333,9 +333,15 @@ public class PumpkinBoss extends MobaBoss
|
||||
{
|
||||
Player player = iterator.next();
|
||||
|
||||
if (!player.isOnline() || !player.hasPotionEffect(PotionEffectType.REGENERATION))
|
||||
if (!player.hasPotionEffect(PotionEffectType.REGENERATION))
|
||||
{
|
||||
if (player.isOnline())
|
||||
{
|
||||
player.getInventory().setHelmet(player.getInventory().getHelmet());
|
||||
}
|
||||
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
sendFakeHelmet(player);
|
||||
|
@ -35,7 +35,7 @@ public class WitherBoss extends MobaBoss
|
||||
private static final String NAME = "Wither Boss";
|
||||
private static final float SPEED_TARGET = 4F;
|
||||
private static final float SPEED_HOME = 6F;
|
||||
private static final int INITIAL_HEALTH = 1750;
|
||||
private static final int INITIAL_HEALTH = 500;
|
||||
private static final MobaAIMethod AI_METHOD = new MobaDirectAIMethod();
|
||||
|
||||
private GameTeam _team;
|
||||
|
@ -26,7 +26,7 @@ public class BossAttackEarthquake implements MobaBossAttack
|
||||
|
||||
private static final String ATTACK_NAME = "Earthquake";
|
||||
private static final int RADIUS = 8;
|
||||
private static final int DAMAGE = 8;
|
||||
private static final int DAMAGE = 4;
|
||||
private static final double FALLING_BLOCK_CHANCE = 0.1;
|
||||
|
||||
private final WitherBoss _boss;
|
||||
@ -56,7 +56,7 @@ public class BossAttackEarthquake implements MobaBossAttack
|
||||
FallingBlock fallingBlock = block.getWorld().spawnFallingBlock(block.getLocation().add(0.5, 1, 0.5), block.getType(), block.getData());
|
||||
fallingBlock.setHurtEntities(false);
|
||||
fallingBlock.setDropItem(false);
|
||||
fallingBlock.setVelocity(UtilAlg.getTrajectory(boss, fallingBlock).multiply(0.25).setY(1.5));
|
||||
fallingBlock.setVelocity(UtilAlg.getTrajectory(boss, fallingBlock).multiply(0.25).setY(0.7 + Math.random()));
|
||||
}
|
||||
|
||||
for (Entry<LivingEntity, Double> entry : UtilEnt.getInRadius(boss.getLocation(), RADIUS).entrySet())
|
||||
|
@ -7,7 +7,6 @@ import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.game.games.moba.kit.HeroSkill;
|
||||
@ -17,13 +16,9 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class SkillPulseHeal extends HeroSkill
|
||||
{
|
||||
|
||||
@ -33,28 +28,11 @@ public class SkillPulseHeal extends HeroSkill
|
||||
};
|
||||
|
||||
private static final ItemStack SKILL_ITEM = new ItemBuilder(Material.INK_SACK, (byte) 10).build();
|
||||
private static final ItemStack SKILL_ITEM_TOGGLED = new ItemBuilder(Material.INK_SACK, (byte) 12).build();
|
||||
|
||||
private Set<Player> _toggled = new HashSet<>();
|
||||
|
||||
public SkillPulseHeal(int slot)
|
||||
{
|
||||
super("Pulse Heal", DESCRIPTION, SKILL_ITEM, slot, ActionType.ANY);
|
||||
addSkillItem(SKILL_ITEM_TOGGLED);
|
||||
setCooldown(2000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giveItem(Player player)
|
||||
{
|
||||
if (_toggled.contains(player))
|
||||
{
|
||||
player.getInventory().setItem(getSlot(), _items.get(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getInventory().setItem(getSlot(), _items.get(0));
|
||||
}
|
||||
setCooldown(8000);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -66,17 +44,20 @@ public class SkillPulseHeal extends HeroSkill
|
||||
}
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (_toggled.contains(player))
|
||||
{
|
||||
_toggled.remove(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
_toggled.add(player);
|
||||
}
|
||||
|
||||
useSkill(player);
|
||||
|
||||
for (LivingEntity entity : UtilEnt.getInRadius(player.getLocation(), 5).keySet())
|
||||
{
|
||||
// Don't heal enemies
|
||||
if (!isTeamDamage(entity, player))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
entity.setHealth(Math.min(entity.getHealth() + 4, entity.getMaxHealth()));
|
||||
}
|
||||
|
||||
displayPulse(player.getLocation().add(0, 0.5, 0));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -89,61 +70,41 @@ public class SkillPulseHeal extends HeroSkill
|
||||
|
||||
for (Player player : Manager.GetGame().GetPlayers(true))
|
||||
{
|
||||
if (!hasPerk(player) || UtilPlayer.isSpectator(player) || !Recharge.Instance.use(player, GetName(), 5000, false, false))
|
||||
if (!hasPerk(player) || UtilPlayer.isSpectator(player))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Location location = player.getLocation();
|
||||
|
||||
if (_toggled.contains(player))
|
||||
for (LivingEntity entity : UtilEnt.getInRadius(player.getLocation(), 5).keySet())
|
||||
{
|
||||
for (LivingEntity entity : UtilEnt.getInRadius(player.getLocation(), 5).keySet())
|
||||
// Don't heal enemies
|
||||
if (!isTeamDamage(entity, player))
|
||||
{
|
||||
// Don't heal self or enemies
|
||||
if (entity.equals(player) || !isTeamDamage(entity, player))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
entity.setHealth(Math.min(entity.getHealth() + 4, entity.getMaxHealth()));
|
||||
continue;
|
||||
}
|
||||
|
||||
displayPulse(location, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setHealth(Math.min(player.getHealth() + 4, player.getMaxHealth()));
|
||||
|
||||
displayPulse(location, true);
|
||||
entity.setHealth(Math.min(entity.getHealth() + 4, entity.getMaxHealth()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void playerQuit(PlayerQuitEvent event)
|
||||
{
|
||||
_toggled.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
private void displayPulse(Location location, boolean inwards)
|
||||
private void displayPulse(Location location)
|
||||
{
|
||||
Manager.runSyncTimer(new BukkitRunnable()
|
||||
{
|
||||
|
||||
double theta = 0;
|
||||
double radius = inwards ? 5 : 0;
|
||||
double radius = 0;
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
if (inwards && radius < 0 || !inwards && radius > 5)
|
||||
if (radius > 5)
|
||||
{
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
double increment = inwards ? -0.2 : 0.2;
|
||||
for (double theta2 = 0; theta2 < 2 * Math.PI; theta2 += Math.PI / 3)
|
||||
{
|
||||
double x = radius * Math.sin(theta + theta2);
|
||||
@ -151,13 +112,13 @@ public class SkillPulseHeal extends HeroSkill
|
||||
|
||||
location.add(x, 0.5, z);
|
||||
|
||||
UtilParticle.PlayParticleToAll(inwards ? ParticleType.HAPPY_VILLAGER : ParticleType.DRIP_WATER, location, 0, 0, 0, 0.1F, 1, ViewDist.LONG);
|
||||
UtilParticle.PlayParticleToAll(ParticleType.HAPPY_VILLAGER, location, 0, 0, 0, 0.1F, 1, ViewDist.LONG);
|
||||
|
||||
location.subtract(x, 0.5, z);
|
||||
}
|
||||
|
||||
theta += Math.PI / 100;
|
||||
radius += increment;
|
||||
radius += 0.2;
|
||||
}
|
||||
}, 0, 1);
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ public class HeroHattori extends HeroKit
|
||||
|
||||
private static final Perk[] PERKS = {
|
||||
new PerkDoubleJump("Double Jump", 1, 1, true, 3000, true),
|
||||
new SkillSnowball(0),
|
||||
new SkillSword(1),
|
||||
new SkillSword(0),
|
||||
new SkillSnowball(1),
|
||||
new SkillNinjaDash(2),
|
||||
new SkillNinjaBlade(3)
|
||||
};
|
||||
|
@ -78,7 +78,7 @@ public class SkillSnowball extends HeroSkill implements IThrown
|
||||
if (target != null && !isTeamDamage(target, thrower))
|
||||
{
|
||||
thrower.playSound(thrower.getLocation(), Sound.LAVA_POP, 1, 1.3F);
|
||||
Manager.GetDamage().NewDamageEvent(target, thrower, (Projectile) data.getThrown(), DamageCause.CUSTOM, DAMAGE, true, true, false, UtilEnt.getName(thrower), GetName());
|
||||
Manager.GetDamage().NewDamageEvent(target, thrower, (Projectile) data.getThrown(), DamageCause.CUSTOM, DAMAGE, false, true, false, UtilEnt.getName(thrower), GetName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,21 +3,29 @@ package nautilus.game.arcade.game.games.moba.minion;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import nautilus.game.arcade.game.games.moba.util.MobaUtil;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Minion
|
||||
{
|
||||
|
||||
private static final int HEALTH = 10;
|
||||
private static final float HIT_BOX = 2F;
|
||||
private static final ItemStack[] SUPER_ARMOUR = {
|
||||
new ItemStack(Material.IRON_BOOTS),
|
||||
new ItemStack(Material.IRON_LEGGINGS),
|
||||
new ItemStack(Material.IRON_CHESTPLATE),
|
||||
new ItemStack(Material.IRON_HELMET)
|
||||
};
|
||||
|
||||
private final LivingEntity _entity;
|
||||
|
||||
private Location _target;
|
||||
private int _targetIndex;
|
||||
|
||||
public Minion(Location spawn, Class<? extends LivingEntity> clazz)
|
||||
public Minion(Location spawn, Class<? extends LivingEntity> clazz, boolean superMinion)
|
||||
{
|
||||
_target = spawn;
|
||||
|
||||
@ -31,6 +39,11 @@ public class Minion
|
||||
((Zombie) entity).setBaby(true);
|
||||
}
|
||||
|
||||
if (superMinion)
|
||||
{
|
||||
entity.getEquipment().setArmorContents(SUPER_ARMOUR);
|
||||
}
|
||||
|
||||
UtilEnt.vegetate(entity);
|
||||
UtilEnt.silence(entity, true);
|
||||
UtilEnt.setBoundingBox(entity, HIT_BOX, HIT_BOX);
|
||||
|
@ -11,6 +11,7 @@ import nautilus.game.arcade.events.GamePrepareCountdownCommence;
|
||||
import nautilus.game.arcade.game.DebugCommand;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.moba.Moba;
|
||||
import nautilus.game.arcade.game.games.moba.structure.tower.Tower;
|
||||
import nautilus.game.arcade.game.games.moba.util.MobaConstants;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
@ -77,6 +78,15 @@ public class MinionManager implements Listener
|
||||
{
|
||||
List<Location> path = new ArrayList<>(_path);
|
||||
boolean reverse = team.GetColor() == ChatColor.RED;
|
||||
boolean superMinions = true;
|
||||
|
||||
for (Tower tower : _host.getTowerManager().getTowers())
|
||||
{
|
||||
if (!tower.isDead() && tower.getOwner().equals(team))
|
||||
{
|
||||
superMinions = false;
|
||||
}
|
||||
}
|
||||
|
||||
// If red team, reverse the pat
|
||||
if (reverse)
|
||||
@ -84,7 +94,7 @@ public class MinionManager implements Listener
|
||||
Collections.reverse(path);
|
||||
}
|
||||
|
||||
MinionWave wave = new MinionWave(_host, this, team, path, reverse ? Zombie.class : PigZombie.class);
|
||||
MinionWave wave = new MinionWave(_host, this, team, path, reverse ? Zombie.class : PigZombie.class, superMinions);
|
||||
|
||||
_waves.add(wave);
|
||||
}
|
||||
|
@ -48,17 +48,19 @@ public class MinionWave implements Listener
|
||||
private final MinionManager _minionManager;
|
||||
private final GameTeam _owner;
|
||||
private final Class<? extends LivingEntity> _clazz;
|
||||
private final boolean _superMinions;
|
||||
private final long _startTime;
|
||||
|
||||
private final List<Location> _path;
|
||||
private final List<Minion> _minions;
|
||||
|
||||
public MinionWave(Moba host, MinionManager minionManager, GameTeam owner, List<Location> path, Class<? extends LivingEntity> clazz)
|
||||
public MinionWave(Moba host, MinionManager minionManager, GameTeam owner, List<Location> path, Class<? extends LivingEntity> clazz, boolean superMinions)
|
||||
{
|
||||
_host = host;
|
||||
_minionManager = minionManager;
|
||||
_owner = owner;
|
||||
_clazz = clazz;
|
||||
_superMinions = superMinions;
|
||||
_startTime = System.currentTimeMillis();
|
||||
_path = path;
|
||||
_minions = new ArrayList<>(MAX_MINIONS_PER_WAVE);
|
||||
@ -85,7 +87,7 @@ public class MinionWave implements Listener
|
||||
{
|
||||
_host.CreatureAllowOverride = true;
|
||||
|
||||
Minion minion = new Minion(_path.get(0), _clazz);
|
||||
Minion minion = new Minion(_path.get(0), _clazz, _superMinions);
|
||||
|
||||
minion.getEntity().setMetadata(MobaConstants.TEAM_METADATA, new FixedMetadataValue(_host.getArcadeManager().getPlugin(), _owner.GetName()));
|
||||
|
||||
|
@ -145,17 +145,17 @@ public class CapturePoint
|
||||
}
|
||||
// Players on the point
|
||||
// Only inform if it has been a while
|
||||
else if (!_owner.equals(highest) && UtilTime.elapsed(_lastInform, MIN_INFORM_TIME))
|
||||
else if ((_owner == null || !_owner.equals(highest)) && UtilTime.elapsed(_lastInform, MIN_INFORM_TIME))
|
||||
{
|
||||
_lastInform = System.currentTimeMillis();
|
||||
|
||||
for (Player player : Bukkit.getOnlinePlayers())
|
||||
{
|
||||
player.playSound(player.getLocation(), Sound.GHAST_SCREAM2, 1, 1.2F);
|
||||
player.playSound(player.getLocation(), Sound.GHAST_SCREAM2, 1, 1.0F);
|
||||
}
|
||||
|
||||
_host.Announce(F.main("Game", "Team " + highest.GetFormattedName() + C.mBody + " is capturing beacon " + _colour + _name + C.mBody + "!"), false);
|
||||
UtilTextMiddle.display("", "Team " + highest.GetFormattedName() + C.cWhite + " is capturing beacon " + _colour + _name, 0, 30, 10);
|
||||
//UtilTextMiddle.display("", "Team " + highest.GetFormattedName() + C.cWhite + " is capturing beacon " + _colour + _name, 0, 30, 10);
|
||||
}
|
||||
|
||||
// If it has just reached the maximum progress, set the owner.
|
||||
@ -228,8 +228,8 @@ public class CapturePoint
|
||||
|
||||
_owner = team;
|
||||
|
||||
_host.Announce(F.main("Game", "Team " + team.GetFormattedName() + C.mBody + " captured beacon " + _colour + _name + C.mBody + "!"));
|
||||
UtilTextMiddle.display("", "Team " + team.GetFormattedName() + C.cWhite + " captured beacon " + _colour + _name, 0, 30, 10);
|
||||
_host.Announce(F.main("Game", "Team " + team.GetFormattedName() + C.mBody + " captured the " + _colour + _name + C.mBody + " Beacon!"));
|
||||
//UtilTextMiddle.display("", "Team " + team.GetFormattedName() + C.cWhite + " captured beacon " + _colour + _name, 0, 30, 10);
|
||||
|
||||
UtilFirework.playFirework(_center, Type.BURST, team.GetColorBase(), false, false);
|
||||
UtilServer.CallEvent(new CapturePointCaptureEvent(this));
|
||||
|
@ -179,7 +179,7 @@ public class Tower
|
||||
{
|
||||
player.playSound(player.getLocation(), Sound.ANVIL_LAND, 1, 0.5F);
|
||||
player.sendMessage(F.main("Game", "Your Tower is under attack!"));
|
||||
UtilTextMiddle.display("", _team.GetColor() + "Your Tower is under attack!", 0, 30, 10, player);
|
||||
//UtilTextMiddle.display("", _team.GetColor() + "Your Tower is under attack!", 0, 30, 10, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user