v1.4.0: gladiator no longer gains combo when targeting allies
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user