Make chickens attack with more accuracy
This commit is contained in:
parent
6d380c6c6f
commit
47a4e5d9a9
@ -118,12 +118,12 @@ import nautilus.game.arcade.game.games.mineware.effect.DeathEffectData;
|
||||
import nautilus.game.arcade.game.games.mineware.events.ChallengeEndEvent;
|
||||
import nautilus.game.arcade.game.games.mineware.kit.KitBawksFood;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.BouncingShadowTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.SpeedyBuildersTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.DragonKingTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.EliteArcherTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.MilkManTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.PinataMasterTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.PixelNinjaTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.SpeedyBuildersTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.SurfUpTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.TagMasterTracker;
|
||||
import nautilus.game.arcade.game.games.mineware.tracker.VeteranTracker;
|
||||
@ -177,6 +177,7 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
private String _restrictCommand = "restrict";
|
||||
private String _skipCommand = "skip";
|
||||
private String _markCommand = "mark";
|
||||
private String _loseCommand = "lose";
|
||||
|
||||
// A list that contains parts of a countdown.
|
||||
private List<String> _countdown = Arrays.asList(
|
||||
@ -185,36 +186,6 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
C.cGreen + C.Bold + "1",
|
||||
C.cWhite + C.Bold + "GO!");
|
||||
|
||||
/*
|
||||
* Changes
|
||||
* - Refactoring
|
||||
* - Improve Scoreboard
|
||||
*
|
||||
* Bugs
|
||||
* - Chicken attack triggering on game end (eg. 3 players killed at once)
|
||||
* - Impossible maze on Navigation Maze
|
||||
* - Some players spawn into the void on Lava Run
|
||||
* - // Zombie Infection can disguise spectators as Zombies
|
||||
* - // Egg smash dragon eggs stay on the map
|
||||
* - // "Next challenge will begin shortly" message also displays on players in chicken island
|
||||
* - Array index out of bounds during challenge rotation
|
||||
* - Achievement for not getting hit in king of the ladder is impossible in public games
|
||||
* - Players sometimes gain a life when dying (not confirmed)
|
||||
* - // Spectators being teleported over and over to the same location in certain games (no knockback aura around the game area)
|
||||
* - No suitable challenge was found ends the game, does not give exp
|
||||
* - Chicken platform needs water reducing (add lilipads?)
|
||||
* - // Pig dies in Volley pig
|
||||
*
|
||||
* Unconfirmed
|
||||
* - Item rendering exception (Kangaroo Jump http://i.imgur.com/CPYIogC.jpg)
|
||||
* - No TNT knockback on Deadly TNT
|
||||
* - Obsidian not spawning on Lava Run
|
||||
* - Fishing day lives issue
|
||||
*
|
||||
* Other
|
||||
* - Mine the diamond game needs more diamonds
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public BawkBawkBattles(ArcadeManager manager)
|
||||
{
|
||||
@ -1097,14 +1068,13 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
Chicken chicken = UtilMath.randomElement(_chickenAttack.getChickens());
|
||||
Material feetType = chicken.getLocation().getBlock().getType();
|
||||
|
||||
if (!chicken.isOnGround() && feetType != Material.STATIONARY_WATER && feetType != Material.WATER)
|
||||
if (chicken.isOnGround() && feetType != Material.STATIONARY_WATER && feetType != Material.WATER)
|
||||
{
|
||||
return;
|
||||
UtilEnt.CreatureLook(chicken, player);
|
||||
player.playSound(chicken.getLocation(), Sound.BAT_TAKEOFF, 1.0F, 1.3F);
|
||||
UtilAction.velocity(chicken, UtilAlg.getTrajectory2d(chicken, player), UtilAlg.calculateVelocity(chicken.getLocation().toVector(), player.getLocation().toVector(), 0.4).length() + 0.4, false, 0, 0.4, 1.5, false);
|
||||
Manager.GetProjectile().AddThrow(chicken, null, this, -1, true, false, false, true, 0.8F);
|
||||
}
|
||||
|
||||
UtilEnt.CreatureLook(chicken, player);
|
||||
UtilAction.velocity(chicken, UtilAlg.getTrajectory(chicken, player).multiply(1.5D).setY(0.3D));
|
||||
Manager.GetProjectile().AddThrow(chicken, null, this, -1, true, false, false, true, 0.8F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1483,6 +1453,23 @@ public class BawkBawkBattles extends TeamGame implements IThrown
|
||||
UtilPlayer.message(player, F.main("Game", C.cGreen + "Spawn locations will be marked."));
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
else if (message.startsWith("/" + _loseCommand))
|
||||
{
|
||||
if (IsLive() && _challenge != null && IsAlive(player))
|
||||
{
|
||||
setLives(player, 0);
|
||||
_challenge.getData().addLostPlayer(player);
|
||||
_deathEffect.playDeath(player, player.getLocation());
|
||||
GetScoreboard().ResetScore(player.getName());
|
||||
_chickenAttack.start(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Game", "You cannot lose at this time."));
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user