From cb1f1f5bcf54f2ceb77243a0616fdc7dbcc0c829 Mon Sep 17 00:00:00 2001
From: Evan Debenham <Evan.SHPX@gmail.com>
Date: Mon, 11 Sep 2017 23:14:30 -0400
Subject: [PATCH] v0.6.2: bones no longer contain progression items but getting
 50 gold is less likely

---
 .../shatteredpixeldungeon/Bones.java          | 27 +++----------------
 .../items/potions/PotionOfMight.java          |  2 --
 .../items/potions/PotionOfStrength.java       |  2 --
 .../scrolls/ScrollOfMagicalInfusion.java      |  2 --
 .../items/scrolls/ScrollOfUpgrade.java        |  2 --
 5 files changed, 4 insertions(+), 31 deletions(-)

diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java
index 94eb25952..79697817c 100644
--- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java
+++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Bones.java
@@ -27,11 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
 import com.shatteredpixel.shatteredpixeldungeon.items.Item;
 import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
 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.utils.Bundle;
 import com.watabou.utils.Random;
@@ -97,7 +92,7 @@ public class Bones {
 					item = Dungeon.quickslot.randomNonePlaceholder();
 					break;
 			}
-			if (item != null && !item.bones)
+			if (item == null || item.bones)
 				return pickItem(hero);
 		} else {
 
@@ -113,17 +108,13 @@ public class Bones {
 			if (Random.Int(3) < items.size()) {
 				item = Random.element(items);
 				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 (Dungeon.gold > 50) {
-				item = new Gold( Random.NormalIntRange( 50, Dungeon.gold ) );
+			if (Dungeon.gold > 100) {
+				item = new Gold( Random.NormalIntRange( 50, Dungeon.gold/2 ) );
 			} else {
 				item = new Gold( 50 );
 			}
@@ -175,16 +166,6 @@ public class Bones {
 					} else {
 						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()) {
diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMight.java
index 9c0a12324..9dcaf83e7 100644
--- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMight.java
+++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMight.java
@@ -31,8 +31,6 @@ public class PotionOfMight extends Potion {
 
 	{
 		initials = 6;
-
-		bones = true;
 	}
 	
 	@Override
diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfStrength.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfStrength.java
index e5c1cceab..2704e05f8 100644
--- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfStrength.java
+++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfStrength.java
@@ -31,8 +31,6 @@ public class PotionOfStrength extends Potion {
 
 	{
 		initials = 10;
-
-		bones = true;
 	}
 	
 	@Override
diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicalInfusion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicalInfusion.java
index 793f25238..e69f33070 100644
--- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicalInfusion.java
+++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfMagicalInfusion.java
@@ -36,8 +36,6 @@ public class ScrollOfMagicalInfusion extends InventoryScroll {
 	{
 		initials = 2;
 		mode = WndBag.Mode.ENCHANTABLE;
-
-		bones = true;
 	}
 	
 	@Override
diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java
index f304a13c9..9f560eb12 100644
--- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java
+++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java
@@ -40,8 +40,6 @@ public class ScrollOfUpgrade extends InventoryScroll {
 	{
 		initials = 11;
 		mode = WndBag.Mode.UPGRADEABLE;
-
-		bones = true;
 	}
 	
 	@Override