v0.9.1b: fixed various rare errors with fury combo attacks
This commit is contained in:
parent
97c4ac5a66
commit
bf878ee5c4
|
@ -214,21 +214,17 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
||||||
|
|
||||||
AttackIndicator.target(enemy);
|
AttackIndicator.target(enemy);
|
||||||
|
|
||||||
|
boolean wasAlly = enemy.alignment == target.alignment;
|
||||||
|
|
||||||
if (enemy.defenseSkill(target) >= Char.INFINITE_EVASION){
|
if (enemy.defenseSkill(target) >= Char.INFINITE_EVASION){
|
||||||
enemy.sprite.showStatus( CharSprite.NEUTRAL, enemy.defenseVerb() );
|
enemy.sprite.showStatus( CharSprite.NEUTRAL, enemy.defenseVerb() );
|
||||||
Sample.INSTANCE.play(Assets.Sounds.MISS);
|
Sample.INSTANCE.play(Assets.Sounds.MISS);
|
||||||
detach();
|
|
||||||
ActionIndicator.clearAction(Combo.this);
|
|
||||||
((Hero)target).spendAndNext(((Hero)target).attackDelay());
|
|
||||||
return;
|
|
||||||
} else if (enemy.isInvulnerable(target.getClass())){
|
} else if (enemy.isInvulnerable(target.getClass())){
|
||||||
enemy.sprite.showStatus( CharSprite.POSITIVE, Messages.get(Char.class, "invulnerable") );
|
enemy.sprite.showStatus( CharSprite.POSITIVE, Messages.get(Char.class, "invulnerable") );
|
||||||
Sample.INSTANCE.play(Assets.Sounds.MISS);
|
Sample.INSTANCE.play(Assets.Sounds.MISS);
|
||||||
detach();
|
|
||||||
ActionIndicator.clearAction(Combo.this);
|
} else {
|
||||||
((Hero)target).spendAndNext(((Hero)target).attackDelay());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int dmg = target.damageRoll();
|
int dmg = target.damageRoll();
|
||||||
|
|
||||||
|
@ -263,7 +259,6 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
||||||
dmg *= 1.33f;
|
dmg *= 1.33f;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean wasAlly = enemy.alignment == target.alignment;
|
|
||||||
dmg = target.attackProc(enemy, dmg);
|
dmg = target.attackProc(enemy, dmg);
|
||||||
enemy.damage(dmg, target);
|
enemy.damage(dmg, target);
|
||||||
|
|
||||||
|
@ -307,6 +302,8 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
||||||
GLog.i(Messages.capitalize(Messages.get(Char.class, "defeat", enemy.name())));
|
GLog.i(Messages.capitalize(Messages.get(Char.class, "defeat", enemy.name())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Hero hero = (Hero)target;
|
Hero hero = (Hero)target;
|
||||||
|
|
||||||
//Post-attack behaviour
|
//Post-attack behaviour
|
||||||
|
@ -327,7 +324,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
||||||
case FURY:
|
case FURY:
|
||||||
count--;
|
count--;
|
||||||
//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()){
|
if (count > 0 && enemy.isAlive() && (wasAlly || enemy.alignment != target.alignment)){
|
||||||
target.sprite.attack(enemy.pos, new Callback() {
|
target.sprite.attack(enemy.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user