v2.0.0: fixed weapon abilities targeting after hit instead of before
This commit is contained in:
@@ -206,6 +206,7 @@ public class Pickaxe extends MeleeWeapon {
|
||||
damageMulti = 2f;
|
||||
}
|
||||
beforeAbilityUsed(hero);
|
||||
AttackIndicator.target(enemy);
|
||||
if (hero.attack(enemy, damageMulti, 0, Char.INFINITE_ACCURACY)) {
|
||||
if (enemy.isAlive()) {
|
||||
Buff.affect(enemy, Vulnerable.class, 3f);
|
||||
@@ -214,7 +215,6 @@ public class Pickaxe extends MeleeWeapon {
|
||||
}
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||
}
|
||||
AttackIndicator.target(enemy);
|
||||
hero.spendAndNext(hero.attackDelay());
|
||||
Invisibility.dispel();
|
||||
afterAbilityUsed(hero);
|
||||
|
||||
@@ -88,13 +88,13 @@ public class Greataxe extends MeleeWeapon {
|
||||
@Override
|
||||
public void call() {
|
||||
beforeAbilityUsed(hero);
|
||||
AttackIndicator.target(enemy);
|
||||
if (hero.attack(enemy, 1.35f, 0, Char.INFINITE_ACCURACY)){
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||
if (!enemy.isAlive()){
|
||||
onAbilityKill(hero);
|
||||
}
|
||||
}
|
||||
AttackIndicator.target(enemy);
|
||||
hero.spendAndNext(hero.attackDelay());
|
||||
Invisibility.dispel();
|
||||
afterAbilityUsed(hero);
|
||||
|
||||
@@ -85,6 +85,7 @@ public class Mace extends MeleeWeapon {
|
||||
@Override
|
||||
public void call() {
|
||||
wep.beforeAbilityUsed(hero);
|
||||
AttackIndicator.target(enemy);
|
||||
if (hero.attack(enemy, dmgMulti, 0, 0.25f)) {
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||
if (enemy.isAlive()){
|
||||
@@ -93,7 +94,6 @@ public class Mace extends MeleeWeapon {
|
||||
wep.onAbilityKill(hero);
|
||||
}
|
||||
}
|
||||
AttackIndicator.target(enemy);
|
||||
hero.spendAndNext(hero.attackDelay());
|
||||
Invisibility.dispel();
|
||||
wep.afterAbilityUsed(hero);
|
||||
|
||||
@@ -110,13 +110,13 @@ public class Rapier extends MeleeWeapon {
|
||||
public void call() {
|
||||
//+3+lvl damage, equivalent to +67% damage, but more consistent
|
||||
beforeAbilityUsed(hero);
|
||||
AttackIndicator.target(enemy);
|
||||
if (hero.attack(enemy, 1f, augment.damageFactor(3 + level()), Char.INFINITE_ACCURACY)){
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||
if (!enemy.isAlive()){
|
||||
onAbilityKill(hero);
|
||||
}
|
||||
}
|
||||
AttackIndicator.target(enemy);
|
||||
hero.spendAndNext(hero.attackDelay());
|
||||
Invisibility.dispel();
|
||||
afterAbilityUsed(hero);
|
||||
|
||||
@@ -86,6 +86,7 @@ public class RunicBlade extends MeleeWeapon {
|
||||
@Override
|
||||
public void call() {
|
||||
beforeAbilityUsed(hero);
|
||||
AttackIndicator.target(enemy);
|
||||
if (hero.attack(enemy, 1f, 0, Char.INFINITE_ACCURACY)){
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||
if (!enemy.isAlive()){
|
||||
@@ -93,7 +94,6 @@ public class RunicBlade extends MeleeWeapon {
|
||||
}
|
||||
}
|
||||
tracker.detach();
|
||||
AttackIndicator.target(enemy);
|
||||
hero.spendAndNext(hero.attackDelay());
|
||||
Invisibility.dispel();
|
||||
afterAbilityUsed(hero);
|
||||
|
||||
@@ -87,6 +87,7 @@ public class Sai extends MeleeWeapon {
|
||||
@Override
|
||||
public void call() {
|
||||
wep.beforeAbilityUsed(hero);
|
||||
AttackIndicator.target(enemy);
|
||||
boolean hit = hero.attack(enemy, 1, 0, Char.INFINITE_ACCURACY);
|
||||
if (hit && !enemy.isAlive()){
|
||||
wep.onAbilityKill(hero);
|
||||
@@ -100,7 +101,6 @@ public class Sai extends MeleeWeapon {
|
||||
}
|
||||
}
|
||||
|
||||
AttackIndicator.target(enemy);
|
||||
if (recentHits >= 2 && hit){
|
||||
for (Buff b : buffs){
|
||||
b.detach();
|
||||
|
||||
@@ -87,6 +87,7 @@ public class Spear extends MeleeWeapon {
|
||||
@Override
|
||||
public void call() {
|
||||
wep.beforeAbilityUsed(hero);
|
||||
AttackIndicator.target(enemy);
|
||||
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)) {
|
||||
if (enemy.isAlive()){
|
||||
//trace a ballistica to our target (which will also extend past them
|
||||
@@ -100,7 +101,6 @@ public class Spear extends MeleeWeapon {
|
||||
}
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||
}
|
||||
AttackIndicator.target(enemy);
|
||||
hero.spendAndNext(hero.attackDelay());
|
||||
Invisibility.dispel();
|
||||
wep.afterAbilityUsed(hero);
|
||||
|
||||
@@ -88,11 +88,11 @@ public class Sword extends MeleeWeapon {
|
||||
@Override
|
||||
public void call() {
|
||||
wep.beforeAbilityUsed(hero);
|
||||
AttackIndicator.target(enemy);
|
||||
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)){
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||
}
|
||||
|
||||
AttackIndicator.target(enemy);
|
||||
hero.spendAndNext(hero.attackDelay());
|
||||
if (!enemy.isAlive()){
|
||||
wep.onAbilityKill(hero);
|
||||
|
||||
Reference in New Issue
Block a user