From 99fa347cf16c226ce9455e3f055873091efdc60e Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 24 Apr 2017 20:21:19 +0100 Subject: [PATCH] Wolf converted to Google Sheets --- .../arcade/game/games/smash/kits/KitWolf.java | 4 +- .../game/games/smash/perks/wolf/PerkWolf.java | 44 ++++++++++++------- .../games/smash/perks/wolf/SmashWolf.java | 4 +- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWolf.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWolf.java index 0de6382fa..50907a773 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWolf.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitWolf.java @@ -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() }; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/wolf/PerkWolf.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/wolf/PerkWolf.java index a5968ac4e..a52cb5c02 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/wolf/PerkWolf.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/wolf/PerkWolf.java @@ -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); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/wolf/SmashWolf.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/wolf/SmashWolf.java index eee6b9ca7..52d88a686 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/wolf/SmashWolf.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/wolf/SmashWolf.java @@ -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