Mild fix on fireball, fix heal given less cooldown and lower heal spell heals
This commit is contained in:
parent
31c1be9dd8
commit
3ff0592d2d
@ -153,7 +153,7 @@ public enum SpellType // ❤
|
|||||||
10, // Cooldown change per level
|
10, // Cooldown change per level
|
||||||
5, // Item amount in loot
|
5, // Item amount in loot
|
||||||
|
|
||||||
C.cGold + C.Bold + "Heals: " + C.Bold + C.cWhite + "Spell Level + 2",
|
C.cGold + C.Bold + "Heals: " + C.Bold + C.cWhite + "(Spell Level / 2) + 1.5",
|
||||||
|
|
||||||
"",
|
"",
|
||||||
|
|
||||||
@ -689,7 +689,7 @@ public enum SpellType // ❤
|
|||||||
|
|
||||||
+ _spellCooldown - _cooldownChangePerLevel)
|
+ _spellCooldown - _cooldownChangePerLevel)
|
||||||
|
|
||||||
* wizard.getCooldownModifier()));
|
* (this == SpellType.Heal ? 1 : wizard.getCooldownModifier())));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getSpellItem()
|
public ItemStack getSpellItem()
|
||||||
|
@ -3,14 +3,17 @@ package nautilus.game.arcade.game.games.wizards.spells;
|
|||||||
import mineplex.minecraft.game.core.explosion.CustomExplosion;
|
import mineplex.minecraft.game.core.explosion.CustomExplosion;
|
||||||
import nautilus.game.arcade.game.games.wizards.Spell;
|
import nautilus.game.arcade.game.games.wizards.Spell;
|
||||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClick;
|
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClick;
|
||||||
|
import net.minecraft.server.v1_7_R4.EntityFireball;
|
||||||
|
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftFireball;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
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.entity.ProjectileHitEvent;
|
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class SpellFireball extends Spell implements SpellClick
|
public class SpellFireball extends Spell implements SpellClick
|
||||||
{
|
{
|
||||||
@ -24,7 +27,7 @@ public class SpellFireball extends Spell implements SpellClick
|
|||||||
projectile.remove();
|
projectile.remove();
|
||||||
|
|
||||||
CustomExplosion explosion = new CustomExplosion(Wizards.getArcadeManager().GetDamage(), projectile.getLocation(),
|
CustomExplosion explosion = new CustomExplosion(Wizards.getArcadeManager().GetDamage(), projectile.getLocation(),
|
||||||
((org.bukkit.entity.Fireball) projectile).getYield(), "Fireball");
|
projectile.getMetadata("FireballYield").get(0).asFloat(), "Fireball");
|
||||||
|
|
||||||
explosion.setPlayer((Player) projectile.getMetadata("FireballSpell").get(0).value(), true);
|
explosion.setPlayer((Player) projectile.getMetadata("FireballSpell").get(0).value(), true);
|
||||||
|
|
||||||
@ -32,7 +35,6 @@ public class SpellFireball extends Spell implements SpellClick
|
|||||||
|
|
||||||
explosion.explode();
|
explosion.explode();
|
||||||
|
|
||||||
((org.bukkit.entity.Fireball) projectile).setYield(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,12 +44,20 @@ public class SpellFireball extends Spell implements SpellClick
|
|||||||
org.bukkit.entity.Fireball fireball = (org.bukkit.entity.Fireball) p.getWorld().spawnEntity(p.getEyeLocation(),
|
org.bukkit.entity.Fireball fireball = (org.bukkit.entity.Fireball) p.getWorld().spawnEntity(p.getEyeLocation(),
|
||||||
EntityType.FIREBALL);
|
EntityType.FIREBALL);
|
||||||
|
|
||||||
fireball.setVelocity(p.getEyeLocation().getDirection());
|
Vector vector = p.getEyeLocation().getDirection();
|
||||||
|
|
||||||
|
// We can't call the bukkit methods because for some weird reason, it enforces a certain speed.
|
||||||
|
EntityFireball eFireball = ((CraftFireball) fireball).getHandle();
|
||||||
|
eFireball.dirX = vector.getX();
|
||||||
|
eFireball.dirY = vector.getY();
|
||||||
|
eFireball.dirZ = vector.getZ();
|
||||||
|
|
||||||
fireball.setBounce(false);
|
fireball.setBounce(false);
|
||||||
fireball.setDirection(fireball.getVelocity());
|
|
||||||
fireball.setShooter(p);
|
fireball.setShooter(p);
|
||||||
fireball.setYield((getSpellLevel(p) * 0.2F) + 0.8F);
|
fireball.setYield(0);
|
||||||
fireball.setMetadata("FireballSpell", new FixedMetadataValue(Wizards.getArcadeManager().GetPlugin(), p));
|
fireball.setMetadata("FireballSpell", new FixedMetadataValue(Wizards.getArcadeManager().GetPlugin(), p));
|
||||||
|
fireball.setMetadata("FireballYield", new FixedMetadataValue(Wizards.getArcadeManager().GetPlugin(),
|
||||||
|
(getSpellLevel(p) * 0.2F) + 0.8F));
|
||||||
|
|
||||||
p.getWorld().playSound(p.getLocation(), Sound.BLAZE_BREATH, 0.5F, 5F);
|
p.getWorld().playSound(p.getLocation(), Sound.BLAZE_BREATH, 0.5F, 5F);
|
||||||
charge(p);
|
charge(p);
|
||||||
|
@ -28,7 +28,7 @@ public class SpellHeal extends Spell implements SpellClick, SpellClickEntity
|
|||||||
|
|
||||||
if (entity.getHealth() < entity.getMaxHealth())
|
if (entity.getHealth() < entity.getMaxHealth())
|
||||||
{
|
{
|
||||||
double health = entity.getHealth() + (4 + (getSpellLevel(p) * 2));
|
double health = entity.getHealth() + (3 + getSpellLevel(p));
|
||||||
|
|
||||||
if (health > entity.getMaxHealth())
|
if (health > entity.getMaxHealth())
|
||||||
health = entity.getMaxHealth();
|
health = entity.getMaxHealth();
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
package nautilus.game.arcade.game.games.wizards.spells;
|
|
||||||
|
|
||||||
import nautilus.game.arcade.game.games.wizards.Spell;
|
|
||||||
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClick;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
public class SpellTunnel extends Spell implements SpellClick
|
|
||||||
{
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void castSpell(Player player)
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user