MineStrike update

This commit is contained in:
Chiss 2014-10-05 13:37:27 +11:00
parent 42e60d0856
commit d3f87dff46
31 changed files with 774 additions and 713 deletions

View File

@ -1,6 +1,7 @@
package mineplex.core.gadget.gadgets;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import org.bukkit.Color;
@ -12,6 +13,7 @@ import org.bukkit.entity.EnderPearl;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
@ -28,6 +30,8 @@ import mineplex.core.updater.event.UpdateEvent;
public class ItemEtherealPearl extends ItemGadget
{
private HashSet<String> _riding = new HashSet<String>();
public ItemEtherealPearl(GadgetManager manager)
{
super(manager, "Ethereal Pearl", new String[]
@ -62,6 +66,8 @@ public class ItemEtherealPearl extends ItemGadget
((CraftPlayer)player).getHandle().spectating = true;
UtilInv.Update(player);
_riding.add(player.getName());
}
@EventHandler
@ -95,7 +101,17 @@ public class ItemEtherealPearl extends ItemGadget
return;
for (Player player : UtilServer.getPlayers())
if (player.getVehicle() == null)
((CraftPlayer)player).getHandle().spectating = false;
if (_riding.contains(player.getName()))
if (player.getVehicle() == null)
{
((CraftPlayer)player).getHandle().spectating = false;
_riding.remove(player.getName());
}
}
@EventHandler
public void clean(PlayerQuitEvent event)
{
_riding.remove(event.getPlayer().getName());
}
}

View File

@ -102,12 +102,23 @@ public class Recharge extends MiniPlugin
return use(player, ability, ability, recharge, inform, false);
}
*/
public boolean use(Player player, String ability, long recharge, boolean inform, boolean attachItem)
{
return use(player, ability, ability, recharge, inform, attachItem);
}
public boolean use(Player player, String ability, String abilityFull, long recharge, boolean inform, boolean attachItem)
{
return use(player, ability, abilityFull, recharge, inform, attachItem, false);
}
public boolean use(Player player, String ability, long recharge, boolean inform, boolean attachItem, boolean attachDurability)
{
return use(player, ability, ability, recharge, inform, attachItem, attachDurability);
}
public boolean use(Player player, String ability, String abilityFull, long recharge, boolean inform, boolean attachItem, boolean attachDurability)
{
if (recharge == 0)
return true;
@ -132,14 +143,14 @@ public class Recharge extends MiniPlugin
}
//Insert
UseRecharge(player, ability, recharge, attachItem);
UseRecharge(player, ability, recharge, attachItem, attachDurability);
return true;
}
public void useForce(Player player, String ability, long recharge)
{
UseRecharge(player, ability, recharge, false);
UseRecharge(player, ability, recharge, false, false);
}
public boolean usable(Player player, String ability)
@ -150,14 +161,14 @@ public class Recharge extends MiniPlugin
return (System.currentTimeMillis() > Get(player).get(ability).Time);
}
public void UseRecharge(Player player, String ability, long recharge, boolean attachItem)
public void UseRecharge(Player player, String ability, long recharge, boolean attachItem, boolean attachDurability)
{
//Event
RechargeEvent rechargeEvent = new RechargeEvent(player, ability, recharge);
UtilServer.getServer().getPluginManager().callEvent(rechargeEvent);
if (attachItem)
Get(player).put(ability, new RechargeData(this, player, ability, player.getItemInHand(), rechargeEvent.GetRecharge()));
if (attachItem || attachDurability)
Get(player).put(ability, new RechargeData(this, player, ability, player.getItemInHand(), rechargeEvent.GetRecharge(), attachItem, attachDurability));
else
Get(player).put(ability, new RechargeData(System.currentTimeMillis()+rechargeEvent.GetRecharge()));
}

View File

