Added Respawn middle screen text

Added Champs capture point mid screen text
Fixed hitbox mults for projectiles
Fixed inconsistent arrow damage
Lots of Champions balance
This commit is contained in:
Cheese 2015-04-03 15:28:10 +11:00
parent f682bb8f9c
commit d4e8c0c9a6
42 changed files with 352 additions and 245 deletions

View File

@ -35,15 +35,7 @@ public class ProjectileManager extends MiniPlugin
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,
null, 1f, 1f, null, 0, null, null, hitboxMult, null));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, double hitboxMult, DisguiseManager disguise)
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,
null, 1f, 1f, null, 0, null, null, hitboxMult, disguise));
null, 1f, 1f, null, 0, null, null, hitboxMult));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
@ -51,7 +43,7 @@ public class ProjectileManager extends MiniPlugin
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, pickup,
null, 1f, 1f, null, 0, null, null, hitboxMult, null));
null, 1f, 1f, null, 0, null, null, hitboxMult));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
@ -60,7 +52,7 @@ public class ProjectileManager extends MiniPlugin
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,
sound, soundVolume, soundPitch, effect, effectData, effectRate, null, hitboxMult, null));
sound, soundVolume, soundPitch, effect, effectData, effectRate, null, hitboxMult));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
@ -69,7 +61,7 @@ public class ProjectileManager extends MiniPlugin
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,
sound, soundVolume, soundPitch, effect, effectData, effectRate, particle, hitboxMult, null));
sound, soundVolume, soundPitch, effect, effectData, effectRate, particle, hitboxMult));
}
public void AddThrow(Entity thrown, LivingEntity thrower, IThrown callback,
@ -78,7 +70,7 @@ public class ProjectileManager extends MiniPlugin
{
_thrown.put(thrown, new ProjectileUser(this, thrown, thrower, callback,
expireTime, hitPlayer, hitBlock, idle, false,
sound, soundVolume, soundPitch, null, 0, effectRate, particle, hitboxMult, null));
sound, soundVolume, soundPitch, null, 0, effectRate, particle, hitboxMult));
}
@EventHandler

View File

@ -3,6 +3,7 @@ package mineplex.core.projectile;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.core.updater.UpdateType;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilParticle.ParticleType;
@ -48,14 +49,14 @@ public class ProjectileUser
private int _effectData = 0;
private UpdateType _effectRate = UpdateType.TICK;
private DisguiseManager _disguise;
private double _hitboxMult;
public ProjectileUser(ProjectileManager throwInput, Entity thrown, LivingEntity thrower, IThrown callback,
long expireTime, boolean hitPlayer, boolean hitBlock, boolean idle, boolean pickup,
Sound sound, float soundVolume, float soundPitch,
Effect effect, int effectData, UpdateType effectRate,
ParticleType particle,
double hitboxMult, DisguiseManager disguise)
double hitboxMult)
{
Throw = throwInput;
@ -77,7 +78,7 @@ public class ProjectileUser
_effectData = effectData;
_effectRate = effectRate;
_disguise = disguise;
_hitboxMult = hitboxMult;
}
public void Effect(UpdateEvent event)
@ -104,6 +105,8 @@ public class ProjectileUser
return true;
}
if (_hitPlayer)
{
double distanceToEntity = 0.0D;
LivingEntity victim = null;
@ -120,7 +123,11 @@ public class ProjectileUser
vec3d1 = Vec3D.a(finalObjectPosition.pos.a, finalObjectPosition.pos.b, finalObjectPosition.pos.c);
}
for (Object entity : ((CraftWorld)_thrown.getWorld()).getHandle().getEntities(((CraftEntity)_thrown).getHandle(), ((CraftEntity)_thrown).getHandle().boundingBox.a(((CraftEntity)_thrown).getHandle().motX, ((CraftEntity)_thrown).getHandle().motY, ((CraftEntity)_thrown).getHandle().motZ).grow(1.0D, 1.0D, 1.0D)))
for (Object entity : ((CraftWorld)_thrown.getWorld()).getHandle().getEntities(((CraftEntity)_thrown).getHandle(),
((CraftEntity)_thrown).getHandle().boundingBox.a(
((CraftEntity)_thrown).getHandle().motX,
((CraftEntity)_thrown).getHandle().motY,
((CraftEntity)_thrown).getHandle().motZ).grow(_hitboxMult, _hitboxMult, _hitboxMult)))
{
if (entity instanceof net.minecraft.server.v1_7_R4.Entity)
{
@ -139,19 +146,15 @@ public class ProjectileUser
if (((Player)ent).getGameMode() == GameMode.CREATIVE || UtilPlayer.isSpectator(ent))
continue;
EntityType disguise = null;
if (_disguise != null && _disguise.getDisguise(ent) != null)
{
if (_disguise.getDisguise(ent) instanceof DisguiseSquid)
disguise = EntityType.SQUID;
}
float f1 = (float)(nmsEntity.boundingBox.a() * .6);
AxisAlignedBB axisalignedbb1 = ((CraftEntity)ent).getHandle().boundingBox.grow(f1, f1, f1);
//float f1 = (float)(nmsEntity.boundingBox.a() * 0.6f);
AxisAlignedBB axisalignedbb1 = ((CraftEntity)ent).getHandle().boundingBox.grow(1F, 1F, 1F);
MovingObjectPosition entityCollisionPosition = axisalignedbb1.a(vec3d, vec3d1);
if (entityCollisionPosition != null)
{
if (_thrower instanceof Player)
((Player)_thrower).playSound(_thrower.getLocation(), Sound.ORB_PICKUP, 1f, 1.25f);
double d1 = vec3d.distanceSquared(entityCollisionPosition.pos);
if ((d1 < distanceToEntity) || (distanceToEntity == 0.0D))
{
@ -191,6 +194,7 @@ public class ProjectileUser
}
}
}
}
try
{

View File

@ -23,7 +23,7 @@ public class Assassin extends Skill
SetDesc(new String[]
{
"Permanent Speed II.",
"Fall damage reduced by 1."
"Fall damage reduced by 1.5."
});
}
@ -87,7 +87,7 @@ public class Assassin extends Skill
int level = getLevel(player);
if (level == 0) return;
event.AddMod(null, GetName(), -1, false);
event.AddMod(null, GetName(), -1.5, false);
}
@Override

