v0.7.1a: added safety checks to blacksmith and bones
This commit is contained in:
parent
5b6bacc627
commit
77e712003c
|
@ -139,6 +139,8 @@ public class Bones {
|
|||
if (depth == Dungeon.depth && Dungeon.challenges == 0) {
|
||||
FileUtils.deleteFile( BONES_FILE );
|
||||
depth = 0;
|
||||
|
||||
if (item == null) return null;
|
||||
|
||||
//Enforces artifact uniqueness
|
||||
if (item instanceof Artifact){
|
||||
|
|
|
@ -200,7 +200,9 @@ public class Blacksmith extends NPC {
|
|||
}
|
||||
first.level(first.level()+1); //prevents on-upgrade effects like enchant/glyph removal
|
||||
if (first instanceof MissileWeapon && !Dungeon.hero.belongings.contains(first)) {
|
||||
first.collect();
|
||||
if (!first.collect()){
|
||||
Dungeon.level.drop( first, Dungeon.hero.pos );
|
||||
}
|
||||
}
|
||||
Dungeon.hero.spendAndNext( 2f );
|
||||
Badges.validateItemLevelAquired( first );
|
||||
|
|
Loading…
Reference in New Issue
Block a user