v0.7.4: fixed boomerangs being lost during the tengu fight
This commit is contained in:
parent
911f71e59e
commit
68764f802e
|
@ -77,6 +77,15 @@ public class HeavyBoomerang extends MissileWeapon {
|
||||||
left = 3;
|
left = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int returnPos(){
|
||||||
|
return returnPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MissileWeapon cancel(){
|
||||||
|
detach();
|
||||||
|
return boomerang;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (returnDepth == Dungeon.depth){
|
if (returnDepth == Dungeon.depth){
|
||||||
|
|
|
@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Tengu;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey;
|
import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.HeavyBoomerang;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.MazeRoom;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.MazeRoom;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EmptyRoom;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EmptyRoom;
|
||||||
|
@ -276,12 +277,18 @@ public class PrisonBossLevel extends Level {
|
||||||
private void clearEntities(Room safeArea){
|
private void clearEntities(Room safeArea){
|
||||||
for (Heap heap : heaps.values()){
|
for (Heap heap : heaps.values()){
|
||||||
if (safeArea == null || !safeArea.inside(cellToPoint(heap.pos))){
|
if (safeArea == null || !safeArea.inside(cellToPoint(heap.pos))){
|
||||||
for (Item item : heap.items)
|
storedItems.addAll(heap.items);
|
||||||
storedItems.add(item);
|
|
||||||
heap.destroy();
|
heap.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[Dungeon.level.mobs.size()])){
|
|
||||||
|
for (HeavyBoomerang.CircleBack b : Dungeon.hero.buffs(HeavyBoomerang.CircleBack.class)){
|
||||||
|
if (safeArea == null || !safeArea.inside(cellToPoint(b.returnPos()))){
|
||||||
|
storedItems.add(b.cancel());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])){
|
||||||
if (mob != tengu && (safeArea == null || !safeArea.inside(cellToPoint(mob.pos)))){
|
if (mob != tengu && (safeArea == null || !safeArea.inside(cellToPoint(mob.pos)))){
|
||||||
mob.destroy();
|
mob.destroy();
|
||||||
if (mob.sprite != null)
|
if (mob.sprite != null)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user