Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2014-04-07 22:25:08 -04:00
commit 9b4e1aa9eb
34 changed files with 300 additions and 147 deletions

View File

@ -95,7 +95,7 @@ public class Flash extends SkillActive
int charges = _flash.get(cur); int charges = _flash.get(cur);
int level = getLevel(cur); int level = getLevel(cur);
if (charges >= 1 + level) if (charges >= 2 + level)
continue; continue;
if (!mineplex.core.recharge.Recharge.Instance.use(cur, "Flash Recharge", 9000 - (1000 * level), false, false)) if (!mineplex.core.recharge.Recharge.Instance.use(cur, "Flash Recharge", 9000 - (1000 * level), false, false))

View File

@ -139,7 +139,7 @@ public class SmokeArrow extends SkillActive
event.AddMod(damager.getName(), GetName(), 0, true); event.AddMod(damager.getName(), GetName(), 0, true);
//Effect //Effect
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, projectile.getLocation(), 0, 0, 0, 0, 1); UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, projectile.getLocation(), 0, 0, 0, 0, 1);
} }
@EventHandler @EventHandler

View File

@ -44,14 +44,14 @@ public class Stealth extends Skill
"Invisible, but also Slow #4#-1.", "Invisible, but also Slow #4#-1.",
"", "",
"Stealth ends if you an enemy comes", "Stealth ends if you an enemy comes",
"within #8#-2 Blocks of you, or you attack.", "within #10#-2 Blocks of you, or you attack.",
}); });
} }
@Override @Override
public String GetEnergyString() public String GetEnergyString()
{ {
return "Energy: 8 per Second"; return "Energy: #13#1 per Second";
} }
@EventHandler @EventHandler
@ -81,7 +81,7 @@ public class Stealth extends Skill
return; return;
} }
if (!UtilTime.elapsed(Factory.Combat().Get(player).LastCombat, 4000)) if (!UtilTime.elapsed(Factory.Combat().Get(player).GetLastCombat(), 4000))
{ {
UtilPlayer.message(player, F.main(GetClassType().name(), "You cannot use " + F.skill(GetName()) + " while in Combat.")); UtilPlayer.message(player, F.main(GetClassType().name(), "You cannot use " + F.skill(GetName()) + " while in Combat."));
return; return;
@ -222,7 +222,7 @@ public class Stealth extends Skill
continue; continue;
} }
if (!Factory.Energy().Use(cur, GetName(), 0.4, true, false)) if (!Factory.Energy().Use(cur, GetName(), 0.9 - (0.1 * getLevel(cur)), true, false))
{ {
Remove(cur, null); Remove(cur, null);
continue; continue;

View File

@ -22,7 +22,7 @@ public class ViperStrikes extends Skill
SetDesc(new String[] SetDesc(new String[]
{ {
"Your attacks give enemies", "Your attacks give enemies",
"Poison 1 for #0#2 seconds,", "Poison 1 for #1#2 seconds,",
"but deal #1#1 less damage." "but deal #1#1 less damage."
}); });
} }
@ -49,7 +49,7 @@ public class ViperStrikes extends Skill
if (damagee == null) return; if (damagee == null) return;
//Confuse //Confuse
Factory.Condition().Factory().Poison(GetName(), damagee, damager, 0 + 2*level, 0, false, false, false); Factory.Condition().Factory().Poison(GetName(), damagee, damager, 1 + 2*level, 0, false, false, false);
//Damage //Damage
event.AddMod(damager.getName(), GetName(), -1 - level, true); event.AddMod(damager.getName(), GetName(), -1 - level, true);

View File

@ -210,7 +210,7 @@ public class BlockToss extends SkillCharge implements IThrown
Player damager = event.GetDamagerPlayer(true); Player damager = event.GetDamagerPlayer(true);
if (damager == null) return; if (damager == null) return;
if (event.GetReason() != null && !event.GetReason().equals(GetName())) if (event.GetReason() == null || !event.GetReason().equals(GetName()))
return; return;
event.AddKnockback(GetName(), 1.5d); event.AddKnockback(GetName(), 1.5d);

View File

