v0.4.1: adjusted the ring of wealth, no longer generates extra progression items

This commit is contained in:
Evan Debenham 2016-07-05 03:56:08 -04:00 committed by Evan Debenham
parent 23900da5c9
commit 40f5797509

View File

@ -198,27 +198,30 @@ public abstract class Level implements Bundlable {
if (!(Dungeon.bossLevel() || Dungeon.depth == 21) /*final shop floor*/) { if (!(Dungeon.bossLevel() || Dungeon.depth == 21) /*final shop floor*/) {
addItemToSpawn( Generator.random( Generator.Category.FOOD ) ); addItemToSpawn( Generator.random( Generator.Category.FOOD ) );
int bonus = RingOfWealth.getBonus(Dungeon.hero, RingOfWealth.Wealth.class);
if (Dungeon.posNeeded()) { if (Dungeon.posNeeded()) {
if (Random.Float() > Math.pow(0.925, bonus))
addItemToSpawn( new PotionOfMight() );
else
addItemToSpawn( new PotionOfStrength() ); addItemToSpawn( new PotionOfStrength() );
Dungeon.limitedDrops.strengthPotions.count++; Dungeon.limitedDrops.strengthPotions.count++;
} }
if (Dungeon.souNeeded()) { if (Dungeon.souNeeded()) {
if (Random.Float() > Math.pow(0.925, bonus))
addItemToSpawn( new ScrollOfMagicalInfusion() );
else
addItemToSpawn( new ScrollOfUpgrade() ); addItemToSpawn( new ScrollOfUpgrade() );
Dungeon.limitedDrops.upgradeScrolls.count++; Dungeon.limitedDrops.upgradeScrolls.count++;
} }
if (Dungeon.asNeeded()) { if (Dungeon.asNeeded()) {
if (Random.Float() > Math.pow(0.925, bonus))
addItemToSpawn( new Stylus() );
addItemToSpawn( new Stylus() ); addItemToSpawn( new Stylus() );
Dungeon.limitedDrops.arcaneStyli.count++; Dungeon.limitedDrops.arcaneStyli.count++;
} }
int bonus = RingOfWealth.getBonus(Dungeon.hero, RingOfWealth.Wealth.class);
if (Random.Float() > Math.pow(0.95, bonus)){
if (Random.Int(2) == 0)
addItemToSpawn( new ScrollOfMagicalInfusion() );
else
addItemToSpawn( new PotionOfMight() );
}
DriedRose rose = Dungeon.hero.belongings.getItem( DriedRose.class ); DriedRose rose = Dungeon.hero.belongings.getItem( DriedRose.class );
if (rose != null && !rose.cursed){ if (rose != null && !rose.cursed){
//this way if a rose is dropped later in the game, player still has a chance to max it out. //this way if a rose is dropped later in the game, player still has a chance to max it out.