v0.3.4: reworked rankings to store their cause instead of a result string
This commit is contained in:
committed by
Evan Debenham
parent
0e2fbc05fb
commit
ac967fad27
@@ -59,7 +59,7 @@ public class Chasm {
|
||||
jumpConfirmed = true;
|
||||
hero.resume();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class Chasm {
|
||||
public void onDeath() {
|
||||
Badges.validateDeathFromFalling();
|
||||
|
||||
Dungeon.fail( ResultDescriptions.FALL );
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(Chasm.class, "ondeath") );
|
||||
}
|
||||
} );
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ChillingTrap extends Trap{
|
||||
Chill.prolong(ch, Chill.class, 5f + Random.Int(Dungeon.depth));
|
||||
ch.damage(Random.NormalIntRange(1 , Dungeon.depth), this);
|
||||
if (!ch.isAlive() && ch == Dungeon.hero){
|
||||
Dungeon.fail( Utils.format(ResultDescriptions.TRAP, name) );
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class DisintegrationTrap extends Trap {
|
||||
if (ch == Dungeon.hero){
|
||||
Hero hero = (Hero)ch;
|
||||
if (!hero.isAlive()){
|
||||
Dungeon.fail(Utils.format(ResultDescriptions.TRAP, name));
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
} else {
|
||||
Item item = hero.belongings.randomUnequipped();
|
||||
|
||||
@@ -59,7 +59,7 @@ public class FrostTrap extends Trap {
|
||||
ch.damage(Random.NormalIntRange(1 , Dungeon.depth), this);
|
||||
Chill.prolong(ch, Frost.class, 10f + Random.Int(Dungeon.depth));
|
||||
if (!ch.isAlive() && ch == Dungeon.hero){
|
||||
Dungeon.fail( Utils.format(ResultDescriptions.TRAP, name) );
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class GrimTrap extends Trap {
|
||||
}
|
||||
Sample.INSTANCE.play(Assets.SND_CURSED);
|
||||
if (!finalTarget.isAlive()) {
|
||||
Dungeon.fail(Utils.format(ResultDescriptions.TRAP, name));
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -61,7 +61,7 @@ public class LightningTrap extends Trap {
|
||||
Camera.main.shake( 2, 0.3f );
|
||||
|
||||
if (!ch.isAlive()) {
|
||||
Dungeon.fail( Utils.format( ResultDescriptions.TRAP, name ) );
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class RockfallTrap extends Trap {
|
||||
Buff.prolong( ch, Paralysis.class, Paralysis.duration(ch)*2);
|
||||
|
||||
if (!ch.isAlive() && ch == Dungeon.hero){
|
||||
Dungeon.fail(Utils.format(ResultDescriptions.TRAP, name));
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class SpearTrap extends Trap {
|
||||
damage -= Random.IntRange( 0, ch.dr());
|
||||
ch.damage( Math.max(damage, 0) , this);
|
||||
if (!ch.isAlive() && ch == Dungeon.hero){
|
||||
Dungeon.fail(Utils.format(ResultDescriptions.TRAP, name));
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user