v1.1.2: fixed dragon's breath and mastery not always being consumed

This commit is contained in:
Evan Debenham 2022-01-12 16:30:10 -05:00
parent 336b2f338d
commit d1b897cc6b
2 changed files with 8 additions and 4 deletions

View File

@ -60,7 +60,7 @@ public class PotionOfDragonsBreath extends ExoticPotion {
//need to override drink so that time isn't spent right away
protected void drink(final Hero hero) {
curUser = hero;
curItem = this;
curItem = detach( hero.belongings.backpack );
if (!isKnown()) {
identify();
@ -96,7 +96,7 @@ public class PotionOfDragonsBreath extends ExoticPotion {
switch (index) {
case 0:
curUser.spendAndNext(1f);
detach(curUser.belongings.backpack);
identifiedByUse = false;
break;
case 1:
GameScene.selectCell( targeter );
@ -105,6 +105,8 @@ public class PotionOfDragonsBreath extends ExoticPotion {
}
public void onBackPressed() {}
} );
} else if (cell == null && !anonymous){
curItem.collect( curUser.belongings.backpack );
} else if (cell != null) {
identifiedByUse = false;
curUser.busy();

View File

@ -50,7 +50,7 @@ public class PotionOfMastery extends ExoticPotion {
//need to override drink so that time isn't spent right away
protected void drink(final Hero hero) {
curUser = hero;
curItem = this;
curItem = detach( hero.belongings.backpack );
if (!isKnown()) {
identify();
@ -90,7 +90,7 @@ public class PotionOfMastery extends ExoticPotion {
switch (index) {
case 0:
curUser.spendAndNext(1f);
detach(curUser.belongings.backpack);
identifiedByUse = false;
break;
case 1:
GameScene.selectItem(itemSelector);
@ -99,6 +99,8 @@ public class PotionOfMastery extends ExoticPotion {
}
public void onBackPressed() {}
} );
} else if (item == null && !anonymous){
curItem.collect( curUser.belongings.backpack );
} else if (item != null) {
if (item instanceof Weapon) {