v2.0.0: improved duelist unlock badge logic
This commit is contained in:
@@ -870,7 +870,15 @@ public class Badges {
|
||||
if (Dungeon.hero.belongings.weapon instanceof MeleeWeapon
|
||||
&& ((MeleeWeapon) Dungeon.hero.belongings.weapon).tier >= 2
|
||||
&& ((MeleeWeapon) Dungeon.hero.belongings.weapon).STRReq() <= Dungeon.hero.STR()){
|
||||
displayBadge( Badge.UNLOCK_DUELIST );
|
||||
|
||||
if (Dungeon.hero.belongings.weapon.isIdentified() &&
|
||||
((MeleeWeapon) Dungeon.hero.belongings.weapon).STRReq() <= Dungeon.hero.STR()) {
|
||||
displayBadge(Badge.UNLOCK_DUELIST);
|
||||
|
||||
} else if (!Dungeon.hero.belongings.weapon.isIdentified() &&
|
||||
((MeleeWeapon) Dungeon.hero.belongings.weapon).STRReq(0) <= Dungeon.hero.STR()){
|
||||
displayBadge(Badge.UNLOCK_DUELIST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ public class PotionOfStrength extends Potion {
|
||||
GLog.p( Messages.get(this, "msg_2") );
|
||||
|
||||
Badges.validateStrengthAttained();
|
||||
Badges.validateDuelistUnlock();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -58,6 +58,7 @@ public class ElixirOfMight extends Elixir {
|
||||
GLog.p( Messages.get(this, "msg_2") );
|
||||
|
||||
Badges.validateStrengthAttained();
|
||||
Badges.validateDuelistUnlock();
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
|
||||
@@ -270,8 +270,10 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
}
|
||||
|
||||
cursed = false;
|
||||
|
||||
return super.upgrade();
|
||||
|
||||
Item result = super.upgrade();
|
||||
Badges.validateDuelistUnlock();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user