more polisshhhh on snowfight

enabled xmas chests
This commit is contained in:
Cheese 2015-12-07 13:25:32 +11:00
parent cbafb2ba91
commit 54ec0e39bb
7 changed files with 48 additions and 18 deletions

View File

@ -59,6 +59,7 @@ import mineplex.core.status.ServerStatusManager;
import mineplex.core.task.TaskManager;
import mineplex.core.teleport.Teleport;
import mineplex.core.timing.TimingManager;
import mineplex.core.titangiveaway.TitanGiveawayManager;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.classcombat.Class.ClassManager;
import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager;
@ -101,6 +102,7 @@ import nautilus.game.arcade.managers.GameSpectatorManager;
import nautilus.game.arcade.managers.GameStatManager;
import nautilus.game.arcade.managers.GameTournamentManager;
import nautilus.game.arcade.managers.GameWorldManager;
import nautilus.game.arcade.managers.HolidayManager;
import nautilus.game.arcade.managers.IdleManager;
import nautilus.game.arcade.managers.MiscManager;
import nautilus.game.arcade.shop.ArcadeShop;
@ -298,8 +300,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation
new MiscManager(this);
_hologramManager = hologramManager;
_idleManager = new IdleManager(this);
//TitanGiveawayManager titanGiveaway = new TitanGiveawayManager(getPlugin(), clientManager, serverStatusManager);
//new HolidayManager(this, titanGiveaway);
TitanGiveawayManager titanGiveaway = new TitanGiveawayManager(getPlugin(), clientManager, serverStatusManager);
new HolidayManager(this, titanGiveaway);
// Game Addons
new CompassAddon(plugin, this);

View File

@ -29,7 +29,7 @@ public class KitGolem extends LeagueKit
new Perk[]
{
new PerkDoubleJump("Double Jump", 0.8, 0.8, true),
new PerkStoneWall(),
new PerkStoneWall("Iron Wall", Material.IRON_BLOCK, Material.IRON_INGOT),
new PerkSlow(0)
},
EntityType.IRON_GOLEM,

View File

@ -20,7 +20,9 @@ import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilGear;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -29,14 +31,19 @@ import nautilus.game.arcade.kit.perks.data.IcePathData;
public class PerkStoneWall extends Perk
{
private HashSet<IcePathData> _data = new HashSet<IcePathData>();
private Material _type;
private Material _itemInHand;
public PerkStoneWall()
public PerkStoneWall(String name, Material block, Material itemInHand)
{
super("Iron Wall", new String[]
super(name, new String[]
{
C.cYellow + "Click" + C.cGray + " to use " + C.cGreen + "Iron Wall"
C.cYellow + "Click" + C.cGray + " with " + ItemStackFactory.Instance.GetName(itemInHand, (byte)0, false) + " to use " + C.cGreen + name
});
_type = block;
_itemInHand = itemInHand;
}
@EventHandler
@ -49,6 +56,9 @@ public class PerkStoneWall extends Perk
event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK)
return;
if (!UtilGear.isMat(event.getPlayer().getItemInHand(), _itemInHand))
return;
if (UtilBlock.usable(event.getClickedBlock()))
return;
@ -98,9 +108,9 @@ public class PerkStoneWall extends Perk
loc.add(UtilAlg.getLeft(dir).multiply(i));
loc.add(UtilAlg.getUp(dir).multiply(j));
Manager.GetBlockRestore().add(loc.getBlock(), Material.IRON_BLOCK.getId(), (byte)0, 4000);
Manager.GetBlockRestore().add(loc.getBlock(), _type.getId(), (byte)0, 4000);
loc.getWorld().playEffect(loc, Effect.STEP_SOUND, Material.IRON_BLOCK);
loc.getWorld().playEffect(loc, Effect.STEP_SOUND, _type);
}
player.getWorld().playSound(player.getLocation(), Sound.IRONGOLEM_DEATH, 2f, 1f);

View File

@ -5,6 +5,7 @@ import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.AbbreviatedKit;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
@ -19,7 +20,7 @@ import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.Potion;
import org.bukkit.potion.PotionType;
public class KitMedic extends Kit
public class KitMedic extends AbbreviatedKit
{
public KitMedic(ArcadeManager manager)

View File

@ -16,15 +16,17 @@ import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.AbbreviatedKit;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkDoubleJump;
import nautilus.game.arcade.kit.perks.PerkFallDamage;
import nautilus.game.arcade.kit.perks.PerkSpeed;
public class KitSportsman extends Kit
public class KitSportsman extends AbbreviatedKit
{
public KitSportsman(ArcadeManager manager)
{
super(manager, "Sportsman", KitAvailability.Free,
@ -37,8 +39,9 @@ public class KitSportsman extends Kit
new Perk[]
{
new PerkDoubleJump("Snow Jump", 1, 0.8, true, 8000, true),
new PerkFallDamage(-2),
new PerkSpeed(0),
new PerkFallDamage(-2),
new PerkDoubleJump("Snow Jump", 1, 0.8, true, 8000, true),
},
EntityType.SKELETON,
new ItemStack(Material.SNOW_BALL));

View File

@ -1,7 +1,11 @@
package nautilus.game.arcade.game.games.snowfight.kits;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.games.monsterleague.perks.PerkStoneWall;
import nautilus.game.arcade.kit.AbbreviatedKit;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
@ -12,9 +16,13 @@ import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.Potion;
import org.bukkit.potion.PotionType;
public class KitTactician extends Kit
public class KitTactician extends AbbreviatedKit
{
public KitTactician(ArcadeManager manager)
@ -26,8 +34,8 @@ public class KitTactician extends Kit
}, new Perk[]
{
new PerkConstructor("Constructor", 16, 2, Material.FENCE, "Barrier", true),
new PerkIronSkin(0.25),
new PerkStoneWall("Ice Wall", Material.ICE, Material.CLAY_BALL),
},
EntityType.SKELETON,
new ItemStack(Material.FENCE));
@ -37,6 +45,7 @@ public class KitTactician extends Kit
@Override
public void GiveItems(Player player)
{
player.getInventory().setItem(1, ItemStackFactory.Instance.CreateStack(Material.CLAY_BALL, (byte)0, 1, "Ice Wall"));
player.getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.MUSHROOM_SOUP, (byte)0, 1, "Hearty Winter Stew"));
player.getInventory().setItem(3, ItemStackFactory.Instance.CreateStack(Material.MUSHROOM_SOUP, (byte)0, 1, "Hearty Winter Stew"));
player.getInventory().setItem(4, ItemStackFactory.Instance.CreateStack(Material.MUSHROOM_SOUP, (byte)0, 1, "Hearty Winter Stew"));

View File

@ -83,8 +83,8 @@ public class HolidayManager implements Listener
}
}
private HolidayType type = HolidayType.Halloween;
private String _statName = "Halloween Pumpkins 2015";
private HolidayType type = HolidayType.Christmas;
private String _statName = "Christmas Presents 2015";
ArcadeManager Manager;
private TitanGiveawayManager _titanManager;
@ -173,6 +173,11 @@ public class HolidayManager implements Listener
sendChestPackets(block);
}
}
else if (type == HolidayType.Christmas)
{
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, block.getLocation().add(0.5, 0.2, 0.5), 0.3f, 0.2f, 0.3f, 0, 1,
ViewDist.LONG, UtilServer.getPlayers());
}
}
}