V0.2.0: Tied artifact drops into rooms
This commit is contained in:
parent
56c1995bff
commit
ad8d15b483
|
@ -56,9 +56,11 @@ public class PitPainter extends Painter {
|
||||||
}
|
}
|
||||||
|
|
||||||
level.drop( new IronKey( Dungeon.depth ), remains ).type = Type.SKELETON;
|
level.drop( new IronKey( Dungeon.depth ), remains ).type = Type.SKELETON;
|
||||||
|
int loot = Random.Int( 3 );
|
||||||
if (Random.Int( 5 ) == 0) {
|
if (loot == 0) {
|
||||||
level.drop( Generator.random( Generator.Category.RING ), remains );
|
level.drop( Generator.random( Generator.Category.RING ), remains );
|
||||||
|
} else if (loot == 1) {
|
||||||
|
level.drop( Generator.random( Generator.Category.ARTIFACT ), remains );
|
||||||
} else {
|
} else {
|
||||||
level.drop( Generator.random( Random.oneOf(
|
level.drop( Generator.random( Random.oneOf(
|
||||||
Generator.Category.WEAPON,
|
Generator.Category.WEAPON,
|
||||||
|
|
|
@ -70,7 +70,8 @@ public class VaultPainter extends Painter {
|
||||||
private static Item prize( Level level ) {
|
private static Item prize( Level level ) {
|
||||||
return Generator.random( Random.oneOf(
|
return Generator.random( Random.oneOf(
|
||||||
Generator.Category.WAND,
|
Generator.Category.WAND,
|
||||||
Generator.Category.RING
|
Generator.Category.RING,
|
||||||
|
Generator.Category.ARTIFACT
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
||||||
import com.watabou.noosa.BitmapTextMultiline;
|
import com.watabou.noosa.BitmapTextMultiline;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap.Type;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap.Type;
|
||||||
|
@ -80,6 +81,9 @@ public class WndInfoItem extends Window {
|
||||||
info = TXT_REMAINS;
|
info = TXT_REMAINS;
|
||||||
} else if (heap.type == Type.CRYSTAL_CHEST) {
|
} else if (heap.type == Type.CRYSTAL_CHEST) {
|
||||||
title = TXT_CRYSTAL_CHEST;
|
title = TXT_CRYSTAL_CHEST;
|
||||||
|
if (heap.peek() instanceof Artifact)
|
||||||
|
info = Utils.format( TXT_INSIDE, "an artifact" );
|
||||||
|
else
|
||||||
info = Utils.format( TXT_INSIDE, Utils.indefinite( heap.peek().name() ) );
|
info = Utils.format( TXT_INSIDE, Utils.indefinite( heap.peek().name() ) );
|
||||||
} else {
|
} else {
|
||||||
title = TXT_LOCKED_CHEST;
|
title = TXT_LOCKED_CHEST;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user