Final little tweaks to Champions
This commit is contained in:
parent
5899933d8d
commit
1778bd4c28
@ -6,12 +6,14 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
public class ViperStrikes extends Skill
|
||||
{
|
||||
@ -21,8 +23,8 @@ public class ViperStrikes extends Skill
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Your attacks give enemies",
|
||||
"Shock, Slow 1 and Poison 1",
|
||||
"Your attacks give",
|
||||
"enemies Poison 1",
|
||||
"for #0#1 seconds."
|
||||
});
|
||||
}
|
||||
@ -49,8 +51,7 @@ public class ViperStrikes extends Skill
|
||||
if (damagee == null) return;
|
||||
|
||||
//Confuse
|
||||
Factory.Condition().Factory().PoisonShock(GetName(), damagee, damager, level, false);
|
||||
Factory.Condition().Factory().Slow(GetName(), damagee, damager, level, 0, false, false, true, false);
|
||||
Factory.Condition().Factory().Poison(GetName(), damagee, damager, 2 + level, 0, false, true, true, true);
|
||||
|
||||
//Sound
|
||||
damager.getWorld().playSound(damager.getLocation(), Sound.SPIDER_IDLE, 1f, 2f);
|
||||
|
@ -113,7 +113,7 @@ public class Inferno extends SkillActive
|
||||
itemStack.setItemMeta(meta);
|
||||
|
||||
Item fire = cur.getWorld().dropItem(cur.getEyeLocation().add(cur.getLocation().getDirection()), itemStack);
|
||||
Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), 1, GetName(), false);
|
||||
Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), .5, GetName(), false);
|
||||
|
||||
fire.teleport(cur.getEyeLocation());
|
||||
double x = 0.07 - (UtilMath.r(14)/100d);
|
||||
|
@ -28,9 +28,9 @@ public class VitalitySpores extends Skill
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"If after getting hit, no damage is taken",
|
||||
"for #10#0 Seconds then you will receive",
|
||||
"Regeneration #2#0 for #5#1 Seconds"
|
||||
"After getting hit, if no damage is taken",
|
||||
"for 10 Seconds then you will receive",
|
||||
"Regeneration #2#0 for #5#1 Seconds",
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,9 @@ public class Condition
|
||||
|
||||
protected boolean _add = false;
|
||||
protected boolean _live = false;
|
||||
|
||||
|
||||
protected boolean _cancelPotion;
|
||||
|
||||
protected boolean _showIndicator = true;
|
||||
|
||||
public Condition(ConditionManager manager, String reason, LivingEntity ent, LivingEntity source,
|
||||
@ -101,6 +103,35 @@ public class Condition
|
||||
//Live if NOT Additive
|
||||
_live = !add;
|
||||
}
|
||||
|
||||
public Condition(ConditionManager manager, String reason, LivingEntity ent, LivingEntity source,
|
||||
ConditionType type, int mult, int ticks, boolean add, Material visualType, byte visualData, boolean showIndicator, boolean ambient, boolean cancelPotion)
|
||||
{
|
||||
Manager = manager;
|
||||
_time = System.currentTimeMillis();
|
||||
|
||||
_reason = reason;
|
||||
|
||||
_ent = ent;
|
||||
_source = source;
|
||||
|
||||
_type = type;
|
||||
_mult = mult;
|
||||
_ticks = ticks;
|
||||
_ticksTotal = ticks;
|
||||
_ambient = ambient;
|
||||
|
||||
_indicatorType = visualType;
|
||||
_indicatorData = visualData;
|
||||
_showIndicator = showIndicator;
|
||||
|
||||
_cancelPotion = cancelPotion;
|
||||
|
||||
_add = add;
|
||||
|
||||
//Live if NOT Additive
|
||||
_live = !add;
|
||||
}
|
||||
|
||||
public boolean Tick()
|
||||
{
|
||||
@ -124,6 +155,11 @@ public class Condition
|
||||
|
||||
public void Add()
|
||||
{
|
||||
if (_cancelPotion)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
PotionEffectType type = PotionEffectType.getByName(_type.toString());
|
||||
|
@ -239,10 +239,16 @@ public class ConditionFactory
|
||||
|
||||
public Condition Poison(String reason, LivingEntity ent, LivingEntity source,
|
||||
double duration, int mult, boolean extend, boolean showIndicator, boolean ambient)
|
||||
{
|
||||
return Poison(reason, ent, source, duration, mult, extend, showIndicator, ambient, false);
|
||||
}
|
||||
|
||||
public Condition Poison(String reason, LivingEntity ent, LivingEntity source,
|
||||
double duration, int mult, boolean extend, boolean showIndicator, boolean ambient, boolean cancelPotion)
|
||||
{
|
||||
return Manager.AddCondition(new Condition(Manager, reason, ent, source,
|
||||
ConditionType.POISON, mult, (int)(20 * duration), extend,
|
||||
Material.SLIME_BALL, (byte)14, showIndicator, ambient));
|
||||
Material.SLIME_BALL, (byte)14, showIndicator, ambient, cancelPotion));
|
||||
}
|
||||
|
||||
public Condition PoisonShock(String reason, LivingEntity ent, LivingEntity source,
|
||||
|
@ -720,7 +720,7 @@ public class GameFlagManager implements Listener
|
||||
player.removePotionEffect(potion.getType());
|
||||
|
||||
//Visual
|
||||
Manager.GetCondition().Factory().Blind("Ghost", player, player, 2.5, 0, false, false, false);
|
||||
// Manager.GetCondition().Factory().Blind("Ghost", player, player, 2.5, 0, false, false, false);
|
||||
|
||||
player.setFireTicks(0);
|
||||
player.setFallDistance(0);
|
||||
|
Loading…
Reference in New Issue
Block a user