minestrike update!
This commit is contained in:
parent
c922c3248c
commit
cc2e5bc6e4
@ -10,7 +10,6 @@ public enum GameDisplay
|
||||
Bridge("The Bridges", Material.IRON_PICKAXE, (byte)0, GameCategory.SURVIVAL, 3),
|
||||
CastleSiege("Castle Siege", Material.DIAMOND_CHESTPLATE, (byte)0, GameCategory.CLASSICS, 4),
|
||||
ChampionsDominate("Champions Domination", "Champions", Material.BEACON, (byte)0, GameCategory.CHAMPIONS, 6),
|
||||
//ChampionsMOBA(ChampionsMOBA.class, "Champions MOBA", "Champions", Material.SKULL_ITEM, (byte)0, GameCategory.CHAMPIONS, 7),
|
||||
ChampionsTDM("Champions TDM", "Champions", Material.GOLD_SWORD, (byte)0, GameCategory.CHAMPIONS, 5),
|
||||
Christmas("Christmas Chaos", Material.SNOW_BALL, (byte)0, GameCategory.CLASSICS, 8),
|
||||
DeathTag("Death Tag", Material.SKULL_ITEM, (byte)0, GameCategory.ARCADE, 9),
|
||||
@ -21,7 +20,6 @@ public enum GameDisplay
|
||||
DragonsTeams("Dragons Teams", Material.ENDER_STONE, (byte)0, GameCategory.TEAM_VARIANT, 14),
|
||||
Draw("Draw My Thing", Material.BOOK_AND_QUILL, (byte)0, GameCategory.CLASSICS, 15),
|
||||
Evolution("Evolution", Material.EMERALD, (byte)0, GameCategory.ARCADE, 16),
|
||||
//FlappyBird(FlappyBird.class, "Flappy Bird", Material.FEATHER, (byte)0, GameCategory.ARCADE, 17),
|
||||
Gravity("Gravity", Material.ENDER_PORTAL, (byte)0, GameCategory.EXTRA, 18),
|
||||
Halloween("Halloween Horror", Material.PUMPKIN, (byte)0, GameCategory.CLASSICS, 19),
|
||||
HideSeek("Block Hunt", Material.GRASS, (byte)0, GameCategory.CLASSICS, 20),
|
||||
|
@ -70,7 +70,6 @@ public enum GameType
|
||||
Bridge(Bridge.class, GameDisplay.Bridge),
|
||||
CastleSiege(CastleSiege.class, GameDisplay.CastleSiege),
|
||||
ChampionsDominate(ChampionsDominate.class, GameDisplay.ChampionsDominate),
|
||||
//ChampionsMOBA(ChampionsMOBA.class, "Champions MOBA", "Champions", Material.SKULL_ITEM, (byte)0, GameCategory.CHAMPIONS, 7),
|
||||
ChampionsTDM(ChampionsTDM.class, GameDisplay.ChampionsTDM),
|
||||
Christmas(Christmas.class, GameDisplay.Christmas, "http://chivebox.com/file/c/xmas.zip", true),
|
||||
DeathTag(DeathTag.class, GameDisplay.DeathTag),
|
||||
@ -81,7 +80,6 @@ public enum GameType
|
||||
DragonsTeams(DragonsTeams.class, GameDisplay.DragonsTeams),
|
||||
Draw(Draw.class, GameDisplay.Draw),
|
||||
Evolution(Evolution.class, GameDisplay.Evolution),
|
||||
//FlappyBird(FlappyBird.class, "Flappy Bird", Material.FEATHER, (byte)0, GameCategory.ARCADE, 17),
|
||||
Gravity(Gravity.class, GameDisplay.Gravity),
|
||||
Halloween(Halloween.class, GameDisplay.Halloween, "http://chivebox.com/file/c/hh.zip", true),
|
||||
HideSeek(HideSeek.class, GameDisplay.HideSeek),
|
||||
@ -90,7 +88,7 @@ public enum GameType
|
||||
Lobbers(BombLobbers.class, GameDisplay.Lobbers),
|
||||
Micro(Micro.class, GameDisplay.Micro),
|
||||
MilkCow(MilkCow.class, GameDisplay.MilkCow),
|
||||
MineStrike(MineStrike.class, GameDisplay.MineStrike, "http://chivebox.com/file/c/assets.zip", true),// Temp set to CHAMPIONS to fix UI bug
|
||||
MineStrike(MineStrike.class, GameDisplay.MineStrike, "http://chivebox.com/file/c/ResMinestrike.zip", true),
|
||||
MineWare(MineWare.class, GameDisplay.MineWare),
|
||||
OldMineWare(OldMineWare.class, GameDisplay.OldMineWare),
|
||||
Paintball(Paintball.class, GameDisplay.Paintball),
|
||||
|
@ -116,6 +116,10 @@ import net.minecraft.server.v1_7_R4.EntityArrow;
|
||||
|
||||
public class MineStrike extends TeamGame
|
||||
{
|
||||
public static float RECOIL = 0.8f;
|
||||
public static float CONE = 0.7f;
|
||||
public static float MOVE_PENALTY = 0.8f;
|
||||
|
||||
public static class PlayerHeadshotEvent extends PlayerEvent
|
||||
{
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@ -211,6 +215,7 @@ public class MineStrike extends TeamGame
|
||||
private Bomb _bomb = null;
|
||||
private Item _bombItem = null;
|
||||
private Player _bombHolder = null;
|
||||
private long _bombHolderLastMove = 0;
|
||||
|
||||
private Player _bombPlanter;
|
||||
private Player _bombDefuser;
|
||||
@ -371,7 +376,7 @@ public class MineStrike extends TeamGame
|
||||
gun.giveToPlayer(event.GetPlayer(), true);
|
||||
|
||||
//Knife
|
||||
event.GetPlayer().getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD, (byte)0, 1, "Knife"));
|
||||
event.GetPlayer().getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, "Knife"));
|
||||
|
||||
//Armor
|
||||
giveTeamArmor(event.GetPlayer(), Color.fromRGB(0, 0, 255));
|
||||
@ -532,6 +537,7 @@ public class MineStrike extends TeamGame
|
||||
|
||||
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 2f);
|
||||
_bombHolder = player;
|
||||
_bombHolderLastMove = System.currentTimeMillis();
|
||||
|
||||
if (_bombItem != null)
|
||||
{
|
||||
@ -719,6 +725,12 @@ public class MineStrike extends TeamGame
|
||||
|
||||
if (grenade == null)
|
||||
return;
|
||||
|
||||
if (!UtilTime.elapsed(GetStateTime(), 15000))
|
||||
{
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot throw Grenades yet."));
|
||||
return;
|
||||
}
|
||||
|
||||
grenade.throwGrenade(event.getPlayer(), UtilEvent.isAction(event, ActionType.L), this);
|
||||
event.setCancelled(true);
|
||||
@ -1603,7 +1615,7 @@ public class MineStrike extends TeamGame
|
||||
_bombPlanter.setExp(Math.min(_bombPlanter.getExp() + 0.017f, 0.99999f));
|
||||
|
||||
if (Math.random() > 0.90)
|
||||
_bombPlanter.getWorld().playSound(_bombPlanter.getLocation(), Sound.NOTE_PLING, 1f, 3f);
|
||||
_bombPlanter.getWorld().playSound(_bombPlanter.getLocation(), Sound.NOTE_PLING, 2f, 3f);
|
||||
|
||||
UtilTextMiddle.display(C.cRed + C.Bold + "Planting Bomb", UtilTextMiddle.progress(_bombPlanter.getExp()), 0, 10, 0, _bombPlanter);
|
||||
|
||||
@ -2760,6 +2772,48 @@ public class MineStrike extends TeamGame
|
||||
_shopManager.addMoney(event.getPlayer(), 16000, "Debug");
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
if (event.getMessage().contains("recoil"))
|
||||
{
|
||||
try
|
||||
{
|
||||
MineStrike.RECOIL = Float.parseFloat(event.getMessage().split(" ")[1]);
|
||||
this.Announce(C.cPurple + C.Bold + "Recoil Bloom: " + ChatColor.RESET + (int)(MineStrike.RECOIL * 100) + "%");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
if (event.getMessage().contains("cone"))
|
||||
{
|
||||
try
|
||||
{
|
||||
MineStrike.CONE = Float.parseFloat(event.getMessage().split(" ")[1]);
|
||||
this.Announce(C.cPurple + C.Bold + "Cone of Fire: " + ChatColor.RESET + (int)(MineStrike.CONE * 100) + "%");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
if (event.getMessage().contains("move"))
|
||||
{
|
||||
try
|
||||
{
|
||||
MineStrike.MOVE_PENALTY = Float.parseFloat(event.getMessage().split(" ")[1]);
|
||||
this.Announce(C.cPurple + C.Bold + "Move/Sprint/Jump Penalties: " + ChatColor.RESET + (int)(MineStrike.MOVE_PENALTY * 100) + "%");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
if (event.getMessage().contains("instant"))
|
||||
{
|
||||
@ -2884,4 +2938,42 @@ public class MineStrike extends TeamGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void bombMove(PlayerMoveEvent event)
|
||||
{
|
||||
if (_bombHolder == null || !event.getPlayer().equals(_bombHolder))
|
||||
return;
|
||||
|
||||
_bombHolderLastMove = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void bombTimeDrop(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
if (_freezeTime > 0)
|
||||
_bombHolderLastMove = System.currentTimeMillis();
|
||||
|
||||
if (_bombHolder != null && UtilTime.elapsed(_bombHolderLastMove, 10000))
|
||||
{
|
||||
_bombHolder.getInventory().remove(Material.GOLD_SWORD);
|
||||
|
||||
Vector vel = new Vector(Math.random() - 0.5, 0, Math.random() - 0.5);
|
||||
vel.normalize();
|
||||
vel.multiply(0.3);
|
||||
vel.setY(0.2);
|
||||
|
||||
_bombItem = _bombHolder.getWorld().dropItem(_bombHolder.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.GOLD_SWORD, (byte)0, 1, C.cGold + C.Bold + "C4 Explosive"));
|
||||
_bombItem.setVelocity(vel);
|
||||
_bombItem.setPickupDelay(60);
|
||||
|
||||
//Radio
|
||||
playSound(Radio.T_BOMB_DROP, null, GetTeam(_bombHolder));
|
||||
|
||||
_bombHolder = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public abstract class Grenade extends StrikeItem
|
||||
int alreadyHas = 0;
|
||||
int bestSlot = -1;
|
||||
|
||||
for (int i = 3 ; i < 7 ; i++)
|
||||
for (int i = 5 ; i >= 3 ; i--)
|
||||
{
|
||||
if (UtilInv.IsItem(player.getInventory().getItem(i), getSkin(), (byte) -1))
|
||||
alreadyHas++;
|
||||
|
@ -53,7 +53,7 @@ public class HighExplosive extends Grenade
|
||||
// Damage Event
|
||||
game.Manager.GetDamage().NewDamageEvent(player, _thrower, null,
|
||||
DamageCause.CUSTOM, 1 + (players.get(player) * 18),
|
||||
true, true, false, _thrower.getName(), getName());
|
||||
true, true, false, _thrower.getName(), getName(), ent);
|
||||
|
||||
damagedPlayers.add(player);
|
||||
}
|
||||
|
@ -164,6 +164,7 @@ public class Gun extends StrikeItem
|
||||
Vector cof = new Vector(Math.random() - 0.5, (Math.random() - 0.2) * (5d/8d), Math.random() - 0.5);
|
||||
cof.normalize();
|
||||
cof.multiply(cone);
|
||||
cof.multiply(MineStrike.CONE);
|
||||
|
||||
cof.add(player.getLocation().getDirection());
|
||||
cof.normalize();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package nautilus.game.arcade.game.games.minestrike.items.guns;
|
||||
|
||||
import nautilus.game.arcade.game.games.minestrike.MineStrike;
|
||||
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
|
||||
|
||||
import org.bukkit.Material;
|
||||
@ -241,7 +242,6 @@ public enum GunStats
|
||||
|
||||
private double _coneMin;
|
||||
private double _coneMax;
|
||||
private double _coneReduceRate;
|
||||
private double _coneIncreaseRate;
|
||||
|
||||
private boolean _scope = false;
|
||||
@ -375,7 +375,7 @@ public enum GunStats
|
||||
|
||||
public double getConeIncreaseRate()
|
||||
{
|
||||
return _coneIncreaseRate;
|
||||
return _coneIncreaseRate * MineStrike.RECOIL;
|
||||
}
|
||||
|
||||
public boolean getScope()
|
||||
|
@ -1,5 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.minestrike.items.guns;
|
||||
|
||||
import nautilus.game.arcade.game.games.minestrike.MineStrike;
|
||||
|
||||
public enum GunType
|
||||
{
|
||||
PISTOL("Pistol", 0.01, 0.02, 0.02, 3f, 0.1),
|
||||
@ -38,17 +40,17 @@ public enum GunType
|
||||
|
||||
public double getMovePenalty()
|
||||
{
|
||||
return _movePenalty;
|
||||
return _movePenalty * MineStrike.MOVE_PENALTY;
|
||||
}
|
||||
|
||||
public double getSprintPenalty()
|
||||
{
|
||||
return _sprintPentalty;
|
||||
return _sprintPentalty * MineStrike.MOVE_PENALTY;
|
||||
}
|
||||
|
||||
public double getJumpPenalty()
|
||||
{
|
||||
return _jumpPenalty;
|
||||
return _jumpPenalty * MineStrike.MOVE_PENALTY;
|
||||
}
|
||||
|
||||
public float getVolume()
|
||||
|
Loading…
Reference in New Issue
Block a user