Witch converted to Google Sheets
This commit is contained in:
parent
044a3754cf
commit
af25aa0b00
@ -25,8 +25,8 @@ public class KitWitch extends SmashKit
|
||||
{
|
||||
|
||||
private static final Perk[] PERKS = {
|
||||
new PerkSmashStats(6, 1.5, 0.3, 5),
|
||||
new PerkDoubleJump("Double Jump", 0.9, 0.9, false),
|
||||
new PerkSmashStats(),
|
||||
new PerkDoubleJump("Double Jump"),
|
||||
new PerkWitchPotion(),
|
||||
new PerkBatWave(),
|
||||
new SmashWitch()
|
||||
|
@ -45,13 +45,14 @@ import nautilus.game.arcade.game.games.smash.perks.SmashPerk;
|
||||
public class PerkBatWave extends SmashPerk
|
||||
{
|
||||
|
||||
private static final int COOLDOWN = 8000;
|
||||
private static final int LEASH_COOLDOWN = 500;
|
||||
private static final int HIT_COOLDOWN = 200;
|
||||
private static final int HIT_BOX = 2;
|
||||
private static final int DAMAGE = 3;
|
||||
private static final int DISABLE_DAMAGE = 20;
|
||||
private static final float KNOCKBACK_MAGNITUDE = 1.75F;
|
||||
|
||||
private int _cooldown;
|
||||
private int _hitCooldown;
|
||||
private int _hitBox;
|
||||
private int _damage;
|
||||
private int _disableDamage;
|
||||
private float _knockbackMagnitude;
|
||||
|
||||
private static final String LEASH = "Leash Bats";
|
||||
private static final String HIT = "Hit By Bat";
|
||||
@ -69,6 +70,17 @@ public class PerkBatWave extends SmashPerk
|
||||
+ C.cGreen + "Bat Leash" });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupValues()
|
||||
{
|
||||
_cooldown = getPerkTime("Cooldown");
|
||||
_hitCooldown = getPerkInt("Hit Cooldown (ms)");
|
||||
_hitBox = getPerkInt("Hit Box");
|
||||
_damage = getPerkInt("Damage");
|
||||
_disableDamage = getPerkInt("Disable Damage");
|
||||
_knockbackMagnitude = getPerkFloat("Knockback Magnitude");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Activate(PlayerInteractEvent event)
|
||||
{
|
||||
@ -106,7 +118,7 @@ public class PerkBatWave extends SmashPerk
|
||||
|
||||
UUID key = player.getUniqueId();
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName(), COOLDOWN, false, true))
|
||||
if (!Recharge.Instance.use(player, GetName(), _cooldown, false, true))
|
||||
{
|
||||
if (_active.containsKey(key))
|
||||
{
|
||||
@ -138,7 +150,7 @@ public class PerkBatWave extends SmashPerk
|
||||
else
|
||||
{
|
||||
// Inform
|
||||
Recharge.Instance.use(player, GetName(), COOLDOWN, true, true);
|
||||
Recharge.Instance.use(player, GetName(), _cooldown, true, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -219,10 +231,10 @@ public class PerkBatWave extends SmashPerk
|
||||
continue;
|
||||
}
|
||||
|
||||
if (UtilEnt.hitBox(bat.getLocation(), other, HIT_BOX, null))
|
||||
if (UtilEnt.hitBox(bat.getLocation(), other, _hitBox, null))
|
||||
{
|
||||
// Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(other, cur, null, DamageCause.CUSTOM, DAMAGE, true, true, false, cur.getName(), GetName());
|
||||
Manager.GetDamage().NewDamageEvent(other, cur, null, DamageCause.CUSTOM, _damage, true, true, false, cur.getName(), GetName());
|
||||
|
||||
// Effect
|
||||
bat.getWorld().playSound(bat.getLocation(), Sound.BAT_HURT, 1f, 1f);
|
||||
@ -231,7 +243,7 @@ public class PerkBatWave extends SmashPerk
|
||||
bat.remove();
|
||||
|
||||
// Recharge on hit
|
||||
Recharge.Instance.useForce(other, HIT, HIT_COOLDOWN);
|
||||
Recharge.Instance.useForce(other, HIT, _hitCooldown);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -299,7 +311,7 @@ public class PerkBatWave extends SmashPerk
|
||||
{
|
||||
_damageTaken.put(key, (_damageTaken.get(key) + event.GetDamage()));
|
||||
|
||||
if (_damageTaken.get(key) >= DISABLE_DAMAGE)
|
||||
if (_damageTaken.get(key) >= _disableDamage)
|
||||
{
|
||||
Clear(player);
|
||||
}
|
||||
@ -311,6 +323,6 @@ public class PerkBatWave extends SmashPerk
|
||||
return;
|
||||
}
|
||||
|
||||
event.AddKnockback(GetName(), KNOCKBACK_MAGNITUDE);
|
||||
event.AddKnockback(GetName(), _knockbackMagnitude);
|
||||
}
|
||||
}
|
||||
|
@ -40,11 +40,11 @@ import nautilus.game.arcade.game.games.smash.perks.SmashPerk;
|
||||
public class PerkWitchPotion extends SmashPerk implements IThrown
|
||||
{
|
||||
|
||||
private static final int COOLDOWN = 2000;
|
||||
private static final int RANGE_NOMRAL = 3;
|
||||
private static final int DAMAGE_DIRECT = 7;
|
||||
private static final int DAMAGE_DISTANCE = 6;
|
||||
private static final int KNOCKBACK_MAGNITUDE = 2;
|
||||
private int _cooldown;
|
||||
private int _range;
|
||||
private int _damageDirect;
|
||||
private int _damageDistance;
|
||||
private int _knockbackMagnitude;
|
||||
|
||||
private List<Projectile> _proj = new ArrayList<>();
|
||||
|
||||
@ -53,6 +53,16 @@ public class PerkWitchPotion extends SmashPerk implements IThrown
|
||||
super("Daze Potion", new String[] { C.cYellow + "Right-Click" + C.cGray + " with Axe to use " + C.cGreen + "Daze Potion" });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupValues()
|
||||
{
|
||||
_cooldown = getPerkTime("Cooldown");
|
||||
_range = getPerkInt( "Range");
|
||||
_damageDirect = getPerkInt("Damage Direct");
|
||||
_damageDistance = getPerkInt("Damage Distance");
|
||||
_knockbackMagnitude = getPerkInt("Knockback Magnitude");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Activate(PlayerInteractEvent event)
|
||||
{
|
||||
@ -88,7 +98,7 @@ public class PerkWitchPotion extends SmashPerk implements IThrown
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName(), COOLDOWN, true, true))
|
||||
if (!Recharge.Instance.use(player, GetName(), _cooldown, true, true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -137,7 +147,7 @@ public class PerkWitchPotion extends SmashPerk implements IThrown
|
||||
return;
|
||||
}
|
||||
|
||||
event.AddKnockback(GetName(), KNOCKBACK_MAGNITUDE);
|
||||
event.AddKnockback(GetName(), _knockbackMagnitude);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -153,18 +163,18 @@ public class PerkWitchPotion extends SmashPerk implements IThrown
|
||||
|
||||
for (Player player : directHit)
|
||||
{
|
||||
Manager.GetDamage().NewDamageEvent(player, thrower, null, DamageCause.CUSTOM, DAMAGE_DIRECT, true, true, false, thrower.getName(), GetName());
|
||||
Manager.GetDamage().NewDamageEvent(player, thrower, null, DamageCause.CUSTOM, _damageDirect, true, true, false, thrower.getName(), GetName());
|
||||
}
|
||||
|
||||
players.removeAll(directHit);
|
||||
|
||||
Vector a = data.getThrown().getLocation().subtract(RANGE_NOMRAL, RANGE_NOMRAL, RANGE_NOMRAL).toVector();
|
||||
Vector b = data.getThrown().getLocation().add(RANGE_NOMRAL, RANGE_NOMRAL, RANGE_NOMRAL).toVector();
|
||||
Vector a = data.getThrown().getLocation().subtract(_range, _range, _range).toVector();
|
||||
Vector b = data.getThrown().getLocation().add(_range, _range, _range).toVector();
|
||||
for (Player player : players)
|
||||
{
|
||||
if(!UtilEnt.isInsideBoundingBox(player, a, b)) continue;
|
||||
|
||||
Manager.GetDamage().NewDamageEvent(player, thrower, null, DamageCause.CUSTOM, DAMAGE_DISTANCE, true, true, false, thrower.getName(), GetName());
|
||||
Manager.GetDamage().NewDamageEvent(player, thrower, null, DamageCause.CUSTOM, _damageDistance, true, true, false, thrower.getName(), GetName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,20 +43,33 @@ import nautilus.game.arcade.kit.perks.data.SonicBoomData;
|
||||
public class SmashWitch extends SmashUltimate
|
||||
{
|
||||
|
||||
private static final int DURATION = 20000;
|
||||
private static final int COOLDOWN = 1200;
|
||||
private static final int MAX_TIME = 12000;
|
||||
private static final int HIT_BOX = 4;
|
||||
private static final int DAMAGE_RADIUS = 10;
|
||||
private static final int DAMAGE = 12;
|
||||
private static final int FLAP_COOLDOWN = 40;
|
||||
private static final int KNOCKBACK_MAGNITUDE = 2;
|
||||
private int _cooldown;
|
||||
private int _maxTime;
|
||||
private int _hitBox;
|
||||
private int _damageRadius;
|
||||
private int _damage;
|
||||
private int _flapCooldown;
|
||||
private int _knockbackMagnitude;
|
||||
|
||||
private List<SonicBoomData> _sonic = new ArrayList<>();
|
||||
|
||||
public SmashWitch()
|
||||
{
|
||||
super("Bat Form", new String[] {}, Sound.BAT_HURT, DURATION);
|
||||
super("Bat Form", new String[] {}, Sound.BAT_HURT, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupValues()
|
||||
{
|
||||
super.setupValues();
|
||||
|
||||
_cooldown = getPerkInt("Cooldown (ms)");
|
||||
_maxTime = getPerkTime("Max Time");
|
||||
_hitBox = getPerkInt("Hit Box");
|
||||
_damageRadius = getPerkInt("Damage Radius");
|
||||
_damage = getPerkInt("Damage");
|
||||
_flapCooldown = getPerkInt("Flap Cooldown (ms)");
|
||||
_knockbackMagnitude = getPerkInt("Knockback Magnitude");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -148,7 +161,7 @@ public class SmashWitch extends SmashUltimate
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName() + " Screech", COOLDOWN, false, false))
|
||||
if (!Recharge.Instance.use(player, GetName() + " Screech", _cooldown, false, false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -174,7 +187,7 @@ public class SmashWitch extends SmashUltimate
|
||||
SonicBoomData data = sonicIter.next();
|
||||
|
||||
// Time Boom
|
||||
if (UtilTime.elapsed(data.Time, MAX_TIME))
|
||||
if (UtilTime.elapsed(data.Time, _maxTime))
|
||||
{
|
||||
sonicIter.remove();
|
||||
explode(data);
|
||||
@ -202,7 +215,7 @@ public class SmashWitch extends SmashUltimate
|
||||
continue;
|
||||
}
|
||||
|
||||
if (UtilMath.offset(player.getLocation().add(0, 1, 0), data.Location) < HIT_BOX)
|
||||
if (UtilMath.offset(player.getLocation().add(0, 1, 0), data.Location) < _hitBox)
|
||||
{
|
||||
sonicIter.remove();
|
||||
explode(data);
|
||||
@ -226,7 +239,7 @@ public class SmashWitch extends SmashUltimate
|
||||
data.Location.getWorld().playSound(data.Location, Sound.EXPLODE, 1f, 1.5f);
|
||||
|
||||
// Damage
|
||||
Map<LivingEntity, Double> targets = UtilEnt.getInRadius(data.Location, DAMAGE_RADIUS);
|
||||
Map<LivingEntity, Double> targets = UtilEnt.getInRadius(data.Location, _damageRadius);
|
||||
|
||||
for (LivingEntity cur : targets.keySet())
|
||||
{
|
||||
@ -235,7 +248,7 @@ public class SmashWitch extends SmashUltimate
|
||||
continue;
|
||||
}
|
||||
|
||||
Manager.GetDamage().NewDamageEvent(cur, data.Shooter, null, DamageCause.CUSTOM, DAMAGE * targets.get(cur) + 0.5, true, false, false, data.Shooter.getName(), GetName());
|
||||
Manager.GetDamage().NewDamageEvent(cur, data.Shooter, null, DamageCause.CUSTOM, _damage * targets.get(cur) + 0.5, true, false, false, data.Shooter.getName(), GetName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,7 +285,7 @@ public class SmashWitch extends SmashUltimate
|
||||
player.getWorld().playSound(player.getLocation(), Sound.BAT_TAKEOFF, (float) (0.3 + player.getExp()), (float) (Math.random() / 2 + 0.5));
|
||||
|
||||
// Set Recharge
|
||||
Recharge.Instance.use(player, GetName() + " Flap", FLAP_COOLDOWN, false, false);
|
||||
Recharge.Instance.use(player, GetName() + " Flap", _flapCooldown, false, false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -316,6 +329,6 @@ public class SmashWitch extends SmashUltimate
|
||||
return;
|
||||
}
|
||||
|
||||
event.AddKnockback(GetName(), KNOCKBACK_MAGNITUDE);
|
||||
event.AddKnockback(GetName(), _knockbackMagnitude);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user