Revert "Implement an OP version of cake wars just for fun"

This reverts commit 32c2b9456f9e4a2d0954f6805427e483a8d5187e.
This commit is contained in:
Sam 2018-01-20 12:22:06 +00:00 committed by Alexander Meech
parent 5152c07fa3
commit 84fddb953e
3 changed files with 0 additions and 103 deletions

View File

@ -25,7 +25,6 @@ import nautilus.game.arcade.game.games.build.modes.TeamBuild;
import nautilus.game.arcade.game.games.buildmavericks.BuildMavericks;
import nautilus.game.arcade.game.games.cakewars.CakeWars;
import nautilus.game.arcade.game.games.cakewars.modes.CakeWarsDuos;
import nautilus.game.arcade.game.games.cakewars.modes.CakeWarsSugarRush;
import nautilus.game.arcade.game.games.cards.Cards;
import nautilus.game.arcade.game.games.castleassault.CastleAssault;
import nautilus.game.arcade.game.games.castleassault.CastleAssaultTDM;
@ -252,7 +251,6 @@ public enum GameType
CakeWars4(CakeWars.class, GameDisplay.CakeWars4),
CakeWarsDuos(CakeWarsDuos.class, GameDisplay.CakeWarsDuos),
CakeWarsOP(CakeWarsSugarRush.class, GameDisplay.CakeWars4),
Event(EventGame.class, GameDisplay.Event, new GameType[]{
GameType.BaconBrawl, GameType.Barbarians, GameType.Bridge, GameType.Build, GameType.Build,

View File

@ -16,9 +16,6 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -36,23 +33,11 @@ public class CakeSpawnerModule extends CakeModule
private static final int MIN_BLOCK_PLACE_DIST_SQUARED = 4;
private int _base, _multiplier;
public CakeSpawnerModule(CakeWars game)
{
super(game);
}
public void setBase(int base)
{
_base = base;
}
public void setMultiplier(int multiplier)
{
_multiplier = multiplier;
}
@EventHandler
public void blockPlace(BlockPlaceEvent event)
{
@ -104,8 +89,6 @@ public class CakeSpawnerModule extends CakeModule
{
String[] text = new String[resources.length];
int resourceGenerator = cakeTeam.getUpgrades().get(CakeTeamItem.RESOURCE);
resourceGenerator += _base;
resourceGenerator *= _multiplier;
for (int i = 0; i < resources.length; i++)
{
@ -159,9 +142,7 @@ public class CakeSpawnerModule extends CakeModule
CakeTeam cakeTeam = _game.getCakeTeamModule().getCakeTeam(team);
amount += _base;
amount += cakeTeam.getUpgrades().get(CakeTeamItem.RESOURCE);
amount *= _multiplier;
ItemStack itemStack = resource.getItemStack().clone();
itemStack.setAmount(amount);
@ -170,11 +151,6 @@ public class CakeSpawnerModule extends CakeModule
List<Player> players = new ArrayList<>();
Item item = null;
if (_multiplier > 0)
{
UtilParticle.PlayParticleToAll(ParticleType.LAVA, location.clone().add(0, 1, 0), 0.3F, 0.3F, 0.3F, 0, 1, ViewDist.NORMAL);
}
for (Entity entity : location.getWorld().getNearbyEntities(location, 2, 2, 2))
{
if (entity instanceof Item)

View File

@ -1,77 +0,0 @@
package nautilus.game.arcade.game.games.cakewars.modes;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.games.cakewars.CakeWars;
public class CakeWarsSugarRush extends CakeWars
{
private static final PotionEffect SPEED = new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 0, false, false);
public CakeWarsSugarRush(ArcadeManager manager)
{
super(manager, GameType.CakeWarsOP);
getCakeSpawnerModule().setBase(1);
getCakeSpawnerModule().setMultiplier(2);
}
@EventHandler
public void prepare(GameStateChangeEvent event)
{
if (event.GetState() != GameState.Prepare)
{
return;
}
Manager.runSyncLater(() ->
{
GetTeamList().forEach(team ->
{
String title = team.GetColor() + C.Bold + "Cake " + C.cWhiteB + "Wars", subtitle = team.GetColor() + "★ Sugar Rush ★";
team.GetPlayers(false).forEach(player ->
{
UtilTextMiddle.display(title, subtitle, 10, 60, 10, player);
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1, 0.8F);
});
});
}, 60);
}
@EventHandler
public void updateSpeed(UpdateEvent event)
{
if (event.getType() != UpdateType.SEC || !InProgress())
{
return;
}
for (Player player : GetPlayers(true))
{
if (!player.hasPotionEffect(PotionEffectType.SPEED))
{
player.addPotionEffect(SPEED);
}
}
}
@Override
public String GetMode()
{
return "Sugar Rush";
}
}