v0.6.1: fixed a couple of bugs leftover from ring mechanics changes

This commit is contained in:
Evan Debenham 2017-06-21 16:43:15 -04:00
parent 1d904966bf
commit 42a37ec1ac
2 changed files with 5 additions and 4 deletions

View File

@ -248,6 +248,11 @@ public class Ring extends KindofMisc {
if ((ticksToKnow = bundle.getInt( UNFAMILIRIARITY )) == 0) {
ticksToKnow = TICKS_TO_KNOW;
}
//pre-0.6.1 saves
if (level() < 0){
upgrade(-level());
}
}
public static int getBonus(Char target, Class<?extends RingBuff> type){

View File

@ -28,7 +28,6 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
@ -80,9 +79,6 @@ public class ScrollOfRemoveCurse extends InventoryScroll {
procced = true;
}
}
if (item instanceof Ring && item.level() <= 0){
item.upgrade(1 - item.level());
}
if (item instanceof Bag){
for (Item bagItem : ((Bag)item).items){
if (bagItem != null && bagItem.cursed) {