feat: disable invuln for plugin damage + DamageUtil + DiamondTri/Barrage/Overhead nerf
This commit is contained in:
@@ -196,11 +196,11 @@ public class LungeAttack {
|
||||
p.sendActionBar(Component.text("Look at ground within 120 blocks!").color(NamedTextColor.RED));
|
||||
return false;
|
||||
}
|
||||
if (tension.getTP(p) < 50f) {
|
||||
p.sendActionBar(Component.text("Need 20% TP").color(NamedTextColor.RED));
|
||||
if (tension.getTP(p) < 62.5f) {
|
||||
p.sendActionBar(Component.text("Need 25% TP").color(NamedTextColor.RED));
|
||||
return false;
|
||||
}
|
||||
tension.setTP(p, tension.getTP(p) - 50f);
|
||||
tension.setTP(p, tension.getTP(p) - 62.5f);
|
||||
BlackKnifePlugin plugin = BlackKnifePlugin.getPlugin(BlackKnifePlugin.class);
|
||||
Location above = gazePoint.clone().add(0, 10, 0);
|
||||
BlockDisplay sword = p.getWorld().spawn(above, BlockDisplay.class, d -> {
|
||||
@@ -213,13 +213,22 @@ public class LungeAttack {
|
||||
new org.joml.Vector3f(1.5f, 1.5f, 1.5f),
|
||||
new org.joml.AxisAngle4f()));
|
||||
});
|
||||
EntityTracker.mark(sword);
|
||||
p.getWorld().playSound(gazePoint, Sound.ENTITY_PLAYER_ATTACK_SWEEP, 1f, 0.5f);
|
||||
p.getWorld().playSound(gazePoint, Sound.BLOCK_ANVIL_LAND, 0.6f, 1.4f);
|
||||
Vector vel = new Vector(0, -1.8, 0);
|
||||
Vector vel = new Vector(0, -1.2, 0);
|
||||
new BukkitRunnable() {
|
||||
int hold = 8;
|
||||
@Override public void run() {
|
||||
if (!sword.isValid()) { cancel(); return; }
|
||||
Location cur = sword.getLocation();
|
||||
if (hold > 0) {
|
||||
hold--;
|
||||
cur.getWorld().spawnParticle(Particle.SMOKE, cur, 2, 0.15, 0.15, 0.15, 0);
|
||||
cur.getWorld().spawnParticle(Particle.SCULK_SOUL, cur, 1, 0.05, 0.05, 0.05, 0);
|
||||
cur.getWorld().spawnParticle(Particle.ASH, cur, 1, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
Location nl = cur.clone().add(vel);
|
||||
sword.teleport(nl);
|
||||
nl.getWorld().spawnParticle(Particle.DUST, nl, 2, 0.15, 0.15, 0.15, 0, new Particle.DustOptions(Color.fromRGB(0, 0, 0), 1.5f));
|
||||
@@ -265,6 +274,7 @@ public class LungeAttack {
|
||||
if (ent instanceof Player pl && pl.isBlocking()) amount /= 2.5;
|
||||
ent.getPersistentDataContainer().set(SwoonHandler.MAGIC_DAMAGE, PersistentDataType.BYTE, (byte) 1);
|
||||
ent.damage(amount, attacker);
|
||||
ent.setNoDamageTicks(0);
|
||||
}
|
||||
|
||||
private static void startPhase1(Player p, Location epicenter, LivingEntity target, BlackKnifePlugin plugin) {
|
||||
|
||||
Reference in New Issue
Block a user