v0.2.3: transmuted artifacts now retain their levels

This commit is contained in:
Evan Debenham 2014-11-19 11:41:36 -05:00
parent f59fc8c304
commit 977a320fc2
2 changed files with 7 additions and 0 deletions

View File

@ -173,6 +173,7 @@ public class WaterOfTransmutation extends WellWater {
if (n != null){
n.cursedKnown = a.cursedKnown;
n.cursed = a.cursed;
n.transferUpgrade(a);
Journal.remove( Feature.WELL_OF_TRANSMUTATION );
}

View File

@ -138,6 +138,12 @@ public class Artifact extends KindofMisc {
return ((level*10)/levelCap);
}
//transfers upgrades from another artifact, in terms of displayed level
public void transferUpgrade(Artifact a) {
int transferLvl = Math.round((a.visiblyUpgraded()*levelCap)/10);
upgrade(transferLvl);
}
@Override
public String info() {
if (cursed && cursedKnown && !isEquipped( Dungeon.hero )) {