@ -108,15 +108,12 @@ public class SeismicSlam extends SkillActive
_live.remove(player); _live.remove(player);
//Action //Action
HashMap<LivingEntity, Double> targets = UtilEnt.getInRadius(player.getLocation(), 5 + level); HashMap<LivingEntity, Double> targets = UtilEnt.getInRadius(player.getLocation(), 5d + level);
for (LivingEntity cur : targets.keySet()) for (LivingEntity cur : targets.keySet())
{ {
if (cur.equals(player)) if (cur.equals(player))
continue; continue;
if (!UtilEnt.isGrounded(player))
continue;
//Damage Event //Damage Event
Factory.Damage().NewDamageEvent(cur, player, null, Factory.Damage().NewDamageEvent(cur, player, null,
DamageCause.CUSTOM, (3+level) * targets.get(cur) + 0.5, false, true, false, DamageCause.CUSTOM, (3+level) * targets.get(cur) + 0.5, false, true, false,

View File

@ -34,9 +34,13 @@ public class Resistance extends Skill
event.GetCondition().GetType() != ConditionType.BLINDNESS) event.GetCondition().GetType() != ConditionType.BLINDNESS)
return; return;
double reduction = (0.25 * getLevel(event.GetCondition().GetEnt())); int level = getLevel(event.GetCondition().GetEnt());
if (level <= 0)
return;
event.GetCondition().ModifyTicks((int) (event.GetCondition().GetTicksTotal() * (1 - reduction))); double reduction = -(0.25f * level);
event.GetCondition().ModifyTicks((int) (event.GetCondition().GetTicksTotal() * reduction));
} }
@Override @Override

View File

@ -61,7 +61,7 @@ public class Cleave extends Skill
//Splash //Splash
for (Player other : UtilPlayer.getNearby(damagee.getLocation(), 1.5 + (0.5 * level))) for (Player other : UtilPlayer.getNearby(damagee.getLocation(), 1.5 + (0.5 * level)))
{ {
if (!other.equals(damagee)) if (!other.equals(damagee) && !other.equals(damager))
if (Factory.Relation().CanHurt(damager, other)) if (Factory.Relation().CanHurt(damager, other))
{ {
//Damage Event //Damage Event

View File

@ -42,8 +42,8 @@ public class HoldPosition extends SkillActive
SetDesc(new String[] SetDesc(new String[]
{ {
"Hold your position, gaining", "Hold your position, gaining",
"Protection 4, Slow 4 and no", "Protection 4, Slow 3 and no",
"knockback for #3.5#1.5 seconds." "knockback for #2.5#1.5 seconds."
}); });
} }
@ -62,10 +62,10 @@ public class HoldPosition extends SkillActive
@Override @Override
public void Skill(Player player, int level) public void Skill(Player player, int level)
{ {
double duration = 3.5 + (1.5 * level); double duration = 3 + (1 * level);
//Action //Action
Factory.Condition().Factory().Slow(GetName(), player, player, duration, 3, false, true, false, true); Factory.Condition().Factory().Slow(GetName(), player, player, duration, 2, false, true, false, true);
Factory.Condition().Factory().Protection(GetName(), player, player, duration, 3, false, true, true); Factory.Condition().Factory().Protection(GetName(), player, player, duration, 3, false, true, true);
//Inform //Inform

View File

@ -127,7 +127,7 @@ public class Blizzard extends SkillActive
//Snow //Snow
if (target == null || target.getType() == Material.AIR || UtilMath.offset(target.getLocation(), cur.getLocation()) > 5) if (target == null || target.getType() == Material.AIR || UtilMath.offset(target.getLocation(), cur.getLocation()) > 5)
for (int i=0 ; i<4 ; i++) for (int i=0 ; i<1+level ; i++)
{ {
Projectile snow = cur.launchProjectile(Snowball.class); Projectile snow = cur.launchProjectile(Snowball.class);
double x = 0.2 - (UtilMath.r(40)/100d); double x = 0.2 - (UtilMath.r(40)/100d);

View File

@ -41,7 +41,7 @@ public class FireBlast extends SkillActive
{ {
"Launch a fireball which explodes on impact", "Launch a fireball which explodes on impact",
"dealing large knockback to enemies within", "dealing large knockback to enemies within",
"#3.5#1.5 Blocks range. Also ignites enemies", "#6#0.5 Blocks range. Also ignites enemies",
"for up to #2#2 seconds." "for up to #2#2 seconds."
}); });
} }
@ -98,20 +98,20 @@ public class FireBlast extends SkillActive
if (level == 0) return; if (level == 0) return;
//Velocity Players //Velocity Players
HashMap<Player,Double> hitMap = UtilPlayer.getInRadius(proj.getLocation(), 4 + (2 * level)); HashMap<Player,Double> hitMap = UtilPlayer.getInRadius(proj.getLocation(), 5.5 + (0.5 * level));
for (Player cur : hitMap.keySet()) for (Player cur : hitMap.keySet())
{ {
double range = hitMap.get(cur); double range = hitMap.get(cur);
//Damage Event //Damage Event
Factory.Condition().Factory().Ignite(GetName(), cur, player, (2 + (2 * level)) * range, false, false); Factory.Condition().Factory().Ignite(GetName(), cur, player, (2 + (1 * level)) * range, false, false);
//Condition //Condition
Factory.Condition().Factory().Falling(GetName(), cur, player, 10, false, true); Factory.Condition().Factory().Falling(GetName(), cur, player, 10, false, true);
//Velocity //Velocity
UtilAction.velocity(cur, UtilAlg.getTrajectory(proj.getLocation().add(0, -0.5, 0), cur.getEyeLocation()), UtilAction.velocity(cur, UtilAlg.getTrajectory(proj.getLocation().add(0, -0.5, 0), cur.getEyeLocation()),
0.5 + 1.5 * range, false, 0, 0.2 + 0.6 * range, 1.2, true); 1.6 * range, false, 0, 0.8 * range, 1.2, true);
} }
} }

