Change wizards spells to use conditions for potion effects

This commit is contained in:
libraryaddict 2015-03-17 18:07:43 +13:00
parent 03d77abed3
commit 41469b198a
4 changed files with 318 additions and 311 deletions

View File

@ -59,6 +59,12 @@ public class CustomExplosion extends Explosion
return this;
}
public CustomExplosion setDamageBlocks(boolean damageBlocks)
{
b = damageBlocks;
return this;
}
public CustomExplosion setBlocksDamagedEqually(boolean damageEqually)
{
_damageBlocksEqually = damageEqually;

View File

@ -60,7 +60,7 @@ public class SpellHealingRune extends Spell implements SpellClick
firstTeleport.setY(firstTeleport.getBlockY());
HealingRune healingRune = new HealingRune(firstTeleport, getSpellLevel(player));
HealingRune healingRune = new HealingRune(Wizards, firstTeleport, getSpellLevel(player));
_healingRunes.add(healingRune);

View File

@ -4,8 +4,6 @@ import nautilus.game.arcade.game.games.wizards.Spell;
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClick;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
public class SpellSpeedBoost extends Spell implements SpellClick
{
@ -15,7 +13,7 @@ public class SpellSpeedBoost extends Spell implements SpellClick
int ticks = 30 * getSpellLevel(p) * 20;
int potionLevel = getSpellLevel(p);
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, ticks, potionLevel), true);
Wizards.getArcadeManager().GetCondition().Factory().Speed("Speed Boost", p, p, ticks, potionLevel, false, false, false);
charge(p);
}

View File

@ -6,6 +6,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilShapes;
import nautilus.game.arcade.game.games.wizards.Wizards;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
@ -19,12 +20,14 @@ public class HealingRune
private Location _location;
private int _ticksToLive;
private double _runeSize;
private Wizards _wizards;
public HealingRune(Location location, int spellLevel)
public HealingRune(Wizards wizards, Location location, int spellLevel)
{
_location = location;
_ticksToLive = 100 + (spellLevel * 60);
_runeSize = 2 + (spellLevel * .5D);
_wizards = wizards;
}
public boolean onTick()
@ -44,7 +47,7 @@ public class HealingRune
if (loc.distance(_location) <= _runeSize)
{
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 50, 0));
_wizards.getArcadeManager().GetCondition().Factory().Regen("Healing Rune", player, null, 50, 0, false, false, true);
}
}
}