@ -25,13 +25,16 @@ public class RechargeData
public String Name;
public ItemStack Item;
public boolean AttachItem;
public boolean AttachDurability;
public RechargeData(long time)
{
Time = time;
}
public RechargeData(Recharge host, Player player, String name, ItemStack stack, long rechargeTime)
public RechargeData(Recharge host, Player player, String name, ItemStack stack, long rechargeTime, boolean attachitem, boolean attachDurability)
{
Host = host;
@ -40,42 +43,51 @@ public class RechargeData
Item = player.getItemInHand();
Time = System.currentTimeMillis();
Recharge = rechargeTime;
AttachItem = attachitem;
AttachDurability = attachDurability;
}
public boolean Update()
{
if (Item != null && Name != null && Player != null)
{
try
//Holding Recharge Item
double percent = (double)(System.currentTimeMillis() - Time)/(double)Recharge;
if (AttachItem)
{
if (Player.getItemInHand().getType() == Item.getType())
try
{
if (!UtilTime.elapsed(Time, Recharge))
if (Player.getItemInHand().getType() == Item.getType())
{
//Holding Recharge Item
if (!UtilTime.elapsed(Time, Recharge))
{
UtilDisplay.displayTextBar(Host.GetPlugin(), Player, percent, C.cRed + C.Bold + Name + ChatColor.RESET + " - " +
C.cYellow + C.Bold + UtilTime.MakeStr(Recharge - (System.currentTimeMillis() - Time)));
}
else
{
UtilDisplay.displayTextBar(Host.GetPlugin(), Player, 1, C.cGreen + C.Bold + Name);
double percent = (double)(System.currentTimeMillis() - Time)/(double)Recharge;
UtilDisplay.displayTextBar(Host.GetPlugin(), Player, percent, C.cRed + C.Bold + Name + ChatColor.RESET + " - " +
C.cYellow + C.Bold + UtilTime.MakeStr(Recharge - (System.currentTimeMillis() - Time)));
}
else
{
UtilDisplay.displayTextBar(Host.GetPlugin(), Player, 1, C.cGreen + C.Bold + Name);
//PLING!
if (Recharge > 4000)
Player.playSound(Player.getLocation(), Sound.NOTE_PLING, 0.4f, 3f);
//PLING!
if (Recharge > 4000)
Player.playSound(Player.getLocation(), Sound.NOTE_PLING, 0.4f, 3f);
}
}
}
catch (Exception e)
{
System.out.println("Recharge Indicator Error!");
e.printStackTrace();
}
}
catch (Exception e)
if (AttachDurability)
{
System.out.println("Recharge Indicator Error!");
e.printStackTrace();
Item.setDurability((short) (Item.getType().getMaxDurability() - (Item.getType().getMaxDurability() * percent)));
}
/*
ItemMeta itemMeta = Item.getItemMeta();

View File

@ -47,6 +47,8 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.LeatherArmorMeta;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.util.Vector;
import mineplex.core.antistack.AntiStack;
@ -92,9 +94,8 @@ import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.equipment.armor.Armor;
import nautilus.game.arcade.game.games.minestrike.items.grenades.Grenade;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunStats;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
import nautilus.game.arcade.game.games.minestrike.items.guns.pistol.Glock18;
import nautilus.game.arcade.game.games.minestrike.items.guns.pistol.P2000;
import nautilus.game.arcade.game.games.minestrike.kits.KitPlayer;
import nautilus.game.arcade.kit.Kit;
import net.minecraft.server.v1_7_R4.EntityArrow;
@ -132,7 +133,7 @@ public class MineStrike extends TeamGame
private HashMap<Entity, Grenade> _grenadesThrown = new HashMap<Entity, Grenade>();
private HashSet<Entity> _defusalDropped = new HashSet<Entity>();
private HashMap<Location, Long> _incendiary = new HashMap<Location, Long>();
private Bomb _bomb = null;
@ -157,6 +158,8 @@ public class MineStrike extends TeamGame
private boolean _ctWonLast = false;
private int _winStreak = 0;
//Scoreboard
private Objective _scoreObj;
public MineStrike(ArcadeManager manager)
{
@ -183,9 +186,12 @@ public class MineStrike extends TeamGame
this.ItemDrop = true;
this.InventoryClick = true;
this.JoinInProgress = true;
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("HP", "dummy");
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
this._help = new String[]
{
//"Tap Crouch when close to an ally to Boost",
@ -233,40 +239,53 @@ public class MineStrike extends TeamGame
if (team.GetColor() == ChatColor.RED)
{
//Pistol
Gun gun = new Glock18();
registerGun(gun, event.GetPlayer());
gun.giveToPlayer(event.GetPlayer(), true);
if (IsAlive(event.GetPlayer()))
{
//Pistol
Gun gun = new Gun(GunStats.GLOCK_18);
registerGun(gun, event.GetPlayer());
gun.giveToPlayer(event.GetPlayer(), true);
//Knife
event.GetPlayer().getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, "Knife"));
//Knife
event.GetPlayer().getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, "Knife"));
//Armor
giveTeamArmor(event.GetPlayer(), Color.fromRGB(255, 0, 0));
}
//Sneak
disguiseSneak(event.GetPlayer(), team);
//Armor
giveTeamArmor(event.GetPlayer(), Color.fromRGB(255, 0, 0));
}
else if (team.GetColor() == ChatColor.AQUA)
{
//Pistol
Gun gun = new P2000();
registerGun(gun, event.GetPlayer());
gun.giveToPlayer(event.GetPlayer(), true);
if (IsAlive(event.GetPlayer()))
{
//Pistol
Gun gun = new Gun(GunStats.P2000);
registerGun(gun, event.GetPlayer());
gun.giveToPlayer(event.GetPlayer(), true);
//Knife
event.GetPlayer().getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD, (byte)0, 1, "Knife"));
//Knife
event.GetPlayer().getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD, (byte)0, 1, "Knife"));
//Armor
giveTeamArmor(event.GetPlayer(), Color.fromRGB(0, 0, 255));
}
//Sneak
disguiseSneak(event.GetPlayer(), team);
//Armor
giveTeamArmor(event.GetPlayer(), Color.fromRGB(0, 0, 255));
}
//Enter Shop
_shopManager.enterShop(event.GetPlayer());
}
@EventHandler(priority = EventPriority.MONITOR)
public void playerDeath(PlayerDeathEvent event)
{
//Dont Get Hit By Bullets
((CraftPlayer) event.getEntity()).getHandle().spectating = true;
}
public void disguiseSneak(Player player, GameTeam team)
{
@ -381,11 +400,11 @@ public class MineStrike extends TeamGame
UtilTitle.display(null, player.getName() + " has the Bomb", 10, 80, 10, other);
UtilPlayer.message(other, C.cGold + C.Bold + player.getName() + " has the Bomb!");
}
//Chat
UtilPlayer.message(player, C.cGold + C.Bold + "You have the Bomb!");
UtilPlayer.message(player, C.cGold + C.Bold + "Hold Right-Click to place at a Bomb Site!");
//Title
UtilTitle.display(C.cRed + "You have the Bomb", "Hold Right-Click to place at a Bomb Site!", 10, 80, 10, player);
}
@ -395,20 +414,20 @@ public class MineStrike extends TeamGame
if (!other.equals(player))
{
UtilPlayer.message(other, C.cGold + C.Bold + player.getName() + " picked up the Bomb!");
//Title
UtilTitle.display(null, player.getName() + " picked up the Bomb", 10, 50, 10, other);
}
//Chat
UtilPlayer.message(player, C.cGold + C.Bold + "You picked up the Bomb!");
//Title
UtilTitle.display(null, "You picked up the Bomb", 10, 50, 10, player);
}
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 2f);
_bombHolder = player;
@ -618,6 +637,7 @@ public class MineStrike extends TeamGame
{
gun.drop(this, event.getPlayer(), false, false);
event.getItemDrop().remove();
event.getPlayer().setItemInHand(null);
return;
}
@ -627,6 +647,7 @@ public class MineStrike extends TeamGame
{
grenade.drop(this, event.getPlayer(), false, false);
event.getItemDrop().remove();
event.getPlayer().setItemInHand(null);
return;
}
@ -635,6 +656,10 @@ public class MineStrike extends TeamGame
{
_bombItem = event.getItemDrop();
_bombHolder = null;
//Radio
playSound(Radio.T_BOMB_DROP, null, GetTeam(event.getPlayer()));
return;
}
@ -723,13 +748,16 @@ public class MineStrike extends TeamGame
{
_defusalDropped.add(player.getWorld().dropItemNaturally(player.getEyeLocation(), stack));
}
//Bomb
if (stack.getType() == Material.GOLD_SWORD)
{
_bombItem = player.getWorld().dropItemNaturally(player.getEyeLocation(), stack);
_bombItem.setPickupDelay(40);
_bombHolder = null;
//Radio
playSound(Radio.T_BOMB_DROP, null, GetTeam(ChatColor.RED));
}
}
@ -766,24 +794,24 @@ public class MineStrike extends TeamGame
if (grenade.pickup(this, event.getPlayer()))
event.getItem().remove();
}
//Defusal
if (UtilGear.isMat(event.getItem().getItemStack(), Material.SHEARS))
{
if (GetTeam(event.getPlayer()).GetColor() == ChatColor.RED)
return;
if (UtilInv.contains(event.getPlayer(), Material.SHEARS, (byte)0, 1))
return;
AntiStack.removeUID(event.getItem());
event.getPlayer().getInventory().setItem(8, event.getItem().getItemStack());
UtilPlayer.message(event.getPlayer(), F.main("Game", "You equipped Defusal Kit."));
event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.HORSE_ARMOR, 1.5f, 1f);
event.getItem().remove();
}
@ -799,13 +827,13 @@ public class MineStrike extends TeamGame
{
if (event.getType() != UpdateType.TICK)
return;
for (Gun gun : _gunsEquipped.keySet())
{
gun.cancelReloadCheck(_gunsEquipped.get(gun), this);
}
}
@EventHandler
public void rechargeWeapons(RechargedEvent event)
{
@ -939,6 +967,15 @@ public class MineStrike extends TeamGame
//Bullet Whiz Sound
instantBulletWhizz(arrow.getLocation(), bullet);
//Tracer Particle
Location loc = bullet.Origin.clone();
while (UtilMath.offset(loc, arrow.getLocation()) > 2)
{
loc.add(UtilAlg.getTrajectory(loc, arrow.getLocation()).multiply(1));
UtilParticle.PlayParticle(ParticleType.CRIT, loc, 0, 0, 0, 0, 1);
}
//Block Particle
try
{
@ -1036,7 +1073,7 @@ public class MineStrike extends TeamGame
}
//Knife
if (event.GetProjectile() == null)
if (event.GetProjectile() == null && event.GetCause() == DamageCause.ENTITY_ATTACK)
{
if (event.GetDamagerPlayer(false) != null)
{
@ -1213,7 +1250,7 @@ public class MineStrike extends TeamGame
if (hitBody(damagee, loc))
return 0;
if (hitHead(damagee, loc))
return 1;
@ -1238,9 +1275,6 @@ public class MineStrike extends TeamGame
@EventHandler
public void killReward(CombatDeathEvent event)
{
Game game = Manager.GetGame();
if (game == null) return;
if (!(event.GetEvent().getEntity() instanceof Player))
return;
@ -1270,8 +1304,38 @@ public class MineStrike extends TeamGame
_shopManager.addMoney(killer, amount, "kill with " + event.GetLog().GetLastDamager().GetReason());
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void killMessage(CombatDeathEvent event)
{
Player killed = (Player)event.GetEvent().getEntity();
if (event.GetLog().GetKiller() != null)
{
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
String reason = "You died.";
if (killer != null)
{
if (killer.equals(killed))
{
reason = "You killed yourself";
}
else
{
reason = "";
GameTeam team = GetTeam(killer);
if (team != null)
reason += team.GetColor();
reason += killer.getName() + ChatColor.RESET + " killed you with " + event.GetLog().GetLastDamager().GetReason();
}
}
UtilTitle.display("DEAD", reason, 0, 100, 20, killed);
}
}
@EventHandler
public void updateBulletsGrenades(UpdateEvent event)
@ -1382,6 +1446,9 @@ public class MineStrike extends TeamGame
_bombPlanter.setExp(0f);
UtilPlayer.message(player, F.main("Game", "You are placing the Bomb."));
//Radio
playSound(Radio.T_BOMB_PLANT, null, GetTeam(_bombPlanter));
}
@EventHandler
@ -1405,9 +1472,9 @@ public class MineStrike extends TeamGame
if (Math.random() > 0.90)
_bombPlanter.getWorld().playSound(_bombPlanter.getLocation(), Sound.NOTE_PLING, 1f, 3f);
UtilTitle.display(C.cRed + C.Bold + "Planting Bomb", UtilTitle.progress(_bombPlanter.getExp()), 0, 10, 0, _bombPlanter);
if (_bombPlanter.getExp() >= 0.98f)
{
_bomb = new Bomb(_bombPlanter);
@ -1422,10 +1489,10 @@ public class MineStrike extends TeamGame
_bombPlanter.setItemInHand(null);
_bombPlanter = null;
_bombHolder = null;
//Sound
playSound(Radio.BOMB_PLANT, null, null);
//Title
UtilTitle.display(null, C.cRed + C.Bold + "Bomb has been planted!", 10, 50, 10);
}
@ -1438,9 +1505,9 @@ public class MineStrike extends TeamGame
if (UtilMath.offset(event.getFrom(), event.getTo()) > 0)
event.setTo(event.getFrom());
// if (_bombDefuser != null && _bombDefuser.equals(event.getPlayer()))
// if (UtilMath.offset(event.getFrom(), event.getTo()) > 0)
// event.setTo(event.getFrom());
// if (_bombDefuser != null && _bombDefuser.equals(event.getPlayer()))
// if (UtilMath.offset(event.getFrom(), event.getTo()) > 0)
// event.setTo(event.getFrom());
}
@EventHandler
@ -1459,18 +1526,18 @@ public class MineStrike extends TeamGame
for (Player player : GetTeam(ChatColor.AQUA).GetPlayers(true))
{
Block block = player.getTargetBlock(null, 5);
if (block == null || !_bomb.isBlock(block))
continue;
if (UtilMath.offset(player.getLocation(), block.getLocation().add(0.5, 0, 0.5)) > 3)
continue;
if (_bombDefuser != null)
{
if (Recharge.Instance.use(player, "Defuse Message", 2000, false, false))
UtilPlayer.message(player, F.main("Game", _bombDefuser.getName() + " is already defusing the Bomb."));
continue;
}
@ -1482,13 +1549,13 @@ public class MineStrike extends TeamGame
_bombDefuser.getWorld().playSound(_bombDefuser.getLocation(), Sound.PISTON_RETRACT, 2f, 1f);
}
}
@EventHandler
public void defuseBombUpdate(UpdateEvent event)
{
if (_bomb == null)
return;
if (!IsLive())
return;
@ -1502,10 +1569,10 @@ public class MineStrike extends TeamGame
if (_bombDefuser == null)
return;
Block block = _bombDefuser.getTargetBlock(null, 5);
if (block == null || !_bomb.isBlock(block) || !_bombDefuser.isOnline() || UtilMath.offset(_bombDefuser.getLocation(), block.getLocation().add(0.5, 0, 0.5)) > 3)
if (!IsAlive(_bombDefuser) || block == null || !_bomb.isBlock(block) || !_bombDefuser.isOnline() || UtilMath.offset(_bombDefuser.getLocation(), block.getLocation().add(0.5, 0, 0.5)) > 3)
{
_bombDefuser.setExp(0f);
_bombDefuser = null;
@ -1520,7 +1587,7 @@ public class MineStrike extends TeamGame
_bombDefuser.setExp(Math.min(_bombDefuser.getExp() + defuseRate, 0.99999f));
UtilTitle.display(C.cAqua + C.Bold + "Defusing Bomb", UtilTitle.progress(_bombDefuser.getExp()), 0, 10, 0, _bombDefuser);
if (_bombDefuser.getExp() >= 0.98f)
{
_bomb.defuse();
@ -1530,7 +1597,7 @@ public class MineStrike extends TeamGame
_bomb = null;
_bombDefuser.setExp(0f);
_bombDefuser = null;
//Sound
playSound(Radio.BOMB_DEFUSE, null, null);
@ -1698,10 +1765,10 @@ public class MineStrike extends TeamGame
addScore(winner);
drawScoreboard();
color = winner.GetColor();
}
//Sound
if (winner != null)
{
@ -1751,7 +1818,7 @@ public class MineStrike extends TeamGame
for (Player player : UtilServer.getPlayers())
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
UtilTitle.display(null, winnerLine, 20, 120, 20);
//Check for total game win
@ -1800,10 +1867,14 @@ public class MineStrike extends TeamGame
if (GetKit(player) != null)
GetKit(player).ApplyKit(player);
}
//Remove Scope
for (Player player : GetPlayers(false))
removeScope(player);
//Get Hit By Bullets
for (Player player : GetPlayers(false))
((CraftPlayer) player).getHandle().spectating = false;
//Prepare Sound
for (Player player : GetPlayers(false))
@ -1811,7 +1882,7 @@ public class MineStrike extends TeamGame
player.playSound(player.getLocation(), Sound.HORSE_ARMOR, 1f, 2f);
Manager.GetCondition().Factory().Blind("Respawn", player, null, 2, 0, false, false, false);
UtilPlayer.message(player, F.main("Game", "You have " + F.elem(C.cGreen + "$" + _shopManager.getMoney(player)) + ". Open your Inventory to spend it."));
UtilTitle.display(C.cGreen + "$" + _shopManager.getMoney(player), "Open your Inventory to buy new equipment", 10, 120, 10, player);
}
@ -1925,7 +1996,7 @@ public class MineStrike extends TeamGame
for (Entity ent : _bullets.keySet())
ent.remove();
_bullets.clear();
//Bullets
for (Entity ent : _defusalDropped)
ent.remove();
@ -1997,13 +2068,13 @@ public class MineStrike extends TeamGame
else
player.playSound(player.getLocation(), Sound.NOTE_SNARE_DRUM, 1f, 1f);
}
if (_freezeTime == 0)
{
//Give Bomb
Player bombPlayer = UtilAlg.Random(GetTeam(ChatColor.RED).GetPlayers(true));
giveBombToPlayer(bombPlayer);
//Sound
playSound(Radio.CT_START, null, GetTeam(ChatColor.AQUA));
playSound(Radio.T_START, null, GetTeam(ChatColor.RED));
@ -2018,10 +2089,10 @@ public class MineStrike extends TeamGame
if (!IsAlive(event.getPlayer()))
return;
if (UtilMath.offset2d(event.getFrom(), event.getTo()) <= 0)
return;
event.getFrom().setPitch(event.getTo().getPitch());
event.getFrom().setYaw(event.getTo().getYaw());
@ -2092,7 +2163,7 @@ public class MineStrike extends TeamGame
if (gun.getGunType() == GunType.SNIPER)
{
event.getPlayer().getWorld().playSound(event.getPlayer().getEyeLocation(), Sound.GHAST_DEATH, 0.8f, 1f);
//if (Manager.GetCondition().GetActiveCondition(event.getPlayer(), ConditionType.BLINDNESS) == null)
Manager.GetCondition().Factory().Blind("Scope Blind", event.getPlayer(), null, 1, 0, false, false, false);
}
@ -2129,13 +2200,13 @@ public class MineStrike extends TeamGame
{
if (!_scoped.containsKey(player))
return;
ItemStack stack = _scoped.remove(player);
player.getInventory().setHelmet(stack);
UtilInv.Update(player);
Manager.GetCondition().EndCondition(player, null, "Scope");
player.getWorld().playSound(player.getEyeLocation(), Sound.GHAST_DEATH, 0.8f, 1f);
@ -2357,7 +2428,7 @@ public class MineStrike extends TeamGame
if (_bullets.containsKey(ent))
continue;
if (_defusalDropped.contains(ent))
continue;
@ -2386,7 +2457,7 @@ public class MineStrike extends TeamGame
else if (_grenadesThrown.containsKey(event.getEntity()))
event.setCancelled(true);
else if (_defusalDropped.contains(event.getEntity()))
event.setCancelled(true);
@ -2460,6 +2531,36 @@ public class MineStrike extends TeamGame
}
}
@EventHandler
public void healthUpdate(UpdateEvent event)
{
if (!IsLive())
return;
if (event.getType() != UpdateType.SEC)
return;
for (Player player : UtilServer.getPlayers())
_scoreObj.getScore(player.getName()).setScore((int)(player.getHealth() * 5));
}
@EventHandler(priority = EventPriority.MONITOR)
public void damageHealth(CustomDamageEvent event)
{
Player player = event.GetDamagerPlayer(true);
if (player == null)
return;
_scoreObj.getScore(player.getName()).setScore((int)(player.getHealth() * 5));
}
@EventHandler
public void fireDamage(CustomDamageEvent event)
{
if (event.GetCause() == DamageCause.FIRE)
event.AddMod(this.GetName(), "Fire", 3, false);
}
@Override
public void SetSpectator(Player player)
{
@ -2491,30 +2592,30 @@ public class MineStrike extends TeamGame
{
return _bulletInstant;
}
public void playSound(Radio radio, Player player, GameTeam team)
{
if (player == null && team == null)
{
for (Player other : UtilServer.getPlayers())
other.playSound(other.getLocation(), radio.getSound(), 1f, 1f);
other.playSound(other.getLocation(), radio.getSound(), 1.5f, 1f);
}
else if (team != null)
{
for (Player other : team.GetPlayers(false))
other.playSound(other.getLocation(), radio.getSound(), 1f, 1f);
other.playSound(other.getLocation(), radio.getSound(), 1.5f, 1f);
}
else if (player != null)
{
GameTeam playerTeam = GetTeam(player);
if (playerTeam == null)
return;
for (Player other : playerTeam.GetPlayers(false))
other.playSound(player.getLocation(), radio.getSound(), 1.5f, 1f);
}
}
@EventHandler
public void joinMessage(PlayerJoinEvent event)
{

View File

@ -23,6 +23,9 @@ public enum Radio
CT_START(new Sound[] {Sound.VILLAGER_HIT}),
T_START(new Sound[] {Sound.VILLAGER_HAGGLE}),
T_BOMB_PLANT(new Sound[] {Sound.ZOMBIE_PIG_DEATH}),
T_BOMB_DROP(new Sound[] {Sound.ZOMBIE_INFECT}),
;
private Sound[] _sounds;

View File

@ -20,10 +20,7 @@ import nautilus.game.arcade.game.games.minestrike.items.equipment.armor.Helmet;
import nautilus.game.arcade.game.games.minestrike.items.equipment.armor.Kevlar;
import nautilus.game.arcade.game.games.minestrike.items.grenades.*;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.pistol.*;
import nautilus.game.arcade.game.games.minestrike.items.guns.rifle.*;
import nautilus.game.arcade.game.games.minestrike.items.guns.shotgun.*;
import nautilus.game.arcade.game.games.minestrike.items.guns.smg.*;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunStats;
import org.bukkit.ChatColor;
import org.bukkit.Color;
@ -60,27 +57,27 @@ public class ShopManager
//Pistols
slot = 9;
addItem(team.GetColor() == ChatColor.RED ? new Glock18() : new P2000(), player, slot++);
addItem(new P250(), player, slot++);
addItem(new CZ75(), player, slot++);
addItem(new Deagle(), player, slot++);
addItem(team.GetColor() == ChatColor.RED ? new Gun(GunStats.GLOCK_18) : new Gun(GunStats.P2000), player, slot++);
addItem(new Gun(GunStats.P250), player, slot++);
addItem(new Gun(GunStats.CZ75), player, slot++);
addItem(new Gun(GunStats.DEAGLE), player, slot++);
//Shotgun
slot = 18;
addItem(new Nova(), player, slot++);
addItem(new XM1014(), player, slot++);
addItem(new Gun(GunStats.NOVA), player, slot++);
addItem(new Gun(GunStats.XM1014), player, slot++);
//SMG
addItem(new PPBizon(), player, slot++);
addItem(new P90(), player, slot++);
addItem(new Gun(GunStats.PPBIZON), player, slot++);
addItem(new Gun(GunStats.P90), player, slot++);
//Rifles
slot = 27;
addItem(team.GetColor() == ChatColor.RED ? new Galil() : new Famas(), player, slot++);
addItem(team.GetColor() == ChatColor.RED ? new AK47() : new M4A4(), player, slot++);
addItem(team.GetColor() == ChatColor.RED ? new SG553() : new AUG(), player, slot++);
addItem(new SSG08(), player, slot++);
addItem(new AWP(), player, slot++);
addItem(team.GetColor() == ChatColor.RED ? new Gun(GunStats.GALIL) : new Gun(GunStats.FAMAS), player, slot++);
addItem(team.GetColor() == ChatColor.RED ? new Gun(GunStats.AK47) : new Gun(GunStats.M4A4), player, slot++);
addItem(team.GetColor() == ChatColor.RED ? new Gun(GunStats.SG553) : new Gun(GunStats.AUG), player, slot++);
addItem(new Gun(GunStats.SSG08), player, slot++);
addItem(new Gun(GunStats.AWP), player, slot++);
//Grenades
addItem(new FlashBang(), player, 14);

View File

@ -91,6 +91,8 @@ public abstract class StrikeItem
public void drop(MineStrike game, Player player, boolean natural, boolean onlyDeregisterAndRemove)
{
_stack.setAmount(1);
Entity ent;
if (natural)

View File

@ -40,8 +40,12 @@ public class HighExplosive extends Grenade
HashMap<Player, Double> players = UtilPlayer.getInRadius(ent.getLocation(), 10);
for (Player player : players.keySet())
{
game.Announce("HE: " + player.getName());
if (!game.IsAlive(player))
continue;
game.Announce("Damage: " + player.getName());
// Damage Event
game.Manager.GetDamage().NewDamageEvent(player, _thrower, null,

View File

@ -31,74 +31,36 @@ import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.util.Vector;
public abstract class Gun extends StrikeItem
public class Gun extends StrikeItem
{
protected GunType _gunType;
protected GunStats _gunStats;
protected int _slot;
//Stats
protected int _clipSize;
protected int _clipReserve;
protected long _fireRate;
protected long _reloadTime;
protected double _damage;
protected double _dropOffPerBlock;
protected double _armorPen;
protected Sound _fireSound;
protected double _coneMin;
protected double _coneMax;
protected double _coneReduceRate;
protected double _coneIncreaseRate;
protected boolean _scope = false;
protected boolean _reloading = false;
//Active Data
protected int _loadedAmmo;
protected int _reserveAmmo;
protected double _cone;
protected double _lastMove;
protected long _lastMoveTime;
protected boolean _reloading = false;
public Gun(StrikeItemType type, GunType gunType, String name, String[] desc,
int cost, int gemCost,
int clipSize, int clipReserve,
long fireRate, long reloadTime,
double damage, double dropOffPerBlock, double armorPen,
double coneMin, double coneMax,
double coneIncrease, double coneReduce,
Material skin, Sound sound)
public Gun(GunStats gunStats)
{
super(type, name, desc, cost, gemCost, skin);
super(gunStats.getItemType(), gunStats.getName(), gunStats.getDesc(), gunStats.getCost(), gunStats.getGemCost(), gunStats.getSkin());
_gunType = gunType;
if (type == StrikeItemType.PRIMARY_WEAPON)
_gunStats = gunStats;
if (gunStats.getItemType() == StrikeItemType.PRIMARY_WEAPON)
_slot = 0;
else
_slot = 1;
_clipSize = clipSize;
_clipReserve = clipReserve;
_fireRate = fireRate;
_reloadTime = reloadTime;
_damage = damage;
_dropOffPerBlock = dropOffPerBlock;
_armorPen = armorPen;
_cone = gunStats.getConeMin();
_fireSound = sound;
_coneMin = coneMin;
_coneMax = coneMax;
_coneIncreaseRate = coneIncrease;
_coneReduceRate = coneReduce;
_cone = _coneMin;
_loadedAmmo = clipSize;
_reserveAmmo = clipReserve * clipSize;
_loadedAmmo = gunStats.getClipSize();
_reserveAmmo = gunStats.getClipReserve() * gunStats.getClipSize();
updateWeaponName(null);
}
@ -112,7 +74,7 @@ public abstract class Gun extends StrikeItem
shootOnce(player, game);
//600RPM
if (_fireRate <= 100 && _fireRate > 50)
if (_gunStats.getFireRate() <= 100 && _gunStats.getFireRate() > 50)
{
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(game.Manager.GetPlugin(), new Runnable()
{
@ -125,7 +87,7 @@ public abstract class Gun extends StrikeItem
}
//1200RPM
if (_fireRate <= 50)
if (_gunStats.getFireRate() <= 50)
{
for (int i=1 ; i<4 ; i++)
{
@ -143,11 +105,17 @@ public abstract class Gun extends StrikeItem
public void shootOnce(Player player, MineStrike game)
{
if (_reloading)
return;
//Check Ammo
if (!ammoCheck(player))
{
reload(player);
return;
if (!Recharge.Instance.use(player, getName() + " Shoot", _fireRate, false, false))
}
if (!Recharge.Instance.use(player, getName() + " Shoot", _gunStats.getFireRate(), false, false))
return;
//Use Ammo
@ -166,14 +134,18 @@ public abstract class Gun extends StrikeItem
game.registerBullet(fireBullet(player, game));
//Unscope
if (_gunType == GunType.SNIPER)
if (_gunStats.getGunType() == GunType.SNIPER)
game.removeScope(player);
//Reload
if (_loadedAmmo == 0)
reload(player);
}
public Bullet fireBullet(Player player, MineStrike game)
{
//Instant?
boolean instant = game.getBulletType() == 1 || (game.getBulletType() == 2 && _gunType == GunType.SNIPER);
boolean instant = game.getBulletType() == 1 || (game.getBulletType() == 2 && _gunStats.getGunType() == GunType.SNIPER);
//Shoot
Entity bullet;
@ -197,14 +169,14 @@ public abstract class Gun extends StrikeItem
bullet.setVelocity(cof.multiply(instant ? 200 : 4));
//Increase COF
_cone = Math.min(_coneMax, _cone + _coneIncreaseRate);
_cone = Math.min(_gunStats.getConeMax(), _cone + _gunStats.getConeIncreaseRate());
return new Bullet(bullet, this, player, game);
}
public double getArmorPenetration()
{
return _armorPen;
return _gunStats.getArmorPen();
}
public double getCone(Player player)
@ -213,31 +185,31 @@ public abstract class Gun extends StrikeItem
//Move Penalty
if (!UtilTime.elapsed(_lastMoveTime, 75))
cone += _lastMove * _gunType.getMovePenalty();
cone += _lastMove * _gunStats.getGunType().getMovePenalty();
//Sprint Penalty
if (player.isSprinting())
cone += _gunType.getSprintPenalty();
cone += _gunStats.getGunType().getSprintPenalty();
//Airborne Penalty
else if (!UtilEnt.isGrounded(player))
cone += _gunType.getJumpPenalty();
cone += _gunStats.getGunType().getJumpPenalty();
//Crouch
else if (player.isSneaking() && _gunType != GunType.SNIPER)
else if (player.isSneaking() && _gunStats.getGunType() != GunType.SNIPER)
cone = cone * 0.8;
//Sniper Zoomed
if (_scope && UtilGear.isMat(player.getInventory().getHelmet(), Material.PUMPKIN))
if (_gunStats.getScope() && UtilGear.isMat(player.getInventory().getHelmet(), Material.PUMPKIN))
{
//Snipers Perfectly Accurate if not jumping
if (_gunType == GunType.SNIPER)
if (_gunStats.getGunType() == GunType.SNIPER)
{
cone = 0;
if (!UtilEnt.isGrounded(player))
cone += _gunType.getJumpPenalty();
cone += _gunStats.getGunType().getJumpPenalty();
}
//30% Recoil Decrease
else
@ -263,12 +235,15 @@ public abstract class Gun extends StrikeItem
public long getReloadTime()
{
return _reloadTime;
return _gunStats.getReloadTime();
}
public void reload(Player player)
{
if (_loadedAmmo == _clipSize)
if (_reloading)
return;
if (_loadedAmmo == _gunStats.getClipSize())
return;
int ammo = _reserveAmmo + _loadedAmmo;
@ -278,9 +253,9 @@ public abstract class Gun extends StrikeItem
UtilPlayer.message(player, F.main("Gun", "You have no more ammo for " + F.name(getName()) + "."));
return;
}
//Recharge
Recharge.Instance.use(player, getName() + " Reload", getReloadTime(), false, true);
Recharge.Instance.use(player, getName() + " Reload", getReloadTime(), false, true, true);
//Sound
soundReload(player.getLocation());
@ -299,6 +274,8 @@ public abstract class Gun extends StrikeItem
ItemMeta meta = getStack().getItemMeta();
meta.setDisplayName(ChatColor.RESET + (getOwnerName() == null ? "" : getOwnerName() + "'s ") + C.Bold + getName() + ChatColor.RESET + " " + C.cGreen + _loadedAmmo + ChatColor.RESET + " / " + C.cYellow + _reserveAmmo);
getStack().setItemMeta(meta);
getStack().setAmount(Math.max(1, _loadedAmmo));
if (player != null)
player.getInventory().setItem(_slot, getStack());
@ -306,12 +283,12 @@ public abstract class Gun extends StrikeItem
public double getDropOff()
{
return _dropOffPerBlock;
return _gunStats.getDropoff();
}
public void soundFire(Location loc)
{
loc.getWorld().playSound(loc, _fireSound, _gunType.getVolume(), (float)(Math.random() * 0.2 + 0.9));
loc.getWorld().playSound(loc, _gunStats.getFireSound(), _gunStats.getGunType().getVolume(), (float)(Math.random() * 0.2 + 0.9));
}
public void soundEmpty(Location loc)
@ -351,8 +328,8 @@ public abstract class Gun extends StrikeItem
//Update Ammo
int ammo = _reserveAmmo + _loadedAmmo;
_loadedAmmo = Math.min(ammo, _clipSize);
_reserveAmmo = Math.max(0, ammo - _clipSize);
_loadedAmmo = Math.min(ammo, _gunStats.getClipSize());
_reserveAmmo = Math.max(0, ammo - _gunStats.getClipSize());
//Update
updateWeaponName(player);
@ -386,7 +363,7 @@ public abstract class Gun extends StrikeItem
public void reduceCone()
{
_cone = Math.max(_coneMin, _cone - (_coneReduceRate / 20d));
_cone = Math.max(_gunStats.getConeMin(), _cone - (_gunStats.getConeReduceRate() / 20d));
}
public void reloadEvent(RechargedEvent event)
@ -420,21 +397,21 @@ public abstract class Gun extends StrikeItem
public void restockAmmo(Player player)
{
_loadedAmmo = _clipSize;
_reserveAmmo = _clipReserve * _clipSize;
_loadedAmmo = _gunStats.getClipSize();
_reserveAmmo = _gunStats.getClipReserve() * _gunStats.getClipSize();
updateWeaponName(player);
}
public double getDamage()
{
return _damage/5d;
return _gunStats.getDamage()/5d;
}
@Override
public String getShopItemType()
{
return C.cDGreen + C.Bold + _gunType.getName() + ChatColor.RESET;
return C.cDGreen + C.Bold + _gunStats.getGunType().getName() + ChatColor.RESET;
}
@Override
@ -442,22 +419,22 @@ public abstract class Gun extends StrikeItem
{
return new String[]
{
C.cYellow + C.Bold + "Clip / Spare Ammo: " + ChatColor.RESET + _clipSize + "/" + _clipReserve*_clipSize,
C.cYellow + C.Bold + "Clip / Spare Ammo: " + ChatColor.RESET + _gunStats.getClipSize() + "/" + _gunStats.getClipReserve()*_gunStats.getClipSize(),
C.cYellow + C.Bold + "Damage per Bullet: " + ChatColor.RESET + UtilMath.trim(1, getDamage()),
C.cYellow + C.Bold + "Armor Penetration: " + ChatColor.RESET + (int)(_armorPen*100) + "%",
C.cYellow + C.Bold + "Damage Dropoff: " + ChatColor.RESET + (int)(_dropOffPerBlock*1000d) + "% per 10 Blocks",
C.cYellow + C.Bold + "Recoil per Shot: " + ChatColor.RESET + _coneIncreaseRate,
C.cYellow + C.Bold + "Recoil Recovery: " + ChatColor.RESET + _coneReduceRate + " per Second",
C.cYellow + C.Bold + "Armor Penetration: " + ChatColor.RESET + (int)(_gunStats.getArmorPen()*100) + "%",
C.cYellow + C.Bold + "Damage Dropoff: " + ChatColor.RESET + (int)(_gunStats.getDropoff()*1000d) + "% per 10 Blocks",
C.cYellow + C.Bold + "Recoil per Shot: " + ChatColor.RESET + _gunStats.getConeIncreaseRate(),
C.cYellow + C.Bold + "Recoil Recovery: " + ChatColor.RESET + _gunStats.getConeReduceRate() + " per Second",
};
}
public boolean hasScope()
{
return _scope;
return _gunStats.getScope();
}
public GunType getGunType()
{
return _gunType;
return _gunStats.getGunType();
}
}

View File

@ -0,0 +1,12 @@
package nautilus.game.arcade.game.games.minestrike.items.guns;
public class GunFactory
{
public Gun createGun(GunStats gun)
{
if (gun.getGunType() == GunType.SHOTGUN)
return new Shotgun(gun);
return new Gun(gun);
}
}

View File

@ -0,0 +1,390 @@
package nautilus.game.arcade.game.games.minestrike.items.guns;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import org.bukkit.Material;
import org.bukkit.Sound;
public enum GunStats
{
//Pistols XXX
CZ75(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "CZ75-Auto", new String[]
{
},
500, 0, //Cost, Gem Cost
12, 1, //Clip Size, Spare Ammo
80, 2700, //ROF, Reload Time
35, 0.006, 0.77, //Damage, Dropoff, Armor Penetration
0.02, 0.2, //COF Min, COF Max
0.06, //COF Inc per Bullet
Material.IRON_HOE, Sound.ENDERMAN_DEATH, false, 1),
DEAGLE(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "Desert Eagle", new String[]
{
},
800, 0, //Cost, Gem Cost
7, 5, //Clip Size, Spare Ammo
300, 2200, //ROF, Reload Time
68, 0.007, 0.85, //Damage, Dropoff, Armor Penetration
0, 0.12, //COF Min, COF Max
0.12, //COF Inc per Bullet
Material.GOLD_HOE, Sound.BAT_DEATH, false, 1),
GLOCK_18(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "Glock 18", new String[]
{
},
200, 0, //Cost, Gem Cost
20, 6, //Clip Size, Spare Ammo
120, 2200, //ROF, Reload Time
28, 0.008, 0.47, //Damage, Dropoff, Armor Penetration
0.01, 0.06, //COF Min, COF Max
0.06, //COF Inc per Bullet
Material.STONE_HOE, Sound.BAT_LOOP, false, 1),
P2000(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "P2000", new String[]
{
},
200, 0, //Cost, Gem Cost
13, 4, //Clip Size, Spare Ammo
130, 2200, //ROF, Reload Time
35, 0.008, 0.50, //Damage, Dropoff, Armor Penetration
0.01, 0.06, //COF Min, COF Max
0.03, //COF Inc per Bullet
Material.WOOD_HOE, Sound.GHAST_SCREAM2, false, 1),
P250(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "P250", new String[]
{
},
300, 0, //Cost, Gem Cost
13, 4, //Clip Size, Spare Ammo
130, 2200, //ROF, Reload Time
35, 0.005, 0.77, //Damage, Dropoff, Armor Penetration
0, 0.05, //COF Min, COF Max
0.03, //COF Inc per Bullet
Material.DIAMOND_HOE, Sound.SILVERFISH_KILL, false, 1),
//Rifles XXX
FAMAS(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "FAMAS", new String[]
{
},
2250, 5000, //Cost, Gem Cost
25, 4, //Clip Size, Spare Ammo
80, 3300, //ROF, Reload Time
30, 0.004, 0.7, //Damage, Dropoff, Armor Penetration
0, 0.17, //COF Min, COF Max
0.06, //COF Inc per Bullet
Material.WOOD_PICKAXE, Sound.WITHER_DEATH, false, 1),
GALIL(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "Galil AR", new String[]
{
},
2000, 5000, //Cost, Gem Cost
35, 3, //Clip Size, Spare Ammo
80, 2600, //ROF, Reload Time
30, 0.004, 0.75, //Damage, Dropoff, Armor Penetration
0, 0.18, //COF Min, COF Max
0.065, //COF Inc per Bullet
Material.STONE_PICKAXE, Sound.WITHER_SHOOT, false, 1),
AK47(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "AK-47", new String[]
{
},
2700, 5000, //Cost, Gem Cost
30, 3, //Clip Size, Spare Ammo
80, 2500, //ROF, Reload Time
36, 0.004, 0.78, //Damage, Dropoff, Armor Penetration
0, 0.15, //COF Min, COF Max
0.055, //COF Inc per Bullet
Material.WOOD_SPADE, Sound.BURP, false, 1),
M4A4(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "M4A4", new String[]
{
},
2900, 5000, //Cost, Gem Cost
30, 3, //Clip Size, Spare Ammo
80, 3000, //ROF, Reload Time
33, 0.004, 0.7, //Damage, Dropoff, Armor Penetration
0, 0.14, //COF Min, COF Max
0.05, //COF Inc per Bullet
Material.STONE_SPADE, Sound.BAT_TAKEOFF, false, 1),
SG553(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "SG553", new String[]
{
},
3000, 5000, //Cost, Gem Cost
30, 3, //Clip Size, Spare Ammo
80, 3800, //ROF, Reload Time
30, 0.004, 1.00, //Damage, Dropoff, Armor Penetration
0, 0.13, //COF Min, COF Max
0.045, //COF Inc per Bullet
Material.IRON_PICKAXE, Sound.WITHER_SPAWN, true, 1),
AUG(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "Steyr AUG", new String[]
{
},
3300, 5000, //Cost, Gem Cost
30, 3, //Clip Size, Spare Ammo
80, 3800, //ROF, Reload Time
28, 0.004, 0.9, //Damage, Dropoff, Armor Penetration
0, 0.12, //COF Min, COF Max
0.04, //COF Inc per Bullet
Material.GOLD_PICKAXE, Sound.VILLAGER_DEATH, true, 1),
//Sniper XXX
AWP(StrikeItemType.PRIMARY_WEAPON, GunType.SNIPER, "AWP", new String[]
{
},
4750, 5000, //Cost, Gem Cost
10, 3, //Clip Size, Spare Ammo
1500, 3600, //ROF, Reload Time
115, 0, 0.97, //Damage, Dropoff, Armor Penetration
0.14, 0.14, //COF Min, COF Max
0, //COF Inc per Bullet
Material.GOLD_SPADE, Sound.DRINK, true, 1),
SSG08(StrikeItemType.PRIMARY_WEAPON, GunType.SNIPER, "SSG 08", new String[]
{
},
1700, 5000, //Cost, Gem Cost
10, 6, //Clip Size, Spare Ammo
1250, 3700, //ROF, Reload Time
88, 0.001, 0.85, //Damage, Dropoff, Armor Penetration
0.08, 0.08, //COF Min, COF Max
0, //COF Inc per Bullet
Material.DIAMOND_PICKAXE, Sound.WOLF_DEATH, true, 1),
//Shotgun XXX
NOVA(StrikeItemType.PRIMARY_WEAPON, GunType.SHOTGUN, "Nova", new String[]
{
},
1200, 5000, //Cost, Gem Cost
8, 4, //Clip Size, Spare Ammo
1000, 600, //ROF, Reload Time
26, 0.03, 0.5, //Damage, Dropoff, Armor Penetration
0.1, 0.1, //COF Min, COF Max
0, //COF Inc per Bullet
Material.GOLD_AXE, Sound.BLAZE_DEATH, false, 9),
XM1014(StrikeItemType.PRIMARY_WEAPON, GunType.SHOTGUN, "XM1014", new String[]
{
},
2000, 5000, //Cost, Gem Cost
7, 4, //Clip Size, Spare Ammo
260, 600, //ROF, Reload Time
20, 0.03, 0.8, //Damage, Dropoff, Armor Penetration
0.12, 0.12, //COF Min, COF Max
0, //COF Inc per Bullet
Material.DIAMOND_AXE, Sound.SKELETON_DEATH, false, 6),
//Smg XXX
P90(StrikeItemType.PRIMARY_WEAPON, GunType.SMG, "P90", new String[]
{
},
2350, 5000, //Cost, Gem Cost
50, 2, //Clip Size, Spare Ammo
35, 3300, //ROF, Reload Time
17, 0.006, 0.65, //Damage, Dropoff, Armor Penetration
0.04, 0.12, //COF Min, COF Max
0.03, //COF Inc per Bullet
Material.STONE_AXE, Sound.CREEPER_DEATH, false, 1),
PPBIZON(StrikeItemType.PRIMARY_WEAPON, GunType.SMG, "PP-Bizon", new String[]
{
},
1400, 5000, //Cost, Gem Cost
64, 2, //Clip Size, Spare Ammo
60, 2400, //ROF, Reload Time
27, 0.007, 0.47, //Damage, Dropoff, Armor Penetration
0.04, 0.14, //COF Min, COF Max
0.04, //COF Inc per Bullet
Material.WOOD_AXE, Sound.SHEEP_SHEAR, false, 1);
private GunType _gunType;
private StrikeItemType _itemType;
private String _name;
private String[] _desc;
private int _cost;
private int _gemCost;
private int _clipSize;
private int _clipReserve;
private long _fireRate;
private long _reloadTime;
private double _damage;
private double _dropOffPerBlock;
private double _armorPen;
private Material _skin;
private Sound _fireSound;
private double _coneMin;
private double _coneMax;
private double _coneReduceRate;
private double _coneIncreaseRate;
private boolean _scope = false;
private int _pellets;
GunStats(StrikeItemType type, GunType gunType, String name, String[] desc,
int cost, int gemCost,
int clipSize, int clipReserve,
long fireRate, long reloadTime,
double damage, double dropOffPerBlock, double armorPen,
double coneMin, double coneMax, double coneIncrease,
Material skin, Sound sound, boolean scope, int pellets)
{
_itemType = type;
_gunType = gunType;
_name = name;
_desc = desc;
_cost = cost;
_gemCost = gemCost;
_clipSize = clipSize;
_clipReserve = clipReserve;
_fireRate = fireRate;
_reloadTime = reloadTime;
_damage = damage;
_dropOffPerBlock = dropOffPerBlock;
_armorPen = armorPen;
_skin = skin;
_fireSound = sound;
_coneMin = coneMin;
_coneMax = coneMax;
_coneIncreaseRate = coneIncrease;
_scope = scope;
_pellets = pellets;
}
public StrikeItemType getItemType()
{
return _itemType;
}
public GunType getGunType()
{
return _gunType;
}
public String getName()
{
return _name;
}
public String[] getDesc()
{
return _desc;
}
public int getCost()
{
return _cost;
}
public int getGemCost()
{
return _gemCost;
}
public int getClipSize()
{
return _clipSize;
}
public int getClipReserve()
{
return _clipReserve;
}
public long getFireRate()
{
return _fireRate;
}
public long getReloadTime()
{
return _reloadTime;
}
public double getDamage()
{
return _damage;
}
public double getDropoff()
{
return _dropOffPerBlock;
}
public double getArmorPen()
{
return _armorPen;
}
public Material getSkin()
{
return _skin;
}
public Sound getFireSound()
{
return _fireSound;
}
public double getConeMin()
{
return _coneMin;
}
public double getConeMax()
{
return _coneMax;
}
public double getConeReduceRate()
{
return _gunType.getRecoilReduction();
}
public double getConeIncreaseRate()
{
return _coneIncreaseRate;
}
public boolean getScope()
{
return _scope;
}
public int getPellets()
{
return _pellets;
}
}

View File

@ -2,14 +2,12 @@ package nautilus.game.arcade.game.games.minestrike.items.guns;
public enum GunType
{
PISTOL("Pistol", 0.00, 0.01, 0.02, 3f, 0.1),
SHOTGUN("Shotgun", 0, 0, 0, 3f, 0.1),
SMG("SMG", 0.01, 0.02, 0.04, 3f, 0.3),
RIFLE("Rifle", 0.04, 0.08, 0.12, 3.5f, 0.3),
PISTOL("Pistol", 0.06, 0.04, 0.08, 3f),
SHOTGUN("Shotgun", 0, 0, 0, 3f),
SMG("SMG", 0.08, 0.05, 0.1, 3f),
RIFLE("Rifle", 0.1, 0.06, 0.12, 3.5f),
SNIPER("Sniper Rifle", 0.16, 0.08, 0.16, 4f);
SNIPER("Sniper Rifle", 0.16, 0.08, 0.16, 4f, 0.1);
private String _name;
@ -18,8 +16,10 @@ public enum GunType
private double _jumpPenalty;
private float _volume;
private double _recoilReductionRate;
GunType(String name, double move, double sprint, double jump, float volume)
GunType(String name, double move, double sprint, double jump, float volume, double recoilReductionRate)
{
_name = name;
_movePenalty = move;
@ -27,6 +27,8 @@ public enum GunType
_jumpPenalty = jump;
_volume = volume;
_recoilReductionRate = recoilReductionRate;
}
public String getName()
@ -53,4 +55,9 @@ public enum GunType
{
return _volume;
}
public double getRecoilReduction()
{
return _recoilReductionRate;
}
}

View File

@ -12,23 +12,15 @@ import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerMoveEvent;
public abstract class Shotgun extends Gun
public class Shotgun extends Gun
{
private int _pellets;
public Shotgun(StrikeItemType type, String name, String[] desc,
int cost, int gemCost,
int clipSize, int spareAmmo,
long fireRate, long reloadTime, double damage,
double dropOffPerBlock, double bulletSpeed, double coneMin,
double coneMax, double coneIncrease, double coneReduce,
Material skin, Sound sound, int pellets)
public Shotgun(GunStats gunStats)
{
super(type, GunType.SHOTGUN, name, desc, cost, gemCost, clipSize, spareAmmo, fireRate, reloadTime, damage,
dropOffPerBlock, bulletSpeed, coneMin, coneMax, coneIncrease,
coneReduce, skin, sound);
super(gunStats);
_pellets = pellets;
_pellets = gunStats.getPellets();
}
@Override
@ -39,14 +31,17 @@ public abstract class Shotgun extends Gun
//Check Ammo
if (!ammoCheck(player))
{
reload(player);
return;
if (!Recharge.Instance.use(player, getName() + " Shoot", _fireRate, false, false))
}
if (!Recharge.Instance.use(player, getName() + " Shoot", _gunStats.getFireRate(), false, false))
return;
//Use Ammo
_loadedAmmo--;
updateWeaponName(player);
updateWeaponName(player);
//Effect
soundFire(player.getLocation());
@ -54,12 +49,16 @@ public abstract class Shotgun extends Gun
for (int i=0 ; i<_pellets ; i++)
game.registerBullet(fireBullet(player, game));
//Reload
if (_loadedAmmo == 0)
reload(player);
}
@Override
public void soundRefire(Location loc)
{
if (_fireRate >= 500)
if (_gunStats.getFireRate() >= 500)
{
loc.getWorld().playSound(loc, Sound.PISTON_RETRACT, 0.8f, 1.2f);
loc.getWorld().playSound(loc, Sound.PISTON_RETRACT, 0.8f, 1.2f);
@ -81,7 +80,7 @@ public abstract class Shotgun extends Gun
@Override
public long getReloadTime()
{
long time = _reloadTime + _reloadTime * Math.min(_reserveAmmo, _clipSize - _loadedAmmo);
long time = _gunStats.getReloadTime() + _gunStats.getReloadTime() * Math.min(_reserveAmmo, _gunStats.getClipSize() - _loadedAmmo);
return time;
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.pistol;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class CZ75 extends Gun
{
public CZ75()
{
super(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "CZ75-Auto", new String[]
{
},
500, 0, //Cost, Gem Cost
12, 1, //Clip Size, Spare Ammo
80, 2700, //ROF, Reload Time
35, 0.006, 0.77, //Damage, Dropoff, Armor Penetration
0, 0.2, //COF Min, COF Max
0.06, 0.3, //COF Inc per Bullet, COF Dec per Second
Material.IRON_HOE, Sound.ENDERMAN_DEATH);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.pistol;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class Deagle extends Gun
{
public Deagle()
{
super(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "Desert Eagle", new String[]
{
},
800, 0, //Cost, Gem Cost
7, 5, //Clip Size, Spare Ammo
300, 2200, //ROF, Reload Time
68, 0.007, 0.85, //Damage, Dropoff, Armor Penetration
0, 0.2, //COF Min, COF Max
0.18, 0.2, //COF Inc per Bullet, COF Dec per Second
Material.GOLD_HOE, Sound.BAT_DEATH);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.pistol;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class Glock18 extends Gun
{
public Glock18()
{
super(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "Glock 18", new String[]
{
},
200, 0, //Cost, Gem Cost
20, 6, //Clip Size, Spare Ammo
120, 2200, //ROF, Reload Time
28, 0.008, 0.47, //Damage, Dropoff, Armor Penetration
0, 0.12, //COF Min, COF Max
0.06, 0.3, //COF Inc per Bullet, COF Dec per Second
Material.STONE_HOE, Sound.BAT_LOOP);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.pistol;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class P2000 extends Gun
{
public P2000()
{
super(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "P2000", new String[]
{
},
200, 0, //Cost, Gem Cost
13, 4, //Clip Size, Spare Ammo
130, 2200, //ROF, Reload Time
35, 0.008, 0.50, //Damage, Dropoff, Armor Penetration
0, 0.12, //COF Min, COF Max
0.06, 0.3, //COF Inc per Bullet, COF Dec per Second
Material.WOOD_HOE, Sound.GHAST_SCREAM2);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.pistol;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class P250 extends Gun
{
public P250()
{
super(StrikeItemType.SECONDARY_WEAPON, GunType.PISTOL, "P250", new String[]
{
},
300, 0, //Cost, Gem Cost
13, 4, //Clip Size, Spare Ammo
130, 2200, //ROF, Reload Time
35, 0.005, 0.77, //Damage, Dropoff, Armor Penetration
0, 0.1, //COF Min, COF Max
0.06, 0.3, //COF Inc per Bullet, COF Dec per Second
Material.DIAMOND_HOE, Sound.SILVERFISH_KILL);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.rifle;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class AK47 extends Gun
{
public AK47()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "AK-47", new String[]
{
},
2700, 5000, //Cost, Gem Cost
30, 3, //Clip Size, Spare Ammo
80, 2500, //ROF, Reload Time
36, 0.004, 0.78, //Damage, Dropoff, Armor Penetration
0, 0.3, //COF Min, COF Max
0.051, 0.35, //COF Inc per Bullet, COF Dec per Second
Material.WOOD_SPADE, Sound.BURP);
}
}

View File

@ -1,29 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.rifle;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class AUG extends Gun
{
public AUG()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "Steyr AUG", new String[]
{
},
3300, 5000, //Cost, Gem Cost
30, 3, //Clip Size, Spare Ammo
80, 3800, //ROF, Reload Time
28, 0.004, 0.9, //Damage, Dropoff, Armor Penetration
0, 0.25, //COF Min, COF Max
0.05, 0.4, //COF Inc per Bullet, COF Dec per Second
Material.GOLD_PICKAXE, Sound.VILLAGER_DEATH);
_scope = true;
}
}

View File

@ -1,31 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.rifle;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class AWP extends Gun
{
public AWP()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.SNIPER, "AWP", new String[]
{
},
4750, 5000, //Cost, Gem Cost
10, 3, //Clip Size, Spare Ammo
1500, 3600, //ROF, Reload Time
115, 0, 0.97, //Damage, Dropoff, Armor Penetration
0.14, 0.14, //COF Min, COF Max
0, 0, //COF Inc per Bullet, COF Dec per Second
Material.GOLD_SPADE, Sound.DRINK);
_scope = true;
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.rifle;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class Famas extends Gun
{
public Famas()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "FAMAS", new String[]
{
},
2250, 5000, //Cost, Gem Cost
25, 4, //Clip Size, Spare Ammo
80, 3300, //ROF, Reload Time
30, 0.004, 0.7, //Damage, Dropoff, Armor Penetration
0, 0.28, //COF Min, COF Max
0.040, 0.30, //COF Inc per Bullet, COF Dec per Second
Material.WOOD_PICKAXE, Sound.WITHER_DEATH);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.rifle;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class Galil extends Gun
{
public Galil()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "Galil AR", new String[]
{
},
2000, 5000, //Cost, Gem Cost
35, 3, //Clip Size, Spare Ammo
80, 2600, //ROF, Reload Time
30, 0.004, 0.75, //Damage, Dropoff, Armor Penetration
0, 0.30, //COF Min, COF Max
0.042, 0.30, //COF Inc per Bullet, COF Dec per Second
Material.STONE_PICKAXE, Sound.WITHER_SHOOT);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.rifle;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class M4A4 extends Gun
{
public M4A4()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "M4A4", new String[]
{
},
2900, 5000, //Cost, Gem Cost
30, 3, //Clip Size, Spare Ammo
80, 3000, //ROF, Reload Time
33, 0.004, 0.7, //Damage, Dropoff, Armor Penetration
0, 0.26, //COF Min, COF Max
0.048, 0.35, //COF Inc per Bullet, COF Dec per Second
Material.STONE_SPADE, Sound.BAT_TAKEOFF);
}
}

View File

@ -1,29 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.rifle;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class SG553 extends Gun
{
public SG553()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.RIFLE, "SG553", new String[]
{
},
3000, 5000, //Cost, Gem Cost
30, 3, //Clip Size, Spare Ammo
80, 3800, //ROF, Reload Time
30, 0.004, 1.00, //Damage, Dropoff, Armor Penetration
0, 0.25, //COF Min, COF Max
0.052, 0.4, //COF Inc per Bullet, COF Dec per Second
Material.IRON_PICKAXE, Sound.WITHER_SPAWN);
_scope = true;
}
}

View File

@ -1,31 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.rifle;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class SSG08 extends Gun
{
public SSG08()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.SNIPER, "SSG 08", new String[]
{
},
1700, 5000, //Cost, Gem Cost
10, 6, //Clip Size, Spare Ammo
1250, 3700, //ROF, Reload Time
88, 0.001, 0.85, //Damage, Dropoff, Armor Penetration
0.08, 0.08, //COF Min, COF Max
0, 0, //COF Inc per Bullet, COF Dec per Second
Material.DIAMOND_PICKAXE, Sound.WOLF_DEATH);
_scope = true;
}
}

View File

@ -1,26 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.shotgun;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Shotgun;
public class Nova extends Shotgun
{
public Nova()
{
super(StrikeItemType.PRIMARY_WEAPON, "Nova", new String[]
{
},
1200, 5000, //Cost, Gem Cost
8, 4, //Clip Size, Spare Ammo
1000, 600, //ROF, Reload Time
26, 0.01, 0.5, //Damage, Dropoff, Armor Penetration
0.1, 0.1, //COF Min, COF Max
0, 0, //COF Inc per Bullet, COF Dec per Second
Material.GOLD_AXE, Sound.BLAZE_DEATH, 9);
}
}

View File

@ -1,26 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.shotgun;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Shotgun;
public class XM1014 extends Shotgun
{
public XM1014()
{
super(StrikeItemType.PRIMARY_WEAPON, "XM1014", new String[]
{
},
2000, 5000, //Cost, Gem Cost
7, 4, //Clip Size, Spare Ammo
260, 600, //ROF, Reload Time
20, 0.01, 0.8, //Damage, Dropoff, Armor Penetration
0.12, 0.12, //COF Min, COF Max
0, 0, //COF Inc per Bullet, COF Dec per Second
Material.DIAMOND_AXE, Sound.SKELETON_DEATH, 6);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.smg;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class P90 extends Gun
{
public P90()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.SMG, "P90", new String[]
{
},
2350, 5000, //Cost, Gem Cost
50, 2, //Clip Size, Spare Ammo
35, 3300, //ROF, Reload Time
17, 0.006, 0.65, //Damage, Dropoff, Armor Penetration
0, 0.25, //COF Min, COF Max
0.022, 0.3, //COF Inc per Bullet, COF Dec per Second
Material.STONE_AXE, Sound.CREEPER_DEATH);
}
}

View File

@ -1,27 +0,0 @@
package nautilus.game.arcade.game.games.minestrike.items.guns.smg;
import org.bukkit.Material;
import org.bukkit.Sound;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
public class PPBizon extends Gun
{
public PPBizon()
{
super(StrikeItemType.PRIMARY_WEAPON, GunType.SMG, "PP-Bizon", new String[]
{
},
1400, 5000, //Cost, Gem Cost
64, 2, //Clip Size, Spare Ammo
60, 2400, //ROF, Reload Time
27, 0.007, 0.47, //Damage, Dropoff, Armor Penetration
0, 0.3, //COF Min, COF Max
0.045, 0.3, //COF Inc per Bullet, COF Dec per Second
Material.WOOD_AXE, Sound.SHEEP_SHEAR);
}
}

View File

@ -38,7 +38,6 @@ import nautilus.game.arcade.stats.WinWithoutDyingStatTracker;
public class Quiver extends SoloGame
{
private ArrayList<QuiverScore> _ranks = new ArrayList<QuiverScore>();
private ArrayList<String> _lastScoreboard = new ArrayList<String>();
private HashMap<Player, Integer> _combo = new HashMap<Player, Integer>();
private HashMap<Player, Integer> _bestCombo = new HashMap<Player, Integer>();
private HashMap<Player, Long> _deathTime = new HashMap<Player, Long>();