View File

@ -54,7 +54,7 @@ public class MagmaBlade extends Skill
if (level == 0) return; if (level == 0) return;
//Damage //Damage
event.AddMod(damager.getName(), GetName(), level, true); event.AddMod(damager.getName(), GetName(), 1 + level, true);
//Effect //Effect
damager.getWorld().playSound(damager.getLocation(), Sound.FIZZ, 0.8f, 0f); damager.getWorld().playSound(damager.getLocation(), Sound.FIZZ, 0.8f, 0f);

View File

@ -60,7 +60,7 @@ public class Rupture extends SkillActiveCharge
{ {
"Hold Block to create a rupture", "Hold Block to create a rupture",
"at your feet. It will snake through", "at your feet. It will snake through",
"the ground with #1#0.1 velocity, moving" + "the ground with #1#0.1 velocity, moving",
"towards where you are looking,", "towards where you are looking,",
"giving Slow 2 to nearby opponents.", "giving Slow 2 to nearby opponents.",
"", "",

View File

@ -36,8 +36,8 @@ public class Void extends Skill
"Slow 3, take no knockback and", "Slow 3, take no knockback and",
"use no energy to swing weapons.", "use no energy to swing weapons.",
"", "",
"Reduces incoming damage by #2#1 , but", "Reduces incoming damage by #1#1 , but",
"burns #7#-1 Energy per 1 damage reduced." "burns #9#-1 Energy per 1 damage reduced."
}); });
} }
@ -129,6 +129,19 @@ public class Void extends Skill
//Energy //Energy
Factory.Energy().ModifyEnergy(cur, -0.3); Factory.Energy().ModifyEnergy(cur, -0.3);
}
}
@EventHandler
public void Conditions(UpdateEvent event)
{
if (event.getType() != UpdateType.FAST)
return;
for (Player cur : _active)
{
if (cur.isDead())
continue;
//Condition //Condition
Factory.Condition().Factory().Invisible(GetName(), cur, cur, 1.9, 0, false, true, true); Factory.Condition().Factory().Invisible(GetName(), cur, cur, 1.9, 0, false, true, true);
@ -151,7 +164,7 @@ public class Void extends Skill
int level = getLevel(damagee); int level = getLevel(damagee);
if (level == 0) return; if (level == 0) return;
double dmgToEnergy = 7 - level; double dmgToEnergy = 9 - level;
int dmgLower = 1 + level; int dmgLower = 1 + level;
int currentEnergy = (int)Factory.Energy().GetCurrent(damagee); int currentEnergy = (int)Factory.Energy().GetCurrent(damagee);

View File

@ -24,7 +24,7 @@ public class VitalitySpores extends Skill
{ {
"After #12#-2 seconds of not taking damage,", "After #12#-2 seconds of not taking damage,",
"forest spores surround you, giving", "forest spores surround you, giving",
"you Regeneration 1 for #4#2 seconds.", "you Regeneration 1 for #3#2 seconds.",
"", "",
"This remains until you take damage." "This remains until you take damage."
}); });
@ -41,10 +41,10 @@ public class VitalitySpores extends Skill
int level = getLevel(cur); int level = getLevel(cur);
if (level == 0) continue; if (level == 0) continue;
if (UtilTime.elapsed(Factory.Combat().Get(cur).LastDamaged, 10000)) if (UtilTime.elapsed(Factory.Combat().Get(cur).GetLastDamaged(), 12000 - 2000*level))
{ {
Factory.Condition().Factory().Regen(GetName(), cur, cur, 6.9, 0, false, true, true); Factory.Condition().Factory().Regen(GetName(), cur, cur, 3.9 + 2*level, 0, false, true, true);
UtilPlayer.health(cur, 1); UtilPlayer.health(cur, 0.5);
if (Recharge.Instance.use(cur, GetName(), 2000, false, false)) if (Recharge.Instance.use(cur, GetName(), 2000, false, false))
UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation(), 0, 0.2f, 0, 0, 1); UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation(), 0, 0.2f, 0, 0, 1);

