v0.6.2: further rebalances to heroes remains

This commit is contained in:
Evan Debenham 2017-10-12 19:35:28 -04:00
parent 038d500c98
commit b9f7f7c44a

View File

@ -74,8 +74,8 @@ public class Bones {
private static Item pickItem(Hero hero){ private static Item pickItem(Hero hero){
Item item = null; Item item = null;
if (Random.Int(2) == 0) { if (Random.Int(3) != 0) {
switch (Random.Int(5)) { switch (Random.Int(6)) {
case 0: case 0:
item = hero.belongings.weapon; item = hero.belongings.weapon;
break; break;
@ -88,7 +88,7 @@ public class Bones {
case 3: case 3:
item = hero.belongings.misc2; item = hero.belongings.misc2;
break; break;
case 4: case 4: case 5:
item = Dungeon.quickslot.randomNonePlaceholder(); item = Dungeon.quickslot.randomNonePlaceholder();
break; break;
} }
@ -111,15 +111,15 @@ public class Bones {
if (item.stackable){ if (item.stackable){
item.quantity(Random.NormalIntRange(1, (item.quantity() + 1) / 2)); item.quantity(Random.NormalIntRange(1, (item.quantity() + 1) / 2));
} }
}
}
if (item == null) {
if (Dungeon.gold > 100) {
item = new Gold( Random.NormalIntRange( 50, Dungeon.gold/2 ) );
} else { } else {
item = new Gold( 50 ); if (Dungeon.gold > 100) {
item = new Gold( Random.NormalIntRange( 50, Dungeon.gold/2 ) );
} else {
item = new Gold( 50 );
}
} }
} }
return item; return item;
} }
@ -150,11 +150,8 @@ public class Bones {
if (item instanceof Artifact){ if (item instanceof Artifact){
if (Generator.removeArtifact(((Artifact)item).getClass())) { if (Generator.removeArtifact(((Artifact)item).getClass())) {
try { try {
//generates a new artifact of the same type, always +0
Artifact artifact = (Artifact)item.getClass().newInstance(); Artifact artifact = (Artifact)item.getClass().newInstance();
//caps displayed artifact level
artifact.transferUpgrade(Math.min(
item.visiblyUpgraded(),
1 + ((Dungeon.depth * 3) / 10)));
artifact.cursed = true; artifact.cursed = true;
artifact.cursedKnown = true; artifact.cursedKnown = true;
@ -173,10 +170,9 @@ public class Bones {
item.cursed = true; item.cursed = true;
item.cursedKnown = true; item.cursedKnown = true;
if (item.isUpgradable()) { if (item.isUpgradable()) {
//gain 1 level every 3.333 floors down plus one additional level. //caps at +3
int lvl = 1 + ((Dungeon.depth * 3) / 10); if (item.level() > 3) {
if (lvl < item.level()) { item.degrade( item.level() - 3 );
item.degrade( item.level() - lvl );
} }
item.levelKnown = false; item.levelKnown = false;
} }