View File

@ -70,11 +70,14 @@ public class Blink extends SkillActive
return false;
}
//Mastery
//Deblink
if (_loc.containsKey(player) && _blinkTime.containsKey(player))
if (!UtilTime.elapsed(_blinkTime.get(player), 5000))
{
//Require 500ms after blink to deblink
if (UtilTime.elapsed(_blinkTime.get(player), 500))
Deblink(player, level);
return false;
}

View File

@ -53,7 +53,7 @@ public class Flash extends SkillActive
@Override
public String GetRechargeString()
{
return "Recharge: #11#-1 Seconds per Charge";
return "Recharge: #10#-1 Seconds per Charge";
}
@Override
@ -98,7 +98,7 @@ public class Flash extends SkillActive
if (charges >= 1 + level)
continue;
if (!mineplex.core.recharge.Recharge.Instance.use(cur, "Flash Recharge", 11000 - (1000 * level), false, false))
if (!mineplex.core.recharge.Recharge.Instance.use(cur, "Flash Recharge", 10000 - (1000 * level), false, false))
continue;
_flash.put(cur, charges + 1);

View File

@ -46,7 +46,7 @@ public class Recall extends Skill
@Override
public String GetRechargeString()
{
return "Recharge: #90#-15 Seconds";
return "Recharge: #60#-10 Seconds";
}
@EventHandler
@ -70,7 +70,7 @@ public class Recall extends Skill
if (trigger.IsCancelled())
return;
if (!Recharge.Instance.use(player, GetName(), GetName(level), 90000 - (level * 15000), true, false))
if (!Recharge.Instance.use(player, GetName(), GetName(level), 60000 - (level * 10000), true, false))
return;
LinkedList<Location> locs = _locMap.remove(player);

View File

@ -50,7 +50,7 @@ public class SilencingArrow extends SkillActive
SetDesc(new String[]
{
"Your next arrow will Silence",
"target for #3#3 seconds.",
"target for #1#3 seconds.",
"",
"Silence stops skills being used."
});

View File

@ -50,7 +50,7 @@ public class SmokeArrow extends SkillActive
SetDesc(new String[]
{
"Your next arrow will give Blindness",
"to target for #3#1 seconds."
"to target for #4#1 seconds."
});
}

View File

@ -46,7 +46,7 @@ public class SmokeBomb extends Skill
@Override
public String GetRechargeString()
{
return "Recharge: #90#-15 Seconds";
return "Recharge: #60#-10 Seconds";
}
@EventHandler
@ -75,7 +75,7 @@ public class SmokeBomb extends Skill
return;
}
if (!Recharge.Instance.use(player, GetName(), GetName(level), 90000 - (level * 15000), true, false))
if (!Recharge.Instance.use(player, GetName(), GetName(level), 60000 - (level * 10000), true, false))
return;
//Action

View File

