From d7ae88d963f76736cf4e424d815e3760bf122c8b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 18 Nov 2015 17:10:19 -0500 Subject: [PATCH] v0.3.2c: re-added bones to prison boss level --- .../levels/PrisonBossLevel.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java index 1ccde4d4d..2f3acca7b 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java @@ -21,6 +21,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Bones; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; @@ -81,7 +82,7 @@ public class PrisonBossLevel extends Level { @Override public void storeInBundle( Bundle bundle ) { super.storeInBundle(bundle); - bundle.put(STATE, state); + bundle.put( STATE, state ); bundle.put( TENGU, tengu ); bundle.put( STORED_ITEMS, storedItems); } @@ -142,6 +143,10 @@ public class PrisonBossLevel extends Level { @Override protected void createItems() { + Item item = Bones.get(); + if (item != null) { + drop( item, randomRespawnCell() ).type = Heap.Type.REMAINS; + } drop(new IronKey(10), randomPrisonCell()); } @@ -178,15 +183,9 @@ public class PrisonBossLevel extends Level { } } - @Override - public Heap drop( Item item, int cell ) { - - return super.drop( item, cell ); - } - @Override public int randomRespawnCell() { - return 5+3*32; + return 5+2*32 + NEIGHBOURS8[Random.Int(8)]; //random cell adjacent to the entrance. } @Override