champions balance
This commit is contained in:
parent
25f299b490
commit
5586132429
@ -55,7 +55,7 @@ public class Flash extends SkillActive
|
|||||||
@Override
|
@Override
|
||||||
public String GetRechargeString()
|
public String GetRechargeString()
|
||||||
{
|
{
|
||||||
return "Recharge: #10#-1 Seconds per Charge";
|
return "Recharge: #8#-1 Seconds per Charge";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -84,7 +84,7 @@ public class Flash extends SkillActive
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Recharge(UpdateEvent event)
|
public void recharge(UpdateEvent event)
|
||||||
{
|
{
|
||||||
for (Player cur : GetUsers())
|
for (Player cur : GetUsers())
|
||||||
{
|
{
|
||||||
@ -100,7 +100,7 @@ public class Flash extends SkillActive
|
|||||||
if (charges >= 1 + level)
|
if (charges >= 1 + level)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!mineplex.core.recharge.Recharge.Instance.use(cur, "Flash Recharge", 10000 - (1000 * level), false, false))
|
if (!mineplex.core.recharge.Recharge.Instance.use(cur, "Flash Recharge", 8000 - (1000 * level), false, false))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_flash.put(cur, charges + 1);
|
_flash.put(cur, charges + 1);
|
||||||
|
@ -107,6 +107,9 @@ public class Illusion extends SkillActive
|
|||||||
UtilEnt.Vegetate(skel);
|
UtilEnt.Vegetate(skel);
|
||||||
UtilEnt.silence(skel, true);
|
UtilEnt.silence(skel, true);
|
||||||
|
|
||||||
|
skel.setMaxHealth(7);
|
||||||
|
skel.setHealth(7);
|
||||||
|
|
||||||
ClassCombatCreatureAllowSpawnEvent disableEvent = new ClassCombatCreatureAllowSpawnEvent(false);
|
ClassCombatCreatureAllowSpawnEvent disableEvent = new ClassCombatCreatureAllowSpawnEvent(false);
|
||||||
UtilServer.getServer().getPluginManager().callEvent(disableEvent);
|
UtilServer.getServer().getPluginManager().callEvent(disableEvent);
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ import org.bukkit.event.player.PlayerDropItemEvent;
|
|||||||
public class Recall extends Skill
|
public class Recall extends Skill
|
||||||
{
|
{
|
||||||
private HashMap<Player, LinkedList<Location>> _locMap = new HashMap<Player, LinkedList<Location>>();
|
private HashMap<Player, LinkedList<Location>> _locMap = new HashMap<Player, LinkedList<Location>>();
|
||||||
|
private HashMap<Player, LinkedList<Double>> _healthMap = new HashMap<Player, LinkedList<Double>>();
|
||||||
|
|
||||||
public Recall(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
|
public Recall(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
|
||||||
{
|
{
|
||||||
@ -52,7 +53,7 @@ public class Recall extends Skill
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Use(PlayerDropItemEvent event)
|
public void use(PlayerDropItemEvent event)
|
||||||
{
|
{
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
@ -79,9 +80,17 @@ public class Recall extends Skill
|
|||||||
if (locs == null)
|
if (locs == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
LinkedList<Double> health = _healthMap.remove(player);
|
||||||
|
if (health == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//Heal
|
||||||
|
player.setHealth(health.getLast());
|
||||||
|
|
||||||
//Effect
|
//Effect
|
||||||
player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_UNFECT, 2f, 2f);
|
player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_UNFECT, 2f, 2f);
|
||||||
|
|
||||||
|
//Teleport
|
||||||
Location current = player.getLocation();
|
Location current = player.getLocation();
|
||||||
Location target = locs.getLast();
|
Location target = locs.getLast();
|
||||||
|
|
||||||
@ -102,21 +111,32 @@ public class Recall extends Skill
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void StoreLocation(UpdateEvent event)
|
public void storeLocation(UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.TICK)
|
if (event.getType() != UpdateType.TICK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (Player cur : GetUsers())
|
for (Player cur : GetUsers())
|
||||||
{
|
{
|
||||||
|
//Create
|
||||||
if (!_locMap.containsKey(cur))
|
if (!_locMap.containsKey(cur))
|
||||||
_locMap.put(cur, new LinkedList<Location>());
|
_locMap.put(cur, new LinkedList<Location>());
|
||||||
|
|
||||||
|
if (!_healthMap.containsKey(cur))
|
||||||
|
_healthMap.put(cur, new LinkedList<Double>());
|
||||||
|
|
||||||
|
//Store
|
||||||
_locMap.get(cur).addFirst(cur.getLocation());
|
_locMap.get(cur).addFirst(cur.getLocation());
|
||||||
|
_healthMap.get(cur).addFirst(cur.getHealth());
|
||||||
|
|
||||||
int level = getLevel(cur);
|
int level = getLevel(cur);
|
||||||
|
|
||||||
|
//Cull
|
||||||
if (_locMap.get(cur).size() > (2 + 2 * level) * 20)
|
if (_locMap.get(cur).size() > (2 + 2 * level) * 20)
|
||||||
_locMap.get(cur).removeLast();
|
_locMap.get(cur).removeLast();
|
||||||
|
|
||||||
|
if (_healthMap.get(cur).size() > (2 + 2 * level) * 20)
|
||||||
|
_healthMap.get(cur).removeLast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public class SilencingArrow extends SkillActive
|
|||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
"Your next arrow will Silence",
|
"Your next arrow will Silence",
|
||||||
"target for #1#3 seconds.",
|
"target for #2#2 seconds.",
|
||||||
"",
|
"",
|
||||||
"Silence stops skills being used."
|
"Silence stops skills being used."
|
||||||
});
|
});
|
||||||
@ -129,7 +129,7 @@ public class SilencingArrow extends SkillActive
|
|||||||
if (level == 0) return;
|
if (level == 0) return;
|
||||||
|
|
||||||
//Confuse
|
//Confuse
|
||||||
Factory.Condition().Factory().Silence(GetName(), damagee, damager, 3 + 3*level, true, true);
|
Factory.Condition().Factory().Silence(GetName(), damagee, damager, 2 + 2*level, true, true);
|
||||||
|
|
||||||
//Effect
|
//Effect
|
||||||
damagee.getWorld().playSound(damagee.getLocation(), Sound.BLAZE_BREATH, 2.5f, 2.0f);
|
damagee.getWorld().playSound(damagee.getLocation(), Sound.BLAZE_BREATH, 2.5f, 2.0f);
|
||||||
|
@ -112,7 +112,7 @@ public class BlockToss extends SkillCharge implements IThrown
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ladder and beacon grabs
|
// Ladder and beacon grabs
|
||||||
if (grab.getType() == Material.LADDER || grab.getType() == Material.BEACON)
|
if (grab.getType() == Material.LADDER || grab.getType() == Material.BEACON || grab.getType() == Material.WEB)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main(GetName(), "You cannot grab this block."));
|
UtilPlayer.message(player, F.main(GetName(), "You cannot grab this block."));
|
||||||
return;
|
return;
|
||||||
@ -288,7 +288,17 @@ public class BlockToss extends SkillCharge implements IThrown
|
|||||||
if (block.getType() != fall.getMaterial())
|
if (block.getType() != fall.getMaterial())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
block.setTypeIdAndData(0, (byte)0, false);
|
//No idea why i was doing this
|
||||||
|
//block.setTypeIdAndData(0, (byte)0, false);
|
||||||
|
|
||||||
|
//Added this to fix ^
|
||||||
|
if (!UtilBlock.airFoliage(block))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int id = fall.getBlockId();
|
||||||
|
|
||||||
|
if (id == 12) id = Material.SANDSTONE.getId();
|
||||||
|
if (id == 13) id = Material.STONE.getId();
|
||||||
|
|
||||||
//Block Replace
|
//Block Replace
|
||||||
Factory.BlockRestore().Add(block, fall.getBlockId(), (byte)0, 10000);
|
Factory.BlockRestore().Add(block, fall.getBlockId(), (byte)0, 10000);
|
||||||
|
@ -18,7 +18,7 @@ public class Colossus extends Skill
|
|||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
"You are so huge that you take",
|
"You are so huge that you take",
|
||||||
"#15#20 % less knockback from attacks."
|
"50% less knockback from attacks."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ public class Colossus extends Skill
|
|||||||
|
|
||||||
//Damage
|
//Damage
|
||||||
event.AddMod(damagee.getName(), GetName(), 0, false);
|
event.AddMod(damagee.getName(), GetName(), 0, false);
|
||||||
event.AddKnockback(GetName(), 0.85 - 0.20*level);
|
event.AddKnockback(GetName(), 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,7 +58,7 @@ public class DwarfToss extends SkillActive
|
|||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
"Hold Block to pick up target player.",
|
"Hold Block to pick up target player.",
|
||||||
"Release Block to throw with #1.2#0.2 velocity.",
|
"Release Block to throw target player.",
|
||||||
"",
|
"",
|
||||||
"Players you are holding cannot harm",
|
"Players you are holding cannot harm",
|
||||||
"you, or be harmed by others.",
|
"you, or be harmed by others.",
|
||||||
@ -209,8 +209,8 @@ public class DwarfToss extends SkillActive
|
|||||||
_time.put(player, System.currentTimeMillis());
|
_time.put(player, System.currentTimeMillis());
|
||||||
|
|
||||||
//Inform
|
//Inform
|
||||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You picked up " + F.name(UtilEnt.getName(target)) + " with " + F.skill(GetName(level)) + "."));
|
UtilPlayer.message(player, F.main(GetClassType().name(), "You picked up " + F.name(UtilEnt.getName(target)) + " with " + F.skill(GetName()) + "."));
|
||||||
UtilPlayer.message(target, F.main(GetClassType().name(), F.name(player.getName()) + " grabbed you with " + F.skill(GetName(level)) + "."));
|
UtilPlayer.message(target, F.main(GetClassType().name(), F.name(player.getName()) + " grabbed you with " + F.skill(GetName()) + "."));
|
||||||
|
|
||||||
//Hide!
|
//Hide!
|
||||||
if (target instanceof Player)
|
if (target instanceof Player)
|
||||||
@ -303,9 +303,8 @@ public class DwarfToss extends SkillActive
|
|||||||
{
|
{
|
||||||
LivingEntity target = _holding.remove(cur);
|
LivingEntity target = _holding.remove(cur);
|
||||||
_time.remove(cur);
|
_time.remove(cur);
|
||||||
int level = getLevel(cur);
|
|
||||||
|
|
||||||
UtilPlayer.message(cur, F.main(GetClassType().name(), F.name(UtilEnt.getName(target)) + " escaped your " + F.skill(GetName(level)) + "."));
|
UtilPlayer.message(cur, F.main(GetClassType().name(), F.name(UtilEnt.getName(target)) + " escaped your " + F.skill(GetName()) + "."));
|
||||||
|
|
||||||
//Show!
|
//Show!
|
||||||
if (target instanceof Player)
|
if (target instanceof Player)
|
||||||
@ -316,7 +315,6 @@ public class DwarfToss extends SkillActive
|
|||||||
{
|
{
|
||||||
final LivingEntity target = _holding.remove(cur);
|
final LivingEntity target = _holding.remove(cur);
|
||||||
long time = _time.remove(cur);
|
long time = _time.remove(cur);
|
||||||
int level = getLevel(cur);
|
|
||||||
|
|
||||||
//Time Reduce
|
//Time Reduce
|
||||||
double timeScale = 1;
|
double timeScale = 1;
|
||||||
@ -332,7 +330,7 @@ public class DwarfToss extends SkillActive
|
|||||||
//Throw
|
//Throw
|
||||||
cur.eject();
|
cur.eject();
|
||||||
target.leaveVehicle();
|
target.leaveVehicle();
|
||||||
final double mult = (1.2 + (0.2 * level)) * timeScale;
|
final double mult = (1.8) * timeScale;
|
||||||
|
|
||||||
//Delay
|
//Delay
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(Factory.getPlugin(), new Runnable()
|
Bukkit.getScheduler().scheduleSyncDelayedTask(Factory.getPlugin(), new Runnable()
|
||||||
@ -351,8 +349,8 @@ public class DwarfToss extends SkillActive
|
|||||||
}, 5);
|
}, 5);
|
||||||
|
|
||||||
//Inform
|
//Inform
|
||||||
UtilPlayer.message(cur, F.main(GetClassType().name(), "You threw " + F.name(UtilEnt.getName(target)) + " with " + F.skill(GetName(level)) + "."));
|
UtilPlayer.message(cur, F.main(GetClassType().name(), "You threw " + F.name(UtilEnt.getName(target)) + " with " + F.skill(GetName()) + "."));
|
||||||
UtilPlayer.message(target, F.main(GetClassType().name(), F.name(cur.getName()) + " threw you with " + F.skill(GetName(level)) + "."));
|
UtilPlayer.message(target, F.main(GetClassType().name(), F.name(cur.getName()) + " threw you with " + F.skill(GetName()) + "."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ public class FleshHook extends SkillActiveCharge implements IThrown
|
|||||||
GetChargeString(),
|
GetChargeString(),
|
||||||
"",
|
"",
|
||||||
"If Flesh Hook hits a player, it",
|
"If Flesh Hook hits a player, it",
|
||||||
"deals up to #2#2 damage, and rips them",
|
"deals up to #5#1 damage, and rips them",
|
||||||
"towards you with #1.2#0.2 velocity.",
|
"towards you with #1.2#0.3 velocity.",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,14 +142,14 @@ public class FleshHook extends SkillActiveCharge implements IThrown
|
|||||||
//Pull
|
//Pull
|
||||||
UtilAction.velocity(target,
|
UtilAction.velocity(target,
|
||||||
UtilAlg.getTrajectory(target.getLocation(), player.getLocation()),
|
UtilAlg.getTrajectory(target.getLocation(), player.getLocation()),
|
||||||
1.2 + (0.2 * level), false, 0, 0.8, 1.5, true);
|
1.2 + (0.3 * level), false, 0, 0.7, 1.2, true);
|
||||||
|
|
||||||
//Condition
|
//Condition
|
||||||
Factory.Condition().Factory().Falling(GetName(), target, player, 10, false, true);
|
Factory.Condition().Factory().Falling(GetName(), target, player, 10, false, true);
|
||||||
|
|
||||||
//Damage Event
|
//Damage Event
|
||||||
Factory.Damage().NewDamageEvent(target, player, null,
|
Factory.Damage().NewDamageEvent(target, player, null,
|
||||||
DamageCause.CUSTOM, velocity * (1 + (1*level)), false, true, false,
|
DamageCause.CUSTOM, 5 + level, false, true, false,
|
||||||
player.getName(), GetName());
|
player.getName(), GetName());
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public class SeismicSlam extends SkillActive
|
|||||||
{
|
{
|
||||||
"Jump up and slam back into the ground.",
|
"Jump up and slam back into the ground.",
|
||||||
"Players within #5.5#0.5 Blocks take up to",
|
"Players within #5.5#0.5 Blocks take up to",
|
||||||
"#1#1 damage and are thrown into the air.",
|
"#1#1 damage and are smashed away from you.",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ public class SeismicSlam extends SkillActive
|
|||||||
//Velocity
|
//Velocity
|
||||||
UtilAction.velocity(cur,
|
UtilAction.velocity(cur,
|
||||||
UtilAlg.getTrajectory2d(player.getLocation().toVector(), cur.getLocation().toVector()),
|
UtilAlg.getTrajectory2d(player.getLocation().toVector(), cur.getLocation().toVector()),
|
||||||
0.4 + 2 * targets.get(cur), true, 0, 0.2 + 1.2 * targets.get(cur), 1.6, true);
|
0.6 + 2 * targets.get(cur), true, 0, 0.2 + 1.0 * targets.get(cur), 1.4, true);
|
||||||
|
|
||||||
//Condition
|
//Condition
|
||||||
Factory.Condition().Factory().Falling(GetName(), cur, player, 10, false, true);
|
Factory.Condition().Factory().Falling(GetName(), cur, player, 10, false, true);
|
||||||
|
@ -67,8 +67,9 @@ public class HoldPosition extends SkillActive
|
|||||||
double duration = 3 + (1 * 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, 2, false, true, true);
|
Factory.Condition().Factory().Protection(GetName(), player, player, duration, 2, false, false, true);
|
||||||
|
Factory.Condition().Factory().Jump(GetName(), player, player, duration, 250, false, false, 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)) + "."));
|
||||||
|
@ -49,7 +49,7 @@ public class Riposte extends SkillActive
|
|||||||
"to riposte.",
|
"to riposte.",
|
||||||
"",
|
"",
|
||||||
"If successful, you deal an additional",
|
"If successful, you deal an additional",
|
||||||
"#0.5#0.5 bonus damage.",
|
"#0#0.5 bonus damage.",
|
||||||
"",
|
"",
|
||||||
"You must block, parry, then riposte",
|
"You must block, parry, then riposte",
|
||||||
"all within 1 second of each other."
|
"all within 1 second of each other."
|
||||||
@ -155,7 +155,7 @@ public class Riposte extends SkillActive
|
|||||||
_prepare.remove(damager);
|
_prepare.remove(damager);
|
||||||
|
|
||||||
//Damage
|
//Damage
|
||||||
event.AddMod(damager.getName(), GetName(), 0.5 + 0.5 * level, true);
|
event.AddMod(damager.getName(), GetName(), 0.5 * level, true);
|
||||||
|
|
||||||
//Effect
|
//Effect
|
||||||
damager.getWorld().playSound(damager.getLocation(), Sound.ZOMBIE_METAL, 1f, 1.2f);
|
damager.getWorld().playSound(damager.getLocation(), Sound.ZOMBIE_METAL, 1f, 1.2f);
|
||||||
@ -163,8 +163,6 @@ public class Riposte extends SkillActive
|
|||||||
//UtilPlayer.health(damager, 1);
|
//UtilPlayer.health(damager, 1);
|
||||||
//UtilParticle.PlayParticle(ParticleType.HEART, damager.getEyeLocation(), 0, 0.3f, 0, 0, 1);
|
//UtilParticle.PlayParticle(ParticleType.HEART, damager.getEyeLocation(), 0, 0.3f, 0, 0, 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Inform
|
//Inform
|
||||||
UtilPlayer.message(damager, F.main(GetClassType().name(), "You countered with " + F.skill(GetName(level)) + "."));
|
UtilPlayer.message(damager, F.main(GetClassType().name(), "You countered with " + F.skill(GetName(level)) + "."));
|
||||||
UtilPlayer.message(target, F.main(GetClassType().name(), F.name(damager.getName()) + " countered with " + F.skill(GetName(level)) + "."));
|
UtilPlayer.message(target, F.main(GetClassType().name(), F.name(damager.getName()) + " countered with " + F.skill(GetName(level)) + "."));
|
||||||
|
@ -46,10 +46,9 @@ public class ArcticArmor extends Skill
|
|||||||
"",
|
"",
|
||||||
"Create a freezing area around you",
|
"Create a freezing area around you",
|
||||||
"in a #3#1 Block radius. Allies inside",
|
"in a #3#1 Block radius. Allies inside",
|
||||||
"this area receive Protection 1.",
|
"this area receive Protection 2.",
|
||||||
"",
|
"",
|
||||||
"You are permanently immune to the",
|
"You receive Protection 1."
|
||||||
"Slowing effect of snow."
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +176,7 @@ public class ArcticArmor extends Skill
|
|||||||
//Protection
|
//Protection
|
||||||
for (Player other : UtilPlayer.getNearby(cur.getLocation(), 3 + getLevel(cur)))
|
for (Player other : UtilPlayer.getNearby(cur.getLocation(), 3 + getLevel(cur)))
|
||||||
if (!Factory.Relation().canHurt(cur, other) || other.equals(cur))
|
if (!Factory.Relation().canHurt(cur, other) || other.equals(cur))
|
||||||
Factory.Condition().Factory().Protection(GetName(), other, cur, 1.9, 0, false, true, true);
|
Factory.Condition().Factory().Protection(GetName(), other, cur, 1.9, cur.equals(other) ? 0 : 1, false, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,43 +221,6 @@ public class ArcticArmor extends Skill
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @EventHandler
|
|
||||||
// public void Slow(UpdateEvent event)
|
|
||||||
// {
|
|
||||||
// if (event.getType() != UpdateType.TICK)
|
|
||||||
// return;
|
|
||||||
//
|
|
||||||
// for (Player cur : UtilServer.getPlayers())
|
|
||||||
// {
|
|
||||||
// if (cur.getLocation().getChunk() == null)
|
|
||||||
// continue;
|
|
||||||
//
|
|
||||||
// Block block = cur.getLocation().getBlock();
|
|
||||||
//
|
|
||||||
// if (block.getTypeId() != 78)
|
|
||||||
// continue;
|
|
||||||
//
|
|
||||||
// if (block.getData() == 0)
|
|
||||||
// continue;
|
|
||||||
//
|
|
||||||
// if (getLevel(cur) > 0)
|
|
||||||
// continue;
|
|
||||||
//
|
|
||||||
// int level = 0;
|
|
||||||
// if (block.getData() == 2 || block.getData() == 3)
|
|
||||||
// level = 1;
|
|
||||||
// else if (block.getData() == 4 || block.getData() == 5)
|
|
||||||
// level = 2;
|
|
||||||
// else if (block.getData() == 6 || block.getData() == 7)
|
|
||||||
// level = 3;
|
|
||||||
//
|
|
||||||
// //Slow
|
|
||||||
// Factory.Condition().Factory().Custom("Thick Snow", cur, cur,
|
|
||||||
// ConditionType.SLOW, 1.9, level, false,
|
|
||||||
// Material.SNOW_BALL, (byte)0, true);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Particle(UpdateEvent event)
|
public void Particle(UpdateEvent event)
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ public class IcePrison extends SkillActive implements IThrown
|
|||||||
{
|
{
|
||||||
"Launch an icy orb. When it collides,",
|
"Launch an icy orb. When it collides,",
|
||||||
"it creates a hollow sphere of ice",
|
"it creates a hollow sphere of ice",
|
||||||
"thats lasts for #2#1 seconds.",
|
"thats lasts for #3#1.5 seconds.",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ public class IcePrison extends SkillActive implements IThrown
|
|||||||
if (!UtilBlock.airFoliage(freeze))
|
if (!UtilBlock.airFoliage(freeze))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
long time = 2500 + (1000 * level);
|
long time = 3500 + (1500 * level);
|
||||||
|
|
||||||
int yDiff = freeze.getY() - mid.getY();
|
int yDiff = freeze.getY() - mid.getY();
|
||||||
|
|
||||||
|
@ -11,12 +11,14 @@ import org.bukkit.event.*;
|
|||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.block.BlockIgniteEvent;
|
import org.bukkit.event.block.BlockIgniteEvent;
|
||||||
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
|
|
||||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
import mineplex.core.projectile.IThrown;
|
import mineplex.core.projectile.IThrown;
|
||||||
import mineplex.core.projectile.ProjectileUser;
|
import mineplex.core.projectile.ProjectileUser;
|
||||||
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
import mineplex.core.common.util.UtilEnt;
|
||||||
@ -24,6 +26,9 @@ import mineplex.core.common.util.UtilPlayer;
|
|||||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||||
|
import mineplex.minecraft.game.core.condition.Condition;
|
||||||
|
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||||
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
|
|
||||||
import org.bukkit.event.player.*;
|
import org.bukkit.event.player.*;
|
||||||
|
|
||||||
@ -78,8 +83,8 @@ public class LightningOrb extends SkillActive implements IThrown
|
|||||||
"Launch a lightning orb. Upon a direct",
|
"Launch a lightning orb. Upon a direct",
|
||||||
"hit with player, or #5#-0.4 seconds, it will",
|
"hit with player, or #5#-0.4 seconds, it will",
|
||||||
"strike all enemies within #3#0.5 Blocks ",
|
"strike all enemies within #3#0.5 Blocks ",
|
||||||
"with lightning, giving them Slow 2",
|
"with lightning, dealing #4#1 damage and",
|
||||||
"for 4 seconds."
|
"giving Slow 2 for 4 seconds."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,12 +152,6 @@ public class LightningOrb extends SkillActive implements IThrown
|
|||||||
|
|
||||||
HashMap<LivingEntity, Double> hit = UtilEnt.getInRadius(data.GetThrown().getLocation(), 3 + 0.5 * level);
|
HashMap<LivingEntity, Double> hit = UtilEnt.getInRadius(data.GetThrown().getLocation(), 3 + 0.5 * level);
|
||||||
|
|
||||||
//Lightning Condition
|
|
||||||
for (LivingEntity cur : hit.keySet())
|
|
||||||
{
|
|
||||||
Factory.Condition().Factory().Lightning(GetName(), cur, player, 0, 0.5, false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<LivingEntity> struck = new ArrayList<>();
|
List<LivingEntity> struck = new ArrayList<>();
|
||||||
|
|
||||||
//Lightning
|
//Lightning
|
||||||
@ -161,14 +160,16 @@ public class LightningOrb extends SkillActive implements IThrown
|
|||||||
if (cur.equals(player))
|
if (cur.equals(player))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (cur instanceof Player)
|
|
||||||
{
|
|
||||||
//Inform
|
//Inform
|
||||||
UtilPlayer.message(cur, F.main(GetClassType().name(), F.name(player.getName()) + " hit you with " + F.skill(GetName(level)) + "."));
|
UtilPlayer.message(cur, F.main(GetClassType().name(), F.name(player.getName()) + " hit you with " + F.skill(GetName(level)) + "."));
|
||||||
}
|
|
||||||
|
|
||||||
//Lightning
|
//Lightning
|
||||||
cur.getWorld().strikeLightning(cur.getLocation());
|
cur.getWorld().strikeLightningEffect(cur.getLocation());
|
||||||
|
|
||||||
|
//Damage Event
|
||||||
|
Factory.Damage().NewDamageEvent(cur, player, null,
|
||||||
|
DamageCause.LIGHTNING, 4 + level, false, true, false,
|
||||||
|
player.getName(), GetName());
|
||||||
|
|
||||||
struck.add(cur);
|
struck.add(cur);
|
||||||
}
|
}
|
||||||
@ -180,6 +181,7 @@ public class LightningOrb extends SkillActive implements IThrown
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
Factory.Condition().Factory().Slow(GetName(), cur, player, 4, 1, false, true, true, true);
|
Factory.Condition().Factory().Slow(GetName(), cur, player, 4, 1, false, true, true, true);
|
||||||
|
Factory.Condition().Factory().Shock(GetName(), cur, player, 1, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bukkit.getPluginManager().callEvent(new LightningOrbEvent(player, struck));
|
Bukkit.getPluginManager().callEvent(new LightningOrbEvent(player, struck));
|
||||||
|
@ -32,7 +32,7 @@ public class Barrage extends SkillChargeBow
|
|||||||
SkillType skillType, int cost, int maxLevel)
|
SkillType skillType, int cost, int maxLevel)
|
||||||
{
|
{
|
||||||
super(skills, name, classType, skillType, cost, maxLevel,
|
super(skills, name, classType, skillType, cost, maxLevel,
|
||||||
0.012f, 0.006f, false, true);
|
0.016f, 0.008f, false, true);
|
||||||
|
|
||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
|
@ -55,10 +55,13 @@ public class HealingShot extends SkillActive
|
|||||||
|
|
||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
"Prepare a healing shot;",
|
"Prepare a Healing Shot;",
|
||||||
|
"",
|
||||||
"Your next arrow will give its target",
|
"Your next arrow will give its target",
|
||||||
"Regeneration 2 for #5#1 seconds,",
|
"Regeneration 3 for #5#1 seconds,",
|
||||||
"and remove all negative effects."
|
"and remove all negative effects.",
|
||||||
|
"",
|
||||||
|
"Gives Nausea to enemies for #5#1 seconds."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +112,7 @@ public class HealingShot extends SkillActive
|
|||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
public void ArrowHit(EntityDamageEvent event)
|
public void arrowHit(EntityDamageEvent event)
|
||||||
{
|
{
|
||||||
if (event.getCause() != DamageCause.PROJECTILE)
|
if (event.getCause() != DamageCause.PROJECTILE)
|
||||||
return;
|
return;
|
||||||
@ -128,10 +131,10 @@ public class HealingShot extends SkillActive
|
|||||||
if (!_arrows.contains((Entity)projectile))
|
if (!_arrows.contains((Entity)projectile))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(event.getEntity() instanceof LivingEntity))
|
if (!(event.getEntity() instanceof Player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LivingEntity damagee = (LivingEntity)event.getEntity();
|
Player damagee = (Player)event.getEntity();
|
||||||
|
|
||||||
if (projectile.getShooter() == null)
|
if (projectile.getShooter() == null)
|
||||||
return;
|
return;
|
||||||
@ -150,7 +153,9 @@ public class HealingShot extends SkillActive
|
|||||||
projectile.remove();
|
projectile.remove();
|
||||||
|
|
||||||
//Regen
|
//Regen
|
||||||
Factory.Condition().Factory().Regen(GetName(), damagee, damager, 3 + 2 * level, 1, false, true, true);
|
if (Factory.Relation().canHurt(damager, damagee))
|
||||||
|
{
|
||||||
|
Factory.Condition().Factory().Regen(GetName(), damagee, damager, 5 + level, 2, false, false, false);
|
||||||
|
|
||||||
//Remove Bad
|
//Remove Bad
|
||||||
damagee.setFireTicks(0);
|
damagee.setFireTicks(0);
|
||||||
@ -158,6 +163,11 @@ public class HealingShot extends SkillActive
|
|||||||
damagee.removePotionEffect(PotionEffectType.POISON);
|
damagee.removePotionEffect(PotionEffectType.POISON);
|
||||||
damagee.removePotionEffect(PotionEffectType.CONFUSION);
|
damagee.removePotionEffect(PotionEffectType.CONFUSION);
|
||||||
damagee.removePotionEffect(PotionEffectType.WEAKNESS);
|
damagee.removePotionEffect(PotionEffectType.WEAKNESS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Factory.Condition().Factory().Confuse(GetName(), damagee, damager, 5 + level, 2, false, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
//Effect
|
//Effect
|
||||||
damagee.getWorld().playSound(damagee.getLocation(), Sound.LEVEL_UP, 1f, 1.5f);
|
damagee.getWorld().playSound(damagee.getLocation(), Sound.LEVEL_UP, 1f, 1.5f);
|
||||||
@ -181,7 +191,7 @@ public class HealingShot extends SkillActive
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Particle(UpdateEvent event)
|
public void particle(UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.TICK)
|
if (event.getType() != UpdateType.TICK)
|
||||||
return;
|
return;
|
||||||
@ -194,7 +204,7 @@ public class HealingShot extends SkillActive
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Clean(UpdateEvent event)
|
public void clean(UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.SEC)
|
if (event.getType() != UpdateType.SEC)
|
||||||
return;
|
return;
|
||||||
|
@ -1,178 +1,178 @@
|
|||||||
package mineplex.minecraft.game.classcombat.Skill.Ranger;
|
//package mineplex.minecraft.game.classcombat.Skill.Ranger;
|
||||||
|
//
|
||||||
import java.util.HashSet;
|
//import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
//import java.util.Iterator;
|
||||||
|
//
|
||||||
import org.bukkit.Material;
|
//import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
//import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Arrow;
|
//import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.Entity;
|
//import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
//import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
//import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
//import org.bukkit.entity.Projectile;
|
||||||
import org.bukkit.event.EventHandler;
|
//import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
//import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.block.Action;
|
//import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
//import org.bukkit.event.entity.EntityShootBowEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
//import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
|
//
|
||||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
//import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
//import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import mineplex.core.common.util.F;
|
//import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilParticle;
|
//import mineplex.core.common.util.UtilParticle;
|
||||||
import mineplex.core.common.util.UtilServer;
|
//import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
//import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.core.updater.UpdateType;
|
//import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
//import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
//import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
//import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
//import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
//import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||||
|
//
|
||||||
public class IncendiaryShot extends SkillActive
|
//public class IncendiaryShot extends SkillActive
|
||||||
{
|
//{
|
||||||
private HashSet<Entity> _arrows = new HashSet<Entity>();
|
// private HashSet<Entity> _arrows = new HashSet<Entity>();
|
||||||
private HashSet<Player> _active = new HashSet<Player>();
|
// private HashSet<Player> _active = new HashSet<Player>();
|
||||||
|
//
|
||||||
public IncendiaryShot(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
// public IncendiaryShot(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||||
int cost, int levels,
|
// int cost, int levels,
|
||||||
int energy, int energyMod,
|
// int energy, int energyMod,
|
||||||
long recharge, long rechargeMod, boolean rechargeInform,
|
// long recharge, long rechargeMod, boolean rechargeInform,
|
||||||
Material[] itemArray,
|
// Material[] itemArray,
|
||||||
Action[] actionArray)
|
// Action[] actionArray)
|
||||||
{
|
// {
|
||||||
super(skills, name, classType, skillType,
|
// super(skills, name, classType, skillType,
|
||||||
cost, levels,
|
// cost, levels,
|
||||||
energy, energyMod,
|
// energy, energyMod,
|
||||||
recharge, rechargeMod, rechargeInform,
|
// recharge, rechargeMod, rechargeInform,
|
||||||
itemArray,
|
// itemArray,
|
||||||
actionArray);
|
// actionArray);
|
||||||
|
//
|
||||||
SetDesc(new String[]
|
// SetDesc(new String[]
|
||||||
{
|
// {
|
||||||
"Prepare an incendiary shot;",
|
// "Prepare an incendiary shot;",
|
||||||
"Your next arrow will ignite",
|
// "Your next arrow will ignite",
|
||||||
"its target for #2#1 seconds."
|
// "its target for #2#1 seconds."
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean CustomCheck(Player player, int level)
|
// public boolean CustomCheck(Player player, int level)
|
||||||
{
|
// {
|
||||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
// 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."));
|
// UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void Skill(Player player, int level)
|
// public void Skill(Player player, int level)
|
||||||
{
|
// {
|
||||||
//Action
|
// //Action
|
||||||
_active.add(player);
|
// _active.add(player);
|
||||||
|
//
|
||||||
//Inform
|
// //Inform
|
||||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You prepared " + F.skill(GetName(level)) + "."));
|
// UtilPlayer.message(player, F.main(GetClassType().name(), "You prepared " + F.skill(GetName(level)) + "."));
|
||||||
|
//
|
||||||
//Effect
|
// //Effect
|
||||||
player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 2.5f, 2.0f);
|
// player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 2.5f, 2.0f);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@EventHandler
|
// @EventHandler
|
||||||
public void ShootBow(EntityShootBowEvent event)
|
// public void ShootBow(EntityShootBowEvent event)
|
||||||
{
|
// {
|
||||||
if (!(event.getEntity() instanceof Player))
|
// if (!(event.getEntity() instanceof Player))
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
if (!(event.getProjectile() instanceof Arrow))
|
// if (!(event.getProjectile() instanceof Arrow))
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
Player player = (Player)event.getEntity();
|
// Player player = (Player)event.getEntity();
|
||||||
|
//
|
||||||
if (!_active.remove(player))
|
// if (!_active.remove(player))
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
//Inform
|
// //Inform
|
||||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You fired " + F.skill(GetName(getLevel(player))) + "."));
|
// UtilPlayer.message(player, F.main(GetClassType().name(), "You fired " + F.skill(GetName(getLevel(player))) + "."));
|
||||||
|
//
|
||||||
_arrows.add(event.getProjectile());
|
// _arrows.add(event.getProjectile());
|
||||||
event.getProjectile().setFireTicks(200);
|
// event.getProjectile().setFireTicks(200);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
// @EventHandler(priority = EventPriority.HIGH)
|
||||||
public void ArrowHit(CustomDamageEvent event)
|
// public void ArrowHit(CustomDamageEvent event)
|
||||||
{
|
// {
|
||||||
if (event.IsCancelled())
|
// if (event.IsCancelled())
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
if (event.GetCause() != DamageCause.PROJECTILE)
|
// if (event.GetCause() != DamageCause.PROJECTILE)
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
Projectile projectile = event.GetProjectile();
|
// Projectile projectile = event.GetProjectile();
|
||||||
if (projectile == null) return;
|
// if (projectile == null) return;
|
||||||
|
//
|
||||||
if (!_arrows.contains((Entity)projectile))
|
// if (!_arrows.contains((Entity)projectile))
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
LivingEntity damagee = event.GetDamageeEntity();
|
// LivingEntity damagee = event.GetDamageeEntity();
|
||||||
if (damagee == null) return;
|
// if (damagee == null) return;
|
||||||
|
//
|
||||||
Player damager = event.GetDamagerPlayer(true);
|
// Player damager = event.GetDamagerPlayer(true);
|
||||||
if (damager == null) return;
|
// if (damager == null) return;
|
||||||
|
//
|
||||||
//Level
|
// //Level
|
||||||
int level = getLevel(damager);
|
// int level = getLevel(damager);
|
||||||
if (level == 0) return;
|
// if (level == 0) return;
|
||||||
|
//
|
||||||
//Ignite
|
// //Ignite
|
||||||
Factory.Condition().Factory().Ignite(GetName(), damagee, damager, 2 + level, true, true);
|
// Factory.Condition().Factory().Ignite(GetName(), damagee, damager, 2 + level, true, true);
|
||||||
|
//
|
||||||
//Damage
|
// //Damage
|
||||||
event.AddMod(damager.getName(), GetName(), 0, true);
|
// event.AddMod(damager.getName(), GetName(), 0, true);
|
||||||
|
//
|
||||||
//Effect
|
// //Effect
|
||||||
damagee.getWorld().playSound(damagee.getLocation(), Sound.FIZZ, 2f, 1.5f);
|
// damagee.getWorld().playSound(damagee.getLocation(), Sound.FIZZ, 2f, 1.5f);
|
||||||
|
//
|
||||||
//Remove
|
// //Remove
|
||||||
projectile.remove();
|
// projectile.remove();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@EventHandler
|
// @EventHandler
|
||||||
public void Particle(UpdateEvent event)
|
// public void Particle(UpdateEvent event)
|
||||||
{
|
// {
|
||||||
if (event.getType() != UpdateType.TICK)
|
// if (event.getType() != UpdateType.TICK)
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
for (Entity ent : _arrows)
|
// for (Entity ent : _arrows)
|
||||||
{
|
// {
|
||||||
UtilParticle.PlayParticle(ParticleType.FLAME, ent.getLocation(), 0, 0, 0, 0, 1,
|
// UtilParticle.PlayParticle(ParticleType.FLAME, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||||
ViewDist.MAX, UtilServer.getPlayers());
|
// ViewDist.MAX, UtilServer.getPlayers());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@EventHandler
|
// @EventHandler
|
||||||
public void Clean(UpdateEvent event)
|
// public void Clean(UpdateEvent event)
|
||||||
{
|
// {
|
||||||
if (event.getType() != UpdateType.SEC)
|
// if (event.getType() != UpdateType.SEC)
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
for (Iterator<Entity> arrowIterator = _arrows.iterator(); arrowIterator.hasNext();)
|
// for (Iterator<Entity> arrowIterator = _arrows.iterator(); arrowIterator.hasNext();)
|
||||||
{
|
// {
|
||||||
Entity arrow = arrowIterator.next();
|
// Entity arrow = arrowIterator.next();
|
||||||
|
//
|
||||||
if (arrow.isDead() || !arrow.isValid() || arrow.isOnGround())
|
// if (arrow.isDead() || !arrow.isValid() || arrow.isOnGround())
|
||||||
{
|
// {
|
||||||
arrowIterator.remove();
|
// arrowIterator.remove();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void Reset(Player player)
|
// public void Reset(Player player)
|
||||||
{
|
// {
|
||||||
_active.remove(player);
|
// _active.remove(player);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
@ -9,12 +9,15 @@ import org.bukkit.Sound;
|
|||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
@ -31,6 +34,7 @@ import mineplex.core.common.util.UtilParticle.ParticleType;
|
|||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||||
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
|
|
||||||
public class NapalmShot extends SkillActive
|
public class NapalmShot extends SkillActive
|
||||||
{
|
{
|
||||||
@ -53,9 +57,13 @@ public class NapalmShot extends SkillActive
|
|||||||
|
|
||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
"Prepare a napalm shot;",
|
"Prepare a Napalm Shot;",
|
||||||
|
"",
|
||||||
"Your next arrow will burst into",
|
"Your next arrow will burst into",
|
||||||
"#8#8 flames on impact."
|
"#8#8 flames on impact.",
|
||||||
|
"",
|
||||||
|
"If your arrow hit an enemy, it",
|
||||||
|
"will ignite them for #2#1 seconds."
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +93,7 @@ public class NapalmShot extends SkillActive
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void BowShoot(EntityShootBowEvent event)
|
public void bowShoot(EntityShootBowEvent event)
|
||||||
{
|
{
|
||||||
if (!(event.getEntity() instanceof Player))
|
if (!(event.getEntity() instanceof Player))
|
||||||
return;
|
return;
|
||||||
@ -105,8 +113,46 @@ public class NapalmShot extends SkillActive
|
|||||||
event.getProjectile().setFireTicks(120);
|
event.getProjectile().setFireTicks(120);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
|
public void arrowDamage(CustomDamageEvent event)
|
||||||
|
{
|
||||||
|
if (event.IsCancelled())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (event.GetCause() != DamageCause.PROJECTILE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Projectile projectile = event.GetProjectile();
|
||||||
|
if (projectile == null) return;
|
||||||
|
|
||||||
|
if (!_arrows.contains((Entity)projectile))
|
||||||
|
return;
|
||||||
|
|
||||||
|
LivingEntity damagee = event.GetDamageeEntity();
|
||||||
|
if (damagee == null) return;
|
||||||
|
|
||||||
|
Player damager = event.GetDamagerPlayer(true);
|
||||||
|
if (damager == null) return;
|
||||||
|
|
||||||
|
//Level
|
||||||
|
int level = getLevel(damager);
|
||||||
|
if (level == 0) return;
|
||||||
|
|
||||||
|
//Ignite
|
||||||
|
Factory.Condition().Factory().Ignite(GetName(), damagee, damager, 2 + level, true, true);
|
||||||
|
|
||||||
|
//Damage
|
||||||
|
event.AddMod(damager.getName(), GetName(), 0, true);
|
||||||
|
|
||||||
|
//Effect
|
||||||
|
damagee.getWorld().playSound(damagee.getLocation(), Sound.FIZZ, 2f, 1.5f);
|
||||||
|
|
||||||
|
//Remove
|
||||||
|
projectile.remove();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void ProjectileHit(ProjectileHitEvent event)
|
public void projectileHit(ProjectileHitEvent event)
|
||||||
{
|
{
|
||||||
Projectile proj = event.getEntity();
|
Projectile proj = event.getEntity();
|
||||||
|
|
||||||
@ -142,20 +188,20 @@ public class NapalmShot extends SkillActive
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Particle(UpdateEvent event)
|
public void particle(UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.TICK)
|
if (event.getType() != UpdateType.TICK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (Entity ent : _arrows)
|
for (Entity ent : _arrows)
|
||||||
{
|
{
|
||||||
UtilParticle.PlayParticle(ParticleType.LAVA, ent.getLocation(), 0, 0, 0, 0, 1,
|
UtilParticle.PlayParticle(ParticleType.FLAME, ent.getLocation(), 0, 0, 0, 0, 1,
|
||||||
ViewDist.MAX, UtilServer.getPlayers());
|
ViewDist.MAX, UtilServer.getPlayers());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Clean(UpdateEvent event)
|
public void clean(UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.SEC)
|
if (event.getType() != UpdateType.SEC)
|
||||||
return;
|
return;
|
||||||
|
@ -34,7 +34,7 @@ public class Overcharge extends SkillChargeBow
|
|||||||
SkillType skillType, int cost, int maxLevel)
|
SkillType skillType, int cost, int maxLevel)
|
||||||
{
|
{
|
||||||
super(skills, name, classType, skillType, cost, maxLevel,
|
super(skills, name, classType, skillType, cost, maxLevel,
|
||||||
0.012f, 0.006f, false, true);
|
0.016f, 0.008f, false, true);
|
||||||
|
|
||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
|
@ -2,18 +2,21 @@ package mineplex.minecraft.game.classcombat.Skill.Ranger;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
|
|
||||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||||
|
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
@ -33,17 +36,16 @@ public class Sharpshooter extends Skill
|
|||||||
|
|
||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
"Consecutive arrow hits deal an",
|
"Hitting with arrows increases",
|
||||||
"additional #1#0.5 damage.",
|
"arrow damage by 1 for 5 seconds.",
|
||||||
"",
|
"",
|
||||||
"Stacks up to #1#1 times",
|
"Stacks up to #0#2 times, and each",
|
||||||
"",
|
"hit sets duration to 5 seconds."
|
||||||
"Missing an arrow resets the bonus.",
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void ShootBow(EntityShootBowEvent event)
|
public void shootBow(EntityShootBowEvent event)
|
||||||
{
|
{
|
||||||
if (!(event.getEntity() instanceof Player))
|
if (!(event.getEntity() instanceof Player))
|
||||||
return;
|
return;
|
||||||
@ -56,7 +58,7 @@ public class Sharpshooter extends Skill
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void Damage(CustomDamageEvent event)
|
public void damage(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
if (event.IsCancelled())
|
if (event.IsCancelled())
|
||||||
return;
|
return;
|
||||||
@ -76,48 +78,69 @@ public class Sharpshooter extends Skill
|
|||||||
if (event.GetDamagerEntity(true) != null && event.GetDamagerEntity(true).equals(event.GetDamageeEntity()))
|
if (event.GetDamagerEntity(true) != null && event.GetDamagerEntity(true).equals(event.GetDamageeEntity()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int bonus = 1;
|
||||||
if (_hitCount.containsKey(player))
|
if (_hitCount.containsKey(player))
|
||||||
{
|
bonus = _hitCount.get(player);
|
||||||
|
|
||||||
//Damage
|
//Damage
|
||||||
event.AddMod(player.getName(), GetName(), _hitCount.get(player) * (1 + 0.5 * level), true);
|
event.AddMod(player.getName(), GetName(), bonus, true);
|
||||||
|
|
||||||
int limit = Math.min(1 + level, _hitCount.get(player) + 1);
|
//Increase
|
||||||
|
bonus = Math.min(bonus + 1, 2 * level);
|
||||||
|
|
||||||
_hitCount.put(player, limit);
|
_hitCount.put(player, bonus);
|
||||||
|
|
||||||
//Inform
|
//Inform
|
||||||
UtilPlayer.message((Entity)projectile.getShooter(), F.main(GetClassType().name(), GetName() + ": " +
|
UtilPlayer.message((Entity)projectile.getShooter(), F.main(GetClassType().name(), GetName() + ": " +
|
||||||
F.elem(_hitCount.get(player) + " Consecutive Hits") + C.cGray + " (" + F.skill("+"+ (1 + 0.5 * limit) + "Damage" ) + C.cGray + ")" ) );
|
F.elem(bonus + " Consecutive Hits") + C.cGray + " (" + F.skill("+" + bonus + "Damage" ) + C.cGray + ")" ) );
|
||||||
}
|
|
||||||
else
|
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 0.8f + (float)(bonus * 0.2));
|
||||||
{
|
|
||||||
_hitCount.put(player, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
projectile.remove();
|
projectile.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Clean(UpdateEvent event)
|
public void resetViaTime(UpdateEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.FAST)
|
if (event.getType() != UpdateType.TICK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HashSet<Entity> remove = new HashSet<Entity>();
|
Iterator<Player> playerIter = _hitCount.keySet().iterator();
|
||||||
|
|
||||||
for (Entity cur : _arrows.keySet())
|
while (playerIter.hasNext())
|
||||||
if (cur.isDead() || !cur.isValid() || cur.isOnGround())
|
|
||||||
remove.add(cur);
|
|
||||||
|
|
||||||
for (Entity cur : remove)
|
|
||||||
{
|
{
|
||||||
Player player = _arrows.remove(cur);
|
Player player = playerIter.next();
|
||||||
|
|
||||||
if (player != null)
|
if (Recharge.Instance.usable(player, GetName() + " Timer"))
|
||||||
if (_hitCount.remove(player) != null)
|
{
|
||||||
UtilPlayer.message(player, F.main(GetClassType().name(), GetName() + ": " + F.elem("0 Consecutive Hits")));
|
playerIter.remove();
|
||||||
|
UtilPlayer.message(player, F.main(GetClassType().name(), GetName() + ": " + F.elem("Damage Bonus Reset")));
|
||||||
|
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 0.75f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// @EventHandler
|
||||||
|
// public void resetViaMiss(UpdateEvent event)
|
||||||
|
// {
|
||||||
|
// if (event.getType() != UpdateType.FAST)
|
||||||
|
// return;
|
||||||
|
//
|
||||||
|
// HashSet<Entity> remove = new HashSet<Entity>();
|
||||||
|
//
|
||||||
|
// for (Entity cur : _arrows.keySet())
|
||||||
|
// if (cur.isDead() || !cur.isValid() || cur.isOnGround())
|
||||||
|
// remove.add(cur);
|
||||||
|
//
|
||||||
|
// for (Entity cur : remove)
|
||||||
|
// {
|
||||||
|
// Player player = _arrows.remove(cur);
|
||||||
|
//
|
||||||
|
// if (player != null)
|
||||||
|
// if (_hitCount.remove(player) != null)
|
||||||
|
// UtilPlayer.message(player, F.main(GetClassType().name(), GetName() + ": " + F.elem("0 Consecutive Hits")));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void Reset(Player player)
|
public void Reset(Player player)
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
package mineplex.minecraft.game.classcombat.Skill.Ranger;
|
package mineplex.minecraft.game.classcombat.Skill.Ranger;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
|
|
||||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilParticle;
|
import mineplex.core.common.util.UtilParticle;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
@ -18,24 +22,30 @@ import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
|||||||
|
|
||||||
public class VitalitySpores extends Skill
|
public class VitalitySpores extends Skill
|
||||||
{
|
{
|
||||||
|
private HashMap<Player, Long> _lastMove = new HashMap<Player, Long>();
|
||||||
|
|
||||||
public VitalitySpores(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
|
public VitalitySpores(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
|
||||||
{
|
{
|
||||||
super(skills, name, classType, skillType, cost, levels);
|
super(skills, name, classType, skillType, cost, levels);
|
||||||
|
|
||||||
SetDesc(new String[]
|
SetDesc(new String[]
|
||||||
{
|
{
|
||||||
"After #5#-1 seconds of not taking damage,",
|
"While standing still, forest spores",
|
||||||
"forest spores surround you, restoring",
|
"heal you for #0#0.5 health per 2 seconds."
|
||||||
"1 health per second.",
|
|
||||||
"",
|
|
||||||
"This remains until you take damage."
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Update(UpdateEvent event)
|
public void playerMove(PlayerMoveEvent event)
|
||||||
{
|
{
|
||||||
if (event.getType() != UpdateType.SEC)
|
if (UtilMath.offset(event.getFrom(), event.getTo()) > 0)
|
||||||
|
_lastMove.put(event.getPlayer(), System.currentTimeMillis());
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void update(UpdateEvent event)
|
||||||
|
{
|
||||||
|
if (event.getType() != UpdateType.TICK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (Player cur : GetUsers())
|
for (Player cur : GetUsers())
|
||||||
@ -43,13 +53,17 @@ 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).GetLastDamaged(), 5000 - 1000*level))
|
if (!_lastMove.containsKey(cur))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (UtilTime.elapsed(_lastMove.get(cur), 2000))
|
||||||
{
|
{
|
||||||
//Factory.Condition().Factory().Regen(GetName(), cur, cur, 3.9 + 2*level, 0, false, true, true);
|
UtilPlayer.health(cur, 0.5 * level);
|
||||||
UtilPlayer.health(cur, 1);
|
|
||||||
|
|
||||||
UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation().add(UtilAlg.getBehind(cur.getLocation().getDirection().multiply(0.5))), 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,
|
||||||
ViewDist.LONG, UtilServer.getPlayers());
|
ViewDist.LONG, UtilServer.getPlayers());
|
||||||
|
|
||||||
|
_lastMove.put(cur, System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ public abstract class SkillChargeBow extends SkillCharge implements Listener
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
//Delay
|
//Delay
|
||||||
if (!UtilTime.elapsed(_chargeStart.get(cur), 1200))
|
if (!UtilTime.elapsed(_chargeStart.get(cur), 1000))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
float charge = _charge.get(cur);
|
float charge = _charge.get(cur);
|
||||||
|
@ -201,21 +201,21 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
AddSkill(new MarkedForDeath(this, "Marked for Death", ClassType.Assassin, SkillType.Bow,
|
AddSkill(new MarkedForDeath(this, "Marked for Death", ClassType.Assassin, SkillType.Bow,
|
||||||
1, 4,
|
1, 4,
|
||||||
40, 0,
|
40, 0,
|
||||||
20000, 0, true,
|
20000, -2000, true,
|
||||||
new Material[] {Material.BOW},
|
new Material[] {Material.BOW},
|
||||||
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
||||||
|
|
||||||
AddSkill(new SmokeArrow(this, "Smoke Arrow", ClassType.Assassin, SkillType.Bow,
|
AddSkill(new SmokeArrow(this, "Smoke Arrow", ClassType.Assassin, SkillType.Bow,
|
||||||
1, 4,
|
1, 4,
|
||||||
40, 0,
|
40, 0,
|
||||||
20000, 0, true,
|
20000, -2000, true,
|
||||||
new Material[] {Material.BOW},
|
new Material[] {Material.BOW},
|
||||||
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
||||||
|
|
||||||
AddSkill(new SilencingArrow(this, "Silencing Arrow", ClassType.Assassin, SkillType.Bow,
|
AddSkill(new SilencingArrow(this, "Silencing Arrow", ClassType.Assassin, SkillType.Bow,
|
||||||
1, 4,
|
1, 4,
|
||||||
40, 0,
|
40, 0,
|
||||||
20000, 0, true,
|
20000, -2000, true,
|
||||||
new Material[] {Material.BOW},
|
new Material[] {Material.BOW},
|
||||||
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
||||||
|
|
||||||
@ -238,9 +238,9 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
|
|
||||||
//Sword
|
//Sword
|
||||||
AddSkill(new DwarfToss(this, "Dwarf Toss", ClassType.Brute, SkillType.Sword,
|
AddSkill(new DwarfToss(this, "Dwarf Toss", ClassType.Brute, SkillType.Sword,
|
||||||
1, 5,
|
2, 1,
|
||||||
0, 0,
|
0, 0,
|
||||||
20000, -2000, true,
|
16000, 0, true,
|
||||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
@ -257,21 +257,21 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
AddSkill(new SeismicSlam(this, "Seismic Slam", ClassType.Brute, SkillType.Axe,
|
AddSkill(new SeismicSlam(this, "Seismic Slam", ClassType.Brute, SkillType.Axe,
|
||||||
1, 5,
|
1, 5,
|
||||||
0, 0,
|
0, 0,
|
||||||
30000, -2000, true,
|
24000, -2000, true,
|
||||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
AddSkill(new Takedown(this, "Takedown", ClassType.Brute, SkillType.Axe,
|
AddSkill(new Takedown(this, "Takedown", ClassType.Brute, SkillType.Axe,
|
||||||
1, 5,
|
1, 5,
|
||||||
0, 0,
|
0, 0,
|
||||||
30000, -3000, true,
|
24000, -2000, true,
|
||||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
AddSkill(new WhirlwindAxe(this, "Whirlwind Axe", ClassType.Brute, SkillType.Axe,
|
AddSkill(new WhirlwindAxe(this, "Whirlwind Axe", ClassType.Brute, SkillType.Axe,
|
||||||
1, 5,
|
1, 5,
|
||||||
0, 0,
|
0, 0,
|
||||||
30000, -3000, true,
|
24000, -2000, true,
|
||||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
@ -282,7 +282,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
|
|
||||||
//Passive B
|
//Passive B
|
||||||
AddSkill(new CripplingBlow(this, "Crippling Blow", ClassType.Brute, SkillType.PassiveB, 2, 1));
|
AddSkill(new CripplingBlow(this, "Crippling Blow", ClassType.Brute, SkillType.PassiveB, 2, 1));
|
||||||
AddSkill(new Colossus(this, "Colossus", ClassType.Brute, SkillType.PassiveB, 1, 3));
|
AddSkill(new Colossus(this, "Colossus", ClassType.Brute, SkillType.PassiveB, 2, 1));
|
||||||
AddSkill(new Overwhelm(this, "Overwhelm", ClassType.Brute, SkillType.PassiveB, 1, 3));
|
AddSkill(new Overwhelm(this, "Overwhelm", ClassType.Brute, SkillType.PassiveB, 1, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,7 +331,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
AddSkill(new ShieldSmash(this, "Shield Smash", ClassType.Knight, SkillType.Axe,
|
AddSkill(new ShieldSmash(this, "Shield Smash", ClassType.Knight, SkillType.Axe,
|
||||||
1, 5,
|
1, 5,
|
||||||
0, 0,
|
0, 0,
|
||||||
10000, -1000, true,
|
15000, -1000, true,
|
||||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
@ -400,7 +400,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
AddSkill(new LightningOrb(this, "Lightning Orb", ClassType.Mage, SkillType.Axe,
|
AddSkill(new LightningOrb(this, "Lightning Orb", ClassType.Mage, SkillType.Axe,
|
||||||
1, 5,
|
1, 5,
|
||||||
60, -2,
|
60, -2,
|
||||||
11000, -1000, true,
|
13000, -1000, true,
|
||||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe,
|
AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe,
|
||||||
1, 5,
|
1, 5,
|
||||||
60, -3,
|
60, -3,
|
||||||
11000, -1000, true,
|
13000, -1000, true,
|
||||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
@ -434,13 +434,12 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
AddSkill(new GlacialBlade(this, "Glacial Blade", ClassType.Mage, SkillType.PassiveB,
|
AddSkill(new GlacialBlade(this, "Glacial Blade", ClassType.Mage, SkillType.PassiveB,
|
||||||
1, 3,
|
1, 3,
|
||||||
16, -2,
|
16, -2,
|
||||||
1200, -200, false,
|
1200, -250, false,
|
||||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||||
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
||||||
|
|
||||||
AddSkill(new MagmaBlade(this, "Magma Blade", ClassType.Mage, SkillType.PassiveB, 1, 3));
|
AddSkill(new MagmaBlade(this, "Magma Blade", ClassType.Mage, SkillType.PassiveB, 1, 3));
|
||||||
AddSkill(new NullBlade(this, "Null Blade", ClassType.Mage, SkillType.PassiveB, 1, 3));
|
AddSkill(new NullBlade(this, "Null Blade", ClassType.Mage, SkillType.PassiveB, 1, 3));
|
||||||
//AddSkill(new RootingAxe(this, "Rooting Axe", ClassType.Mage, SkillType.PassiveB, 5, 3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRanger()
|
public void AddRanger()
|
||||||
@ -451,7 +450,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
AddSkill(new Disengage(this, "Disengage", ClassType.Ranger, SkillType.Sword,
|
AddSkill(new Disengage(this, "Disengage", ClassType.Ranger, SkillType.Sword,
|
||||||
1, 4,
|
1, 4,
|
||||||
0, 0,
|
0, 0,
|
||||||
18000, -2000, true,
|
16000, -1000, true,
|
||||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||||
|
|
||||||
@ -480,12 +479,12 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
new Material[] {Material.BOW},
|
new Material[] {Material.BOW},
|
||||||
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
||||||
|
|
||||||
AddSkill(new IncendiaryShot(this, "Incendiary Shot", ClassType.Ranger, SkillType.Bow,
|
// AddSkill(new IncendiaryShot(this, "Incendiary Shot", ClassType.Ranger, SkillType.Bow,
|
||||||
1, 4,
|
// 1, 4,
|
||||||
0, 0,
|
// 0, 0,
|
||||||
20000, -2000, true,
|
// 20000, -2000, true,
|
||||||
new Material[] {Material.BOW},
|
// new Material[] {Material.BOW},
|
||||||
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
// new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
||||||
|
|
||||||
AddSkill(new NapalmShot(this, "Napalm Shot", ClassType.Ranger, SkillType.Bow,
|
AddSkill(new NapalmShot(this, "Napalm Shot", ClassType.Ranger, SkillType.Bow,
|
||||||
1, 4,
|
1, 4,
|
||||||
@ -523,9 +522,9 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
|||||||
//Passive B
|
//Passive B
|
||||||
AddSkill(new BarbedArrows(this, "Barbed Arrows", ClassType.Ranger, SkillType.PassiveB, 1, 3));
|
AddSkill(new BarbedArrows(this, "Barbed Arrows", ClassType.Ranger, SkillType.PassiveB, 1, 3));
|
||||||
AddSkill(new HeavyArrows(this, "Heavy Arrows", ClassType.Ranger, SkillType.PassiveB, 1, 3));
|
AddSkill(new HeavyArrows(this, "Heavy Arrows", ClassType.Ranger, SkillType.PassiveB, 1, 3));
|
||||||
//AddSkill(new Shadowmeld(this, "Shadowmeld", ClassType.Ranger, SkillType.PassiveB, 5, 3));
|
|
||||||
AddSkill(new Longshot(this, "Longshot", ClassType.Ranger, SkillType.PassiveB, 1, 3));
|
AddSkill(new Longshot(this, "Longshot", ClassType.Ranger, SkillType.PassiveB, 1, 3));
|
||||||
AddSkill(new Sharpshooter(this, "Sharpshooter", ClassType.Ranger, SkillType.PassiveB, 1, 3));
|
AddSkill(new Sharpshooter(this, "Sharpshooter", ClassType.Ranger, SkillType.PassiveB, 1, 3));
|
||||||
|
//AddSkill(new Shadowmeld(this, "Shadowmeld", ClassType.Ranger, SkillType.PassiveB, 5, 3));
|
||||||
//AddSkill(new Fletcher(this, "Fletcher", ClassType.Ranger, SkillType.PassiveB, 5, 3));
|
//AddSkill(new Fletcher(this, "Fletcher", ClassType.Ranger, SkillType.PassiveB, 5, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package mineplex.minecraft.game.core.condition;
|
|||||||
|
|
||||||
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.visibility.VisibilityManager;
|
import mineplex.core.visibility.VisibilityManager;
|
||||||
@ -254,6 +255,15 @@ public class ConditionEffect implements Listener
|
|||||||
Condition condition = Manager.GetActiveCondition(ent, ConditionType.LIGHTNING);
|
Condition condition = Manager.GetActiveCondition(ent, ConditionType.LIGHTNING);
|
||||||
if (condition == null) return;
|
if (condition == null) return;
|
||||||
|
|
||||||
|
if (event.GetDamageePlayer() != null)
|
||||||
|
{
|
||||||
|
if (!Recharge.Instance.use(event.GetDamageePlayer(), "Lightning by " + UtilEnt.getName(condition.GetSource()), 1000, false, false))
|
||||||
|
{
|
||||||
|
event.SetCancelled("Lightning Rate");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Damage
|
//Damage
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user