Wizards: Latest changes by Chiss
This commit is contained in:
parent
cd47da179a
commit
0196a5c359
@ -41,6 +41,7 @@ public class SpellButton implements IButton
|
||||
|
||||
_spellPage.getWizards().drawUtilTextBottom(player);
|
||||
_spellPage.getWizards().changeWandsTitles(player);
|
||||
_spellPage.getWizards().changeWandsType(player, -1, player.getInventory().getHeldItemSlot());
|
||||
|
||||
player.closeInventory();
|
||||
}
|
||||
|
@ -63,13 +63,13 @@ public class SpellMenuPage extends ShopPageBase<WizardSpellMenu, WizardSpellMenu
|
||||
{
|
||||
ItemBuilder builder = new ItemBuilder(spell.getSpellItem());
|
||||
|
||||
builder.setTitle(spell.getElement().getColor() + spell.getSpellName());
|
||||
builder.setTitle(spell.getElement().getColor() + C.Bold + spell.getSpellName());
|
||||
|
||||
builder.addLore("");
|
||||
builder.addLore(C.cBlue + C.Bold + "Spell Level: " + C.cWhite + spellLevel);
|
||||
builder.addLore(C.cBlue + C.Bold + "Mana Cost: " + C.cWhite
|
||||
builder.addLore(C.cYellow + C.Bold + "Spell Level: " + C.cWhite + spellLevel);
|
||||
builder.addLore(C.cYellow + C.Bold + "Mana Cost: " + C.cWhite
|
||||
+ (wizard == null ? spell.getBaseManaCost() : spell.getManaCost(wizard)));
|
||||
builder.addLore(C.cBlue + C.Bold + "Cooldown: " + C.cWhite
|
||||
builder.addLore(C.cYellow + C.Bold + "Cooldown: " + C.cWhite
|
||||
+ (wizard == null ? spell.getBaseCooldown() : spell.getSpellCooldown(wizard)) + " seconds");
|
||||
builder.addLore("");
|
||||
|
||||
@ -87,9 +87,9 @@ public class SpellMenuPage extends ShopPageBase<WizardSpellMenu, WizardSpellMenu
|
||||
|
||||
builder.addLore("");
|
||||
|
||||
builder.addLore(C.cPurple + C.Bold + "LEFT CLICK" + C.cDGreen + " Bind to Wand");
|
||||
builder.addLore(C.cGreen + C.Bold + "Left-click" + C.cWhite + " Bind to Wand");
|
||||
|
||||
builder.addLore(C.cGreen + C.Bold + "RIGHT CLICK" + C.cBlue + " Quickcast Spell");
|
||||
builder.addLore(C.cGreen + C.Bold + "Right-click" + C.cWhite + " Quickcast Spell");
|
||||
|
||||
addButton(i, new ShopItem(builder.build(), spell.name(), spell.name(), 1, true, true), new SpellButton(
|
||||
this, spell));
|
||||
|
@ -9,8 +9,9 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public enum SpellType // ❤
|
||||
{
|
||||
Droom(SpellElement.ATTACK, // Spell element
|
||||
"Droom", // Spell name
|
||||
AnvilDrop(SpellElement.ATTACK, // Spell element
|
||||
WandElement.EARTH, // Wand element
|
||||
"Anvil Drop", // Spell name
|
||||
new ItemStack(Material.NETHER_BRICK_ITEM), // Spell icon
|
||||
SpellDroom.class, // Spell class
|
||||
3, // Spell max level
|
||||
@ -20,7 +21,7 @@ public enum SpellType // ❤
|
||||
-4, // Cooldown change per level
|
||||
10, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "(Spell Level x 2) + 3",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "(Spell Level x 2) + 3",
|
||||
|
||||
"",
|
||||
|
||||
@ -29,8 +30,9 @@ public enum SpellType // ❤
|
||||
"This also includes the caster!"),
|
||||
|
||||
Fireball(SpellElement.ATTACK, // Spell element
|
||||
WandElement.FIRE, // Wand element
|
||||
"Fireball", // Spell name
|
||||
new ItemStack(Material.FIREWORK_CHARGE), // Spell icon
|
||||
new ItemStack(Material.COAL), // Spell icon
|
||||
SpellFireball.class, // Spell class
|
||||
3, // Spell max level
|
||||
30, // Mana cost
|
||||
@ -39,7 +41,7 @@ public enum SpellType // ❤
|
||||
-2, // Cooldown change per level
|
||||
10, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "Spell Level + 3",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "Spell Level + 3",
|
||||
|
||||
"",
|
||||
|
||||
@ -48,6 +50,7 @@ public enum SpellType // ❤
|
||||
"Summon a blazing fireball!"),
|
||||
|
||||
Flash(SpellElement.SUPPORT, // Spell element
|
||||
WandElement.LIFE, // Wand element
|
||||
"Flash", // Spell name
|
||||
new ItemStack(Material.GOLD_NUGGET), // Spell icon
|
||||
SpellFlash.class, // Spell class
|
||||
@ -58,13 +61,14 @@ public enum SpellType // ❤
|
||||
-5, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Range: " + C.Bold + C.cWhite + "(Spell Level x 10) + 20",
|
||||
C.cYellow + C.Bold + "Range: " + C.Bold + C.cWhite + "(Spell Level x 10) + 20",
|
||||
|
||||
"",
|
||||
|
||||
"Teleport to the block you are looking at!"),
|
||||
|
||||
FrostBarrier(SpellElement.MISC, // Spell element
|
||||
WandElement.ICE, // Wand element
|
||||
"Frost Barrier", // Spell name
|
||||
new ItemStack(Material.MONSTER_EGG), // Spell icon
|
||||
SpellFrostBarrier.class, // Spell class
|
||||
@ -75,15 +79,16 @@ public enum SpellType // ❤
|
||||
-5, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Height: " + C.Bold + C.cWhite + "Spell Level + 1",
|
||||
C.cYellow + C.Bold + "Height: " + C.Bold + C.cWhite + "Spell Level + 1",
|
||||
|
||||
C.cGold + C.Bold + "Width: " + C.Bold + C.cWhite + "(Spell Level x 2) + 4",
|
||||
C.cYellow + C.Bold + "Width: " + C.Bold + C.cWhite + "(Spell Level x 2) + 4",
|
||||
|
||||
"",
|
||||
|
||||
"Create a wall of ice!"),
|
||||
|
||||
Gust(SpellElement.MISC, // Spell element
|
||||
WandElement.AIR, // Wand element
|
||||
"Gust", // Spell name
|
||||
new ItemStack(Material.SULPHUR), // Spell icon
|
||||
SpellGust.class, // Spell class
|
||||
@ -94,15 +99,16 @@ public enum SpellType // ❤
|
||||
0, // Cooldown change per level
|
||||
5, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Gust Size: " + C.Bold + C.cWhite + "10 x Spell Level blocks",
|
||||
C.cYellow + C.Bold + "Gust Size: " + C.Bold + C.cWhite + "10 x Spell Level blocks",
|
||||
|
||||
C.cGold + C.Bold + "Gust Strenth: " + C.Bold + C.cWhite + "Spell Level x 30%",
|
||||
C.cYellow + C.Bold + "Gust Strenth: " + C.Bold + C.cWhite + "Spell Level x 30%",
|
||||
|
||||
"",
|
||||
|
||||
"Cast the spell and watch your enemies fly!"),
|
||||
|
||||
Heal(SpellElement.SUPPORT, // Spell element
|
||||
WandElement.LIFE, // Wand element
|
||||
"Heal", // Spell name
|
||||
new ItemStack(Material.QUARTZ), // Spell icon
|
||||
SpellHeal.class, // Spell class
|
||||
@ -113,7 +119,7 @@ public enum SpellType // ❤
|
||||
-1, // Cooldown change per level
|
||||
5, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Heals: " + C.Bold + C.cWhite + "(Spell Level / 2) + 1.5",
|
||||
C.cYellow + C.Bold + "Heals: " + C.Bold + C.cWhite + "(Spell Level / 2) + 1.5",
|
||||
|
||||
"",
|
||||
|
||||
@ -122,8 +128,9 @@ public enum SpellType // ❤
|
||||
"Use this! Heal yourself up!"),
|
||||
|
||||
IcePrison(SpellElement.MISC, // Spell element
|
||||
WandElement.ICE, // Wand element
|
||||
"Ice Prison", // Spell name
|
||||
new ItemStack(Material.BOOK_AND_QUILL), // Spell icon
|
||||
new ItemStack(Material.EYE_OF_ENDER), // Spell icon
|
||||
SpellIcePrison.class, // Spell class
|
||||
3, // Spell max level
|
||||
50, // Mana cost
|
||||
@ -132,7 +139,7 @@ public enum SpellType // ❤
|
||||
0, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Size: " + C.Bold + C.cWhite + "Spell Level + 3",
|
||||
C.cYellow + C.Bold + "Size: " + C.Bold + C.cWhite + "Spell Level + 3",
|
||||
|
||||
"",
|
||||
|
||||
@ -141,6 +148,7 @@ public enum SpellType // ❤
|
||||
"prison to capture thy enemies!"),
|
||||
|
||||
IceShards(SpellElement.ATTACK, // Spell element
|
||||
WandElement.ICE, // Wand element
|
||||
"Ice Shards", // Spell name
|
||||
new ItemStack(Material.GOLDEN_CARROT), // Spell icon
|
||||
SpellIceShards.class, // Spell class
|
||||
@ -151,9 +159,9 @@ public enum SpellType // ❤
|
||||
-2, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "2",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "2",
|
||||
|
||||
C.cGold + C.Bold + "Shards: " + C.Bold + C.cWhite + "Spell Level + 1",
|
||||
C.cYellow + C.Bold + "Shards: " + C.Bold + C.cWhite + "Spell Level + 1",
|
||||
|
||||
"",
|
||||
|
||||
@ -166,6 +174,7 @@ public enum SpellType // ❤
|
||||
"enemies senseless!"),
|
||||
|
||||
Implode(SpellElement.MISC, // Spell element
|
||||
WandElement.EARTH, // Wand element
|
||||
"Implode", // Spell name
|
||||
new ItemStack(Material.GLOWSTONE_DUST), // Spell icon
|
||||
SpellImplode.class, // Spell class
|
||||
@ -176,11 +185,11 @@ public enum SpellType // ❤
|
||||
-3, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Range: " + C.Bold + C.cWhite + "50",
|
||||
C.cYellow + C.Bold + "Range: " + C.Bold + C.cWhite + "50",
|
||||
|
||||
C.cGold + C.Bold + "Implosion Height: " + C.Bold + C.cWhite + "Spell Level",
|
||||
C.cYellow + C.Bold + "Implosion Height: " + C.Bold + C.cWhite + "Spell Level",
|
||||
|
||||
C.cGold + C.Bold + "Implosion Width: " + C.Bold + C.cWhite + "Spell Level x 2",
|
||||
C.cYellow + C.Bold + "Implosion Width: " + C.Bold + C.cWhite + "Spell Level x 2",
|
||||
|
||||
"",
|
||||
|
||||
@ -189,6 +198,7 @@ public enum SpellType // ❤
|
||||
"and scatters them about the area"),
|
||||
|
||||
LightningStrike(SpellElement.ATTACK, // Spell element
|
||||
WandElement.AIR, // Wand element
|
||||
"Lightning Strike", // Spell name
|
||||
new ItemStack(Material.SLIME_BALL), // Spell icon
|
||||
SpellLightningStrike.class, // Spell class
|
||||
@ -199,7 +209,7 @@ public enum SpellType // ❤
|
||||
0, // Cooldown change per level
|
||||
10, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "(Spell Level x 2) + 2",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "(Spell Level x 2) + 2",
|
||||
|
||||
"",
|
||||
|
||||
@ -210,6 +220,7 @@ public enum SpellType // ❤
|
||||
"The lightning also contains fire!"),
|
||||
|
||||
MagicMissile(SpellElement.ATTACK, // Spell element
|
||||
WandElement.NORMAL, // Wand element
|
||||
"Magic Missile", // Spell name
|
||||
new ItemStack(Material.MELON_SEEDS), // Spell icon
|
||||
SpellMagicMissile.class, // Spell class
|
||||
@ -220,9 +231,9 @@ public enum SpellType // ❤
|
||||
0, // Cooldown change per level
|
||||
15, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "Spell Level + 3",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "Spell Level + 3",
|
||||
|
||||
C.cGold + C.Bold + "Range: " + C.Bold + C.cWhite + "(Spell Level x 10) + 20",
|
||||
C.cYellow + C.Bold + "Range: " + C.Bold + C.cWhite + "(Spell Level x 10) + 20",
|
||||
|
||||
"",
|
||||
|
||||
@ -230,6 +241,7 @@ public enum SpellType // ❤
|
||||
+ "the magic profession and homes in towards the closest target!"),
|
||||
|
||||
Napalm(SpellElement.ATTACK, // Spell element
|
||||
WandElement.FIRE, // Wand element
|
||||
"Napalm", // Spell name
|
||||
new ItemStack(Material.CARROT_STICK), // Spell icon
|
||||
SpellNapalm.class, // Spell class
|
||||
@ -240,7 +252,7 @@ public enum SpellType // ❤
|
||||
-10, // Cooldown change per level
|
||||
1, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Length: " + C.Bold + C.cWhite + "(Spell Level x 10) + 5",
|
||||
C.cYellow + C.Bold + "Length: " + C.Bold + C.cWhite + "(Spell Level x 10) + 5",
|
||||
|
||||
"",
|
||||
|
||||
@ -251,6 +263,7 @@ public enum SpellType // ❤
|
||||
"it even even burn away nearby blocks!"),
|
||||
|
||||
RainbowBeam(SpellElement.ATTACK, // Spell element
|
||||
WandElement.FIRE, // Wand element
|
||||
"Rainbow Beam", // Spell name
|
||||
new ItemStack(Material.EMERALD), // Spell icon
|
||||
SpellRainbowBeam.class, // Spell class
|
||||
@ -261,9 +274,9 @@ public enum SpellType // ❤
|
||||
1, // Cooldown change per level
|
||||
10, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "Spell Level + 2.5",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "Spell Level + 2.5",
|
||||
|
||||
C.cGold + C.Bold + "Range: " + C.Bold + C.cWhite + "80",
|
||||
C.cYellow + C.Bold + "Range: " + C.Bold + C.cWhite + "80",
|
||||
|
||||
"",
|
||||
|
||||
@ -278,6 +291,7 @@ public enum SpellType // ❤
|
||||
"30 blocks by 0.2 damage per block!"),
|
||||
|
||||
RainbowRoad(SpellElement.MISC, // Spell element
|
||||
WandElement.AIR, // Wand element
|
||||
"Rainbow Road", // Spell name
|
||||
new ItemStack(Material.SADDLE), // Spell icon
|
||||
SpellRainbowRoad.class, // Spell class
|
||||
@ -288,7 +302,7 @@ public enum SpellType // ❤
|
||||
0, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Length: " + C.Bold + C.cWhite + "Spell Level x 10",
|
||||
C.cYellow + C.Bold + "Length: " + C.Bold + C.cWhite + "Spell Level x 10",
|
||||
|
||||
"",
|
||||
|
||||
@ -297,6 +311,7 @@ public enum SpellType // ❤
|
||||
"of rainbows for thee to walk on!"),
|
||||
|
||||
Rumble(SpellElement.ATTACK, // Spell element
|
||||
WandElement.EARTH, // Wand element
|
||||
"Rumble", // Spell name
|
||||
new ItemStack(Material.PUMPKIN_SEEDS), // Spell icon
|
||||
SpellRumble.class, // Spell class
|
||||
@ -307,13 +322,13 @@ public enum SpellType // ❤
|
||||
-1, // Cooldown change per level
|
||||
10, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "Spell Level + 2",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "Spell Level + 2",
|
||||
|
||||
C.cGold + C.Bold + "Explosion Damage: " + C.Bold + C.cWhite + "Spell Level / 4",
|
||||
C.cYellow + C.Bold + "Explosion Damage: " + C.Bold + C.cWhite + "Spell Level / 4",
|
||||
|
||||
C.cGold + C.Bold + "Range: " + C.Bold + C.cWhite + "Spell Level x 10",
|
||||
C.cYellow + C.Bold + "Range: " + C.Bold + C.cWhite + "Spell Level x 10",
|
||||
|
||||
C.cGold + C.Bold + "Slowness Level: " + C.Bold + C.cWhite + "Spell Level",
|
||||
C.cYellow + C.Bold + "Slowness Level: " + C.Bold + C.cWhite + "Spell Level",
|
||||
|
||||
"",
|
||||
|
||||
@ -326,6 +341,7 @@ public enum SpellType // ❤
|
||||
"Effected players lose their footing!"),
|
||||
|
||||
SpectralArrow(SpellElement.ATTACK, // Spell element
|
||||
WandElement.DEATH, // Wand element
|
||||
"Spectral Arrow", // Spell name
|
||||
new ItemStack(Material.ENCHANTED_BOOK), // Spell icon
|
||||
SpellSpectralArrow.class, // Spell class
|
||||
@ -336,7 +352,7 @@ public enum SpellType // ❤
|
||||
-2, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "(Blocks / (7 - Spell Level)) + 3",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "(Blocks / (7 - Spell Level)) + 3",
|
||||
|
||||
"",
|
||||
|
||||
@ -345,6 +361,7 @@ public enum SpellType // ❤
|
||||
"Further the distance, higher the damage!"),
|
||||
|
||||
SpeedBoost(SpellElement.SUPPORT, // Spell element
|
||||
WandElement.LIFE, // Wand element
|
||||
"Speed Boost", // Spell name
|
||||
new ItemStack(Material.BOOK), // Spell icon
|
||||
SpellSpeedBoost.class, // Spell class
|
||||
@ -355,15 +372,16 @@ public enum SpellType // ❤
|
||||
0, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Length: " + C.Bold + C.cWhite + "20 seconds",
|
||||
C.cYellow + C.Bold + "Length: " + C.Bold + C.cWhite + "20 seconds",
|
||||
|
||||
C.cGold + C.Bold + "Strength: " + C.Bold + C.cWhite + "Spell Level",
|
||||
C.cYellow + C.Bold + "Strength: " + C.Bold + C.cWhite + "Spell Level",
|
||||
|
||||
"",
|
||||
|
||||
"Gain a speed potion effect to outrun your enemies"),
|
||||
|
||||
SummonWolves(SpellElement.ATTACK, // Spell element
|
||||
WandElement.LIFE, // Wand element
|
||||
"Summon Wolves", // Spell name
|
||||
new ItemStack(Material.MILK_BUCKET), // Spell icon
|
||||
SpellSummonWolves.class, // Spell class
|
||||
@ -374,7 +392,7 @@ public enum SpellType // ❤
|
||||
0, // Cooldown change per level
|
||||
8, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Wolves: " + C.Bold + C.cWhite + "Spell Level + 2",
|
||||
C.cYellow + C.Bold + "Wolves: " + C.Bold + C.cWhite + "Spell Level + 2",
|
||||
|
||||
"",
|
||||
|
||||
@ -383,8 +401,9 @@ public enum SpellType // ❤
|
||||
"They will fight for you and after 30 seconds, will disappear"),
|
||||
|
||||
TrapRune(SpellElement.MISC, // Spell element
|
||||
WandElement.DEATH, // Wand element
|
||||
"Trap Rune", // Spell name
|
||||
new ItemStack(Material.BREWING_STAND_ITEM), // Spell icon
|
||||
new ItemStack(Material.SHEARS), // Spell icon
|
||||
SpellTrapRune.class, // Spell class
|
||||
3, // Spell max level
|
||||
50, // Mana cost
|
||||
@ -393,11 +412,11 @@ public enum SpellType // ❤
|
||||
-5, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "(Spell Level x 2) + 3",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "(Spell Level x 2) + 3",
|
||||
|
||||
C.cGold + C.Bold + "Range: " + C.Bold + C.cWhite + "(Spell Level x 4) + 12",
|
||||
C.cYellow + C.Bold + "Range: " + C.Bold + C.cWhite + "(Spell Level x 4) + 12",
|
||||
|
||||
C.cGold + C.Bold + "Rune Size: " + C.Bold + C.cWhite + "Spell Level",
|
||||
C.cYellow + C.Bold + "Rune Size: " + C.Bold + C.cWhite + "Spell Level",
|
||||
|
||||
"",
|
||||
|
||||
@ -406,6 +425,7 @@ public enum SpellType // ❤
|
||||
"The rune takes 5 seconds to prepare and will damage even you!"),
|
||||
|
||||
WebShot(SpellElement.ATTACK, // Spell element
|
||||
WandElement.DEATH, // Wand element
|
||||
"Web Shot", // Spell name
|
||||
new ItemStack(Material.SPIDER_EYE), // Spell icon
|
||||
SpellWebShot.class, // Spell class
|
||||
@ -416,15 +436,16 @@ public enum SpellType // ❤
|
||||
0, // Cooldown change per level
|
||||
3, // Item amount in loot
|
||||
|
||||
C.cGold + C.Bold + "Damage: " + C.Bold + C.cWhite + "1 heart",
|
||||
C.cYellow + C.Bold + "Damage: " + C.Bold + C.cWhite + "1 heart",
|
||||
|
||||
C.cGold + C.Bold + "Webs: " + C.Bold + C.cWhite + "Spell Level x 2",
|
||||
C.cYellow + C.Bold + "Webs: " + C.Bold + C.cWhite + "Spell Level x 2",
|
||||
|
||||
"",
|
||||
|
||||
"Shoot webs just like your favorite hero!"),
|
||||
|
||||
WizardsCompass(SpellElement.MISC, // Spell element
|
||||
WandElement.LIFE, // Wand element
|
||||
"Wizard's Compass", // Spell name
|
||||
new ItemStack(Material.SUGAR), // Spell icon
|
||||
SpellWizardsCompass.class, // Spell class
|
||||
@ -500,6 +521,35 @@ public enum SpellType // ❤
|
||||
}
|
||||
}
|
||||
|
||||
public enum WandElement
|
||||
{
|
||||
AIR(Material.IRON_HOE),
|
||||
|
||||
DEATH(Material.FERMENTED_SPIDER_EYE),
|
||||
|
||||
EARTH(Material.STONE_HOE),
|
||||
|
||||
FIRE(Material.GOLD_HOE),
|
||||
|
||||
ICE(Material.DIAMOND_HOE),
|
||||
|
||||
LIFE(Material.WOOD_HOE),
|
||||
|
||||
NORMAL(Material.BLAZE_ROD);
|
||||
|
||||
private Material _material;
|
||||
|
||||
private WandElement(Material material)
|
||||
{
|
||||
_material = material;
|
||||
}
|
||||
|
||||
public Material getMaterial()
|
||||
{
|
||||
return _material;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
for (SpellType spell : values())
|
||||
@ -559,10 +609,13 @@ public enum SpellType // ❤
|
||||
private int _spellCost;
|
||||
private String _spellName;
|
||||
private SpellElement _type;
|
||||
private WandElement _wandElement;
|
||||
|
||||
private SpellType(SpellElement type, String spellName, ItemStack spellItem, Class<? extends Spell> spell, int maxLevel,
|
||||
int spellCost, int spellCooldown, int manaChangePerLevel, int cooldownChangePerLevel, int itemAmount, String... desc)
|
||||
private SpellType(SpellElement type, WandElement wandElement, String spellName, ItemStack spellItem,
|
||||
Class<? extends Spell> spell, int maxLevel, int spellCost, int spellCooldown, int manaChangePerLevel,
|
||||
int cooldownChangePerLevel, int itemAmount, String... desc)
|
||||
{
|
||||
_wandElement = wandElement;
|
||||
_maxLevel = maxLevel;
|
||||
_item = spellItem;
|
||||
_desc = desc;
|
||||
@ -663,6 +716,11 @@ public enum SpellType // ❤
|
||||
return _spellName;
|
||||
}
|
||||
|
||||
public WandElement getWandType()
|
||||
{
|
||||
return _wandElement;
|
||||
}
|
||||
|
||||
public ItemStack makeSpell(Wizards wizards, ItemStack item)
|
||||
{
|
||||
ItemBuilder builder = new ItemBuilder(item);
|
||||
|
@ -90,9 +90,9 @@ public class WizardSpellMenu extends MiniPlugin
|
||||
{
|
||||
|
||||
ItemStack item = event.getItem();
|
||||
if (item != null && item.getType() == Material.BLAZE_ROD)
|
||||
{
|
||||
|
||||
if (item != null && item.getType() != Material.STAINED_GLASS_PANE)
|
||||
{
|
||||
Player p = event.getPlayer();
|
||||
|
||||
if (event.getAction().name().contains("RIGHT"))
|
||||
|
@ -312,8 +312,7 @@ public class Wizards extends SoloGame
|
||||
private void addRandomItem(int amount, ItemStack item, int minAmount, int maxAmount)
|
||||
{
|
||||
item.setAmount(minAmount);
|
||||
HashMap.SimpleEntry entry = new HashMap.SimpleEntry(item, maxAmount
|
||||
- minAmount);
|
||||
HashMap.SimpleEntry entry = new HashMap.SimpleEntry(item, maxAmount - minAmount);
|
||||
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
@ -447,6 +446,37 @@ public class Wizards extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
public void changeWandsType(Player player, int oldSlot, int newSlot)
|
||||
{
|
||||
PlayerInventory inv = player.getInventory();
|
||||
|
||||
if (oldSlot >= 0 && oldSlot < 5)
|
||||
{
|
||||
SpellType spell = getWizard(player).getSpell(oldSlot);
|
||||
|
||||
if (spell != null)
|
||||
{
|
||||
ItemStack item = inv.getItem(oldSlot);
|
||||
item.setType(spell.getSpellItem().getType());
|
||||
inv.setItem(oldSlot, item);
|
||||
}
|
||||
}
|
||||
|
||||
if (newSlot >= 0 && newSlot < 5)
|
||||
{
|
||||
SpellType spell = getWizard(player).getSpell(newSlot);
|
||||
|
||||
if (spell != null)
|
||||
{
|
||||
ItemStack item = inv.getItem(newSlot);
|
||||
|
||||
item.setType(spell.getWandType().getMaterial());
|
||||
|
||||
inv.setItem(newSlot, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void changeWandsTitles(Player player)
|
||||
{
|
||||
PlayerInventory inv = player.getInventory();
|
||||
@ -457,7 +487,7 @@ public class Wizards extends SoloGame
|
||||
ItemStack item = inv.getItem(slot);
|
||||
SpellType type = wizard.getSpell(slot);
|
||||
|
||||
if (item != null && item.getType() == Material.BLAZE_ROD)
|
||||
if (item != null && item.getType() != Material.STAINED_GLASS_PANE)
|
||||
{
|
||||
String display;
|
||||
|
||||
@ -744,7 +774,6 @@ public class Wizards extends SoloGame
|
||||
{
|
||||
HashSet<SpellType> spells = new HashSet<SpellType>();
|
||||
ArrayList<ItemStack> itemsToDrop = new ArrayList<ItemStack>();
|
||||
ArrayList<ItemStack> normalItemsToDrop = UtilInv.getItems(player);
|
||||
|
||||
Wizard wizard = getWizard(player);
|
||||
int wandsHeld = 0;
|
||||
@ -767,23 +796,24 @@ public class Wizards extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
Iterator<ItemStack> itel = normalItemsToDrop.iterator();
|
||||
|
||||
while (itel.hasNext())
|
||||
for (ItemStack item : UtilInv.getItems(player))
|
||||
{
|
||||
ItemStack item = itel.next();
|
||||
if (item.getType() == Material.BLAZE_ROD)
|
||||
switch (item.getType())
|
||||
{
|
||||
case WOOD_HOE:
|
||||
case STONE_HOE:
|
||||
case GOLD_HOE:
|
||||
case IRON_HOE:
|
||||
case DIAMOND_HOE:
|
||||
case BLAZE_ROD:
|
||||
case STICK:
|
||||
wandsHeld++;
|
||||
itel.remove();
|
||||
}
|
||||
else if (item.getType() == Material.STAINED_GLASS_PANE)
|
||||
{
|
||||
itel.remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
case STAINED_GLASS_PANE:
|
||||
break;
|
||||
default:
|
||||
player.getWorld().dropItemNaturally(player.getLocation(), item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -937,11 +967,10 @@ public class Wizards extends SoloGame
|
||||
{
|
||||
ItemStack item = player.getItemInHand();
|
||||
|
||||
if (IsLive() && IsAlive(player) && item != null && item.getType() == Material.BLAZE_ROD
|
||||
&& player.getInventory().getHeldItemSlot() < 5)
|
||||
if (IsLive() && IsAlive(player) && item != null && player.getInventory().getHeldItemSlot() < 5)
|
||||
{
|
||||
|
||||
Wizard wizard = getWizard(player);
|
||||
|
||||
SpellType spell = wizard.getSpell(player.getInventory().getHeldItemSlot());
|
||||
|
||||
if (spell != null)
|
||||
@ -1085,8 +1114,7 @@ public class Wizards extends SoloGame
|
||||
if (IsAlive(p))
|
||||
{
|
||||
dropSpells(p);
|
||||
|
||||
Iterator<ItemStack> itel = event.getDrops().iterator();
|
||||
/*Iterator<ItemStack> itel = event.getDrops().iterator();
|
||||
|
||||
while (itel.hasNext())
|
||||
{
|
||||
@ -1096,7 +1124,7 @@ public class Wizards extends SoloGame
|
||||
{
|
||||
itel.remove();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
_wizards.remove(p.getName());
|
||||
@ -1161,7 +1189,7 @@ public class Wizards extends SoloGame
|
||||
|
||||
_droppedWandsBooks.add(event.getEntity());
|
||||
}
|
||||
else if (item.getType() == Material.BOOK)
|
||||
else if (item.getType() == Material.BOOK || item.getType() == Material.STICK)
|
||||
{
|
||||
event.getEntity().remove();
|
||||
}
|
||||
@ -1257,20 +1285,9 @@ public class Wizards extends SoloGame
|
||||
@EventHandler
|
||||
public void onInteract(PlayerInteractEvent event)
|
||||
{
|
||||
ItemStack item = event.getItem();
|
||||
if (item != null)
|
||||
{
|
||||
|
||||
Player p = event.getPlayer();
|
||||
if (event.getAction().name().contains("LEFT"))
|
||||
{
|
||||
|
||||
if (item.getType() == Material.BLAZE_ROD)
|
||||
{
|
||||
|
||||
onCastSpell(p, event.getClickedBlock());
|
||||
}
|
||||
}
|
||||
onCastSpell(event.getPlayer(), event.getClickedBlock());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1439,17 +1456,25 @@ public class Wizards extends SoloGame
|
||||
@EventHandler
|
||||
public void onSwapItem(PlayerItemHeldEvent event)
|
||||
{
|
||||
if (IsLive())
|
||||
if (!IsLive())
|
||||
{
|
||||
return;
|
||||
}
|
||||
Player p = event.getPlayer();
|
||||
|
||||
if (!_wizards.containsKey(p.getName()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
changeWandsType(p, event.getPreviousSlot(), event.getNewSlot());
|
||||
|
||||
if (event.getNewSlot() >= 0 && event.getNewSlot() < 5)
|
||||
{
|
||||
drawUtilTextBottom(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Get rid of the old wand message
|
||||
if (event.getPreviousSlot() >= 0 && event.getPreviousSlot() < 5)
|
||||
{
|
||||
@ -1457,7 +1482,6 @@ public class Wizards extends SoloGame
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onUnplaceablePlace(BlockPlaceEvent event)
|
||||
@ -1475,10 +1499,21 @@ public class Wizards extends SoloGame
|
||||
|
||||
ItemStack result = recipe != null ? recipe.getResult() : null;
|
||||
|
||||
if (result != null && (result.getType().name().contains("_SWORD") || result.getType().name().contains("_AXE")))
|
||||
if (result != null)
|
||||
{
|
||||
if (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");
|
||||
|
||||
UtilPlayer.message(event.getViewers().get(0), C.cRed + "You may not craft weapons");
|
||||
}
|
||||
else if (result.getType() == Material.STICK || result.getType() == Material.FERMENTED_SPIDER_EYE
|
||||
|| result.getType().name().contains("_HOE"))
|
||||
{
|
||||
event.getInventory().setResult(new ItemStack(Material.AIR));
|
||||
|
||||
UtilPlayer.message(event.getViewers().get(0), C.cRed + "You may not craft this item");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ public class KitMystic extends Kit
|
||||
super(manager, "Mystic", KitAvailability.Free, new String[]
|
||||
{
|
||||
"Mana regeneration increased by 10%"
|
||||
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.BLAZE_ROD));
|
||||
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.WOOD_HOE));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -20,7 +20,7 @@ public class KitSorcerer extends Kit
|
||||
super(manager, "Sorcerer", KitAvailability.Free, new String[]
|
||||
{
|
||||
"Start out with an extra wand"
|
||||
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.BLAZE_ROD));
|
||||
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.STONE_HOE));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,7 +21,7 @@ public class KitWitchDoctor extends Kit
|
||||
super(manager, "Witch Doctor", KitAvailability.Free, new String[]
|
||||
{
|
||||
"Max mana increased to 150"
|
||||
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.BLAZE_ROD));
|
||||
}, new Perk[0], EntityType.WITCH, new ItemStack(Material.IRON_HOE));
|
||||
|
||||
this.setAchievementRequirements(new Achievement[]
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user