Fix evolution not progression.
Fixed incorrect description in Gladiators Reformatted kits in Bridges
This commit is contained in:
parent
1893e98036
commit
e28d411ee4
@ -1,5 +1,6 @@
|
|||||||
package nautilus.game.arcade.game.games.bridge;
|
package nautilus.game.arcade.game.games.bridge;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import mineplex.core.common.Rank;
|
import mineplex.core.common.Rank;
|
||||||
import mineplex.core.common.util.*;
|
import mineplex.core.common.util.*;
|
||||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||||
@ -149,10 +150,13 @@ public class Bridge extends TeamGame implements OreObsfucation
|
|||||||
"The last team alive wins!"
|
"The last team alive wins!"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
List<Kit> kits = Lists.newArrayList(GetKits());
|
||||||
|
List<Kit> finalKits = Lists.newArrayList(kits);
|
||||||
|
|
||||||
boolean foundBrawler = false;
|
boolean foundBrawler = false;
|
||||||
for(int i = 0; i < GetKits().length; i++)
|
for(int i = 0; i < kits.size(); i++)
|
||||||
{
|
{
|
||||||
Kit kit = GetKits()[i];
|
Kit kit = kits.get(i);
|
||||||
if(kit.GetName().equalsIgnoreCase("Brawler"))
|
if(kit.GetName().equalsIgnoreCase("Brawler"))
|
||||||
{
|
{
|
||||||
if(!foundBrawler)
|
if(!foundBrawler)
|
||||||
@ -161,11 +165,13 @@ public class Bridge extends TeamGame implements OreObsfucation
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetKits()[i] = null;
|
finalKits.remove(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setKits(finalKits.toArray(new Kit[finalKits.size()]));
|
||||||
|
|
||||||
_ore = new OreHider();
|
_ore = new OreHider();
|
||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
|
@ -1,26 +1,10 @@
|
|||||||
package nautilus.game.arcade.game.games.evolution;
|
package nautilus.game.arcade.game.games.evolution;
|
||||||
|
|
||||||
import java.util.AbstractMap.SimpleEntry;
|
import com.google.common.collect.Maps;
|
||||||
import java.util.ArrayList;
|
import mineplex.core.common.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
|
||||||
import mineplex.core.common.util.F;
|
|
||||||
import mineplex.core.common.util.NautHashMap;
|
|
||||||
import mineplex.core.common.util.UtilAlg;
|
|
||||||
import mineplex.core.common.util.UtilEnt;
|
|
||||||
import mineplex.core.common.util.UtilEvent;
|
|
||||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||||
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.ParticleType;
|
||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
|
||||||
import mineplex.core.common.util.UtilServer;
|
|
||||||
import mineplex.core.common.util.UtilTextMiddle;
|
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
@ -37,29 +21,16 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
|
|||||||
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
|
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
|
||||||
import nautilus.game.arcade.game.GameTeam;
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
import nautilus.game.arcade.game.SoloGame;
|
import nautilus.game.arcade.game.SoloGame;
|
||||||
import nautilus.game.arcade.game.games.evolution.events.EvolutionAbilityUseEvent;
|
import nautilus.game.arcade.game.games.evolution.events.*;
|
||||||
import nautilus.game.arcade.game.games.evolution.events.EvolutionAttemptingTickEvent;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.events.EvolutionBeginEvent;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.events.EvolutionEndEvent;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.events.EvolutionPostEvolveEvent;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.evolve.EvolveManager;
|
import nautilus.game.arcade.game.games.evolution.evolve.EvolveManager;
|
||||||
import nautilus.game.arcade.game.games.evolution.kits.KitAbility;
|
import nautilus.game.arcade.game.games.evolution.kits.KitAbility;
|
||||||
import nautilus.game.arcade.game.games.evolution.kits.KitEvolveSpeed;
|
import nautilus.game.arcade.game.games.evolution.kits.KitEvolveSpeed;
|
||||||
import nautilus.game.arcade.game.games.evolution.kits.KitHealth;
|
import nautilus.game.arcade.game.games.evolution.kits.KitHealth;
|
||||||
import nautilus.game.arcade.game.games.evolution.mobs.KitBlaze;
|
import nautilus.game.arcade.game.games.evolution.mobs.*;
|
||||||
import nautilus.game.arcade.game.games.evolution.mobs.KitChicken;
|
import nautilus.game.arcade.game.games.evolution.trackers.*;
|
||||||
import nautilus.game.arcade.game.games.evolution.mobs.KitCreeper;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.mobs.KitGolem;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.mobs.KitSlime;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.mobs.KitSpider;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.trackers.EvoWinWithoutDyingTracker;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.trackers.KillsWhileEvolvingTracker;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.trackers.NoAbilityTracker;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.trackers.NoDamageWhileEvolvingTracker;
|
|
||||||
import nautilus.game.arcade.game.games.evolution.trackers.NoMeleeTracker;
|
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
|
import nautilus.game.arcade.kit.ProgressingKit;
|
||||||
import nautilus.game.arcade.stats.KillFastStatTracker;
|
import nautilus.game.arcade.stats.KillFastStatTracker;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -76,6 +47,9 @@ import org.bukkit.event.player.PlayerItemHeldEvent;
|
|||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public class Evolution extends SoloGame
|
public class Evolution extends SoloGame
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -87,6 +61,7 @@ public class Evolution extends SoloGame
|
|||||||
|
|
||||||
private ArrayList<EvoKit> _mobKits = new ArrayList<EvoKit>();
|
private ArrayList<EvoKit> _mobKits = new ArrayList<EvoKit>();
|
||||||
private ArrayList<Kit> _kits = new ArrayList<Kit>();
|
private ArrayList<Kit> _kits = new ArrayList<Kit>();
|
||||||
|
private Map<UUID, ProgressingKit> _startedKit = Maps.newHashMap();
|
||||||
|
|
||||||
private NautHashMap<String, EvoToken> _tokens = new NautHashMap<String, EvoToken>();
|
private NautHashMap<String, EvoToken> _tokens = new NautHashMap<String, EvoToken>();
|
||||||
|
|
||||||
@ -174,6 +149,20 @@ public class Evolution extends SoloGame
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void select(UUID player, ProgressingKit kit)
|
||||||
|
{
|
||||||
|
_startedKit.put(player, kit);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProgressingKit getStartedKit(UUID player, boolean remove)
|
||||||
|
{
|
||||||
|
if(remove)
|
||||||
|
{
|
||||||
|
return _startedKit.remove(player);
|
||||||
|
}
|
||||||
|
return _startedKit.get(player);
|
||||||
|
}
|
||||||
|
|
||||||
public EvolveManager getEvolve()
|
public EvolveManager getEvolve()
|
||||||
{
|
{
|
||||||
return _evolve;
|
return _evolve;
|
||||||
|
@ -4,7 +4,6 @@ import nautilus.game.arcade.ArcadeManager;
|
|||||||
import nautilus.game.arcade.kit.KitAvailability;
|
import nautilus.game.arcade.kit.KitAvailability;
|
||||||
import nautilus.game.arcade.kit.Perk;
|
import nautilus.game.arcade.kit.Perk;
|
||||||
import nautilus.game.arcade.kit.ProgressingKit;
|
import nautilus.game.arcade.kit.ProgressingKit;
|
||||||
import nautilus.game.arcade.kit.perks.PerkLeap;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -16,12 +15,9 @@ public class KitGladiator extends ProgressingKit
|
|||||||
|
|
||||||
private static final String[] DESCRIPTION = {
|
private static final String[] DESCRIPTION = {
|
||||||
"At my signal, unleash hell.",
|
"At my signal, unleash hell.",
|
||||||
"",
|
|
||||||
leap()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Perk[] PERKS = {
|
private static final Perk[] PERKS = {
|
||||||
new PerkLeap("Leap", 1.2, 1.0, 8000),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final ItemStack IN_HAND = new ItemStack(Material.IRON_SWORD);
|
private static final ItemStack IN_HAND = new ItemStack(Material.IRON_SWORD);
|
||||||
|
@ -16,6 +16,8 @@ import mineplex.core.progression.gui.Menu;
|
|||||||
import mineplex.core.progression.math.Calculations;
|
import mineplex.core.progression.math.Calculations;
|
||||||
import mineplex.core.shop.page.ConfirmationPage;
|
import mineplex.core.shop.page.ConfirmationPage;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
|
import nautilus.game.arcade.GameType;
|
||||||
|
import nautilus.game.arcade.game.games.evolution.Evolution;
|
||||||
import nautilus.game.arcade.shop.KitPackage;
|
import nautilus.game.arcade.shop.KitPackage;
|
||||||
import net.minecraft.server.v1_8_R3.EntityFireworks;
|
import net.minecraft.server.v1_8_R3.EntityFireworks;
|
||||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityStatus;
|
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityStatus;
|
||||||
@ -172,6 +174,11 @@ public abstract class ProgressingKit extends Kit implements ProgressiveKit
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(Manager.GetGame().GetType() == GameType.Evolution)
|
||||||
|
{
|
||||||
|
Evolution evolution = (Evolution) Manager.GetGame();
|
||||||
|
evolution.select(player, this);
|
||||||
|
}
|
||||||
_dataManager.get(player).setCurrentKit(getInternalName());
|
_dataManager.get(player).setCurrentKit(getInternalName());
|
||||||
Manager.GetGame().SetKit(Bukkit.getPlayer(player), this, true);
|
Manager.GetGame().SetKit(Bukkit.getPlayer(player), this, true);
|
||||||
Manager.getProgressionKitManager().displayParticles(this, player);
|
Manager.getProgressionKitManager().displayParticles(this, player);
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package nautilus.game.arcade.stats;
|
package nautilus.game.arcade.stats;
|
||||||
|
|
||||||
import mineplex.core.common.util.NautHashMap;
|
import mineplex.core.common.util.NautHashMap;
|
||||||
|
import nautilus.game.arcade.GameType;
|
||||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.GemData;
|
import nautilus.game.arcade.game.GemData;
|
||||||
|
import nautilus.game.arcade.game.games.evolution.Evolution;
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
import nautilus.game.arcade.kit.ProgressingKit;
|
import nautilus.game.arcade.kit.ProgressingKit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -98,6 +100,11 @@ public class ExperienceStatTracker extends StatTracker<Game>
|
|||||||
int expGained = (int)(((timeExp + gemExp)*mult)*getGame().XpMult);
|
int expGained = (int)(((timeExp + gemExp)*mult)*getGame().XpMult);
|
||||||
//Exp
|
//Exp
|
||||||
Kit kit = event.GetGame().GetKit(player);
|
Kit kit = event.GetGame().GetKit(player);
|
||||||
|
if(event.GetGame().GetType() == GameType.Evolution)
|
||||||
|
{
|
||||||
|
Evolution evolution = (Evolution) event.GetGame();
|
||||||
|
kit = evolution.getStartedKit(player.getUniqueId(), true);
|
||||||
|
}
|
||||||
if (kit instanceof ProgressingKit)
|
if (kit instanceof ProgressingKit)
|
||||||
{
|
{
|
||||||
ProgressingKit progressingKit = (ProgressingKit) kit;
|
ProgressingKit progressingKit = (ProgressingKit) kit;
|
||||||
|
Loading…
Reference in New Issue
Block a user