v0.9.1c: fixed death message errors in chasm
This commit is contained in:
parent
72918dbf45
commit
5467883a69
|
@ -48,7 +48,7 @@ import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
public class Chasm {
|
public class Chasm implements Hero.Doom {
|
||||||
|
|
||||||
public static boolean jumpConfirmed = false;
|
public static boolean jumpConfirmed = false;
|
||||||
|
|
||||||
|
@ -100,6 +100,14 @@ public class Chasm {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDeath() {
|
||||||
|
Badges.validateDeathFromFalling();
|
||||||
|
|
||||||
|
Dungeon.fail( Chasm.class );
|
||||||
|
GLog.n( Messages.get(Chasm.class, "ondeath") );
|
||||||
|
}
|
||||||
|
|
||||||
public static void heroLand() {
|
public static void heroLand() {
|
||||||
|
|
||||||
Hero hero = Dungeon.hero;
|
Hero hero = Dungeon.hero;
|
||||||
|
@ -120,15 +128,7 @@ public class Chasm {
|
||||||
//The lower the hero's HP, the more bleed and the less upfront damage.
|
//The lower the hero's HP, the more bleed and the less upfront damage.
|
||||||
//Hero has a 50% chance to bleed out at 66% HP, and begins to risk instant-death at 25%
|
//Hero has a 50% chance to bleed out at 66% HP, and begins to risk instant-death at 25%
|
||||||
Buff.affect( hero, FallBleed.class).set( Math.round(hero.HT / (6f + (6f*(hero.HP/(float)hero.HT)))));
|
Buff.affect( hero, FallBleed.class).set( Math.round(hero.HT / (6f + (6f*(hero.HP/(float)hero.HT)))));
|
||||||
hero.damage( Math.max( hero.HP / 2, Random.NormalIntRange( hero.HP / 2, hero.HT / 4 )), new Hero.Doom() {
|
hero.damage( Math.max( hero.HP / 2, Random.NormalIntRange( hero.HP / 2, hero.HT / 4 )), new Chasm() );
|
||||||
@Override
|
|
||||||
public void onDeath() {
|
|
||||||
Badges.validateDeathFromFalling();
|
|
||||||
|
|
||||||
Dungeon.fail( Chasm.class );
|
|
||||||
GLog.n( Messages.get(Chasm.class, "ondeath") );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void mobFall( Mob mob ) {
|
public static void mobFall( Mob mob ) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user