View File

@ -72,7 +72,7 @@ public class WolfsFury extends SkillActive
_active.put(player, System.currentTimeMillis() + 8000); _active.put(player, System.currentTimeMillis() + 8000);
//Condition //Condition
Factory.Condition().Factory().Strength(GetName(), player, player, 2 + 2*level, 2, false, true, true); Factory.Condition().Factory().Strength(GetName(), player, player, 2 + 2*level, level-1, false, true, true);
//Inform //Inform
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + ".")); UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));

View File

@ -190,10 +190,10 @@ public abstract class Skill implements ISkill, Listener
try try
{ {
double base = Double.parseDouble(numberToks[0]); float base = Float.parseFloat(numberToks[0]);
double bonus = Double.parseDouble(numberToks[1]); float bonus = Float.parseFloat(numberToks[1]);
double levelValue = base + ((double)level * bonus); float levelValue = base + (level * bonus);
String plusMinus = "+"; String plusMinus = "+";
if (bonus < 0) if (bonus < 0)
@ -211,7 +211,7 @@ public abstract class Skill implements ISkill, Listener
//Only display what you'd get with level 1 //Only display what you'd get with level 1
if (level == 0 ) if (level == 0 )
{ {
levelValue = base + ((double)1 * bonus); levelValue = base + (1f * bonus);
totalString = levelValue + ""; totalString = levelValue + "";
if (levelValue % 1 == 0) if (levelValue % 1 == 0)

View File

@ -154,7 +154,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 5, 3)); AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 5, 3));
AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 5, 2)); AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 5, 2));
AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 5, 5)); AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 5, 3));
AddSkill(new Recharge(this, "Mana Regeneration", ClassType.Mage, SkillType.GlobalPassive, 5, 3)); AddSkill(new Recharge(this, "Mana Regeneration", ClassType.Mage, SkillType.GlobalPassive, 5, 3));
AddSkill(new Fitness(this, "Fitness", ClassType.Assassin, SkillType.GlobalPassive, 5, 3)); AddSkill(new Fitness(this, "Fitness", ClassType.Assassin, SkillType.GlobalPassive, 5, 3));
@ -418,7 +418,6 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new Void(this, "Void", ClassType.Mage, SkillType.PassiveA, 5, 3)); AddSkill(new Void(this, "Void", ClassType.Mage, SkillType.PassiveA, 5, 3));
AddSkill(new LifeBonds(this, "Life Bonds", ClassType.Mage, SkillType.PassiveA, 5, 3)); AddSkill(new LifeBonds(this, "Life Bonds", ClassType.Mage, SkillType.PassiveA, 5, 3));
//Passive B //Passive B
AddSkill(new GlacialBlade(this, "Glacial Blade", ClassType.Mage, SkillType.PassiveB, AddSkill(new GlacialBlade(this, "Glacial Blade", ClassType.Mage, SkillType.PassiveB,
5, 3, 5, 3,

View File

@ -3,6 +3,8 @@ package mineplex.minecraft.game.core.combat;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.WeakHashMap; import java.util.WeakHashMap;
import mineplex.core.common.util.UtilTime;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
public class ClientCombat public class ClientCombat
@ -13,6 +15,7 @@ public class ClientCombat
private WeakHashMap<LivingEntity, Long> _lastHurt = new WeakHashMap<LivingEntity, Long>(); private WeakHashMap<LivingEntity, Long> _lastHurt = new WeakHashMap<LivingEntity, Long>();
private WeakHashMap<LivingEntity, Long> _lastHurtBy = new WeakHashMap<LivingEntity, Long>(); private WeakHashMap<LivingEntity, Long> _lastHurtBy = new WeakHashMap<LivingEntity, Long>();
private long _lastHurtByWorld = 0;
public LinkedList<CombatLog> GetKills() public LinkedList<CombatLog> GetKills()
{ {
@ -32,7 +35,17 @@ public class ClientCombat
public boolean CanBeHurtBy(LivingEntity damager) public boolean CanBeHurtBy(LivingEntity damager)
{ {
if (damager == null) if (damager == null)
return true; {
if (UtilTime.elapsed(_lastHurtByWorld, 250))
{
_lastHurtByWorld = System.currentTimeMillis();
return true;
}
else
{
return false;
}
}
if (!_lastHurtBy.containsKey(damager)) if (!_lastHurtBy.containsKey(damager))
{ {

View File

@ -23,8 +23,8 @@ public class CombatLog
private String _killerColor = ChatColor.YELLOW + ""; private String _killerColor = ChatColor.YELLOW + "";
protected CombatComponent LastDamager; protected CombatComponent LastDamager;
public long LastDamaged; protected long _lastDamaged;
public long LastCombat; protected long _lastCombat;
public CombatLog(Player player, long expireTime) public CombatLog(Player player, long expireTime)
{ {
@ -52,8 +52,8 @@ public class CombatLog
// Set Last // Set Last
LastDamager = comp; LastDamager = comp;
LastDamaged = System.currentTimeMillis(); _lastDamaged = System.currentTimeMillis();
LastCombat = System.currentTimeMillis(); _lastCombat = System.currentTimeMillis();
} }
public CombatComponent GetEnemy(String name, LivingEntity ent) public CombatComponent GetEnemy(String name, LivingEntity ent)
@ -134,6 +134,21 @@ public class CombatLog
return LastDamager; return LastDamager;
} }
public long GetLastDamaged()
{
return _lastDamaged;
}
public long GetLastCombat()
{
return _lastCombat;
}
public void SetLastCombat(long time)
{
_lastCombat = time;
}
public long GetDeathTime() public long GetDeathTime()
{ {
return _deathTime; return _deathTime;
@ -163,4 +178,6 @@ public class CombatLog
{ {
_killerColor = color; _killerColor = color;
} }
} }

View File

@ -79,7 +79,7 @@ public class CombatManager extends MiniPlugin
if (damagerEnt != null) if (damagerEnt != null)
{ {
if (damagerEnt instanceof Player) if (damagerEnt instanceof Player)
Get((Player)damagerEnt).LastCombat = System.currentTimeMillis(); Get((Player)damagerEnt).SetLastCombat(System.currentTimeMillis());
Get(damagee).Attacked( Get(damagee).Attacked(
UtilEnt.getName(damagerEnt), UtilEnt.getName(damagerEnt),
@ -226,7 +226,7 @@ public class CombatManager extends MiniPlugin
} }
if (event.GetDamagerEntity(true) instanceof Player) if (event.GetDamagerEntity(true) instanceof Player)
Get((Player)event.GetDamagerEntity(true)).LastCombat = System.currentTimeMillis(); Get((Player)event.GetDamagerEntity(true)).SetLastCombat(System.currentTimeMillis());
Get(event.GetDamageePlayer()).Attacked( Get(event.GetDamageePlayer()).Attacked(
UtilEnt.getName(event.GetDamagerEntity(true)), UtilEnt.getName(event.GetDamagerEntity(true)),
@ -521,7 +521,10 @@ public class CombatManager extends MiniPlugin
public CombatLog Get(Player player) public CombatLog Get(Player player)
{ {
if (!_active.containsKey(player)) if (!_active.containsKey(player))
{
Add(player); Add(player);
}
return _active.get(player); return _active.get(player);
} }

View File

@ -339,6 +339,7 @@ public class ConditionEffect implements Listener
event.SetDamager(condition.GetSource()); event.SetDamager(condition.GetSource());
event.AddMod(UtilEnt.getName(condition.GetSource()), condition.GetReason(), 0, true); event.AddMod(UtilEnt.getName(condition.GetSource()), condition.GetReason(), 0, true);
event.SetIgnoreArmor(true); event.SetIgnoreArmor(true);
event.SetKnockback(false);
} }
@EventHandler @EventHandler

View File

@ -166,12 +166,12 @@ public class DamageManager extends MiniPlugin
return; return;
} }
//Limit World Damage Rate //Limit Mob/World Damage Rate
if (!event.IgnoreRate()) if (!event.IgnoreRate())
{ {
if (!_combatManager.Get(damagee.getName()).CanBeHurtBy(event.GetDamagerEntity(true))) if (!_combatManager.Get(damagee.getName()).CanBeHurtBy(event.GetDamagerEntity(true)))
{ {
event.SetCancelled("Damage Rate"); event.SetCancelled("World/Monster Damage Rate");
return; return;
} }
} }
@ -192,7 +192,7 @@ public class DamageManager extends MiniPlugin
if (!event.IgnoreRate()) if (!event.IgnoreRate())
if (!_combatManager.Get(damager.getName()).CanHurt(event.GetDamageeEntity())) if (!_combatManager.Get(damager.getName()).CanHurt(event.GetDamageeEntity()))
{ {
event.SetCancelled("Damage Rate"); event.SetCancelled("PvP Damage Rate");
return; return;
} }
} }
@ -545,4 +545,9 @@ public class DamageManager extends MiniPlugin
{ {
_enabled = var; _enabled = var;
} }
public CombatManager GetCombatManager()
{
return _combatManager;
}
} }

View File

@ -144,7 +144,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
if (serverConfig.GameList.contains(GameType.Dominate)) if (serverConfig.GameList.contains(GameType.Dominate))
{ {
_skillFactory = new SkillFactory(plugin, damageManager, this, new CombatManager(plugin), conditionManager, _projectileManager, _blockRestore, _fire, new Movement(plugin), teleport, new Energy(plugin), webAddress); _skillFactory = new SkillFactory(plugin, damageManager, this, _damageManager.GetCombatManager(), conditionManager, _projectileManager, _blockRestore, _fire, new Movement(plugin), teleport, new Energy(plugin), webAddress);
_classManager = new ClassManager(plugin, clientManager, donationManager, _skillFactory, webAddress); _classManager = new ClassManager(plugin, clientManager, donationManager, _skillFactory, webAddress);
_classShopManager = new ClassShopManager(_plugin, _classManager, _skillFactory, new ItemPackFactory(_plugin)); _classShopManager = new ClassShopManager(_plugin, _classManager, _skillFactory, new ItemPackFactory(_plugin));

View File

@ -22,9 +22,7 @@ public class StopCommand extends CommandBase<ArcadeManager>
return; return;
HandlerList.unregisterAll(Plugin.GetGame()); HandlerList.unregisterAll(Plugin.GetGame());
Plugin.GetGame().SetState(GameState.Dead); Plugin.GetGame().SetState(GameState.End);
Plugin.GetGame().WorldData.Uninitialize();
Plugin.SetGame(null);
caller.sendMessage("Stopped Game!"); caller.sendMessage("Stopped Game!");
} }

View File

@ -17,6 +17,7 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.combat.DeathMessageType;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType; import nautilus.game.arcade.GameType;
@ -64,16 +65,26 @@ public class Dominate extends TeamGame
{ {
"Capture Beacons for Points", "Capture Beacons for Points",
"+500 Points for Emerald Powerups", "+500 Points for Emerald Powerups",
"+200 Point for Kills", "+50 Points for Kills",
"First team to 15000 Points wins" "First team to 15000 Points wins"
}); });
_help = new String[]
{
"Capture Beacons faster with more people!",
};
this.DeathOut = false; this.DeathOut = false;
this.PrepareFreeze = false; this.PrepareFreeze = false;
this.HungerSet = 20; this.HungerSet = 20;
this.WorldTimeSet = 2000;
this.DeathSpectateSecs = 10; this.DeathSpectateSecs = 10;
this.Manager.GetDamage().UseSimpleWeaponDamage = false;
} }
@Override @Override
@ -173,7 +184,7 @@ public class Dominate extends TeamGame
if (killerTeam.equals(killedTeam)) if (killerTeam.equals(killedTeam))
return; return;
AddScore(killerTeam, 200); AddScore(killerTeam, 50);
} }
public void AddScore(GameTeam team, int score) public void AddScore(GameTeam team, int score)
@ -302,4 +313,10 @@ public class Dominate extends TeamGame
event.getWhoClicked().closeInventory(); event.getWhoClicked().closeInventory();
} }
} }
@Override
public DeathMessageType GetDeathMessageType()
{
return DeathMessageType.Detailed;
}
} }