@ -25,6 +25,7 @@ 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;
@ -55,9 +56,6 @@ public class BlockToss extends SkillCharge implements IThrown
"dealing up to #6#1 damage.",
"",
GetChargeString(),
"",
"You can only pick up Stone, Dirt,",
"Cobblestone, Sand, Gravel or Snow."
});
}
@ -99,22 +97,20 @@ public class BlockToss extends SkillCharge implements IThrown
return;
}
Block grab = event.getClickedBlock();
if (!UtilBlock.solid(grab) || grab.getType() == Material.BEDROCK)
return;
//Recharge
if (!Recharge.Instance.use(player, GetName(), 1000, false, false))
return;
Block grab = event.getClickedBlock();
int id = event.getClickedBlock().getTypeId();
if (
id != 1 &&
id != 2 &&
id != 3 &&
id != 12 &&
id != 13 &&
id != 80)
if (grab.getRelative(BlockFace.UP).getType() != Material.AIR)
{
UtilPlayer.message(player, F.main(GetName(), "You cannot grab this block."));
return;
}
//Door
if (grab.getRelative(BlockFace.UP).getTypeId() == 64 || grab.getRelative(BlockFace.UP).getTypeId() == 71)
@ -240,7 +236,7 @@ public class BlockToss extends SkillCharge implements IThrown
//Damage Event
Factory.Damage().NewDamageEvent(target, data.GetThrower(), null,
DamageCause.CUSTOM, data.GetThrown().getVelocity().length() * (2.5 + 0.5 * level), true, true, false,
DamageCause.CUSTOM, data.GetThrown().getVelocity().length() * (3 + 0.6 * level), true, true, false,
UtilEnt.getName(data.GetThrower()), GetName());
//Block to Item

View File

@ -8,6 +8,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import com.mysql.jdbc.Util;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import mineplex.core.common.util.F;
import mineplex.core.updater.event.UpdateEvent;
@ -32,9 +34,9 @@ public class Bloodlust extends Skill
SetDesc(new String[]
{
"When an enemy dies within #8#2 blocks,",
"you go into a Bloodlust, receiving",
"Speed 1 and Strength 1 for #4#2 seconds.",
"When you kill an enemy, you go into",
"a Bloodlust, receiving Speed 1 and",
"Strength 1 for #4#2 seconds.",
"You also heal #0#1 health.",
"",
"Bloodlust can stack up to 3 times,",
@ -48,49 +50,52 @@ public class Bloodlust extends Skill
if (!(event.GetEvent().getEntity() instanceof Player))
return;
for (Player cur : UtilServer.getPlayers())
{
if (Expire(cur))
continue;
if (event.GetLog().GetKiller() == null || !event.GetLog().GetKiller().IsPlayer())
return;
if (!Factory.Relation().canHurt(cur, (Player)event.GetEvent().getEntity()))
continue;
Player player = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (player == null)
return;
if (cur.equals(event.GetEvent().getEntity()))
continue;
if (!Factory.Relation().canHurt(player, (Player)event.GetEvent().getEntity()))
return;
if (player.equals(event.GetEvent().getEntity()))
return;
//Level
int level = getLevel(cur);
if (level == 0) continue;
int level = getLevel(player);
if (level == 0)
return;
//Offset
double distance = 4 + (4 * level);
if (UtilMath.offset(event.GetEvent().getEntity().getLocation(), cur.getLocation()) > distance)
continue;
if (UtilMath.offset(event.GetEvent().getEntity().getLocation(), player.getLocation()) > distance)
return;
//Strength
int str = 0;
if (_str.containsKey(cur))
str = _str.get(cur) + 1;
str = Math.min(str, 3);
_str.put(cur, str);
if (_str.containsKey(player))
str = _str.get(player) + 1;
str = Math.min(str, 2);
_str.put(player, str);
//Time
double dur = 4 + (2 * level);
_time.put(cur, (System.currentTimeMillis() + (long)(dur*1000)));
_time.put(player, (System.currentTimeMillis() + (long)(dur*1000)));
//Condition
Factory.Condition().Factory().Speed(GetName(), cur, event.GetEvent().getEntity(), dur, str, false, true, true);
Factory.Condition().Factory().Strength(GetName(), cur, event.GetEvent().getEntity(), dur, 0, false, true, true);
Factory.Condition().Factory().Speed(GetName(), player, event.GetEvent().getEntity(), dur, str, false, true, true);
Factory.Condition().Factory().Strength(GetName(), player, event.GetEvent().getEntity(), dur, 0, false, true, true);
UtilPlayer.health(cur, level);
UtilPlayer.health(player, level);
//Inform
UtilPlayer.message(cur, F.main(GetClassType().name(), "You entered " + F.skill(GetName(level)) + " at " + F.elem("Level " + (str+1)) + "."));
UtilPlayer.message(player, F.main(GetClassType().name(), "You entered " + F.skill(GetName(level)) + " at " + F.elem("Level " + (str+1)) + "."));
//Effect
cur.getWorld().playSound(cur.getLocation(), Sound.ZOMBIE_PIG_ANGRY, 2f, 0.6f);
}
player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_PIG_ANGRY, 2f, 0.6f);
}
@EventHandler

View File

