v0.2.4: some corrections to heap explosion
This commit is contained in:
parent
6625b70fe9
commit
47adfc1403
|
@ -229,7 +229,9 @@ public class Heap implements Bundlable {
|
||||||
replace( item, ChargrilledMeat.cook( (MysteryMeat)item ) );
|
replace( item, ChargrilledMeat.cook( (MysteryMeat)item ) );
|
||||||
burnt = true;
|
burnt = true;
|
||||||
} else if (item instanceof Bomb) {
|
} else if (item instanceof Bomb) {
|
||||||
explode();
|
items.remove( item );
|
||||||
|
((Bomb) item).explode( pos );
|
||||||
|
//stop processing the burning, it will be replaced by the explosion.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -253,10 +255,10 @@ public class Heap implements Bundlable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//bombs!
|
//Note: should not be called to initiate an explosion, but rather by an explosion that is happening.
|
||||||
public void explode() {
|
public void explode() {
|
||||||
|
|
||||||
//breaks open most standard containers
|
//breaks open most standard containers, mimics die.
|
||||||
if (type == Type.MIMIC || type == Type.CHEST || type == Type.SKELETON) {
|
if (type == Type.MIMIC || type == Type.CHEST || type == Type.SKELETON) {
|
||||||
type = Type.HEAP;
|
type = Type.HEAP;
|
||||||
sprite.link();
|
sprite.link();
|
||||||
|
@ -279,6 +281,7 @@ public class Heap implements Bundlable {
|
||||||
} else if (item instanceof Bomb) {
|
} else if (item instanceof Bomb) {
|
||||||
items.remove( item );
|
items.remove( item );
|
||||||
((Bomb) item).explode(pos);
|
((Bomb) item).explode(pos);
|
||||||
|
//stop processing current explosion, it will be replaced by the new one.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//unique and upgraded items can endure the blast
|
//unique and upgraded items can endure the blast
|
||||||
|
@ -314,6 +317,9 @@ public class Heap implements Bundlable {
|
||||||
} else if (item instanceof Potion) {
|
} else if (item instanceof Potion) {
|
||||||
((Potion) item).shatter(pos);
|
((Potion) item).shatter(pos);
|
||||||
frozen = true;
|
frozen = true;
|
||||||
|
} else if (item instanceof Bomb){
|
||||||
|
((Bomb) item).fuseLit = false;
|
||||||
|
frozen = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user