diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java index c25435d18..bad78d6f5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java @@ -324,7 +324,7 @@ public class Combo extends Buff implements ActionIndicator.Action { //special on-hit effects switch (moveBeingUsed) { case CLOBBER: - hit(enemy); + if (!wasAlly) hit(enemy); //trace a ballistica to our target (which will also extend past them Ballistica trajectory = new Ballistica(target.pos, enemy.pos, Ballistica.STOP_TARGET); //trim it to just be the part that goes past them diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 062b9c00f..4c6b31288 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -431,6 +431,7 @@ public class Hero extends Char { public boolean shoot( Char enemy, MissileWeapon wep ) { this.enemy = enemy; + boolean wasEnemy = enemy.alignment == Alignment.ENEMY; //temporarily set the hero's weapon to the missile weapon being used //TODO improve this! @@ -438,8 +439,8 @@ public class Hero extends Char { boolean hit = attack( enemy ); Invisibility.dispel(); belongings.thrownWeapon = null; - - if (hit && subClass == HeroSubClass.GLADIATOR){ + + if (hit && subClass == HeroSubClass.GLADIATOR && wasEnemy){ Buff.affect( this, Combo.class ).hit( enemy ); } @@ -1849,13 +1850,14 @@ public class Hero extends Char { public void onAttackComplete() { AttackIndicator.target(enemy); - + boolean wasEnemy = enemy.alignment == Alignment.ENEMY; + boolean hit = attack( enemy ); Invisibility.dispel(); spend( attackDelay() ); - if (hit && subClass == HeroSubClass.GLADIATOR){ + if (hit && subClass == HeroSubClass.GLADIATOR && wasEnemy){ Buff.affect( this, Combo.class ).hit( enemy ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java index 2ceb46f9d..047821183 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java @@ -122,9 +122,10 @@ public class Shockwave extends ArmorAbility { } if (Random.Int(10) < 3*hero.pointsInTalent(Talent.STRIKING_WAVE)){ + boolean wasEnemy = ch.alignment == Char.Alignment.ENEMY; damage = hero.attackProc(ch, damage); ch.damage(damage, hero); - if (hero.subClass == HeroSubClass.GLADIATOR){ + if (hero.subClass == HeroSubClass.GLADIATOR && wasEnemy){ Buff.affect( hero, Combo.class ).hit( ch ); } } else {