v0.9.1c: frozen carpaccio can now burn like mystery meat
This commit is contained in:
parent
aac9cf7367
commit
db023aafc7
|
@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||||
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.food.ChargrilledMeat;
|
import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
|
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
@ -104,7 +105,7 @@ public class Burning extends Buff implements Hero.Doom {
|
||||||
ArrayList<Item> burnable = new ArrayList<>();
|
ArrayList<Item> burnable = new ArrayList<>();
|
||||||
//does not reach inside of containers
|
//does not reach inside of containers
|
||||||
for (Item i : hero.belongings.backpack.items){
|
for (Item i : hero.belongings.backpack.items){
|
||||||
if (!i.unique && (i instanceof Scroll || i instanceof MysteryMeat)){
|
if (!i.unique && (i instanceof Scroll || i instanceof MysteryMeat || i instanceof FrozenCarpaccio)){
|
||||||
burnable.add(i);
|
burnable.add(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +113,7 @@ public class Burning extends Buff implements Hero.Doom {
|
||||||
if (!burnable.isEmpty()){
|
if (!burnable.isEmpty()){
|
||||||
Item toBurn = Random.element(burnable).detach(hero.belongings.backpack);
|
Item toBurn = Random.element(burnable).detach(hero.belongings.backpack);
|
||||||
GLog.w( Messages.get(this, "burnsup", Messages.capitalize(toBurn.toString())) );
|
GLog.w( Messages.get(this, "burnsup", Messages.capitalize(toBurn.toString())) );
|
||||||
if (toBurn instanceof MysteryMeat){
|
if (toBurn instanceof MysteryMeat || toBurn instanceof FrozenCarpaccio){
|
||||||
ChargrilledMeat steak = new ChargrilledMeat();
|
ChargrilledMeat steak = new ChargrilledMeat();
|
||||||
if (!steak.collect( hero.belongings.backpack )) {
|
if (!steak.collect( hero.belongings.backpack )) {
|
||||||
Dungeon.level.drop( steak, hero.pos ).sprite.drop();
|
Dungeon.level.drop( steak, hero.pos ).sprite.drop();
|
||||||
|
|
|
@ -204,8 +204,8 @@ public class Heap implements Bundlable {
|
||||||
} else if (item instanceof Dewdrop) {
|
} else if (item instanceof Dewdrop) {
|
||||||
items.remove( item );
|
items.remove( item );
|
||||||
evaporated = true;
|
evaporated = true;
|
||||||
} else if (item instanceof MysteryMeat) {
|
} else if (item instanceof MysteryMeat || item instanceof FrozenCarpaccio) {
|
||||||
replace( item, ChargrilledMeat.cook( (MysteryMeat)item ) );
|
replace( item, ChargrilledMeat.cook( item.quantity ) );
|
||||||
burnt = true;
|
burnt = true;
|
||||||
} else if (item instanceof Bomb) {
|
} else if (item instanceof Bomb) {
|
||||||
items.remove( item );
|
items.remove( item );
|
||||||
|
|
|
@ -36,9 +36,9 @@ public class ChargrilledMeat extends Food {
|
||||||
return 8 * quantity;
|
return 8 * quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Food cook( MysteryMeat ingredient ) {
|
public static Food cook( int quantity ) {
|
||||||
ChargrilledMeat result = new ChargrilledMeat();
|
ChargrilledMeat result = new ChargrilledMeat();
|
||||||
result.quantity = ingredient.quantity();
|
result.quantity = quantity;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user