Merge branch 'alex-ctf' of ssh://184.154.0.242:7999/min/Mineplex into alex-ctf
This commit is contained in:
commit
8b480cc32b
@ -503,7 +503,7 @@ public class UtilEnt
|
||||
}
|
||||
else if (UtilMath.offset2d(loc, player.getLocation()) < 0.6 * mult)
|
||||
{
|
||||
if (loc.getY() > player.getLocation().getY() && loc.getY() < player.getEyeLocation().getY())
|
||||
if (loc.getY() >= player.getLocation().getY() - 0.2*mult && loc.getY() <= player.getEyeLocation().getY() + 0.2*mult)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ public class Immolate extends Skill
|
||||
|
||||
Item fire = cur.getWorld().dropItem(cur.getLocation().add(0, 0.5, 0), itemStack);
|
||||
fire.setVelocity(new Vector((Math.random() - 0.5)/3,Math.random()/3,(Math.random() - 0.5)/3));
|
||||
Factory.Fire().Add(fire, cur, 2, 0, 0.25 + (level * 0.25), 0, GetName());
|
||||
Factory.Fire().Add(fire, cur, 2, 0, 0.25 + (level * 0.25), 0, GetName(), false);
|
||||
|
||||
//Sound
|
||||
cur.getWorld().playSound(cur.getLocation(), Sound.FIZZ, 0.2f, 1f);
|
||||
|
@ -113,7 +113,7 @@ public class Inferno extends SkillActive
|
||||
itemStack.setItemMeta(meta);
|
||||
|
||||
Item fire = cur.getWorld().dropItem(cur.getEyeLocation().add(cur.getLocation().getDirection()), itemStack);
|
||||
Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), 1, GetName());
|
||||
Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), 1, GetName(), false);
|
||||
|
||||
fire.teleport(cur.getEyeLocation());
|
||||
double x = 0.07 - (UtilMath.r(14)/100d);
|
||||
|
@ -153,7 +153,7 @@ public class HealingShot extends SkillActive
|
||||
projectile.remove();
|
||||
|
||||
//Regen
|
||||
if (Factory.Relation().canHurt(damager, damagee))
|
||||
if (!Factory.Relation().canHurt(damager, damagee))
|
||||
{
|
||||
Factory.Condition().Factory().Regen(GetName(), damagee, damager, 3 + level, 2, false, false, false);
|
||||
|
||||
|
@ -144,19 +144,19 @@ public class NapalmShot extends SkillActive
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), 0, true);
|
||||
|
||||
//Effect
|
||||
//Effect
|
||||
damagee.getWorld().playSound(damagee.getLocation(), Sound.FIZZ, 2f, 1.5f);
|
||||
|
||||
//Remove
|
||||
projectile.remove();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority=EventPriority.MONITOR) //make it happen after the damage event ^
|
||||
public void projectileHit(ProjectileHitEvent event)
|
||||
{
|
||||
Projectile proj = event.getEntity();
|
||||
|
||||
if (!_arrows.remove(proj))
|
||||
if (!_arrows.contains(proj))
|
||||
return;
|
||||
|
||||
if (proj.getShooter() == null)
|
||||
@ -179,7 +179,7 @@ public class NapalmShot extends SkillActive
|
||||
itemStack.setItemMeta(meta);
|
||||
|
||||
Item fire = proj.getWorld().dropItemNaturally(proj.getLocation(), itemStack);
|
||||
Factory.Fire().Add(fire, damager, 16, 0.25, 2, 0, GetName());
|
||||
Factory.Fire().Add(fire, damager, 16, 0.25, 2, 0.25, GetName(), true);
|
||||
fire.setVelocity(fire.getVelocity().multiply(1 + (0.15 * level)));
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@ public class Fire extends MiniPlugin
|
||||
_damageManager = damageManager;
|
||||
}
|
||||
|
||||
public void Add(Item item, LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName)
|
||||
public void Add(Item item, LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName, boolean hitSelf)
|
||||
{
|
||||
_fire.put(item, new FireData(owner, expireTime, delayTime, burnTime, damage, skillName));
|
||||
_fire.put(item, new FireData(owner, expireTime, delayTime, burnTime, damage, skillName, hitSelf));
|
||||
item.setPickupDelay(0);
|
||||
}
|
||||
|
||||
@ -60,13 +60,13 @@ public class Fire extends MiniPlugin
|
||||
{
|
||||
if (!_fire.get(fire).IsPrimed())
|
||||
continue;
|
||||
|
||||
|
||||
if (fire.getLocation().getBlock().isLiquid())
|
||||
{
|
||||
collided.put(fire, null);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
for (LivingEntity ent : fire.getWorld().getEntitiesByClass(LivingEntity.class))
|
||||
{
|
||||
if (ent instanceof Player)
|
||||
@ -75,13 +75,13 @@ public class Fire extends MiniPlugin
|
||||
|
||||
if (ent.hasPotionEffect(PotionEffectType.FIRE_RESISTANCE))
|
||||
continue;
|
||||
|
||||
|
||||
if (ent.getLocation().getBlock().getTypeId() == 8 || ent.getLocation().getBlock().getTypeId() == 9)
|
||||
continue;
|
||||
|
||||
if (ent.equals(_fire.get(fire).GetOwner()))
|
||||
|
||||
if (!_fire.get(fire).canHitOwner() && ent.equals(_fire.get(fire).GetOwner()))
|
||||
continue;
|
||||
|
||||
|
||||
if (_conditionManager.HasCondition(ent, ConditionType.FIRE_ITEM_IMMUNITY, null))
|
||||
{
|
||||
continue;
|
||||
@ -111,23 +111,23 @@ public class Fire extends MiniPlugin
|
||||
if (!_fire.containsKey(fire))
|
||||
return;
|
||||
|
||||
if (_fire.get(fire).GetOwner().equals(player))
|
||||
if (!_fire.get(fire).canHitOwner() && _fire.get(fire).GetOwner().equals(player))
|
||||
return;
|
||||
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (((CraftPlayer)player).getHandle().spectating)
|
||||
return;
|
||||
|
||||
|
||||
if (player.hasPotionEffect(PotionEffectType.FIRE_RESISTANCE))
|
||||
return;
|
||||
|
||||
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
return;
|
||||
|
||||
if (!_fire.get(fire).IsPrimed())
|
||||
return;
|
||||
|
||||
|
||||
if (_conditionManager.HasCondition(player, ConditionType.FIRE_ITEM_IMMUNITY, null))
|
||||
{
|
||||
return;
|
||||
|
@ -10,8 +10,9 @@ public class FireData
|
||||
private double _burnTime;
|
||||
private double _damage;
|
||||
private String _skillName;
|
||||
private boolean _hitOwner;
|
||||
|
||||
public FireData(LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName)
|
||||
public FireData(LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName, boolean hitSelf)
|
||||
{
|
||||
_owner = owner;
|
||||
_expireTime = System.currentTimeMillis() + (long)(1000 * expireTime);
|
||||
@ -19,6 +20,7 @@ public class FireData
|
||||
_burnTime = burnTime;
|
||||
_damage = damage;
|
||||
_skillName = skillName;
|
||||
_hitOwner = hitSelf;
|
||||
}
|
||||
|
||||
public LivingEntity GetOwner()
|
||||
@ -50,4 +52,9 @@ public class FireData
|
||||
{
|
||||
return System.currentTimeMillis() > _expireTime;
|
||||
}
|
||||
|
||||
public boolean canHitOwner()
|
||||
{
|
||||
return _hitOwner;
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ public class ChampionsCTF extends CaptureTheFlag
|
||||
Manager.GetDamage().UseSimpleWeaponDamage = false;
|
||||
Manager.getCosmeticManager().setHideParticles(true);
|
||||
|
||||
Manager.getClassManager().GetItemFactory().getProximityManager().setProxyLimit(3);
|
||||
Manager.getClassManager().GetItemFactory().getProximityManager().setProxyLimit(6);
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
|
||||
|
@ -129,7 +129,7 @@ public class PerkFlamingSwordEVO extends Perk
|
||||
{
|
||||
//Fire
|
||||
Item fire = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER));
|
||||
Manager.GetFire().Add(fire, player, 0.7, 0, 0.5, 1, "Inferno");
|
||||
Manager.GetFire().Add(fire, player, 0.7, 0, 0.5, 1, "Inferno", false);
|
||||
|
||||
fire.teleport(player.getEyeLocation());
|
||||
double x = 0.07 - (UtilMath.r(14)/100d);
|
||||
|
@ -106,7 +106,7 @@ public class PerkInferno extends SmashPerk
|
||||
|
||||
//Fire
|
||||
Item fire = cur.getWorld().dropItem(cur.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER));
|
||||
Manager.GetFire().Add(fire, cur, 0.7, 0, 0.5, 1.25, "Inferno");
|
||||
Manager.GetFire().Add(fire, cur, 0.7, 0, 0.5, 1.25, "Inferno", false);
|
||||
|
||||
fire.teleport(cur.getEyeLocation());
|
||||
double x = 0.07 - (UtilMath.r(14)/100d);
|
||||
|
@ -86,7 +86,7 @@ public class PerkInfernoFinn extends Perk
|
||||
|
||||
//Fire
|
||||
Item fire = cur.getWorld().dropItem(cur.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER));
|
||||
Manager.GetFire().Add(fire, cur, 0.7, 0, 2, 2, "Inferno");
|
||||
Manager.GetFire().Add(fire, cur, 0.7, 0, 2, 2, "Inferno", false);
|
||||
|
||||
fire.teleport(cur.getEyeLocation());
|
||||
double x = 0.07 - (UtilMath.r(14)/100d);
|
||||
|
Loading…
Reference in New Issue
Block a user