Fixing some nuke stuff, Giant noises only for own Team and "Giant under attack message", spelling fixes

This commit is contained in:
Sarah 2015-12-19 00:59:15 +01:00
parent dab2416ccd
commit b3afa0094e
3 changed files with 34 additions and 15 deletions

View File

@ -79,7 +79,7 @@ public class Minion
"Conquest", "Province", "Overflow", "Graceful", "Negative", "Doctrine", "Charger", "Carrots", "Spirits", "Robbers",
"Karambit", "Solution", "Sandwich", "Catapult", "Positive", "Firework", "Ukulele", "Dragons", "Cobwebs", "Drawing",
"Internal", "Japanese", "Atronomy", "Villager", "Tranquil", "Compress", "Glasses", "Nursing", "College", "Magenta",
"Trillion", "Standard", "Atrology", "Infringe", "Fortress", "Prisoner", "Daisies", "Soldier", "Courses", "Serpent",
"Trillion", "Standard", "Astrology", "Infringe", "Fortress", "Prisoner", "Daisies", "Soldier", "Courses", "Serpent",
"Carnival", "Parasite", "Porridge", "Variable", "Charcoal", "Decision", "Hazards", "Jupiter", "Buttons", "Camping",
"Concrete", "Carriage", "Pressure", "Practice", "Commerce", "Windmill", "Cheetah", "Mercury", "Octopus", "Canyons",
"Pavement", "Auxilary", "Demolish", "Maintain", "Barbeque", "Parmesan", "Vulture", "America", "Printer", "Seventy",

View File

@ -711,8 +711,12 @@ public class TypeWars extends TeamGame
Location loc = giant.getLocation().clone();
loc.setYaw(UtilAlg.GetYaw(new Vector(minion.getEntity().getLocation().getBlockX() - loc.getBlockX(), minion.getEntity().getLocation().getBlockY() - loc.getBlockY(), minion.getEntity().getLocation().getBlockZ() - loc.getBlockZ())));
giant.teleport(loc);
giant.getWorld().playSound(giant.getLocation(), Sound.ZOMBIE_WOODBREAK, 100, 1);
giant.getWorld().playSound(giant.getLocation(), Sound.ZOMBIE_IDLE, 1, 1);
for(Player player : team.GetPlayers(false))
{
player.playSound(giant.getLocation(), Sound.ZOMBIE_WOODBREAK, 100, 1);
player.playSound(giant.getLocation(), Sound.ZOMBIE_IDLE, 1, 1);
}
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, minion.getEntity().getLocation(), 0, 0, 0, 1, 1, ViewDist.LONG, UtilServer.getPlayers());
minion.despawn(null, true);
@ -754,19 +758,14 @@ public class TypeWars extends TeamGame
_giants.get(team).damage(damage);
}
}
if(_giantsAttacked.containsKey(team))
{
if(_giantsAttacked.get(team) != null)
if(!_giantsAttacked.containsKey(team) || UtilTime.elapsed(_giantsAttacked.get(team), 10000))
{
_giantsAttacked.put(team, System.currentTimeMillis());
for(Player player : GetPlayers(true))
{
if(UtilTime.elapsed(_giantsAttacked.get(team), 10000))
{
for(Player player : GetPlayers(true))
{
if(GetTeam(player) == team)
{
UtilTextMiddle.display("", "Your giant is under Attack!", 0, 30, 9, player);
}
}
if(GetTeam(player) == team)
{
UtilTextMiddle.display("", "Your giant is under Attack!", 0, 30, 9, player);
}
}
}
@ -1257,6 +1256,23 @@ public class TypeWars extends TeamGame
_deadMinions.add(minion);
}
}
Iterator<Minion> finishedMinionIterator = _finishedMinions.iterator();
while(finishedMinionIterator.hasNext())
{
Minion minion = finishedMinionIterator.next();
if(minion.getTeam() == team)
continue;
if(UtilMath.offset(location, minion.getEntity().getLocation()) > 3)
continue;
minion.despawn(player, true);
if(!minion.hasLives())
{
minionIterator.remove();
_deadMinions.add(minion);
}
}
i++;
}
_nukeFrame++;

View File

@ -63,6 +63,9 @@ public abstract class KitTypeWarsBase extends Kit
@EventHandler
public void activateSpell(PlayerInteractEvent event)
{
if(!Manager.GetGame().IsLive())
return;
if(event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK)
return;