v0.9.1c: frozen carpaccio can now burn like mystery meat

This commit is contained in:
Evan Debenham 2021-01-06 20:04:51 -05:00
parent aac9cf7367
commit db023aafc7
3 changed files with 7 additions and 6 deletions

View File

@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
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.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -104,7 +105,7 @@ public class Burning extends Buff implements Hero.Doom {
ArrayList<Item> burnable = new ArrayList<>();
//does not reach inside of containers
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);
}
}
@ -112,7 +113,7 @@ public class Burning extends Buff implements Hero.Doom {
if (!burnable.isEmpty()){
Item toBurn = Random.element(burnable).detach(hero.belongings.backpack);
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();
if (!steak.collect( hero.belongings.backpack )) {
Dungeon.level.drop( steak, hero.pos ).sprite.drop();

View File

@ -204,8 +204,8 @@ public class Heap implements Bundlable {
} else if (item instanceof Dewdrop) {
items.remove( item );
evaporated = true;
} else if (item instanceof MysteryMeat) {
replace( item, ChargrilledMeat.cook( (MysteryMeat)item ) );
} else if (item instanceof MysteryMeat || item instanceof FrozenCarpaccio) {
replace( item, ChargrilledMeat.cook( item.quantity ) );
burnt = true;
} else if (item instanceof Bomb) {
items.remove( item );

View File

@ -36,9 +36,9 @@ public class ChargrilledMeat extends Food {
return 8 * quantity;
}
public static Food cook( MysteryMeat ingredient ) {
public static Food cook( int quantity ) {
ChargrilledMeat result = new ChargrilledMeat();
result.quantity = ingredient.quantity();
result.quantity = quantity;
return result;
}
}