v0.9.3: standardized knockback effects to always work on dead chars
This commit is contained in:
parent
8d526cb50e
commit
9a52b49467
|
@ -331,14 +331,13 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
|||
switch (moveBeingUsed) {
|
||||
case CLOBBER:
|
||||
hit( enemy );
|
||||
if (enemy.isAlive()) {
|
||||
//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
|
||||
trajectory = new Ballistica(trajectory.collisionPos, trajectory.path.get(trajectory.path.size() - 1), Ballistica.PROJECTILE);
|
||||
//knock them back along that ballistica, ensuring they don't fall into a pit
|
||||
int dist = 2;
|
||||
if (count >= 7 && hero.pointsInTalent(Talent.ENHANCED_COMBO) >= 1){
|
||||
if (enemy.isAlive() && count >= 7 && hero.pointsInTalent(Talent.ENHANCED_COMBO) >= 1){
|
||||
dist ++;
|
||||
Buff.prolong(enemy, Vertigo.class, 3);
|
||||
} else if (!enemy.flying) {
|
||||
|
@ -348,7 +347,6 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
|||
}
|
||||
}
|
||||
WandOfBlastWave.throwChar(enemy, trajectory, dist, true, false);
|
||||
}
|
||||
break;
|
||||
case PARRY:
|
||||
hit( enemy );
|
||||
|
|
|
@ -88,7 +88,9 @@ public class WandOfBlastWave extends DamageWand {
|
|||
Ballistica trajectory = new Ballistica(ch.pos, ch.pos + i, Ballistica.MAGIC_BOLT);
|
||||
int strength = 1 + Math.round(buffedLvl() / 2f);
|
||||
throwChar(ch, trajectory, strength, false);
|
||||
} else if (ch == Dungeon.hero){
|
||||
}
|
||||
|
||||
if (ch == Dungeon.hero){
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get( this, "ondeath") );
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ public class Chasm implements Hero.Doom {
|
|||
public static void mobFall( Mob mob ) {
|
||||
if (mob.isAlive()) mob.die( Chasm.class );
|
||||
|
||||
((MobSprite)mob.sprite).fall();
|
||||
if (mob.sprite != null) ((MobSprite)mob.sprite).fall();
|
||||
}
|
||||
|
||||
public static class Falling extends Buff {
|
||||
|
|
Loading…
Reference in New Issue
Block a user