v3.1.0: fixed seal transfer showing glyph xfer prompt without talent
This commit is contained in:
@@ -127,6 +127,7 @@ public class BrokenSeal extends Item {
|
|||||||
GLog.w(Messages.get(BrokenSeal.class, "unknown_armor"));
|
GLog.w(Messages.get(BrokenSeal.class, "unknown_armor"));
|
||||||
|
|
||||||
} else if (armor.glyph != null && getGlyph() != null
|
} else if (armor.glyph != null && getGlyph() != null
|
||||||
|
&& canTransferGlyph()
|
||||||
&& armor.glyph.getClass() != getGlyph().getClass()) {
|
&& armor.glyph.getClass() != getGlyph().getClass()) {
|
||||||
|
|
||||||
//cannot apply the seal's non-curse glyph to a curse glyph armor
|
//cannot apply the seal's non-curse glyph to a curse glyph armor
|
||||||
@@ -327,8 +328,11 @@ public class BrokenSeal extends Item {
|
|||||||
if (Dungeon.hero.visibleEnemies() == 0){
|
if (Dungeon.hero.visibleEnemies() == 0){
|
||||||
turnsSinceEnemies++;
|
turnsSinceEnemies++;
|
||||||
if (turnsSinceEnemies >= 5){
|
if (turnsSinceEnemies >= 5){
|
||||||
float percentLeft = shielding() / (float)maxShield();
|
if (cooldown > 0) {
|
||||||
cooldown -= COOLDOWN_START*(percentLeft/2f); //max of 50% cooldown refund
|
float percentLeft = shielding() / (float)maxShield();
|
||||||
|
//max of 50% cooldown refund
|
||||||
|
cooldown = Math.max(0, (int)(cooldown - COOLDOWN_START * (percentLeft / 2f)));
|
||||||
|
}
|
||||||
decShield(shielding());
|
decShield(shielding());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -346,7 +350,7 @@ public class BrokenSeal extends Item {
|
|||||||
|
|
||||||
public synchronized void activate() {
|
public synchronized void activate() {
|
||||||
incShield(maxShield());
|
incShield(maxShield());
|
||||||
cooldown += COOLDOWN_START;
|
cooldown = Math.max(0, cooldown+COOLDOWN_START);
|
||||||
turnsSinceEnemies = 0;
|
turnsSinceEnemies = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user