Fix merge errors and properly force disable particles by checking the game's settings
This commit is contained in:
commit
eccd7deedc
@ -1617,4 +1617,35 @@ public class UtilBlock
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static boolean water(Material type)
|
||||
{
|
||||
return type == Material.WATER || type == Material.STATIONARY_WATER;
|
||||
}
|
||||
|
||||
public static boolean lava(Material type)
|
||||
{
|
||||
return type == Material.LAVA || type == Material.STATIONARY_LAVA;
|
||||
}
|
||||
|
||||
public static boolean liquid(Material type)
|
||||
{
|
||||
return water(type) || lava(type);
|
||||
}
|
||||
|
||||
public static boolean water(Block block)
|
||||
{
|
||||
return water(block.getType());
|
||||
}
|
||||
|
||||
public static boolean lava(Block block)
|
||||
{
|
||||
return lava(block.getType());
|
||||
}
|
||||
|
||||
public static boolean liquid(Block block)
|
||||
{
|
||||
return liquid(block.getType());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -88,6 +88,15 @@ public class ProjectileManager extends MiniPlugin
|
||||
sound, soundVolume, soundPitch, null, 0, effectRate, particle, 0F, 0F, 0F, 0F, 1, hitboxMult));
|
||||
}
|
||||
|
||||
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
|
||||
long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle,
|
||||
Sound sound, float soundVolume, float soundPitch, ParticleType particle, UpdateType effectRate, float hitboxMult, double charge)
|
||||
{
|
||||
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
|
||||
expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false,
|
||||
sound, soundVolume, soundPitch, null, 0, effectRate, particle, 0F, 0F, 0F, 0F, 1, hitboxMult, charge));
|
||||
}
|
||||
|
||||
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
|
||||
long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle,
|
||||
Sound sound, float soundVolume, float soundPitch, ParticleType particle, float pX, float pY, float pZ, float pS, int pC, UpdateType effectRate, float hitboxMult)
|
||||
@ -133,14 +142,14 @@ public class ProjectileManager extends MiniPlugin
|
||||
}
|
||||
|
||||
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
|
||||
long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle,
|
||||
Sound sound, float soundVolume, float soundPitch, ParticleType particle, UpdateType effectRate, float hitboxMult, List<Player> canHit)
|
||||
long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle,
|
||||
Sound sound, float soundVolume, float soundPitch, ParticleType particle, UpdateType effectRate, float hitboxMult, List<Player> canHit)
|
||||
{
|
||||
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
|
||||
expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false,
|
||||
sound, soundVolume, soundPitch, null, 0, effectRate, particle, 0F, 0F, 0F, 0F, 1, hitboxMult, canHit));
|
||||
expireTime, hitPlayer, hitNonPlayerEntity, hitBlock, idle, false,
|
||||
sound, soundVolume, soundPitch, null, 0, effectRate, particle, 0F, 0F, 0F, 0F, 1, hitboxMult, canHit));
|
||||
}
|
||||
|
||||
|
||||
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
|
||||
long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle,
|
||||
Sound sound, float soundVolume, float soundPitch, ParticleType particle, float pX, float pY, float pZ, float pS, int pC, UpdateType effectRate, float hitboxMult, List<Player> canHit)
|
||||
|
@ -62,6 +62,8 @@ public class ProjectileUser
|
||||
private UpdateType _effectRate = UpdateType.TICK;
|
||||
|
||||
private double _hitboxGrow;
|
||||
|
||||
private double _charge;
|
||||
|
||||
private List<Player> _canHit;
|
||||
|
||||
@ -104,6 +106,47 @@ public class ProjectileUser
|
||||
_canHit = null;
|
||||
}
|
||||
|
||||
public ProjectileUser(ProjectileManager throwInput, Entity thrown, LivingEntity thrower, IThrown callback,
|
||||
long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, boolean pickup,
|
||||
Sound sound, float soundVolume, float soundPitch,
|
||||
Effect effect, int effectData, UpdateType effectRate,
|
||||
ParticleType particle, float particleX, float particleY,
|
||||
float particleZ, float particleS, int particleC, double hitboxMult, double charge)
|
||||
{
|
||||
Throw = throwInput;
|
||||
|
||||
_thrown = thrown;
|
||||
_thrower = thrower;
|
||||
_callback = callback;
|
||||
|
||||
_expireTime = expireTime;
|
||||
_startTime = System.currentTimeMillis();
|
||||
|
||||
_hitPlayer = hitPlayer;
|
||||
_hitNonPlayerEntity = hitNonPlayerEntity;
|
||||
_hitBlock = hitBlock;
|
||||
_idle = idle;
|
||||
_pickup = pickup;
|
||||
|
||||
_sound = sound;
|
||||
_soundVolume = soundVolume;
|
||||
_soundPitch = soundPitch;
|
||||
_particle = particle;
|
||||
_particleX = particleX;
|
||||
_particleY = particleY;
|
||||
_particleZ = particleZ;
|
||||
_particleS = particleS;
|
||||
_particleC = particleC;
|
||||
_effect = effect;
|
||||
_effectData = effectData;
|
||||
_effectRate = effectRate;
|
||||
|
||||
_hitboxGrow = hitboxMult;
|
||||
_canHit = null;
|
||||
|
||||
_charge = charge;
|
||||
}
|
||||
|
||||
public ProjectileUser(ProjectileManager throwInput, Entity thrown, LivingEntity thrower, IThrown callback,
|
||||
long expireTime, boolean hitPlayer, boolean hitNonPlayerEntity, boolean hitBlock, boolean idle, boolean pickup,
|
||||
Sound sound, float soundVolume, float soundPitch,
|
||||
@ -142,6 +185,7 @@ public class ProjectileUser
|
||||
_hitboxGrow = hitboxMult;
|
||||
_canHit = canHit;
|
||||
}
|
||||
|
||||
|
||||
public void effect(UpdateEvent event)
|
||||
{
|
||||
@ -311,6 +355,11 @@ public class ProjectileUser
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public double getCharge()
|
||||
{
|
||||
return _charge;
|
||||
}
|
||||
|
||||
public IThrown getIThrown()
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ public class Blink extends SkillActive
|
||||
{
|
||||
private HashMap<Player, Location> _loc = new HashMap<Player, Location>();
|
||||
private HashMap<Player, Long> _blinkTime = new HashMap<Player, Long>();
|
||||
|
||||
|
||||
public Blink(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
@ -206,6 +206,9 @@ public class Blink extends SkillActive
|
||||
done = true;
|
||||
}
|
||||
|
||||
target.setYaw(player.getLocation().getYaw());
|
||||
target.setPitch(player.getLocation().getPitch());
|
||||
|
||||
player.teleport(target);
|
||||
|
||||
player.setFallDistance(0);
|
||||
|
@ -29,6 +29,7 @@ import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
@ -213,10 +214,11 @@ public class Evade extends SkillActive
|
||||
{
|
||||
Player player = activeIter.next();
|
||||
|
||||
if (!player.isOnline() || !player.isBlocking() || UtilTime.elapsed(_active.get(player), 750))
|
||||
if (!player.isOnline() || !player.isBlocking() || UtilTime.elapsed(_active.get(player), 1000))
|
||||
{
|
||||
activeIter.remove();
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You failed to " + F.skill(GetName()) + "."));
|
||||
Recharge.Instance.useForce(player, GetName(), 10000l, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
@ -28,7 +29,6 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
||||
import net.minecraft.server.v1_8_R3.Material;
|
||||
|
||||
public class Recall extends Skill
|
||||
{
|
||||
@ -69,6 +69,12 @@ public class Recall extends Skill
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (UtilBlock.water(player.getLocation().getBlock()))
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||
return;
|
||||
}
|
||||
|
||||
//Check Allowed
|
||||
SkillTriggerEvent trigger = new SkillTriggerEvent(player, GetName(), GetClassType());
|
||||
Bukkit.getServer().getPluginManager().callEvent(trigger);
|
||||
|
@ -6,12 +6,14 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
public class ViperStrikes extends Skill
|
||||
{
|
||||
@ -21,8 +23,8 @@ public class ViperStrikes extends Skill
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Your attacks give enemies",
|
||||
"Shock, Slow 1 and Poison 1",
|
||||
"Your attacks give",
|
||||
"enemies Poison 1",
|
||||
"for #0#1 seconds."
|
||||
});
|
||||
}
|
||||
@ -49,8 +51,7 @@ public class ViperStrikes extends Skill
|
||||
if (damagee == null) return;
|
||||
|
||||
//Confuse
|
||||
Factory.Condition().Factory().PoisonShock(GetName(), damagee, damager, level, false);
|
||||
Factory.Condition().Factory().Slow(GetName(), damagee, damager, level, 0, false, false, true, false);
|
||||
Factory.Condition().Factory().Poison(GetName(), damagee, damager, 2 + level, 0, false, true, true, true);
|
||||
|
||||
//Sound
|
||||
damager.getWorld().playSound(damager.getLocation(), Sound.SPIDER_IDLE, 1f, 2f);
|
||||
|
@ -9,32 +9,34 @@ import org.bukkit.Effect;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillCharge;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.BlockTossExpireEvent;
|
||||
@ -90,7 +92,7 @@ public class BlockToss extends SkillCharge implements IThrown
|
||||
@Override
|
||||
public String GetRechargeString()
|
||||
{
|
||||
return "Recharge: " + "#4#-0.5 Seconds";
|
||||
return "Recharge: " + "#5.5#-0.5 Seconds";
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -193,7 +195,22 @@ public class BlockToss extends SkillCharge implements IThrown
|
||||
//Effect
|
||||
player.getWorld().playEffect(event.getClickedBlock().getLocation(), Effect.STEP_SOUND, block.getMaterial().getId());
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void Damage(EntityDamageByEntityEvent event)
|
||||
{
|
||||
Entity vehicle = event.getEntity().getVehicle();
|
||||
|
||||
if (_holding.containsKey(vehicle))
|
||||
{
|
||||
Player attacker = (Player) event.getDamager();
|
||||
|
||||
//Forward Damage
|
||||
Factory.Damage().NewDamageEvent((Player) vehicle, attacker, Factory.Damage().GetProjectile(event),
|
||||
event.getCause(), event.getDamage(), true, false, false, null, null, event.isCancelled());
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Throw(UpdateEvent event)
|
||||
{
|
||||
@ -241,7 +258,7 @@ public class BlockToss extends SkillCharge implements IThrown
|
||||
for (Player cur : throwSet)
|
||||
{
|
||||
Recharge.Instance.recharge(cur, GetName());
|
||||
Recharge.Instance.use(cur, GetName(), 4000 - (500 * getLevel(cur)), false, true);
|
||||
Recharge.Instance.use(cur, GetName(), 5500 - (500 * getLevel(cur)), false, true);
|
||||
|
||||
FallingBlock block = _holding.remove(cur);
|
||||
float charge = _charge.remove(cur);
|
||||
|
@ -24,7 +24,7 @@ public class CripplingBlow extends Skill
|
||||
{
|
||||
"Your powerful axe attacks give",
|
||||
"targets Slow 2 for 1.5 second,",
|
||||
"as well as 50% less knockback."
|
||||
"as well as 25% less knockback."
|
||||
});
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ public class CripplingBlow extends Skill
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), 0, true);
|
||||
event.AddKnockback(GetName(), 0.5);
|
||||
event.AddKnockback(GetName(), 0.75);
|
||||
|
||||
//Event
|
||||
UtilServer.getServer().getPluginManager().callEvent(new SkillEvent(damager, GetName(), ClassType.Brute, damagee));
|
||||
|
@ -73,7 +73,7 @@ public class DwarfToss extends SkillActive
|
||||
{
|
||||
if (_used.contains(player))
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -96,7 +96,13 @@ public class DwarfToss extends SkillActive
|
||||
{
|
||||
int level = getLevel(player);
|
||||
if (level == 0) return false;
|
||||
|
||||
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||
return false;
|
||||
}
|
||||
|
||||
//Check Material
|
||||
if (player.getItemInHand() != null)
|
||||
if (!_itemSet.contains(player.getItemInHand().getType()))
|
||||
@ -337,6 +343,9 @@ public class DwarfToss extends SkillActive
|
||||
target.leaveVehicle();
|
||||
final double mult = (1.8) * timeScale;
|
||||
|
||||
//Protection
|
||||
Factory.Condition().Factory().Invulnerable(GetName(), target, target, 1.25, false, false);
|
||||
|
||||
//Delay
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(Factory.getPlugin(), new Runnable()
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ public class FleshHook extends SkillActiveCharge implements IThrown
|
||||
//Release Charge
|
||||
else if (_charge.containsKey(cur))
|
||||
{
|
||||
float charge = _charge.remove(cur);
|
||||
double charge = _charge.remove(cur);
|
||||
|
||||
//Action
|
||||
Item item = cur.getWorld().dropItem(cur.getEyeLocation().add(cur.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(131));
|
||||
@ -109,8 +109,8 @@ public class FleshHook extends SkillActiveCharge implements IThrown
|
||||
1 + charge , false, 0, 0.2, 20, false);
|
||||
|
||||
Factory.Projectile().AddThrow(item, cur, this, -1, true, true, true, true,
|
||||
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, UpdateType.TICK, 0.6f);
|
||||
|
||||
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, UpdateType.TICK, 0.6f, charge);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(cur, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));
|
||||
|
||||
@ -148,7 +148,7 @@ public class FleshHook extends SkillActiveCharge implements IThrown
|
||||
//Pull
|
||||
UtilAction.velocity(target,
|
||||
UtilAlg.getTrajectory(target.getLocation(), player.getLocation()),
|
||||
1.2 + (0.3 * level), false, 0, 0.7, 1.2, true);
|
||||
velocity, false, 0, 0.7, 1.2, true);
|
||||
|
||||
//Condition
|
||||
Factory.Condition().Factory().Falling(GetName(), target, player, 10, false, true);
|
||||
|
@ -21,7 +21,7 @@ public class Intimidation extends Skill
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"You intimidate nearby enemies;",
|
||||
"Enemies within #3#3 blocks receive Slow 1.",
|
||||
"Enemies within #4#2 blocks receive Slow 1.",
|
||||
});
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ public class Intimidation extends Skill
|
||||
int level = getLevel(cur);
|
||||
if (level == 0) continue;
|
||||
|
||||
HashMap<Player, Double> targets = UtilPlayer.getInRadius(cur.getLocation(), 3 + (level * 3));
|
||||
HashMap<Player, Double> targets = UtilPlayer.getInRadius(cur.getLocation(), 3 + (level * 2));
|
||||
for (Player other : targets.keySet())
|
||||
if (!other.equals(cur))
|
||||
if (Factory.Relation().canHurt(cur, other))
|
||||
|
@ -52,7 +52,7 @@ public class AxeThrow extends SkillActive implements IThrown
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Throw your axe with #0.7#0.1 velocity, ",
|
||||
"dealing #5.5#0.5 damage.",
|
||||
"dealing #4.5#0.5 damage.",
|
||||
"",
|
||||
"You pull your axe back to you when it",
|
||||
"collides with anything.",
|
||||
@ -107,7 +107,7 @@ public class AxeThrow extends SkillActive implements IThrown
|
||||
if (level <= 0)
|
||||
return;
|
||||
|
||||
double damage = 5.5 + 0.5 * level;
|
||||
double damage = 4.5 + 0.5 * level;
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(target, data.getThrower(), null,
|
||||
|
@ -46,7 +46,7 @@ public class HiltSmash extends SkillActive
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Smash the hilt of your sword into",
|
||||
"your opponent, dealing #2#1 damage",
|
||||
"your opponent, dealing #1#1 damage",
|
||||
"and Slow 3 for #0.5#0.5 seconds."
|
||||
});
|
||||
}
|
||||
@ -153,7 +153,7 @@ public class HiltSmash extends SkillActive
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent((LivingEntity)ent, player, null,
|
||||
DamageCause.CUSTOM, 2 + level, false, true, false,
|
||||
DamageCause.CUSTOM, 1 + level, false, true, false,
|
||||
player.getName(), GetName());
|
||||
|
||||
//Sound
|
||||
|
@ -30,7 +30,7 @@ public class Swordsmanship extends Skill
|
||||
{
|
||||
"Prepare a powerful sword attack;",
|
||||
"You gain 1 Charge every #5#-1 seconds.",
|
||||
"You can store a maximum of #0#1 Charges.",
|
||||
"You can store a maximum of #1#1 Charges.",
|
||||
"",
|
||||
"When you next attack, your damage is",
|
||||
"increased by the number of your Charges,",
|
||||
@ -79,7 +79,7 @@ public class Swordsmanship extends Skill
|
||||
if (!Recharge.Instance.use(cur, GetName(), 5000 - (1000 * level), false, false))
|
||||
continue;
|
||||
|
||||
int max = level;
|
||||
int max = 1 + level;
|
||||
|
||||
int charge = 1;
|
||||
if (_charges.containsKey(cur))
|
||||
|
@ -67,7 +67,7 @@ public class Blizzard extends SkillActive
|
||||
@Override
|
||||
public String GetEnergyString()
|
||||
{
|
||||
return "Energy: #34#-2 per Second";
|
||||
return "Energy: #42#-2 per Second";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -114,7 +114,7 @@ public class Blizzard extends SkillActive
|
||||
}
|
||||
|
||||
//Energy
|
||||
if (!Factory.Energy().Use(cur, GetName(), 1.7 - (0.1 * level), true, true))
|
||||
if (!Factory.Energy().Use(cur, GetName(), 2.1 - (0.1 * level), true, true))
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
|
@ -48,7 +48,7 @@ public class IcePrison extends SkillActive implements IThrown
|
||||
{
|
||||
"Launch an icy orb. When it collides,",
|
||||
"it creates a hollow sphere of ice",
|
||||
"thats lasts for #3#1.5 seconds.",
|
||||
"thats lasts for #3#1 seconds.",
|
||||
});
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ public class IcePrison extends SkillActive implements IThrown
|
||||
if (!UtilBlock.airFoliage(freeze))
|
||||
return;
|
||||
|
||||
long time = 3500 + (1500 * level);
|
||||
long time = 3500 + (1000 * level);
|
||||
|
||||
int yDiff = freeze.getY() - mid.getY();
|
||||
|
||||
|
@ -152,6 +152,12 @@ public class Immolate extends Skill
|
||||
Remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cur.getLocation().getBlock().getType() == Material.WATER || cur.getLocation().getBlock().getType() == Material.STATIONARY_WATER)
|
||||
{
|
||||
Remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Energy
|
||||
if (!Factory.Energy().Use(cur, GetName(), 0.65 - (level * 0.05), true, true))
|
||||
|
@ -53,7 +53,7 @@ public class Inferno extends SkillActive
|
||||
@Override
|
||||
public String GetEnergyString()
|
||||
{
|
||||
return "Energy: #34#-2 per Second";
|
||||
return "Energy: #42#-2 per Second";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -100,7 +100,7 @@ public class Inferno extends SkillActive
|
||||
}
|
||||
|
||||
//Energy
|
||||
if (!Factory.Energy().Use(cur, GetName(), 1.7 - (0.1 * level), true, false))
|
||||
if (!Factory.Energy().Use(cur, GetName(), 2.1 - (0.1 * level), true, false))
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
@ -113,7 +113,7 @@ public class Inferno extends SkillActive
|
||||
itemStack.setItemMeta(meta);
|
||||
|
||||
Item fire = cur.getWorld().dropItem(cur.getEyeLocation().add(cur.getLocation().getDirection()), itemStack);
|
||||
Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), 1, GetName(), false);
|
||||
Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), .5, GetName(), false);
|
||||
|
||||
fire.teleport(cur.getEyeLocation());
|
||||
double x = 0.07 - (UtilMath.r(14)/100d);
|
||||
|
@ -42,8 +42,8 @@ public class LifeBonds extends Skill
|
||||
{
|
||||
"Drop Axe/Sword to Toggle.",
|
||||
"",
|
||||
"Transfers life from healthy allies",
|
||||
"to nearby allies with less health.",
|
||||
"Transfers life from yourself to",
|
||||
"nearby allies with less health.",
|
||||
"",
|
||||
"Transfers #0.5#0.5 health every second.",
|
||||
"Maximum range of #3#3 Blocks from user."
|
||||
@ -188,9 +188,6 @@ public class LifeBonds extends Skill
|
||||
int level = getLevel(cur);
|
||||
|
||||
//Bonds
|
||||
Player highest = null;
|
||||
double highestHp = 0;
|
||||
|
||||
Player lowest = null;
|
||||
double lowestHp = 20;
|
||||
|
||||
@ -199,12 +196,6 @@ public class LifeBonds extends Skill
|
||||
if (Factory.Relation().canHurt(cur, other) && !other.equals(cur))
|
||||
continue;
|
||||
|
||||
if (highest == null || other.getHealth() > highestHp)
|
||||
{
|
||||
highest = other;
|
||||
highestHp = other.getHealth();
|
||||
}
|
||||
|
||||
if (lowest == null || other.getHealth() < lowestHp)
|
||||
{
|
||||
lowest = other;
|
||||
@ -213,18 +204,18 @@ public class LifeBonds extends Skill
|
||||
}
|
||||
|
||||
//Nothing to Transfer
|
||||
if (highest == null || lowest == null || highest.equals(lowest) || highestHp - lowestHp < 2)
|
||||
if (cur.equals(lowest) || cur.getHealth() - lowestHp < 2)
|
||||
continue;
|
||||
|
||||
double amount = 0.5 + (0.5 * level);
|
||||
|
||||
amount = Math.min((double)(highestHp - lowestHp) / 2d, amount);
|
||||
amount = Math.min((double)(cur.getHealth() - lowestHp) / 2d, amount);
|
||||
|
||||
//Steal
|
||||
UtilPlayer.health(highest, -amount);
|
||||
UtilPlayer.health(cur, -amount);
|
||||
|
||||
//Hearts
|
||||
_hearts.add(new LifeBondsData(highest.getLocation().add(0, 0.8, 0), lowest, amount));
|
||||
_hearts.add(new LifeBondsData(cur.getLocation().add(0, 0.8, 0), lowest, amount));
|
||||
|
||||
//Effect
|
||||
//highest.getWorld().playEffect(highest.getLocation(), Effect.STEP_SOUND, 18);
|
||||
|
@ -22,7 +22,7 @@ public class MagmaBlade extends Skill
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Your sword deals an additional,",
|
||||
"#0.5#0.5 damage to burning opponents,",
|
||||
"#0.25#0.25 damage to burning opponents,",
|
||||
"but also extinguishes them.",
|
||||
});
|
||||
}
|
||||
@ -54,7 +54,7 @@ public class MagmaBlade extends Skill
|
||||
if (level == 0) return;
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), 0.5 + 0.5 * level, true);
|
||||
event.AddMod(damager.getName(), GetName(), 0.25 + 0.25 * level, true);
|
||||
|
||||
//Effect
|
||||
damager.getWorld().playSound(damager.getLocation(), Sound.FIZZ, 0.8f, 0f);
|
||||
|
@ -18,18 +18,24 @@ import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.util.BlockIterator;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
public class Sharpshooter extends Skill
|
||||
{
|
||||
private WeakHashMap<Player, Integer> _missedCount = new WeakHashMap<Player, Integer>();
|
||||
private WeakHashMap<Player, Integer> _hitCount = new WeakHashMap<Player, Integer>();
|
||||
private HashMap<Entity, Player> _arrows = new HashMap<Entity, Player>();
|
||||
private HashMap<Arrow, Player> _arrows = new HashMap<Arrow, Player>();
|
||||
|
||||
public Sharpshooter(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
|
||||
{
|
||||
@ -53,9 +59,15 @@ public class Sharpshooter extends Skill
|
||||
|
||||
int level = getLevel((Player)event.getEntity());
|
||||
if (level == 0) return;
|
||||
|
||||
|
||||
if (!(event.getProjectile() instanceof Arrow))
|
||||
{
|
||||
System.out.println(GetName() + " : " + event.getEntity().getName() + " shot bow but resulting projectile was now Arrow?!?!?!?");
|
||||
return;
|
||||
}
|
||||
|
||||
//Store
|
||||
_arrows.put(event.getProjectile(), (Player)event.getEntity());
|
||||
_arrows.put((Arrow) event.getProjectile(), (Player)event.getEntity());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
@ -98,9 +110,46 @@ public class Sharpshooter extends Skill
|
||||
|
||||
projectile.remove();
|
||||
|
||||
_missedCount.remove(player);
|
||||
|
||||
Recharge.Instance.useForce(player, GetName() + " Timer", 5000);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void missReset(ProjectileHitEvent event)
|
||||
{
|
||||
final Projectile projectile = event.getEntity();
|
||||
Factory.runSyncLater(() -> {
|
||||
if (!projectile.isDead() && _arrows.containsKey(projectile))
|
||||
{
|
||||
Player shooter = (Player) projectile.getShooter();
|
||||
|
||||
if (!_hitCount.containsKey(shooter))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_missedCount.containsKey(shooter))
|
||||
{
|
||||
_missedCount.put(shooter, Integer.valueOf(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
_missedCount.put(shooter, Integer.valueOf(_missedCount.get(shooter).intValue() + 1));
|
||||
|
||||
// Reset
|
||||
if (_missedCount.get(shooter).intValue() >= 2)
|
||||
{
|
||||
_hitCount.remove(shooter);
|
||||
_missedCount.remove(shooter);
|
||||
UtilPlayer.message(shooter, F.main(GetClassType().name(), GetName() + " : " + F.elem("Damage Bonus Reset")));
|
||||
shooter.playSound(shooter.getLocation(), Sound.NOTE_PLING, 1f, 0.75f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 3l);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void resetViaTime(UpdateEvent event)
|
||||
{
|
||||
@ -148,5 +197,6 @@ public class Sharpshooter extends Skill
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_hitCount.remove(player);
|
||||
_missedCount.remove(player);
|
||||
}
|
||||
}
|
||||
|
@ -1,28 +1,26 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Ranger;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
public class VitalitySpores extends Skill
|
||||
{
|
||||
private HashMap<Player, Long> _lastMove = new HashMap<Player, Long>();
|
||||
private HashMap<Player, Long> _lastDamage = new HashMap<>();
|
||||
|
||||
public VitalitySpores(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
|
||||
{
|
||||
@ -30,47 +28,52 @@ public class VitalitySpores extends Skill
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"While standing still, forest spores",
|
||||
"heal you for #0#0.5 health per 2 seconds."
|
||||
"After getting hit, if no damage is taken",
|
||||
"for 10 Seconds then you will receive",
|
||||
"Regeneration #2#0 for #5#1 Seconds",
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void playerMove(PlayerMoveEvent event)
|
||||
public void damage(CustomDamageEvent event)
|
||||
{
|
||||
if (doesUserHaveSkill(event.getPlayer()) && UtilMath.offset(event.getFrom(), event.getTo()) > 0)
|
||||
_lastMove.put(event.getPlayer(), System.currentTimeMillis());
|
||||
if (doesUserHaveSkill(event.GetDamageePlayer()))
|
||||
{
|
||||
if (event.GetDamageePlayer().hasPotionEffect(PotionEffectType.REGENERATION))
|
||||
{
|
||||
event.GetDamageePlayer().removePotionEffect(PotionEffectType.REGENERATION);
|
||||
}
|
||||
else
|
||||
{
|
||||
_lastDamage.put(event.GetDamageePlayer(), Long.valueOf(System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
{
|
||||
return;
|
||||
|
||||
for (Player cur : GetUsers())
|
||||
{
|
||||
int level = getLevel(cur);
|
||||
if (level == 0) continue;
|
||||
|
||||
if (!_lastMove.containsKey(cur))
|
||||
continue;
|
||||
|
||||
if (UtilTime.elapsed(_lastMove.get(cur), 2000))
|
||||
}
|
||||
|
||||
Iterator<Entry<Player, Long>> iterator = _lastDamage.entrySet().iterator();
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
Entry<Player, Long> entry = iterator.next();
|
||||
|
||||
if (UtilTime.elapsed(entry.getValue().longValue(), 10000))
|
||||
{
|
||||
UtilPlayer.health(cur, 0.5 * level);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation().add(UtilAlg.getBehind(cur.getLocation().getDirection().multiply(0.5))), 0, 0.2f, 0, 0, 1,
|
||||
ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
||||
_lastMove.put(cur, System.currentTimeMillis());
|
||||
}
|
||||
iterator.remove();
|
||||
entry.getKey().addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, (20 * (5 + getLevel(entry.getKey()))), 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_lastMove.remove(player);
|
||||
_lastDamage.remove(player);
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class WolfsPounce extends SkillChargeSword
|
||||
"Taking damage cancels charge.",
|
||||
"",
|
||||
"Colliding with another player",
|
||||
"mid-air deals up to #4#1 damage",
|
||||
"mid-air deals up to #2#1 damage",
|
||||
"and Slow 2 for 3 seconds."
|
||||
|
||||
});
|
||||
@ -128,7 +128,7 @@ public class WolfsPounce extends SkillChargeSword
|
||||
if (_chargeStore.containsKey(damager))
|
||||
charge = _chargeStore.remove(damager);
|
||||
|
||||
int damage = (int)((4 + getLevel(damager)) * charge);
|
||||
int damage = (int)((2 + getLevel(damager)) * charge);
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(damagee, damager, null,
|
||||
|
@ -221,10 +221,6 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 1, 3));
|
||||
AddSkill(new Recharge(this, "Mana Regeneration", ClassType.Mage, SkillType.GlobalPassive, 1, 3));
|
||||
|
||||
AddSkill(new Fitness(this, "Fitness", ClassType.Assassin, SkillType.GlobalPassive, 1, 3));
|
||||
AddSkill(new Recharge(this, "Rest", ClassType.Assassin, SkillType.GlobalPassive, 1, 3));
|
||||
|
||||
|
||||
//AddSkill(new Stamina(this, "Stamina", ClassType.Global, SkillType.GlobalPassive, 1, 1));
|
||||
//AddSkill(new Swim(this, "Swim", ClassType.Global, SkillType.GlobalPassive, 1, 1));
|
||||
}
|
||||
@ -235,9 +231,9 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
|
||||
//Sword
|
||||
AddSkill(new Evade(this, "Evade", ClassType.Assassin, SkillType.Sword,
|
||||
1, 4,
|
||||
2, 1,
|
||||
0, 0,
|
||||
6500, -500, true,
|
||||
2500, -500, true,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
@ -337,7 +333,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
AddSkill(new Takedown(this, "Takedown", ClassType.Brute, SkillType.Axe,
|
||||
1, 5,
|
||||
0, 0,
|
||||
21000, -1000, true,
|
||||
17000, -1000, true,
|
||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
@ -374,7 +370,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
AddSkill(new Riposte(this, "Riposte", ClassType.Knight, SkillType.Sword,
|
||||
1, 5,
|
||||
0, 0,
|
||||
11000, -1000, false,
|
||||
15000, -1000, false,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
@ -411,7 +407,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
AddSkill(new AxeThrow(this, "Roped Axe Throw", ClassType.Knight, SkillType.Axe,
|
||||
1, 5,
|
||||
0, 0,
|
||||
3300, -300, true,
|
||||
4300, -300, true,
|
||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
|
@ -72,7 +72,9 @@ public class Condition
|
||||
|
||||
protected boolean _add = false;
|
||||
protected boolean _live = false;
|
||||
|
||||
|
||||
protected boolean _cancelPotion;
|
||||
|
||||
protected boolean _showIndicator = true;
|
||||
|
||||
public Condition(ConditionManager manager, String reason, LivingEntity ent, LivingEntity source,
|
||||
@ -101,6 +103,35 @@ public class Condition
|
||||
//Live if NOT Additive
|
||||
_live = !add;
|
||||
}
|
||||
|
||||
public Condition(ConditionManager manager, String reason, LivingEntity ent, LivingEntity source,
|
||||
ConditionType type, int mult, int ticks, boolean add, Material visualType, byte visualData, boolean showIndicator, boolean ambient, boolean cancelPotion)
|
||||
{
|
||||
Manager = manager;
|
||||
_time = System.currentTimeMillis();
|
||||
|
||||
_reason = reason;
|
||||
|
||||
_ent = ent;
|
||||
_source = source;
|
||||
|
||||
_type = type;
|
||||
_mult = mult;
|
||||
_ticks = ticks;
|
||||
_ticksTotal = ticks;
|
||||
_ambient = ambient;
|
||||
|
||||
_indicatorType = visualType;
|
||||
_indicatorData = visualData;
|
||||
_showIndicator = showIndicator;
|
||||
|
||||
_cancelPotion = cancelPotion;
|
||||
|
||||
_add = add;
|
||||
|
||||
//Live if NOT Additive
|
||||
_live = !add;
|
||||
}
|
||||
|
||||
public boolean Tick()
|
||||
{
|
||||
@ -124,6 +155,11 @@ public class Condition
|
||||
|
||||
public void Add()
|
||||
{
|
||||
if (_cancelPotion)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
PotionEffectType type = PotionEffectType.getByName(_type.toString());
|
||||
|
@ -239,10 +239,16 @@ public class ConditionFactory
|
||||
|
||||
public Condition Poison(String reason, LivingEntity ent, LivingEntity source,
|
||||
double duration, int mult, boolean extend, boolean showIndicator, boolean ambient)
|
||||
{
|
||||
return Poison(reason, ent, source, duration, mult, extend, showIndicator, ambient, false);
|
||||
}
|
||||
|
||||
public Condition Poison(String reason, LivingEntity ent, LivingEntity source,
|
||||
double duration, int mult, boolean extend, boolean showIndicator, boolean ambient, boolean cancelPotion)
|
||||
{
|
||||
return Manager.AddCondition(new Condition(Manager, reason, ent, source,
|
||||
ConditionType.POISON, mult, (int)(20 * duration), extend,
|
||||
Material.SLIME_BALL, (byte)14, showIndicator, ambient));
|
||||
Material.SLIME_BALL, (byte)14, showIndicator, ambient, cancelPotion));
|
||||
}
|
||||
|
||||
public Condition PoisonShock(String reason, LivingEntity ent, LivingEntity source,
|
||||
|
@ -2,10 +2,12 @@ package nautilus.game.arcade.game;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.elo.EloPlayer;
|
||||
import mineplex.core.elo.EloTeam;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
@ -32,6 +34,7 @@ import nautilus.game.arcade.world.WorldData;
|
||||
import net.minecraft.server.v1_8_R3.EntityItem;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayInUseEntity;
|
||||
import net.minecraft.server.v1_8_R3.WorldServer;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
@ -1656,6 +1659,18 @@ public abstract class Game implements Listener
|
||||
// End
|
||||
SetState(GameState.End);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void disableParticles(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare && Manager.getCosmeticManager().getGadgetManager().hideParticles())
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
getArcadeManager().getCosmeticManager().getGadgetManager().removeGadgetType(player, GadgetType.PARTICLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onGameStart(GameStateChangeEvent event)
|
||||
|
@ -1,9 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.champions;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.inventory.data.Item;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
@ -28,7 +26,6 @@ import nautilus.game.arcade.stats.SpecialWinStatTracker;
|
||||
import nautilus.game.arcade.stats.TheLongestShotStatTracker;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
@ -16,7 +16,6 @@ import nautilus.game.arcade.game.games.champions.kits.KitMage;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitRanger;
|
||||
import nautilus.game.arcade.game.games.common.Domination;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||
import nautilus.game.arcade.stats.ElectrocutionStatTracker;
|
||||
import nautilus.game.arcade.stats.KillReasonStatTracker;
|
||||
import nautilus.game.arcade.stats.SeismicSlamStatTracker;
|
||||
|
@ -16,7 +16,6 @@ import nautilus.game.arcade.game.games.champions.kits.KitMage;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitRanger;
|
||||
import nautilus.game.arcade.game.games.common.TeamDeathmatch;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||
import nautilus.game.arcade.stats.ElectrocutionStatTracker;
|
||||
import nautilus.game.arcade.stats.KillAllOpposingStatTracker;
|
||||
import nautilus.game.arcade.stats.KillReasonStatTracker;
|
||||
|
@ -4,6 +4,15 @@ import mineplex.core.common.util.*;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
@ -311,13 +320,14 @@ public class HideSeek extends TeamGame
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare)
|
||||
{
|
||||
System.out.println("prep");
|
||||
this.getArcadeManager().getPacketHandler().addPacketHandler(_blockDisguise, PacketPlayOutSpawnEntityLiving.class, PacketPlayOutEntityDestroy.class);
|
||||
this.getArcadeManager().getPacketHandler().addPacketHandler(_useEntity, true, PacketPlayInUseEntity.class);
|
||||
}
|
||||
else if (event.GetState() == GameState.Dead)
|
||||
{
|
||||
this.getArcadeManager().getPacketHandler().removePacketHandler(_blockDisguise);
|
||||
this.getArcadeManager().getPacketHandler().removePacketHandler(_useEntity);
|
||||
this.getArcadeManager().getPacketHandler().removePacketHandler(_blockDisguise);
|
||||
this.getArcadeManager().getPacketHandler().removePacketHandler(_useEntity);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package nautilus.game.arcade.game.games.wizards;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
@ -51,11 +50,11 @@ import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClick;
|
||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClickBlock;
|
||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClickEntity;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||
import net.minecraft.server.v1_8_R3.EntityFireball;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSetSlot;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutWindowItems;
|
||||
|
||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||
import org.apache.commons.lang.IllegalClassException;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -736,7 +735,7 @@ public class Wizards extends SoloGame
|
||||
done++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void displayProgress(String progressColor, String prefix, double amount, String suffix, Player... players)
|
||||
{
|
||||
// Generate Bar
|
||||
@ -863,7 +862,7 @@ public class Wizards extends SoloGame
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
private void dropSpells(Player player)
|
||||
{
|
||||
HashSet<SpellType> spells = new HashSet<SpellType>();
|
||||
|
@ -720,7 +720,7 @@ public class GameFlagManager implements Listener
|
||||
player.removePotionEffect(potion.getType());
|
||||
|
||||
//Visual
|
||||
Manager.GetCondition().Factory().Blind("Ghost", player, player, 2.5, 0, false, false, false);
|
||||
// Manager.GetCondition().Factory().Blind("Ghost", player, player, 2.5, 0, false, false, false);
|
||||
|
||||
player.setFireTicks(0);
|
||||
player.setFallDistance(0);
|
||||
|
Loading…
Reference in New Issue
Block a user