@ -17,8 +17,8 @@ public class Colossus extends Skill
SetDesc(new String[]
{
"You are so huge that you do not",
"take any knockback from attacks."
"You are so huge that you take",
"#25#25 % less knockback from attacks."
});
}
@ -36,7 +36,7 @@ public class Colossus extends Skill
//Damage
event.AddMod(damagee.getName(), GetName(), 0, false);
event.SetKnockback(false);
event.AddKnockback(GetName(), 0.75 - 0.25*level);
}
@Override

View File

@ -23,7 +23,7 @@ public class CripplingBlow extends Skill
SetDesc(new String[]
{
"Your powerful axe attacks give",
"targets Slow 1 for 1.5 second,",
"targets Slow 2 for 1.5 second,",
"as well as no knockback."
});
}
@ -53,7 +53,7 @@ public class CripplingBlow extends Skill
if (level == 0) return;
//Stun
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * 1, 0, false, true, false, true);
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * 1, 1, false, true, false, true);
//Damage
event.AddMod(damager.getName(), GetName(), 0, true);

View File

@ -2,6 +2,7 @@ package mineplex.minecraft.game.classcombat.Skill.Brute;
import java.util.HashSet;
import org.bukkit.Bukkit;
import org.bukkit.EntityEffect;
import org.bukkit.GameMode;
import org.bukkit.Material;
@ -298,28 +299,37 @@ public class DwarfToss extends SkillActive
UtilPlayer.message(cur, F.main(GetClassType().name(), F.name(UtilEnt.getName(target)) + " escaped your " + F.skill(GetName(level)) + "."));
}
for (Player cur : throwSet)
for (final Player cur : throwSet)
{
LivingEntity target = _holding.remove(cur);
final LivingEntity target = _holding.remove(cur);
_time.remove(cur);
int level = getLevel(cur);
//Throw
cur.eject();
target.leaveVehicle();
double mult = 1.2 + (0.2 * level);
final double mult = 1.2 + (0.2 * level);
//Delay
Bukkit.getScheduler().scheduleSyncDelayedTask(Factory.getPlugin(), new Runnable()
{
@Override
public void run()
{
UtilAction.velocity(target, cur.getLocation().getDirection(), mult, false, 0, 0.2, 1.2, true);
//Condition
Factory.Condition().Factory().Falling(GetName(), target, cur, 10, false, true);
//Effect
target.playEffect(EntityEffect.HURT);
}
}, 4);
//Inform
UtilPlayer.message(cur, F.main(GetClassType().name(), "You threw " + F.name(UtilEnt.getName(target)) + " with " + F.skill(GetName(level)) + "."));
UtilPlayer.message(target, F.main(GetClassType().name(), F.name(cur.getName()) + " threw you with " + F.skill(GetName(level)) + "."));
//Effect
target.playEffect(EntityEffect.HURT);
}
}

View File

@ -23,7 +23,7 @@ public class Overwhelm extends Skill
"than your target, you deal 0.25",
"bonus damage",
"",
"Maximum of #0#1 bonus damage."
"Maximum of #0.5#0.5 bonus damage."
});
}
@ -52,7 +52,7 @@ public class Overwhelm extends Skill
int level = getLevel(damager);
if (level == 0) return;
diff = Math.min(diff, level);
diff = Math.min(diff, 0.5 + 0.5 * level);
//Damage
event.AddMod(damager.getName(), GetName(), diff, true);

View File

@ -42,9 +42,8 @@ public class WhirlwindAxe extends SkillActive
SetDesc(new String[]
{
"Whirl your axes around rapidly dealing",
"#4#1 damage to nearby enemies, and",
"pulling enemies within #5#1 blocks",
"towards you.",
"up to #3#1 damage to enemies within",
"#4#1 blocks, pulling them towards you.",
});
this.setAchievementSkill(true);
@ -66,17 +65,21 @@ public class WhirlwindAxe extends SkillActive
public void Skill(final Player player, int level)
{
//Pull + Damage
HashMap<LivingEntity, Double> targets = UtilEnt.getInRadius(player.getLocation(), 5d + 1 * level);
HashMap<LivingEntity, Double> targets = UtilEnt.getInRadius(player.getLocation(), 4d + 1 * level);
for (LivingEntity cur : targets.keySet())
{
if (cur.equals(player))
continue;
if (cur instanceof Player)
if (!Factory.Relation().canHurt((Player)cur, player))
continue;
//Damage Event
if (UtilMath.offset(cur, player) < 4)
{
Factory.Damage().NewDamageEvent(cur, player, null,
DamageCause.CUSTOM, 4 + level, false, true, false,
DamageCause.CUSTOM, 2 + (1 + level) * targets.get(cur), false, true, false,
player.getName(), GetName());
}

View File

@ -59,7 +59,7 @@ public class AxeThrow extends SkillActive implements IThrown
"collides with anything.",
"",
"Your axe is returned to you if you do",
"not pick it up within #20#-2 seconds."
"not pick it up within #15#-1 seconds."
});
setAchievementSkill(true);
@ -186,7 +186,7 @@ public class AxeThrow extends SkillActive implements IThrown
int level = getLevel(player);
if (item.getTicksLived() > 400 - level * 40)
if (item.getTicksLived() > 300 - level * 40)
{
_thrown.get(item).getInventory().addItem(item.getItemStack());
item.remove();

View File

@ -15,6 +15,7 @@ import org.bukkit.util.Vector;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilTime;
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
@ -86,6 +87,9 @@ public class DefensiveStance extends SkillActive
if (event.GetCause() != DamageCause.ENTITY_ATTACK && event.GetCause() != DamageCause.PROJECTILE)
return;
if (UtilEnt.inWater(event.GetDamageeEntity()))
return;
Player damagee = event.GetDamageePlayer();
if (damagee == null) return;
@ -112,6 +116,9 @@ public class DefensiveStance extends SkillActive
}
//Damage
if (event.GetCause() == DamageCause.ENTITY_ATTACK)
event.AddMult(GetName(), GetName(), 0.1, false);
else
event.SetCancelled(GetName() + " Defense");
//Effect

