Wolf converted to Google Sheets

This commit is contained in:
Sam 2017-04-24 20:21:19 +01:00
parent 27cff85189
commit 99fa347cf1
3 changed files with 31 additions and 21 deletions

View File

@ -24,8 +24,8 @@ public class KitWolf extends SmashKit
{
private static final Perk[] PERKS = {
new PerkSmashStats(5, 1.6, 0.25, 5),
new PerkDoubleJump("Wolf Jump", 1.0, 1.0, true),
new PerkSmashStats(),
new PerkDoubleJump("Wolf Jump"),
new PerkWolf(),
new SmashWolf()
};

View File

@ -41,13 +41,13 @@ import nautilus.game.arcade.game.games.smash.perks.SmashPerk;
public class PerkWolf extends SmashPerk
{
private static final int TACKLE_COOLDOWN_NORMAL = 8000;
private static final int TACKLE_COOLDOWN_SMASH = 1600;
private static final int WOLF_HEALTH = 30;
private static final float WOLF_HIT_BOX = 2.5F;
private static final int WOLF_MAX_TICKS = 70;
private static final int TACKLE_DAMAGE = 5;
private static final int STRIKE_DAMAGE = 7;
private int _cooldownNormal;
private int _cooldownSmash;
private int _wolfHealth;
private float _hitBox;
private int _maxTicks;
private int _tackleDamage;
private int _strikeDamage;
private static final String CUB_TACKLE = "Cub Tackle";
private static final String WOLF_STRIKE = "Wolf Strike";
@ -67,6 +67,18 @@ public class PerkWolf extends SmashPerk
+ "Right-Click" + C.cGray + " with Spade to use " + C.cGreen + WOLF_STRIKE, C.cGray + "Wolf Strike deals 300% Knockback to tackled opponents.", });
}
@Override
public void setupValues()
{
_cooldownNormal = getPerkTime("Cooldown Normal");
_cooldownSmash = getPerkInt("Cooldown Smash (ms)");
_wolfHealth = getPerkInt("Wolf Health");
_hitBox = getPerkFloat("Hit Box");
_maxTicks = getPerkInt("Max Ticks");
_tackleDamage = getPerkInt("Tackle Damage");
_strikeDamage = getPerkInt("Strike Damage");
}
@EventHandler
public void tackleTrigger(PlayerInteractEvent event)
{
@ -99,7 +111,7 @@ public class PerkWolf extends SmashPerk
boolean smash = isSuperActive(player);
if (!Recharge.Instance.use(player, CUB_TACKLE, smash ? TACKLE_COOLDOWN_SMASH : TACKLE_COOLDOWN_NORMAL, !smash, !smash))
if (!Recharge.Instance.use(player, CUB_TACKLE, smash ? _cooldownSmash : _cooldownNormal, !smash, !smash))
{
return;
}
@ -115,7 +127,7 @@ public class PerkWolf extends SmashPerk
UtilEnt.vegetate(wolf);
wolf.setMaxHealth(WOLF_HEALTH);
wolf.setMaxHealth(_wolfHealth);
wolf.setHealth(wolf.getMaxHealth());
UtilAction.velocity(wolf, player.getLocation().getDirection(), 1.8, false, 0, 0.2, 1.2, true);
@ -152,7 +164,7 @@ public class PerkWolf extends SmashPerk
continue;
}
if (UtilEnt.hitBox(wolf.getLocation(), other, WOLF_HIT_BOX, null))
if (UtilEnt.hitBox(wolf.getLocation(), other, _hitBox, null))
{
if (other.equals(tackleGetOwner(wolf)))
{
@ -166,7 +178,7 @@ public class PerkWolf extends SmashPerk
}
}
if (!wolf.isValid() || (UtilEnt.isGrounded(wolf) && wolf.getTicksLived() > WOLF_MAX_TICKS))
if (!wolf.isValid() || (UtilEnt.isGrounded(wolf) && wolf.getTicksLived() > _maxTicks))
{
wolf.remove();
wolfIterator.remove();
@ -195,7 +207,7 @@ public class PerkWolf extends SmashPerk
UtilAction.zeroVelocity(damagee);
// Damage
Manager.GetDamage().NewDamageEvent(damagee, damager, null, DamageCause.CUSTOM, TACKLE_DAMAGE, false, true, false, damager.getName(), CUB_TACKLE);
Manager.GetDamage().NewDamageEvent(damagee, damager, null, DamageCause.CUSTOM, _tackleDamage, false, true, false, damager.getName(), CUB_TACKLE);
// Sound
damagee.getWorld().playSound(damagee.getLocation(), Sound.WOLF_GROWL, 1.5f, 1.5f);
@ -220,14 +232,14 @@ public class PerkWolf extends SmashPerk
Wolf wolf = wolfIterator.next();
LivingEntity ent = _tackle.get(wolf);
if (!wolf.isValid() || !ent.isValid() || wolf.getTicksLived() > WOLF_MAX_TICKS)
if (!wolf.isValid() || !ent.isValid() || wolf.getTicksLived() > _maxTicks)
{
wolf.remove();
wolfIterator.remove();
continue;
}
if (UtilMath.offset(wolf, ent) < WOLF_HIT_BOX)
if (UtilMath.offset(wolf, ent) < _hitBox)
{
Manager.GetCondition().Factory().Slow(CUB_TACKLE, ent, wolf, 0.9, 1, false, false, false, false);
UtilAction.velocity(ent, new Vector(0, -0.3, 0));
@ -362,7 +374,7 @@ public class PerkWolf extends SmashPerk
continue;
}
if (UtilEnt.hitBox(player.getLocation().add(0, 1, 0), other, WOLF_HIT_BOX, null))
if (UtilEnt.hitBox(player.getLocation().add(0, 1, 0), other, _hitBox, null))
{
strikeHit(player, other);
playerIterator.remove();
@ -404,7 +416,7 @@ public class PerkWolf extends SmashPerk
}
}
Manager.GetDamage().NewDamageEvent(damagee, damager, null, DamageCause.CUSTOM, STRIKE_DAMAGE, true, true, false, damager.getName(), WOLF_STRIKE);
Manager.GetDamage().NewDamageEvent(damagee, damager, null, DamageCause.CUSTOM, _strikeDamage, true, true, false, damager.getName(), WOLF_STRIKE);
// Sound
damagee.getWorld().playSound(damagee.getLocation(), Sound.WOLF_BARK, 1.5f, 1f);

View File

@ -13,11 +13,9 @@ import nautilus.game.arcade.game.games.smash.perks.SmashUltimate;
public class SmashWolf extends SmashUltimate
{
private static final int DURATION = 30000;
public SmashWolf()
{
super("Frenzy", new String[] {}, Sound.WOLF_HOWL, DURATION);
super("Frenzy", new String[] {}, Sound.WOLF_HOWL, 0);
}
@Override