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