View File

@ -29,7 +29,7 @@ public class Deflection extends Skill
{
"Prepare to deflect incoming attacks.",
"You gain 1 Charge every #5#-1 seconds.",
"You can store a maximum of #2#1 Charges.",
"You can store a maximum of #1#1 Charges.",
"",
"When you are attacked, the damage is",
"reduced by the number of your Charges,",
@ -73,7 +73,7 @@ public class Deflection extends Skill
if (!Recharge.Instance.use(cur, GetName(), 5000 - (1000 * level), false, false))
continue;
int max = 2 + (1 * level);
int max = 1 + (1 * level);
int charge = 1;
if (_charges.containsKey(cur))

View File

@ -17,6 +17,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import mineplex.core.common.util.F;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.core.updater.UpdateType;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
@ -46,13 +47,19 @@ public class HiltSmash extends SkillActive
{
"Smash the hilt of your sword into",
"your opponent, dealing #2#1 damage",
"and Slow 4 for #0.5#0.5 seconds."
"and Slow 3 for #0.5#0.5 seconds."
});
}
@Override
public boolean CustomCheck(Player player, int level)
{
if (UtilEnt.inWater(player))
{
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
return false;
}
if (_used.contains(player))
return false;
@ -112,6 +119,9 @@ public class HiltSmash extends SkillActive
if (event.isCancelled())
return;
if (UtilEnt.inWater(event.getPlayer()))
return;
Player player = event.getPlayer();
//Level
@ -123,6 +133,9 @@ public class HiltSmash extends SkillActive
Entity ent = event.getRightClicked();
if (UtilPlayer.isSpectator(ent))
return;
if (ent == null)
return;
@ -169,7 +182,7 @@ public class HiltSmash extends SkillActive
return;
//Condition
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * level, 4, false, true, true, true);
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * level, 2, false, true, true, true);
//Effect
damagee.getWorld().playSound(damagee.getLocation(), Sound.ZOMBIE_WOOD, 1f, 1.2f);

View File

@ -66,7 +66,7 @@ public class Blizzard extends SkillActive
@Override
public String GetEnergyString()
{
return "Energy: #32#-2 per Second";
return "Energy: #34#-2 per Second";
}
@Override
@ -113,7 +113,7 @@ public class Blizzard extends SkillActive
}
//Energy
if (!Factory.Energy().Use(cur, GetName(), 1.6 - (0.1 * level), true, true))
if (!Factory.Energy().Use(cur, GetName(), 1.7 - (0.1 * level), true, true))
{
_active.remove(cur);
continue;

View File

@ -71,7 +71,7 @@ public class IcePrison extends SkillActive implements IThrown
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(79));
item.setVelocity(player.getLocation().getDirection());
Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 2000, true, false, false,
Sound.FIZZ, 0.6f, 1.6f, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 2d);
Sound.FIZZ, 0.6f, 1.6f, ParticleType.SNOW_SHOVEL, UpdateType.TICK, 1.5d);
//Inform
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));

View File

@ -53,7 +53,7 @@ public class Inferno extends SkillActive
@Override
public String GetEnergyString()
{
return "Energy: #30#-2 per Second";
return "Energy: #34#-2 per Second";
}
@Override
@ -100,7 +100,7 @@ public class Inferno extends SkillActive
}
//Energy
if (!Factory.Energy().Use(cur, GetName(), 1.5 - (0.1 * level), true, false))
if (!Factory.Energy().Use(cur, GetName(), 1.7 - (0.1 * level), true, false))
{
_active.remove(cur);
continue;

View File

@ -33,8 +33,7 @@ public class LifeBondsData
return true;
}
_loc.add(UtilAlg.getTrajectory(_loc, _target.getLocation().add(0, 0.8, 0)).multiply(0.5));
_loc.add(UtilAlg.getTrajectory(_loc, _target.getLocation().add(0, 0.8, 0)).multiply(0.9));
UtilParticle.PlayParticle(ParticleType.HEART, _loc, 0, 0, 0, 0, 1);
return false;

