v3.3.5: fixed an exploit where quitting would cancel fury partway
This commit is contained in:
@@ -93,7 +93,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
|||||||
comboTime = Math.max(comboTime, 5f);
|
comboTime = Math.max(comboTime, 5f);
|
||||||
|
|
||||||
if (!enemy.isAlive() || (enemy.buff(Corruption.class) != null && enemy.HP == enemy.HT)){
|
if (!enemy.isAlive() || (enemy.buff(Corruption.class) != null && enemy.HP == enemy.HT)){
|
||||||
comboTime = 15f + 15f*((Hero)target).pointsInTalent(Talent.CLEAVE);
|
comboTime = 150f + 15f*((Hero)target).pointsInTalent(Talent.CLEAVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
initialComboTime = comboTime;
|
initialComboTime = comboTime;
|
||||||
@@ -336,6 +336,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static ComboMove moveBeingUsed;
|
private static ComboMove moveBeingUsed;
|
||||||
|
private static int furyHitsLeft = 0;
|
||||||
|
|
||||||
private void doAttack(final Char enemy) {
|
private void doAttack(final Char enemy) {
|
||||||
|
|
||||||
@@ -437,9 +438,14 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FURY:
|
case FURY:
|
||||||
count--;
|
if (count > 0){
|
||||||
|
furyHitsLeft = count;
|
||||||
|
count = 0;
|
||||||
|
hero.spend(hero.attackDelay());
|
||||||
|
}
|
||||||
|
furyHitsLeft--;
|
||||||
//fury attacks as many times as you have combo count
|
//fury attacks as many times as you have combo count
|
||||||
if (count > 0 && enemy.isAlive() && hero.canAttack(enemy) &&
|
if (furyHitsLeft > 0 && enemy.isAlive() && hero.canAttack(enemy) &&
|
||||||
(wasAlly || enemy.alignment != target.alignment)){
|
(wasAlly || enemy.alignment != target.alignment)){
|
||||||
target.sprite.attack(enemy.pos, new Callback() {
|
target.sprite.attack(enemy.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
@@ -448,10 +454,11 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
furyHitsLeft = 0;
|
||||||
detach();
|
detach();
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
ActionIndicator.clearAction(Combo.this);
|
ActionIndicator.clearAction(Combo.this);
|
||||||
hero.spendAndNext(hero.attackDelay());
|
hero.next();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user