v0.2.3: bones now transfer artifact levels (but they are capped as usual)
This commit is contained in:
@@ -149,16 +149,20 @@ public class Bones {
|
||||
if (item instanceof Artifact){
|
||||
if (Generator.removeArtifact((Artifact)item)) {
|
||||
try {
|
||||
item = item.getClass().newInstance();
|
||||
item.cursed = true;
|
||||
item.cursedKnown = true;
|
||||
Artifact artifact = (Artifact)item.getClass().newInstance();
|
||||
artifact.cursed = true;
|
||||
artifact.cursedKnown = true;
|
||||
//caps displayed artifact level
|
||||
artifact.transferUpgrade(Math.min(
|
||||
item.visiblyUpgraded(),
|
||||
1 + ((Dungeon.depth * 3) / 10)));
|
||||
|
||||
return item;
|
||||
} catch (Exception e) {
|
||||
return new Gold(Random.NormalIntRange(150, 250));
|
||||
return new Gold(item.price());
|
||||
}
|
||||
} else {
|
||||
return new Gold(Random.NormalIntRange(150, 250));
|
||||
return new Gold(item.price());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user