v0.6.2: bones no longer contain progression items but getting 50 gold is less likely

This commit is contained in:
Evan Debenham 2017-09-11 23:14:30 -04:00
parent d898e29fdb
commit cb1f1f5bcf
5 changed files with 4 additions and 31 deletions

View File

@ -27,11 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Random; import com.watabou.utils.Random;
@ -97,7 +92,7 @@ public class Bones {
item = Dungeon.quickslot.randomNonePlaceholder(); item = Dungeon.quickslot.randomNonePlaceholder();
break; break;
} }
if (item != null && !item.bones) if (item == null || item.bones)
return pickItem(hero); return pickItem(hero);
} else { } else {
@ -113,17 +108,13 @@ public class Bones {
if (Random.Int(3) < items.size()) { if (Random.Int(3) < items.size()) {
item = Random.element(items); item = Random.element(items);
if (item.stackable){ if (item.stackable){
if (item instanceof MissileWeapon){
item.quantity(Random.NormalIntRange(1, item.quantity()));
} else {
item.quantity(Random.NormalIntRange(1, (item.quantity() + 1) / 2)); item.quantity(Random.NormalIntRange(1, (item.quantity() + 1) / 2));
} }
} }
} }
}
if (item == null) { if (item == null) {
if (Dungeon.gold > 50) { if (Dungeon.gold > 100) {
item = new Gold( Random.NormalIntRange( 50, Dungeon.gold ) ); item = new Gold( Random.NormalIntRange( 50, Dungeon.gold/2 ) );
} else { } else {
item = new Gold( 50 ); item = new Gold( 50 );
} }
@ -175,16 +166,6 @@ public class Bones {
} else { } else {
return new Gold(item.price()); return new Gold(item.price());
} }
//Progression items are less likely to appear in bones in very early floors
//This is to discourage using heroes remains to purposefully boost your earlygame
} else if (item instanceof PotionOfStrength || item instanceof PotionOfMight ||
item instanceof ScrollOfUpgrade || item instanceof ScrollOfMagicalInfusion){
if (Random.IntRange(1, 3) >= depth){
return new Gold(item.price());
}
} }
if (item.isUpgradable()) { if (item.isUpgradable()) {

View File

@ -31,8 +31,6 @@ public class PotionOfMight extends Potion {
{ {
initials = 6; initials = 6;
bones = true;
} }
@Override @Override

View File

@ -31,8 +31,6 @@ public class PotionOfStrength extends Potion {
{ {
initials = 10; initials = 10;
bones = true;
} }
@Override @Override

View File

@ -36,8 +36,6 @@ public class ScrollOfMagicalInfusion extends InventoryScroll {
{ {
initials = 2; initials = 2;
mode = WndBag.Mode.ENCHANTABLE; mode = WndBag.Mode.ENCHANTABLE;
bones = true;
} }
@Override @Override

View File

@ -40,8 +40,6 @@ public class ScrollOfUpgrade extends InventoryScroll {
{ {
initials = 11; initials = 11;
mode = WndBag.Mode.UPGRADEABLE; mode = WndBag.Mode.UPGRADEABLE;
bones = true;
} }
@Override @Override