Metal Kit tweaks

This commit is contained in:
Sam 2016-08-04 16:55:52 +01:00
parent 2b8754aa32
commit 190ced7d97
2 changed files with 11 additions and 9 deletions

View File

@ -22,26 +22,26 @@ public class KitMetal extends ProgressingKit
private static final Perk[][] PERKS =
{
{
new PerkMagnetism(15000, 10)
new PerkMagnetism(15000, 10, 1)
},
{
new PerkMagnetism(15000, 10)
new PerkMagnetism(15000, 10, 1.1)
},
{
new PerkMagnetism(15000, 10)
new PerkMagnetism(15000, 10, 1.2)
},
{
new PerkMagnetism(15000, 10)
new PerkMagnetism(15000, 10, 1.3)
},
{
new PerkMagnetism(15000, 10)
new PerkMagnetism(15000, 10, 1.4)
},
{
new PerkMagnetism(15000, 10)
new PerkMagnetism(15000, 10, 1.5)
},
};
private static final ItemStack[] PLAYER_ITEMS = { new ItemStack(Material.WOOD_SWORD), new ItemBuilder(Material.REDSTONE_COMPARATOR).setTitle(C.cGreen + "Magnet").build() };
private static final ItemStack[] PLAYER_ITEMS = { new ItemStack(Material.WOOD_SWORD), new ItemStack(Material.STONE_AXE), new ItemBuilder(Material.REDSTONE_COMPARATOR).setTitle(C.cGreen + "Magnet").build() };
private static final ItemStack IN_HAND = new ItemStack(Material.REDSTONE_COMPARATOR);

View File

@ -34,13 +34,15 @@ public class PerkMagnetism extends Perk
private long _cooldown;
private int _range;
private double _magnituideFactor;
public PerkMagnetism(long cooldown, int range)
public PerkMagnetism(long cooldown, int range, double magnitudeFactor)
{
super("Magnestism", new String[] {});
_cooldown = cooldown;
_range = range;
_magnituideFactor = magnitudeFactor;
}
@EventHandler
@ -116,7 +118,7 @@ public class PerkMagnetism extends Perk
return;
}
Vector vector = UtilAlg.getTrajectory(target, player).multiply(1 + magnitude / 4);
Vector vector = UtilAlg.getTrajectory(target, player).multiply((1 + magnitude / 4) * _magnituideFactor);
UtilParticle.PlayParticleToAll(ParticleType.FIREWORKS_SPARK, target.getEyeLocation(), 1F, 1F, 1F, 0.1F, 20, ViewDist.NORMAL);
target.setVelocity(vector.setY(Math.max(1, vector.getY())));