View File

@ -72,4 +72,10 @@ public class KitAssassin extends Kit
ent.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS)); ent.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));
ent.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS)); ent.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));
} }
@Override
public void DisplayDesc(Player player)
{
}
} }

View File

@ -72,4 +72,10 @@ public class KitBrute extends Kit
ent.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS)); ent.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
ent.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS)); ent.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));
} }
@Override
public void DisplayDesc(Player player)
{
}
} }

View File

@ -72,4 +72,10 @@ public class KitKnight extends Kit
ent.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS)); ent.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));
ent.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS)); ent.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));
} }
@Override
public void DisplayDesc(Player player)
{
}
} }

View File

@ -72,4 +72,10 @@ public class KitMage extends Kit
ent.getEquipment().setLeggings(new ItemStack(Material.GOLD_LEGGINGS)); ent.getEquipment().setLeggings(new ItemStack(Material.GOLD_LEGGINGS));
ent.getEquipment().setBoots(new ItemStack(Material.GOLD_BOOTS)); ent.getEquipment().setBoots(new ItemStack(Material.GOLD_BOOTS));
} }
@Override
public void DisplayDesc(Player player)
{
}
} }

View File

@ -72,4 +72,10 @@ public class KitRanger extends Kit
ent.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS)); ent.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));
ent.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS)); ent.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));
} }
@Override
public void DisplayDesc(Player player)
{
}
} }