View File

@ -102,7 +102,7 @@ public class LightningOrb extends SkillActive implements IThrown
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(57));
item.setVelocity(player.getLocation().getDirection());
Factory.Projectile().AddThrow(item, player, this, System.currentTimeMillis() + 5000 - (400 * level), true, false, false,
Sound.FIZZ, 0.6f, 1.6f, ParticleType.FIREWORKS_SPARK, UpdateType.TICK, 1.5d);
Sound.FIZZ, 0.6f, 1.6f, ParticleType.FIREWORKS_SPARK, UpdateType.TICK, 2d);
//Inform
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));

View File

@ -33,7 +33,7 @@ public class StaticLazer extends SkillChargeSword
int cost, int maxLevel)
{
super(skills, name, classType, skillType, cost, maxLevel,
0.012f, 0.008f,
0.012f, 0.004f,
12000, -1000, true, true,
false, true);
@ -45,11 +45,12 @@ public class StaticLazer extends SkillChargeSword
GetChargeString(),
"Taking damage cancels charge.",
"",
"Deals up to #7#1 damage and travels",
"up to #20#10 blocks.",
"Deals #6#1 damage and travels up to",
"#20#10 blocks.",
});
_fireOnFull = true;
_fireOnFull = false;
_energyPerCharge = 1.2f;
setAchievementSkill(true);
}
@ -59,6 +60,12 @@ public class StaticLazer extends SkillChargeSword
return "Recharge: " + "#12#-1 Seconds";
}
@Override
public String GetEnergyString()
{
return "Energy: " + "24 per Second";
}
@Override
public void DoSkillCustom(Player player, float charge)
{
@ -105,7 +112,7 @@ public class StaticLazer extends SkillChargeSword
//Damage Event
Factory.Damage().NewDamageEvent(other, player, null,
DamageCause.CUSTOM, (2 + (5 + level) * hit.get(other)) * charge, true, true, false,
DamageCause.CUSTOM, 6 + level * charge, true, true, false,
player.getName(), GetName());
}

View File

@ -33,7 +33,7 @@ public class Void extends Skill
"Drop Axe/Sword to Toggle.",
"",
"While in void form, you receive",
"Slow 2, take no knockback and",
"Slow 3, take no knockback and",
"use no energy to swing weapons.",
"",
"Reduces incoming damage by #1#1 , but",
@ -144,8 +144,8 @@ public class Void extends Skill
continue;
//Condition
Factory.Condition().Factory().Invisible(GetName(), cur, cur, 1.9, 0, false, true, true);
Factory.Condition().Factory().Slow(GetName(), cur, cur, 1.9, 1, false, true, false, true);
Factory.Condition().Factory().Invisible(GetName(), cur, cur, 1.9, 1, false, true, true);
Factory.Condition().Factory().Slow(GetName(), cur, cur, 1.9, 2, false, true, false, true);
}
}

View File

