v0.5.0: made the loot from traps rooms more consistent with pool rooms
This commit is contained in:
parent
ec35e03875
commit
f6af7951ed
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Room;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Room;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
|
@ -125,25 +126,24 @@ public class TrapsPainter extends Painter {
|
||||||
|
|
||||||
Item prize;
|
Item prize;
|
||||||
|
|
||||||
if (Random.Int(4) != 0){
|
if (Random.Int(3) != 0){
|
||||||
prize = level.findPrizeItem();
|
prize = level.findPrizeItem();
|
||||||
if (prize != null)
|
if (prize != null)
|
||||||
return prize;
|
return prize;
|
||||||
}
|
}
|
||||||
|
|
||||||
prize = Generator.random( Random.oneOf(
|
//1 floor set higher in probability, never cursed
|
||||||
Generator.Category.WEAPON,
|
do {
|
||||||
Generator.Category.ARMOR
|
if (Random.Int(2) == 0) {
|
||||||
) );
|
prize = Generator.randomWeapon((Dungeon.depth / 5) + 1);
|
||||||
|
} else {
|
||||||
for (int i=0; i < 3; i++) {
|
prize = Generator.randomArmor((Dungeon.depth / 5) + 1);
|
||||||
Item another = Generator.random( Random.oneOf(
|
|
||||||
Generator.Category.WEAPON,
|
|
||||||
Generator.Category.ARMOR
|
|
||||||
) );
|
|
||||||
if (another.level() > prize.level()) {
|
|
||||||
prize = another;
|
|
||||||
}
|
}
|
||||||
|
} while (prize.cursed);
|
||||||
|
|
||||||
|
//33% chance for an extra update.
|
||||||
|
if (!(prize instanceof MissileWeapon) && Random.Int(3) == 0){
|
||||||
|
prize.upgrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
return prize;
|
return prize;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user