v1.4.0: improved logic for when items block level transitions
This commit is contained in:
@@ -897,10 +897,13 @@ public class Hero extends Char {
|
|||||||
|
|
||||||
if (waitOrPickup) {
|
if (waitOrPickup) {
|
||||||
spendAndNextConstant(TIME_TO_REST);
|
spendAndNextConstant(TIME_TO_REST);
|
||||||
|
}
|
||||||
|
|
||||||
//allow the hero to move between levels even if they can't collect the item
|
//allow the hero to move between levels even if they can't collect the item
|
||||||
} else if (Dungeon.level.getTransition(pos) != null){
|
if (Dungeon.level.getTransition(pos) != null){
|
||||||
return actTransition(new HeroAction.LvlTransition(pos));
|
throwItems();
|
||||||
|
} else {
|
||||||
|
heap.sprite.drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item instanceof Dewdrop
|
if (item instanceof Dewdrop
|
||||||
@@ -913,8 +916,7 @@ public class Hero extends Char {
|
|||||||
GLog.n(Messages.capitalize(Messages.get(this, "you_cant_have", item.name())));
|
GLog.n(Messages.capitalize(Messages.get(this, "you_cant_have", item.name())));
|
||||||
}
|
}
|
||||||
|
|
||||||
heap.sprite.drop();
|
next();
|
||||||
ready();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ready();
|
ready();
|
||||||
|
|||||||
Reference in New Issue
Block a user