Merge remote-tracking branch 'origin/master'

This commit is contained in:
Shaun Bennett 2015-05-03 19:10:22 -05:00
commit 044d1098f4
5 changed files with 42 additions and 16 deletions

View File

@ -91,7 +91,7 @@ import nautilus.game.arcade.game.games.build.gui.OptionsShop;
import nautilus.game.arcade.game.games.draw.kits.*;
import nautilus.game.arcade.kit.Kit;
public class Build extends SoloGame
public class Build extends SoloGame
{
private NautHashMap<Player, BuildData> _data = new NautHashMap<Player, BuildData>();
@ -169,7 +169,7 @@ public class Build extends SoloGame
_words = new String[]
{
"Rollercoaster", "Archery Range", "Pokemon", "Pirates", "Vikings", "Dinosaur", "Dragon", "Toilet", "Farm", "Tree House", "Burger", "Cat", "Truck", "Bicycle", "Soda", "Music Instrument", "Statue", "Cannon", "Catapult", "Sailing Boat", "Grim Reaper", "Star Wars", "Elephant", "Penguin", "Ninja", "Pot of Gold", "Shrek", "Fruit", "Breakfast", "Toaster", "Robot", "Camping", "Rocket", "Aliens", "Shipwreck", "Cannibals", "Flying Creature", "Beach Creature", "Sea Creature",
"Rollercoaster", "Archery Range", "Pokemon", "Pirates", "Vikings", "Dinosaur", "Dragon", "Toilet", "Farm", "Tree House", "Burger", "Cat", "Truck", "Bicycle", "Soda", "Music Instrument", "Statue", "Cannon", "Catapult", "Sailing Boat", "Grim Reaper", "Star Wars", "Elephant", "Penguin", "Ninja", "Pot of Gold", "Shrek", "Fruit", "Breakfast", "Toaster", "Robot", "Camping", "Rocket", "Aliens", "Shipwreck", "Cannibals", "Flying Creature", "Beach Creature", "Sea Creature", "Spongebob", "Car", "Pot Plant", "Weapons", "Christmas", "King", "Queen", "Angel", "Demon"
};

View File

@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import org.bukkit.Bukkit;
import org.bukkit.Color;
import org.bukkit.FireworkEffect;
import org.bukkit.Location;
@ -41,6 +42,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.common.util.UtilParticle.ParticleType;
@ -95,7 +97,7 @@ public class Gravity extends SoloGame
_help = new String[]
{
"Push DROP to launch yourself off platforms.",
"Drop Item to launch yourself off platforms.",
"You automatically grab onto nearby platforms.",
"Hold Block to use your Jetpack",
"Your Experience Bar is your Jetpack Fuel",
@ -137,10 +139,20 @@ public class Gravity extends SoloGame
@EventHandler
public void AnnounceBoost(GameStateChangeEvent event)
{
if (event.GetState() != GameState.Live)
return;
Announce(C.Bold + C.cPurple + "Press " + C.Bold + C.cWhite + "DROP WEAPON" + C.Bold + C.cPurple + " to boost yourself off platforms!");
if (event.GetState() == GameState.Prepare)
{
UtilTextMiddle.display(null, C.cGreen + "Drop Weapon" + C.cWhite + " to boost off Platforms", 0, 120, 0);
Bukkit.getScheduler().runTaskLater(Manager.getPlugin(), new Runnable()
{
@Override
public void run()
{
UtilTextMiddle.display(null, C.cGreen + "Hold Block" + C.cWhite + " to use Jetpack", 0, 80, 5);
}
}, 120);
}
}
@EventHandler
@ -161,8 +173,7 @@ public class Gravity extends SoloGame
if (!isInsideMap(o.Base.getLocation()))
{
o.Base.remove();
oIter.remove();
o.remove();
}
}
@ -698,7 +709,8 @@ public class Gravity extends SoloGame
{
if (UtilMath.offset(player.getLocation(), _powerup) < 3)
{
UtilPlayer.message(player, F.main("Game", "You collected " + F.skill("Jetpack Fuel") + "!"));
UtilTextMiddle.display(null, "Collected Jetpack Fuel", 0, 80, 5, player);
player.setExp(Math.min(0.9999f, player.getExp() + 0.25f));
player.getWorld().playSound(player.getLocation(), Sound.DRINK, 1f, 0.5f);

View File

@ -90,8 +90,8 @@ public abstract class GravityObject
{
if (this instanceof GravityPlayer)
{
Base.getWorld().playEffect(Ent.getLocation().subtract(0, 0.5, 0), Effect.FIREWORKS_SPARK, 0, 100);
//UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, Ent.getLocation().subtract(0, 0.5, 0), 0, 0, 0, 0, 1);
UtilParticle.PlayParticle(ParticleType.FIREWORKS_SPARK, Ent.getLocation().subtract(0, 0.5, 0), 0, 0, 0, 0, 1,
ViewDist.MAX, UtilServer.getPlayers());
}
else if (this instanceof GravityBomb)
{
@ -221,4 +221,12 @@ public abstract class GravityObject
Bat.setSitting(!moving);
//Host.Manager.GetDisguise().updateDisguise(Bat);
}
public void remove()
{
if (Base.getPassenger() != null)
Base.getPassenger().remove();
Base.remove();
}
}

View File

@ -17,6 +17,7 @@ public class GravityDebris extends GravityObject
super(host, ent, mass, 2, vel);
CollideDelay = System.currentTimeMillis() + 500;
SetMovingBat(true);
}
@Override

View File

@ -3,6 +3,7 @@ package nautilus.game.arcade.game.games.gravity.objects;
import java.util.Collection;
import java.util.HashSet;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilParticle;
@ -10,6 +11,7 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.recharge.Recharge;
import nautilus.game.arcade.game.games.gravity.Gravity;
@ -140,7 +142,10 @@ public class GravityPlayer extends GravityObject
if (player.getExp() <= 0)
{
if (Recharge.Instance.use(player, "Fuel", 1000, false, false))
UtilPlayer.message(Ent, F.main("Skill", "You have no more " + F.skill("Jetpack Fuel") + "."));
{
UtilTextMiddle.display(C.cRed + "Jetpack Empty", "Collect Fuel at Gold Blocks with Fireworks", 0, 80, 5, (Player)Ent);
}
return;
}
@ -171,7 +176,8 @@ public class GravityPlayer extends GravityObject
//Restore
if (near)
{
UtilPlayer.message(Ent, F.main("Game", "Restoring Oxygen..."));
UtilTextMiddle.display(null, "Refilling Oxygen...", 0, 60, 5, (Player)Ent);
Ent.getWorld().playSound(Ent.getLocation(), Sound.CAT_HISS, 0.2f, 0.5f);
Base.setHealth(Math.min(60, Base.getHealth() + 10));
@ -189,8 +195,7 @@ public class GravityPlayer extends GravityObject
DamageCause.CUSTOM, 2, false, true, false,
"Oxygen Depleted", "Oxygen Depleted");
UtilPlayer.message(Ent, F.main("Game", "You are suffocating!"));
UtilPlayer.message(Ent, F.main("Game", "Get more Oxygen from the Emerald Blocks!"));
UtilTextMiddle.display(C.cRed + "Suffocating", "Refill Oxygen at Emerald Blocks", 0, 60, 5, (Player)Ent);
}
}