public static void heroLand() { Hero hero = Dungeon.hero; FeatherFall.FeatherBuff b = hero.buff(FeatherFall.FeatherBuff.class); if (b != null){ //TODO visuals b.detach(); return; } Camera.main.shake( 4, 1f ); Dungeon.level.press( hero.pos, hero, true ); Buff.prolong( hero, Cripple.class, Cripple.DURATION ); //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% 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() { @Override public void onDeath() { Badges.validateDeathFromFalling(); Dungeon.fail( Chasm.class ); GLog.n( Messages.get(Chasm.class, "ondeath") ); } } ); }
public static void heroLand() { Hero hero = Dungeon.hero; FeatherFall.FeatherBuff b = hero.buff(FeatherFall.FeatherBuff.class); if (b != null){ //TODO visuals b.detach(); return; } Camera.main.shake( 4, 1f ); Dungeon.level.press( hero.pos, hero, true ); Buff.prolong( hero, Cripple.class, Cripple.DURATION ); //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% 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() { @Override public void onDeath() { Badges.validateDeathFromFalling(); Dungeon.fail( Chasm.class ); GLog.n( Messages.get(Chasm.class, "ondeath") ); } } ); }