v3.2.2: fixed upgrade window not account for metamorphed runic trans
This commit is contained in:
@@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
|
||||
@@ -361,6 +362,11 @@ public class WndUpgrade extends Window {
|
||||
lossChance = Math.min(100, 10 * (int) Math.pow(2, levelFrom - 6));
|
||||
} else {
|
||||
lossChance = Math.min(100, 10 * (int) Math.pow(2, levelFrom - 4));
|
||||
if (Dungeon.hero != null && Dungeon.hero.heroClass != HeroClass.WARRIOR && Dungeon.hero.hasTalent(Talent.RUNIC_TRANSFERENCE)){
|
||||
if (levelFrom < 5+Dungeon.hero.pointsInTalent(Talent.RUNIC_TRANSFERENCE)){
|
||||
lossChance = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lossChance >= 10) {
|
||||
|
||||
Reference in New Issue
Block a user