v0.2.4: tweaked item generation: treasuries spawn a bit more gold, bombs are in armories, and honeypots are in shortages.
This commit is contained in:
parent
72975a49cc
commit
dded8b5dc4
|
@ -103,7 +103,7 @@ public class Gold extends Item {
|
|||
|
||||
@Override
|
||||
public Item random() {
|
||||
quantity = Random.Int( 20 + Dungeon.depth * 10, 40 + Dungeon.depth * 20 );
|
||||
quantity = Random.Int( 30 + Dungeon.depth * 10, 60 + Dungeon.depth * 20 );
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels.painters;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Bomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey;
|
||||
|
@ -63,9 +64,11 @@ public class ArmoryPainter extends Painter {
|
|||
}
|
||||
|
||||
private static Item prize( Level level ) {
|
||||
return Generator.random( Random.oneOf(
|
||||
Generator.Category.ARMOR,
|
||||
Generator.Category.WEAPON
|
||||
) );
|
||||
return Random.Int( 6 ) == 0 ?
|
||||
new Bomb().random() :
|
||||
Generator.random( Random.oneOf(
|
||||
Generator.Category.ARMOR,
|
||||
Generator.Category.WEAPON
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels.painters;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
|
@ -33,6 +34,8 @@ public class StoragePainter extends Painter {
|
|||
|
||||
fill( level, room, Terrain.WALL );
|
||||
fill( level, room, 1, floor );
|
||||
|
||||
boolean honeyPot = Random.Int( 2 ) == 0;
|
||||
|
||||
int n = Random.IntRange( 3, 4 );
|
||||
for (int i=0; i < n; i++) {
|
||||
|
@ -40,7 +43,11 @@ public class StoragePainter extends Painter {
|
|||
do {
|
||||
pos = room.random();
|
||||
} while (level.map[pos] != floor);
|
||||
level.drop( prize( level ), pos );
|
||||
if (honeyPot){
|
||||
level.drop( new Honeypot(), pos);
|
||||
honeyPot = false;
|
||||
} else
|
||||
level.drop( prize( level ), pos );
|
||||
}
|
||||
|
||||
room.entrance().set( Room.Door.Type.BARRICADE );
|
||||
|
|
|
@ -52,7 +52,7 @@ public class TreasuryPainter extends Painter {
|
|||
do {
|
||||
pos = room.random();
|
||||
} while (level.map[pos] != Terrain.EMPTY);
|
||||
level.drop( new Gold( Random.IntRange( 1, 3 ) ), pos );
|
||||
level.drop( new Gold( Random.IntRange( 5, 12 ) ), pos );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user