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