Spider converted to Google Sheets
This commit is contained in:
parent
1d7fb77bc4
commit
43d703d9b7
@ -29,8 +29,8 @@ import java.util.function.Function;
|
||||
public class SuperSmashTraining extends SuperSmash
|
||||
{
|
||||
|
||||
private static final long GAME_TIME = TimeUnit.MINUTES.toMillis(3);
|
||||
private static final long GAME_WARN_TIME = GAME_TIME - TimeUnit.MINUTES.toMillis(1);
|
||||
private static final long GAME_TIME = TimeUnit.HOURS.toMillis(3);
|
||||
private static final long GAME_WARN_TIME = GAME_TIME - TimeUnit.MINUTES.toMillis(5);
|
||||
private static final String[] INFO_HOLOGRAM = {
|
||||
C.cYellow + "Select a " + C.cGreen + "Kit",
|
||||
C.cYellow + "Jump off the island to use your abilities",
|
||||
|
@ -26,7 +26,7 @@ public class KitSpider extends SmashKit
|
||||
{
|
||||
|
||||
private static final Perk[] PERKS = {
|
||||
new PerkSmashStats(6, 1.5, 0.25, 6),
|
||||
new PerkSmashStats(),
|
||||
new PerkSpiderLeap(),
|
||||
new PerkNeedler(),
|
||||
new PerkWebShot(),
|
||||
|
@ -31,10 +31,10 @@ import nautilus.game.arcade.game.games.smash.perks.SmashPerk;
|
||||
public class PerkNeedler extends SmashPerk
|
||||
{
|
||||
|
||||
private static final int COOLDOWN_NORMAL = 2000;
|
||||
private static final int COOLDOWN_SMASH = 600;
|
||||
private static final float DAMAGE = 1.1F;
|
||||
private static final int MAX_TICKS = 300;
|
||||
private long _cooldownNormal;
|
||||
private long _cooldownSmash;
|
||||
private double _damage;
|
||||
private int _maxTicks;
|
||||
|
||||
private Map<UUID, Integer> _active = new HashMap<>();
|
||||
private Set<Arrow> _arrows = new HashSet<>();
|
||||
@ -44,6 +44,15 @@ public class PerkNeedler extends SmashPerk
|
||||
super("Needler", new String[] { C.cYellow + "Hold Block" + C.cGray + " to use " + C.cGreen + "Needler" });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupValues()
|
||||
{
|
||||
_cooldownNormal = getPerkTime("Cooldown Normal");
|
||||
_cooldownSmash = getPerkInt("Cooldown Smash (ms)");
|
||||
_damage = getPerkDouble("Damage");
|
||||
_maxTicks = getPerkInt("Max Ticks");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Activate(PlayerInteractEvent event)
|
||||
{
|
||||
@ -74,7 +83,7 @@ public class PerkNeedler extends SmashPerk
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName(), isSuperActive(player) ? COOLDOWN_SMASH : COOLDOWN_NORMAL, !isSuperActive(player), !isSuperActive(player)))
|
||||
if (!Recharge.Instance.use(player, GetName(), isSuperActive(player) ? _cooldownSmash : _cooldownNormal, !isSuperActive(player), !isSuperActive(player)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -156,7 +165,7 @@ public class PerkNeedler extends SmashPerk
|
||||
event.GetProjectile().remove();
|
||||
|
||||
// Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(event.GetDamageeEntity(), damager, null, DamageCause.THORNS, DAMAGE, true, true, false, damager.getName(), GetName());
|
||||
Manager.GetDamage().NewDamageEvent(event.GetDamageeEntity(), damager, null, DamageCause.THORNS, _damage, true, true, false, damager.getName(), GetName());
|
||||
|
||||
if (!isTeamDamage(damager, event.GetDamageePlayer()))
|
||||
{
|
||||
@ -176,7 +185,7 @@ public class PerkNeedler extends SmashPerk
|
||||
{
|
||||
Arrow arrow = arrowIterator.next();
|
||||
|
||||
if (arrow.isOnGround() || !arrow.isValid() || arrow.getTicksLived() > MAX_TICKS)
|
||||
if (arrow.isOnGround() || !arrow.isValid() || arrow.getTicksLived() > _maxTicks)
|
||||
{
|
||||
arrowIterator.remove();
|
||||
arrow.remove();
|
||||
|
@ -26,8 +26,8 @@ import nautilus.game.arcade.kit.Perk;
|
||||
public class PerkSpiderLeap extends Perk
|
||||
{
|
||||
|
||||
private static final float ENERGY_PER_TICK = 0.005F;
|
||||
private static final float ENERGY_PER_LEAP = 0.17F;
|
||||
private float _energyTick;
|
||||
private float _energyJump;
|
||||
|
||||
private Set<UUID> _secondJump = new HashSet<>();
|
||||
private Set<UUID> _finalJump = new HashSet<>();
|
||||
@ -38,6 +38,13 @@ public class PerkSpiderLeap extends Perk
|
||||
+ "Wall Climb requires Energy (Experience Bar)." });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupValues()
|
||||
{
|
||||
_energyTick = getPerkFloat("Energy Per Tick");
|
||||
_energyJump = getPerkFloat("Energy Per Jump");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WallClimb(UpdateEvent event)
|
||||
{
|
||||
@ -62,19 +69,19 @@ public class PerkSpiderLeap extends Perk
|
||||
_secondJump.remove(player.getUniqueId());
|
||||
}
|
||||
|
||||
player.setExp(Math.min(0.999F, player.getExp() + (grounded ? ENERGY_PER_TICK * 2 : ENERGY_PER_TICK)));
|
||||
player.setExp(Math.min(0.999F, player.getExp() + (grounded ? _energyTick * 2 : _energyTick)));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
player.setExp(Math.max(0, player.getExp() - ENERGY_PER_TICK));
|
||||
player.setExp(Math.max(0, player.getExp() - _energyTick));
|
||||
|
||||
if (player.getExp() <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (player.getExp() >= ENERGY_PER_LEAP)
|
||||
if (player.getExp() >= _energyJump)
|
||||
{
|
||||
_finalJump.remove(player.getUniqueId());
|
||||
}
|
||||
@ -116,7 +123,7 @@ public class PerkSpiderLeap extends Perk
|
||||
// Disable Flight
|
||||
player.setAllowFlight(false);
|
||||
|
||||
if (player.getExp() < ENERGY_PER_LEAP)
|
||||
if (player.getExp() < _energyJump)
|
||||
{
|
||||
if (!_finalJump.contains(player.getUniqueId()))
|
||||
{
|
||||
@ -132,7 +139,7 @@ public class PerkSpiderLeap extends Perk
|
||||
UtilAction.velocity(player, 1.0, 0.2, 1.0, true);
|
||||
|
||||
// Energy
|
||||
player.setExp(Math.max(0, player.getExp() - ENERGY_PER_LEAP));
|
||||
player.setExp(Math.max(0, player.getExp() - _energyJump));
|
||||
|
||||
// Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.SPIDER_IDLE, 1f, 1.5f);
|
||||
|
@ -30,15 +30,23 @@ import nautilus.game.arcade.game.games.smash.perks.SmashPerk;
|
||||
public class PerkWebShot extends SmashPerk implements IThrown
|
||||
{
|
||||
|
||||
private static final int COOLDOWN_NORMAL = 10000;
|
||||
private static final int COOLDOWN_SMASH = 1000;
|
||||
private static final int WEBS = 20;
|
||||
private int _cooldownNormal = 10000;
|
||||
private int _cooldownSmash = 1000;
|
||||
private int _webs = 20;
|
||||
|
||||
public PerkWebShot()
|
||||
{
|
||||
super("Spin Web", new String[] { C.cYellow + "Right-Click" + C.cGray + " with Axe to use " + C.cGreen + "Spin Web" });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupValues()
|
||||
{
|
||||
_cooldownNormal = getPerkTime("Cooldown Normal");
|
||||
_cooldownSmash = getPerkTime("Cooldown Smash");
|
||||
_webs = getPerkInt("Webs");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void ShootWeb(PlayerInteractEvent event)
|
||||
{
|
||||
@ -69,7 +77,7 @@ public class PerkWebShot extends SmashPerk implements IThrown
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName(), isSuperActive(player) ? COOLDOWN_SMASH : COOLDOWN_NORMAL, !isSuperActive(player), !isSuperActive(player)))
|
||||
if (!Recharge.Instance.use(player, GetName(), isSuperActive(player) ? _cooldownSmash : _cooldownNormal, !isSuperActive(player), !isSuperActive(player)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -79,7 +87,7 @@ public class PerkWebShot extends SmashPerk implements IThrown
|
||||
// Boost
|
||||
UtilAction.velocity(player, 1.2, 0.2, 1.2, true);
|
||||
|
||||
for (int i = 0; i < WEBS; i++)
|
||||
for (int i = 0; i < _webs; i++)
|
||||
{
|
||||
Item ent = player.getWorld().dropItem(player.getLocation().add(0, 0.5, 0), ItemStackFactory.Instance.CreateStack(Material.WEB, (byte) 0, 1, "Web " + player.getName() + " " + i));
|
||||
|
||||
|
@ -22,13 +22,11 @@ import nautilus.game.arcade.game.games.smash.perks.SmashUltimate;
|
||||
|
||||
public class SmashSpider extends SmashUltimate
|
||||
{
|
||||
private static final int DURATION = 30000;
|
||||
|
||||
private Map<LivingEntity, Double> _preHealth = new HashMap<>();
|
||||
|
||||
public SmashSpider()
|
||||
{
|
||||
super("Spider Nest", new String[] {}, Sound.SPIDER_DEATH, DURATION);
|
||||
super("Spider Nest", new String[] {}, Sound.SPIDER_DEATH, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -61,11 +59,11 @@ public class SmashSpider extends SmashUltimate
|
||||
continue;
|
||||
}
|
||||
|
||||
Manager.GetBlockRestore().add(block, 30, (byte) 0, (int) (DURATION + 5000 * Math.random()));
|
||||
Manager.GetBlockRestore().add(block, 30, (byte) 0, (int) (getLength() + 5000 * Math.random()));
|
||||
}
|
||||
|
||||
// Regen
|
||||
Manager.GetCondition().Factory().Regen(GetName(), player, player, DURATION / 1000, 2, false, false, false);
|
||||
Manager.GetCondition().Factory().Regen(GetName(), player, player, getLength() / 1000, 2, false, false, false);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
Loading…
Reference in New Issue
Block a user