@ -45,7 +45,7 @@ public class Agility extends SkillActive
SetDesc(new String[]
{
"Sprint with great agility, gaining",
"Speed I for #3#1 seconds. You take",
"Speed 2 for #3#1 seconds. You take",
"#45#5 % less damage and take no knockback.",
"",
"Agility ends if you Left-Click."
@ -68,7 +68,7 @@ public class Agility extends SkillActive
public void Skill(Player player, int level)
{
//Action
Factory.Condition().Factory().Speed(GetName(), player, player, 3 + level, 0, false, true, true);
Factory.Condition().Factory().Speed(GetName(), player, player, 3 + level, 1, false, true, true);
_active.add(player);
//Inform

View File

@ -21,6 +21,7 @@ import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
@ -28,6 +29,7 @@ import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
public class Disengage extends SkillActive
{
private HashMap<Player, Long> _prepare = new HashMap<Player, Long>();
private HashMap<Player, Long> _fall = new HashMap<Player, Long>();
public Disengage(SkillFactory skills, String name, ClassType classType, SkillType skillType,
int cost, int levels,
@ -118,7 +120,9 @@ public class Disengage extends SkillActive
//Condition
Factory.Condition().Factory().Slow(GetName(), damager, damagee, 2.5 + (0.5 * level), 3, false, true, true, true);
Factory.Condition().Factory().Invulnerable(GetName(), damagee, damagee, 2, false, false);
Factory.Condition().Factory().Invulnerable(GetName(), damagee, damagee, 1, false, false);
_fall.put(damagee, System.currentTimeMillis());
//Effect
damagee.getWorld().playSound(damager.getLocation(), Sound.ZOMBIE_METAL, 0.5f, 1.6f);
@ -138,9 +142,19 @@ public class Disengage extends SkillActive
for (Player cur : GetUsers())
{
if (!_prepare.containsKey(cur))
continue;
if (_fall.containsKey(cur))
{
if (UtilTime.elapsed(_fall.get(cur), 2000))
{
if (UtilEnt.isGrounded(cur) || UtilTime.elapsed(_fall.get(cur), 20000))
{
_fall.remove(cur);
}
}
}
if (_prepare.containsKey(cur))
{
if (System.currentTimeMillis() > _prepare.get(cur))
{
//Remove
@ -151,10 +165,27 @@ public class Disengage extends SkillActive
}
}
}
}
@EventHandler(priority = EventPriority.LOW)
public void fallCancel(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
if (event.GetCause() != DamageCause.FALL)
return;
if (_fall.remove(event.GetDamageeEntity()) != null)
{
event.SetCancelled(GetName() + " Fall");
}
}
@Override
public void Reset(Player player)
{
_fall.remove(player);
_prepare.remove(player);
}
}

View File

@ -55,7 +55,7 @@ public class HealingShot extends SkillActive
{
"Prepare a healing shot;",
"Your next arrow will give its target",
"Regeneration 1 for #2#2 seconds,",
"Regeneration 2 for #3#2 seconds,",
"and remove all negative effects."
});
}
@ -148,7 +148,7 @@ public class HealingShot extends SkillActive
projectile.remove();
//Regen
Factory.Condition().Factory().Regen(GetName(), damagee, damager, 2 + 2 * level, 0, false, true, true);
Factory.Condition().Factory().Regen(GetName(), damagee, damager, 3 + 2 * level, 1, false, true, true);
//Remove Bad
damagee.setFireTicks(0);

View File

@ -39,7 +39,7 @@ public class HeavyArrows extends Skill
"as well as #1#1 additional damage.",
"",
"You also receive #10#10 % knockback",
"when firing arrows.",
"when firing arrows if not sneaking.",
});
}
@ -59,11 +59,11 @@ public class HeavyArrows extends Skill
if (level == 0) return;
//Backboost
if (Recharge.Instance.use(player, GetName(), 500, false, false))
if (!player.isSneaking() && Recharge.Instance.use(player, GetName(), 750, false, false))
{
double vel = (event.getProjectile().getVelocity().length() * (0.1 + 0.1 * level));
UtilAction.velocity(player, player.getLocation().getDirection().multiply(-1), vel,
false, 0, 0.2, 0.6, true);
false, 0, 0.3, 0.6, true);
}
//Decrease Speed

View File

@ -25,7 +25,7 @@ public class Longshot extends Skill
SetDesc(new String[]
{
"Arrows do an additional 1 damage", "for every #4#-0.5 Blocks they travelled,",
"however, their base damage is", "reduced by 3.", "", "Maximum of #5#5 additional damage."
"however, their base damage is", "reduced by 3.", "", "Maximum of #6#6 additional damage."
});
}
@ -70,7 +70,7 @@ public class Longshot extends Skill
double length = UtilMath.offset(loc, projectile.getLocation());
// Damage
double damage = Math.min(5 + 5 * level, (length / (4 - 0.5 * level)) - 3);
double damage = Math.min(6 + 6 * level, (length / (4 - 0.5 * level)) - 3);
event.AddMod(damager.getName(), GetName(), damage, damage > 0);
}

View File

@ -40,7 +40,7 @@ public class Overcharge extends SkillChargeBow
"",
GetChargeString(),
"",
"Deals up to #0#1 bonus damage."
"Deals up to #1.5#1.5 bonus damage."
});
}

View File

@ -73,6 +73,9 @@ public class Sharpshooter extends Skill
Player player = _arrows.remove(projectile);
int level = getLevel(player);
if (event.GetDamagerEntity(true) != null && event.GetDamagerEntity(true).equals(event.GetDamageeEntity()))
return;
if (_hitCount.containsKey(player))
{
//Damage

View File

@ -6,6 +6,7 @@ import org.bukkit.event.EventHandler;
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.UtilParticle;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime;
@ -40,12 +41,12 @@ public class VitalitySpores extends Skill
int level = getLevel(cur);
if (level == 0) continue;
if (UtilTime.elapsed(Factory.Combat().Get(cur).GetLastDamaged(), 12000 - 2000*level))
if (UtilTime.elapsed(Factory.Combat().Get(cur).GetLastDamaged(), 5000 - 1000*level))
{
//Factory.Condition().Factory().Regen(GetName(), cur, cur, 3.9 + 2*level, 0, false, true, true);
UtilPlayer.health(cur, 1);
UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation(), 0, 0.2f, 0, 0, 1);
UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation().add(UtilAlg.getBehind(cur.getLocation().getDirection().multiply(0.5))), 0, 0.2f, 0, 0, 1);
}
}
}

