Kit changes to wizards

This commit is contained in:
libraryaddict 2015-01-27 21:09:15 +13:00
parent 76e6b7530f
commit 94f79990e4
7 changed files with 33 additions and 69 deletions

View File

@ -36,11 +36,11 @@ import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.wizards.kit.KitHermit;
import nautilus.game.arcade.game.games.wizards.kit.KitMage;
import nautilus.game.arcade.game.games.wizards.kit.KitMystic;
import nautilus.game.arcade.game.games.wizards.kit.KitScholar;
import nautilus.game.arcade.game.games.wizards.kit.KitSorcerer;
import nautilus.game.arcade.game.games.wizards.kit.KitWitchDoctor;
import nautilus.game.arcade.game.games.wizards.kit.KitWizard;
import nautilus.game.arcade.game.games.wizards.kit.KitMage;
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClick;
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClickBlock;
import nautilus.game.arcade.game.games.wizards.spellinterfaces.SpellClickEntity;
@ -129,15 +129,15 @@ public class Wizards extends SoloGame
setKits(new Kit[]
{
new KitWizard(manager),
new KitMage(manager),
new KitScholar(manager),
new KitHermit(manager),
new KitSorcerer(manager),
new KitMystic(manager),
new KitWitchDoctor(manager)
new KitWitchDoctor(manager),
// new KitWarlock(manager)
});
_wizard = new WizardSpellMenu("Wizard Spell Menu", getArcadeManager().GetPlugin(), this);
@ -1030,7 +1030,7 @@ public class Wizards extends SoloGame
_wizards.put(player.getName(), wizard);
if (kit instanceof KitHermit)
if (kit instanceof KitMage)
{
for (int i = 0; i < 100; i++)
{
@ -1291,6 +1291,7 @@ public class Wizards extends SoloGame
if (result != null && (result.getType().name().contains("_SWORD") || result.getType().name().contains("_AXE")))
{
event.getInventory().setResult(new ItemStack(Material.AIR));
UtilPlayer.message(event.getViewers().get(0), C.cRed + "You may not craft weaponsa");
}
}

View File

@ -13,13 +13,13 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class KitHermit extends Kit
public class KitMage extends Kit
{
public KitHermit(ArcadeManager manager)
public KitMage(ArcadeManager manager)
{
super(manager, "Hermit", KitAvailability.Free, new String[]
super(manager, "Mage", KitAvailability.Free, new String[]
{
"Start with a random spell"
"Start with an extra spell"
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.BLAZE_ROD));
}
@ -28,7 +28,7 @@ public class KitHermit extends Kit
{
for (int i = 0; i < 5; i++)
{
if (i < 3)
if (i < 2)
{
player.getInventory().addItem(((Wizards) Manager.GetGame()).makeUnusedWand());
}

View File

@ -28,7 +28,7 @@ public class KitMystic extends Kit
{
for (int i = 0; i < 5; i++)
{
if (i < 3)
if (i < 2)
{
player.getInventory().addItem(((Wizards) Manager.GetGame()).makeUnusedWand());
}

View File

@ -13,11 +13,11 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class KitScholar extends Kit
public class KitSorcerer extends Kit
{
public KitScholar(ArcadeManager manager)
public KitSorcerer(ArcadeManager manager)
{
super(manager, "Scholar", KitAvailability.Free, new String[]
super(manager, "Sorcerer", KitAvailability.Free, new String[]
{
"Start out with an extra wand"
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.BLAZE_ROD));
@ -28,7 +28,7 @@ public class KitScholar extends Kit
{
for (int i = 0; i < 5; i++)
{
if (i < 4)
if (i < 3)
{
player.getInventory().addItem(((Wizards) Manager.GetGame()).makeUnusedWand());
}

View File

@ -34,7 +34,7 @@ public class KitWitchDoctor extends Kit
{
for (int i = 0; i < 5; i++)
{
if (i < 3)
if (i < 2)
{
player.getInventory().addItem(((Wizards) Manager.GetGame()).makeUnusedWand());
}

View File

@ -1,49 +0,0 @@
package nautilus.game.arcade.game.games.wizards.kit;
import mineplex.core.common.util.C;
import mineplex.core.itemstack.ItemBuilder;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.games.wizards.Wizards;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
public class KitWizard extends Kit
{
public KitWizard(ArcadeManager manager)
{
super(manager, "Wizard", KitAvailability.Free, new String[]
{
"The kit all wizards initally use"
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.BLAZE_ROD));
}
@Override
public void GiveItems(Player player)
{
for (int i = 0; i < 5; i++)
{
if (i < 3)
{
player.getInventory().addItem(((Wizards) Manager.GetGame()).makeUnusedWand());
}
else
{
player.getInventory().addItem(
new ItemBuilder(Material.STAINED_GLASS_PANE, 1, (short) 8)
.setTitle(C.cGray + "Empty wand slot" + ((Wizards) Manager.GetGame()).buildTime())
.addLore(C.cGray + C.Italics + "Wands can be found in chests and on dead players")
.build());
}
}
}
}

View File

@ -12,9 +12,11 @@ import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.AnimalTamer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Tameable;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.scheduler.BukkitRunnable;
@ -124,6 +126,16 @@ public class SpellRumble extends Spell implements SpellClickBlock, SpellClick
if (entity instanceof LivingEntity && player != entity && !_effected.contains(entity.getEntityId()))
{
if (entity instanceof Tameable)
{
AnimalTamer tamer = ((Tameable) entity).getOwner();
if (tamer != null && tamer == player)
{
continue;
}
}
Location loc = entity.getLocation();
if (loc.getBlockX() == b.getX() && loc.getBlockZ() == b.getZ())