View File

@ -71,6 +71,25 @@ public class CapturePoint
floor.setType(Material.WOOL); floor.setType(Material.WOOL);
_floor.add(floor); _floor.add(floor);
} }
else
{
Block block = loc.getBlock().getRelative(x, -1, z);
block.setType(Material.BEACON);
}
}
//Glass
if (Math.abs(x) <= 2 && Math.abs(z) <= 2)
{
Block block = loc.getBlock().getRelative(x, -1, z);
block.setType(Material.GLASS);
}
//Iron
if (Math.abs(x) <= 1 && Math.abs(z) <= 1)
{
Block block = loc.getBlock().getRelative(x, -3, z);
block.setType(Material.IRON_BLOCK);
} }
} }
} }

View File

@ -34,6 +34,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.event.player.PlayerRespawnEvent;
@ -260,6 +261,9 @@ public class GamePlayerManager implements Listener
@EventHandler @EventHandler
public void KitDamage(CustomDamageEvent event) public void KitDamage(CustomDamageEvent event)
{ {
if (event.GetCause() != DamageCause.ENTITY_ATTACK)
return;
Player player = event.GetDamagerPlayer(false); Player player = event.GetDamagerPlayer(false);
if (player == null) return; if (player == null) return;

View File

@ -7,10 +7,13 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import mineplex.core.common.util.UtilWorld;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.material.Wool; import org.bukkit.material.Wool;
@ -65,7 +68,37 @@ public class WorldParser
continue; continue;
} }
//Sign Post > Spawns //Signs
if (block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN)
{
if (block.getRelative(BlockFace.DOWN).getType() == Material.SPONGE)
{
Sign s = (Sign) block.getState();
String name = "";
try
{
name = s.getLine(0);
}
catch (Exception e)
{
caller.sendMessage("Invalid Sign Data: " + UtilWorld.locToStr(block.getLocation()));
}
//Add
if (!CustomLocs.containsKey(name))
CustomLocs.put(name, new ArrayList<Location>());
CustomLocs.get(name).add(block.getRelative(BlockFace.DOWN).getLocation());
//Remove Blocks
block.setTypeId(0);
block.getRelative(BlockFace.DOWN).setTypeId(0);
}
}
//Spawns
if (block.getTypeId() == 147) if (block.getTypeId() == 147)
{ {
Block wool = block.getRelative(BlockFace.DOWN); Block wool = block.getRelative(BlockFace.DOWN);