View File

@ -33,7 +33,7 @@ public class WolfsPounce extends SkillChargeSword
{
super(skills, name, classType, skillType, cost, maxLevel,
0.012f, 0.008f,
7000, -1000, true, true,
8000, -1000, true, true,
false, false);
SetDesc(new String[]
@ -88,7 +88,7 @@ public class WolfsPounce extends SkillChargeSword
if (!_live.containsKey(player))
continue;
if (!UtilTime.elapsed(_live.get(player), 2000))
if (!UtilTime.elapsed(_live.get(player), 1000))
continue;
_live.remove(player);

View File

@ -14,6 +14,8 @@ public class SkillCharge extends Skill
protected float _rateBase;
protected float _rateBoost;
protected float _energyPerCharge = 0;
public SkillCharge(SkillFactory skills, String name, ClassType classType,
SkillType skillType, int cost, int maxLevel,
float base, float boost)
@ -37,6 +39,24 @@ public class SkillCharge extends Skill
float charge = _charge.get(player);
if (charge >= 1)
{
//Display
DisplayProgress(player, GetName(level), charge);
return true;
}
//Energy
if (_energyPerCharge > 0)
{
if (!Factory.Energy().Use(player, GetName(), _energyPerCharge, true, false))
{
//Display
DisplayProgress(player, GetName(level), charge);
return true;
}
}
//Increase Charge
charge = Math.min(1f, charge + _rateBase + (_rateBoost * level));
_charge.put(player, charge);

View File

@ -171,7 +171,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new Illusion(this, "Illusion", ClassType.Assassin, SkillType.Sword,
1, 4,
50, -4,
20000, -1000, true,
17000, -1000, true,
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
@ -193,7 +193,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new Leap(this, "Leap", ClassType.Assassin, SkillType.Axe,
1, 4,
36, -3,
9500, -1500, true,
10500, -1500, true,
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
@ -282,7 +282,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
//Passive B
AddSkill(new CripplingBlow(this, "Crippling Blow", ClassType.Brute, SkillType.PassiveB, 2, 1));
AddSkill(new Colossus(this, "Colossus", ClassType.Brute, SkillType.PassiveB, 2, 1));
AddSkill(new Colossus(this, "Colossus", ClassType.Brute, SkillType.PassiveB, 1, 3));
AddSkill(new Overwhelm(this, "Overwhelm", ClassType.Brute, SkillType.PassiveB, 1, 3));
}
@ -386,7 +386,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new FireBlast(this, "Fire Blast", ClassType.Mage, SkillType.Axe,
1, 5,
60, -3,
11000, -1000, true,
13000, -1000, true,
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));

View File

@ -21,6 +21,7 @@ import net.minecraft.server.v1_7_R4.DamageSource;
import net.minecraft.server.v1_7_R4.EntityHuman;
import net.minecraft.server.v1_7_R4.EntityLiving;
import org.bukkit.Bukkit;
import org.bukkit.EntityEffect;
import org.bukkit.GameMode;
import org.bukkit.Location;
@ -100,8 +101,16 @@ public class DamageManager extends MiniPlugin
if (!DisableDamageChanges)
WeaponDamage(event, damager);
double damage = event.getDamage();
//Consistent Arrow Damage
if (projectile != null && projectile instanceof Arrow)
{
damage = projectile.getVelocity().length() * 3;
}
//New Event
NewDamageEvent(damagee, damager, projectile, event.getCause(), event.getDamage(), true, false, false, null, null, preCancel);
NewDamageEvent(damagee, damager, projectile, event.getCause(), damage, true, false, false, null, null, preCancel);
//System.out.println(UtilEnt.getName(damagee) + " by " + event.getCause() + " at " + UtilWorld.locToStr(damagee.getLocation()));

View File

@ -301,6 +301,8 @@ public class CapturePoint
RewardCapture(player, 30);
}
}
UtilTextMiddle.display(null, _owner.GetColor() + _owner.GetName() + " captured " + _name, 5, 40, 5);
}
}
//Count Down

View File

@ -11,6 +11,7 @@ import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.recharge.Recharge;
import mineplex.core.teleport.event.MineplexTeleportEvent;
@ -713,6 +714,7 @@ public class GameFlagManager implements Listener
UtilAction.velocity(player, new Vector(0,0,0), 1, true, 0.4, 0, 1, true);
UtilPlayer.message(player, C.cWhite + C.Bold + "You will respawn in " + time + " seconds...");
UtilTextMiddle.display(null, "Respawning in " + time + " seconds...", 5, 40, 5, player);
Manager.getPlugin().getServer().getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), new Runnable()
{