Make Perks not static, this fixings all kits having the same stats 😨

This commit is contained in:
Sam 2017-04-23 19:06:33 +01:00
parent c8d891ef31
commit 1d0f28689f
6 changed files with 49 additions and 51 deletions

View File

@ -24,14 +24,6 @@ import nautilus.game.arcade.kit.perks.PerkDoubleJump;
public class KitCreeper extends SmashKit public class KitCreeper extends SmashKit
{ {
private static final Perk[] PERKS = {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkCreeperElectricity(),
new PerkCreeperSulphurBomb(),
new PerkCreeperExplode(),
new SmashCreeper()
};
private static final ItemStack IN_HAND = new ItemStack(Material.TNT); private static final ItemStack IN_HAND = new ItemStack(Material.TNT);
@ -83,7 +75,14 @@ public class KitCreeper extends SmashKit
public KitCreeper(ArcadeManager manager) public KitCreeper(ArcadeManager manager)
{ {
super(manager, "Creeper", KitAvailability.Gem, 4000, PERKS, EntityType.CREEPER, IN_HAND, DisguiseCreeper.class); super(manager, "Creeper", KitAvailability.Gem, 4000, new Perk[] {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkCreeperElectricity(),
new PerkCreeperSulphurBomb(),
new PerkCreeperExplode(),
new SmashCreeper()
}, EntityType.CREEPER, IN_HAND, DisguiseCreeper.class);
} }
@Override @Override

View File

@ -86,7 +86,14 @@ public class KitEnderman extends SmashKit
public KitEnderman(ArcadeManager manager) public KitEnderman(ArcadeManager manager)
{ {
super(manager, "Enderman", KitAvailability.Gem, 3000, PERKS, EntityType.ENDERMAN, IN_HAND, DisguiseEnderman.class); super(manager, "Enderman", KitAvailability.Gem, 3000, new Perk[] {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkBlink("Blink"),
new PerkBlockToss(),
new PerkEndermanTeleport(),
new SmashEnderman()
}, EntityType.ENDERMAN, IN_HAND, DisguiseEnderman.class);
} }
@Override @Override

View File

@ -26,16 +26,6 @@ import nautilus.game.arcade.kit.perks.PerkSlow;
public class KitGolem extends SmashKit public class KitGolem extends SmashKit
{ {
private static final Perk[] PERKS = {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkSlow(0),
new PerkFissure(),
new PerkIronHook(),
new PerkSeismicSlam(),
new SmashGolem()
};
private static final ItemStack IN_HAND = new ItemStack(Material.IRON_BLOCK); private static final ItemStack IN_HAND = new ItemStack(Material.IRON_BLOCK);
private static final ItemStack[] PLAYER_ITEMS = { private static final ItemStack[] PLAYER_ITEMS = {
@ -78,7 +68,15 @@ public class KitGolem extends SmashKit
public KitGolem(ArcadeManager manager) public KitGolem(ArcadeManager manager)
{ {
super(manager, "Iron Golem", KitAvailability.Free, PERKS, EntityType.IRON_GOLEM, IN_HAND, DisguiseIronGolem.class); super(manager, "Iron Golem", KitAvailability.Free, new Perk[] {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkSlow(0),
new PerkFissure(),
new PerkIronHook(),
new PerkSeismicSlam(),
new SmashGolem()
}, EntityType.IRON_GOLEM, IN_HAND, DisguiseIronGolem.class);
} }
@Override @Override

View File

@ -34,17 +34,6 @@ public class KitSkeleton extends SmashKit
private static double ARROW_DAMAGE = 6; private static double ARROW_DAMAGE = 6;
private static final Perk[] PERKS = {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkFletcher(),
new PerkKnockbackArrow(),
new PerkBoneExplosion(),
new PerkRopedArrow("Roped Arrow"),
new PerkBarrage(),
new SmashSkeleton()
};
private static final ItemStack IN_HAND = new ItemStack(Material.BOW); private static final ItemStack IN_HAND = new ItemStack(Material.BOW);
private static final ItemStack[] PLAYER_ITEMS = { private static final ItemStack[] PLAYER_ITEMS = {
@ -90,7 +79,16 @@ public class KitSkeleton extends SmashKit
public KitSkeleton(ArcadeManager manager) public KitSkeleton(ArcadeManager manager)
{ {
super(manager, "Skeleton", KitAvailability.Free, PERKS, EntityType.SKELETON, IN_HAND, DisguiseSkeleton.class); super(manager, "Skeleton", KitAvailability.Free, new Perk[] {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkFletcher(),
new PerkKnockbackArrow(),
new PerkBoneExplosion(),
new PerkRopedArrow("Roped Arrow"),
new PerkBarrage(),
new SmashSkeleton()
}, EntityType.SKELETON, IN_HAND, DisguiseSkeleton.class);
} }
@Override @Override

View File

@ -24,14 +24,6 @@ import nautilus.game.arcade.kit.perks.PerkDoubleJump;
public class KitSlime extends SmashKit public class KitSlime extends SmashKit
{ {
private static final Perk[] PERKS = {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkSlimeSlam(),
new PerkSlimeRocket(),
new SmashSlime()
};
private static final ItemStack IN_HAND = new ItemStack(Material.SLIME_BALL); private static final ItemStack IN_HAND = new ItemStack(Material.SLIME_BALL);
private static final ItemStack[] PLAYER_ITEMS = { private static final ItemStack[] PLAYER_ITEMS = {
@ -74,7 +66,13 @@ public class KitSlime extends SmashKit
public KitSlime(ArcadeManager manager) public KitSlime(ArcadeManager manager)
{ {
super(manager, "Slime", KitAvailability.Free, PERKS, EntityType.SLIME, IN_HAND, DisguiseSlime.class); super(manager, "Slime", KitAvailability.Free, new Perk[] {
new PerkSmashStats(),
new PerkDoubleJump("Double Jump"),
new PerkSlimeSlam(),
new PerkSlimeRocket(),
new SmashSlime()
}, EntityType.SLIME, IN_HAND, DisguiseSlime.class);
} }
@Override @Override

View File

@ -25,14 +25,6 @@ import nautilus.game.arcade.kit.Perk;
public class KitSpider extends SmashKit public class KitSpider extends SmashKit
{ {
private static final Perk[] PERKS = {
new PerkSmashStats(),
new PerkSpiderLeap(),
new PerkNeedler(),
new PerkWebShot(),
new SmashSpider()
};
private static final ItemStack IN_HAND = new ItemStack(Material.WEB); private static final ItemStack IN_HAND = new ItemStack(Material.WEB);
private static final ItemStack[] PLAYER_ITEMS = { private static final ItemStack[] PLAYER_ITEMS = {
@ -88,7 +80,13 @@ public class KitSpider extends SmashKit
public KitSpider(ArcadeManager manager) public KitSpider(ArcadeManager manager)
{ {
super(manager, "Spider", KitAvailability.Free, PERKS, EntityType.SPIDER, IN_HAND, DisguiseSpider.class); super(manager, "Spider", KitAvailability.Free, new Perk[] {
new PerkSmashStats(),
new PerkSpiderLeap(),
new PerkNeedler(),
new PerkWebShot(),
new SmashSpider()
}, EntityType.SPIDER, IN_HAND, DisguiseSpider.class);
} }
@Override @Override