Play zombie_unfect sound when PerkRevealer explodes

PerkSmokeBomb also applies effects to NPCs
PerkSmokeBomb now uses HUGE_EXPLOSION effect
Set Sneaky Assassins PrepareFreeze flag to false
This commit is contained in:
CoderTim 2014-07-30 23:56:40 -04:00
parent 308c2e1b91
commit 77b6f0250e
3 changed files with 12 additions and 7 deletions

View File

@ -53,6 +53,7 @@ public class SneakyAssassins extends SoloGame
this.DamageTeamSelf = true;
this.HungerSet = 20;
this.PrepareFreeze = false;
}
@Override

View File

@ -116,6 +116,8 @@ public class PerkRevealer extends Perk implements IThrown
UtilFirework.playFirework(data.GetThrown().getLocation(), effect);
data.GetThrown().getLocation().getWorld().playSound(data.GetThrown().getLocation(), Sound.ZOMBIE_UNFECT, 2f, 0.5f);
for (Player player : Manager.GetGame().GetPlayers(true))
{
if (player == data.GetThrower())

View File

@ -1,7 +1,7 @@
package nautilus.game.arcade.kit.perks;
import org.bukkit.*;
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.PlayerDeathEvent;
@ -53,7 +53,7 @@ public class PerkSmokebomb extends Perk
return activatorTypes;
}
public int geteffectDuration()
public int getEffectDuration()
{
return effectDuration;
}
@ -94,18 +94,20 @@ public class PerkSmokebomb extends Perk
//Manager.GetCondition().Factory().Vulnerable(GetName(), player, player, 6, 3, false, false, true);
//Blind
for (Player other : UtilPlayer.getNearby(player.getLocation(), 6))
for (Entity other : player.getNearbyEntities(6, 6, 6))
{
if (other.equals(player))
if (other.equals(player) || !(other instanceof LivingEntity))
continue;
Manager.GetCondition().Factory().Blind(GetName(), other, player, geteffectDuration(), 0, false, false, true);
Manager.GetCondition().Factory().Slow(GetName(), other, player, geteffectDuration(), 1, false, false, true, false);
LivingEntity living = (LivingEntity) other;
Manager.GetCondition().Factory().Blind(GetName(), living, player, getEffectDuration(), 0, false, false, true);
Manager.GetCondition().Factory().Slow(GetName(), living, player, getEffectDuration(), 1, false, false, true, false);
}
//Effects
player.getWorld().playSound(player.getLocation(), Sound.FIZZ, 2f, 0.5f);
UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, player.getLocation(), 0f, 0f, 0f, 0, 1);
UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, player.getLocation(), 0f, 0f, 0f, 0, 1);
//Inform
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + "."));