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