Fix evolution not progression.

Fixed incorrect description in Gladiators
Reformatted kits in Bridges
This commit is contained in:
TadahTech 2016-06-16 18:32:19 -05:00 committed by cnr
parent 1893e98036
commit e28d411ee4
5 changed files with 47 additions and 42 deletions

View File

@ -1,5 +1,6 @@
package nautilus.game.arcade.game.games.bridge;
import com.google.common.collect.Lists;
import mineplex.core.common.Rank;
import mineplex.core.common.util.*;
import mineplex.core.common.util.UtilEvent.ActionType;
@ -149,10 +150,13 @@ public class Bridge extends TeamGame implements OreObsfucation
"The last team alive wins!"
});
List<Kit> kits = Lists.newArrayList(GetKits());
List<Kit> finalKits = Lists.newArrayList(kits);
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(!foundBrawler)
@ -161,11 +165,13 @@ public class Bridge extends TeamGame implements OreObsfucation
}
else
{
GetKits()[i] = null;
finalKits.remove(i);
}
}
}
setKits(finalKits.toArray(new Kit[finalKits.size()]));
_ore = new OreHider();
// Flags

View File

@ -1,26 +1,10 @@
package nautilus.game.arcade.game.games.evolution;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
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 com.google.common.collect.Maps;
import mineplex.core.common.util.*;
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.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.updater.UpdateType;
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.game.GameTeam;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.evolution.events.EvolutionAbilityUseEvent;
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.events.*;
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.KitEvolveSpeed;
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.KitChicken;
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.game.games.evolution.mobs.*;
import nautilus.game.arcade.game.games.evolution.trackers.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.ProgressingKit;
import nautilus.game.arcade.stats.KillFastStatTracker;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
@ -76,6 +47,9 @@ import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.util.Vector;
import java.util.AbstractMap.SimpleEntry;
import java.util.*;
public class Evolution extends SoloGame
{
/**
@ -87,6 +61,7 @@ public class Evolution extends SoloGame
private ArrayList<EvoKit> _mobKits = new ArrayList<EvoKit>();
private ArrayList<Kit> _kits = new ArrayList<Kit>();
private Map<UUID, ProgressingKit> _startedKit = Maps.newHashMap();
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()
{
return _evolve;

View File

@ -4,7 +4,6 @@ import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.ProgressingKit;
import nautilus.game.arcade.kit.perks.PerkLeap;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
@ -16,12 +15,9 @@ public class KitGladiator extends ProgressingKit
private static final String[] DESCRIPTION = {
"At my signal, unleash hell.",
"",
leap()
};
private static final Perk[] PERKS = {
new PerkLeap("Leap", 1.2, 1.0, 8000),
};
private static final ItemStack IN_HAND = new ItemStack(Material.IRON_SWORD);

View File

@ -16,6 +16,8 @@ import mineplex.core.progression.gui.Menu;
import mineplex.core.progression.math.Calculations;
import mineplex.core.shop.page.ConfirmationPage;
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 net.minecraft.server.v1_8_R3.EntityFireworks;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityStatus;
@ -172,6 +174,11 @@ public abstract class ProgressingKit extends Kit implements ProgressiveKit
{
return;
}
if(Manager.GetGame().GetType() == GameType.Evolution)
{
Evolution evolution = (Evolution) Manager.GetGame();
evolution.select(player, this);
}
_dataManager.get(player).setCurrentKit(getInternalName());
Manager.GetGame().SetKit(Bukkit.getPlayer(player), this, true);
Manager.getProgressionKitManager().displayParticles(this, player);

View File

@ -1,9 +1,11 @@
package nautilus.game.arcade.stats;
import mineplex.core.common.util.NautHashMap;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game;
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.ProgressingKit;
import org.bukkit.entity.Player;
@ -98,6 +100,11 @@ public class ExperienceStatTracker extends StatTracker<Game>
int expGained = (int)(((timeExp + gemExp)*mult)*getGame().XpMult);
//Exp
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)
{
ProgressingKit progressingKit = (ProgressingKit) kit;