Community testing feedback

This commit is contained in:
Sam 2017-07-31 20:48:36 +01:00
parent 5aefca3c6c
commit 0777855d9f
6 changed files with 98 additions and 99 deletions

View File

@ -438,7 +438,7 @@ public enum Achievement
CASTLE_SIEGE_KING_GUARD("Royal Guard", 0,
new String[]{"Castle Siege.KingGuard"},
new String[]{"Kill 5 Undead within 8 blocks of the King in One Game"},
new String[]{"Kill 5 Undead within 8 blocks of the King in the last 70 seconds"},
new int[][]{ new int[]{0,0,8000}},
new int[]{1},
"",

View File

@ -180,6 +180,12 @@ public class CastleSiegeKing implements Listener
player.sendMessage(F.main("Game", "You cannot place " + F.elem("Barricade") + " in water."));
return;
}
else if (nearby.getType() == Material.VINE)
{
event.setCancelled(true);
player.sendMessage(F.main("Game", "You cannot place " + F.elem("Barricade") + " near vines."));
return;
}
}
if (UtilMath.offsetSquared(_entity.getLocation(), block.getLocation()) < KING_FENCE_RANGE_SQUARED)

View File

@ -1,6 +1,29 @@
package nautilus.game.arcade.game.games.castlesiegenew;
import mineplex.core.achievement.Achievement;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
@ -15,6 +38,7 @@ import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.condition.ConditionFactory;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.FirstBloodEvent;
@ -38,29 +62,6 @@ import nautilus.game.arcade.stats.BloodThirstyStatTracker;
import nautilus.game.arcade.stats.TeamDeathsStatTracker;
import nautilus.game.arcade.stats.TeamKillsStatTracker;
import nautilus.game.arcade.stats.WinAsTeamStatTracker;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.TimeUnit;
public class CastleSiegeNew extends TeamGame
{
@ -85,23 +86,6 @@ public class CastleSiegeNew extends TeamGame
"Wolves must wait 6 seconds in between respawns.",
"Coordination and teamwork are important to winning as Defenders."
};
private static final Achievement[] GAME_ACHIEVEMENTS = {
Achievement.CASTLE_SIEGE_ASSASSIN,
Achievement.CASTLE_SIEGE_BLOOD_THIRSTY,
Achievement.CASTLE_SIEGE_CLOSE_CALL,
Achievement.CASTLE_SIEGE_FIRST_BLOOD,
Achievement.CASTLE_SIEGE_HORSE_KILLER,
Achievement.CASTLE_SIEGE_KING_FULL,
Achievement.CASTLE_SIEGE_KING_GUARD,
Achievement.CASTLE_SIEGE_KINGSLAYER,
Achievement.CASTLE_SIEGE_TNT_KILLER,
Achievement.CASTLE_SIEGE_WINS,
Achievement.CASTLE_SIEGE_WOLF_KILL
};
public static Achievement[] getGameAchievements()
{
return GAME_ACHIEVEMENTS;
}
private static final int START_TIME = 14000;
private static final int UNDEAD_BURN_TIME = 24000;
private static final int DEFENDER_WIN_TIME = UNDEAD_BURN_TIME + 200;
@ -150,7 +134,7 @@ public class CastleSiegeNew extends TeamGame
manager.GetCreature().SetDisableCustomDrops(true);
registerStatTrackers(
new BloodThirstyStatTracker(this, "KingGuard", 5, player -> getDefenders().HasPlayer(player), player -> UtilMath.offsetSquared(player, getKing().getEntity()) < 8 * 8),
new BloodThirstyStatTracker(this, "KingGuard", 5, player -> getDefenders().HasPlayer(player), player -> UtilMath.offsetSquared(player, getKing().getEntity()) < 8 * 8 && WorldTimeSet > UNDEAD_BURN_TIME - 60 * 20),
new BloodThirstyStatTracker(this, "WolfKill", 12, this::isWolf, player -> true),
new BloodThirstyStatTracker(this, "BloodThirsty", 50, player -> true, player -> GetTeam(player).equals(getUndead())),
new TeamKillsStatTracker(this),

View File

@ -1,25 +1,12 @@
package nautilus.game.arcade.game.games.castlesiegenew;
import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextBottom;
import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguiseBase;
import mineplex.core.disguise.disguises.DisguiseLiving;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;
import org.bukkit.Color;
import org.bukkit.Effect;
import org.bukkit.FireworkEffect.Type;
@ -41,12 +28,27 @@ import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;
import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextBottom;
import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguiseBase;
import mineplex.core.disguise.disguises.DisguiseLiving;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
public class CastleSiegeTNTManager implements Listener
{
@ -71,7 +73,9 @@ public class CastleSiegeTNTManager implements Listener
Material.LEAVES_2,
Material.WATER,
Material.STATIONARY_WATER,
Material.LADDER
Material.LADDER,
Material.SNOW,
Material.SNOW_BLOCK
);
private final CastleSiegeNew _host;
@ -267,7 +271,7 @@ public class CastleSiegeTNTManager implements Listener
UtilServer.runSyncLater(() ->
{
TNTPrimed primed = player.getWorld().spawn(UtilAlg.getRandomLocation(location, 5, 1, 5), TNTPrimed.class);
TNTPrimed primed = player.getWorld().spawn(UtilAlg.getRandomLocation(location, 2, 2, 2), TNTPrimed.class);
primed.setFuseTicks(0);
primed.setIsIncendiary(true);

View File

@ -1,6 +1,7 @@
package nautilus.game.arcade.game.games.castlesiegenew.kits;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.disguise.disguises.DisguiseSkeleton;
import mineplex.core.itemstack.ItemBuilder;
import nautilus.game.arcade.ArcadeManager;
@ -24,24 +25,24 @@ public class KitUndeadSummoner extends KitCastleSiege
private static final String[] DESCRIPTION = {
"I hope Im not bugging you.",
"",
click(false, "your potions to spawn undead mobs to help you fight")
click(false, "your eggs to spawn undead mobs to help you fight")
};
private static final String REDUCE_COOLDOWN = reduceCooldown("Undead Potions", 2);
private static final MobPotion SILVER_FISH = new MobPotion(
new ItemBuilder(Material.POTION)
new ItemBuilder(Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.SLIME))
.setTitle(C.cGreen + "Slime Potion")
.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 0, 0))
.build(), EntityType.SLIME, 3);
private static final MobPotion ZOMBIE = new MobPotion(
new ItemBuilder(Material.POTION)
new ItemBuilder(Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.ZOMBIE))
.setTitle(C.cGreen + "Zombie Potion")
.addPotionEffect(new PotionEffect(PotionEffectType.POISON, 0, 0))
.build(), EntityType.ZOMBIE, 1);
private static final MobPotion SPIDER = new MobPotion(
new ItemBuilder(Material.POTION)
.setTitle(C.cGreen + "Spider Potion")
new ItemBuilder(Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.SPIDER))
.setTitle(C.cGreen + "Spider Egg")
.addPotionEffect(new PotionEffect(PotionEffectType.HARM, 0, 0))
.build(), EntityType.SPIDER, 1);
@ -68,10 +69,10 @@ public class KitUndeadSummoner extends KitCastleSiege
private static final String[][] UPGRADES = {
{
receiveItem("Zombie Potion", 1)
receiveItem("Zombie Egg", 1)
},
{
receiveItem("Spider Potion", 1)
receiveItem("Spider Egg", 1)
},
{
REDUCE_COOLDOWN
@ -84,7 +85,7 @@ public class KitUndeadSummoner extends KitCastleSiege
}
};
private static final ItemStack IN_HAND = new ItemStack(Material.POTION);
private static final ItemStack IN_HAND = new ItemStack(Material.MONSTER_EGG);
public KitUndeadSummoner(ArcadeManager manager)
{

View File

@ -1,18 +1,13 @@
package nautilus.game.arcade.game.games.castlesiegenew.perks;
import mineplex.core.common.Pair;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.games.castlesiegenew.CastleSiegeNew;
import nautilus.game.arcade.kit.Perk;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Creature;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Slime;
@ -26,17 +21,24 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import mineplex.core.common.Pair;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.games.castlesiegenew.CastleSiegeNew;
import nautilus.game.arcade.kit.Perk;
public class PerkMobPotions extends Perk
{
private static final long MAX_TIME = TimeUnit.SECONDS.toMillis(16);
private static final long COOLDOWN = TimeUnit.SECONDS.toMillis(2);
private static final int HEALTH = 20;
private static final PotionEffect SPEED = new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 1, false, false);
private final MobPotion[] _mobPotions;
@ -125,14 +127,16 @@ public class PerkMobPotions extends Perk
for (int i = 0; i < mobPotion.getAmount(); i++)
{
Creature entity = (Creature) potion.getWorld().spawnEntity(potion.getLocation(), mobPotion.getEntityType());
LivingEntity entity = (LivingEntity) potion.getWorld().spawnEntity(potion.getLocation(), mobPotion.getEntityType());
entity.addPotionEffect(SPEED);
entity.setCustomName(player.getName() + "'s Minion");
entity.setCustomNameVisible(true);
entity.setMaxHealth(HEALTH);
entity.setHealth(HEALTH);
if (entity instanceof Slime)
{
((Slime) entity).setSize(2);
((Slime) entity).setSize(1);
}
_entities.add(new SummonedEntity(entity, player));
@ -242,12 +246,12 @@ public class PerkMobPotions extends Perk
private class SummonedEntity
{
Creature Summoned;
LivingEntity Summoned;
Player Owner;
GameTeam OwnerTeam;
long SpawnedAt;
SummonedEntity(Creature summoned, Player owner)
SummonedEntity(LivingEntity summoned, Player owner)
{
Summoned = summoned;
Owner = owner;