v0.4.0: high value potions/scrolls no longer burn/freeze

This commit is contained in:
Evan Debenham 2016-06-18 16:30:38 -04:00
parent cbc1744421
commit 2e215359d0
4 changed files with 20 additions and 5 deletions

View File

@ -36,6 +36,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements.Resistance;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
@ -95,7 +97,8 @@ public class Burning extends Buff implements Hero.Doom {
hero.damage( damage, this );
Item item = hero.belongings.randomUnequipped();
if (item instanceof Scroll) {
if (item instanceof Scroll
&& !(item instanceof ScrollOfUpgrade || item instanceof ScrollOfMagicalInfusion)) {
item = item.detach( hero.belongings.backpack );
GLog.w( Messages.get(this, "burnsup", Messages.capitalize(item.toString())) );

View File

@ -28,6 +28,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
@ -55,7 +57,8 @@ public class Chill extends FlavourBuff {
Hero hero = (Hero)target;
Item item = hero.belongings.randomUnequipped();
if (item instanceof Potion) {
if (item instanceof Potion
&& !(item instanceof PotionOfStrength || item instanceof PotionOfMight)) {
item = item.detach( hero.belongings.backpack );
GLog.w( Messages.get(this, "freezes", item.toString()) );

View File

@ -28,6 +28,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements.Resistance;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -55,7 +57,8 @@ public class Frost extends FlavourBuff {
Hero hero = (Hero)target;
Item item = hero.belongings.randomUnequipped();
if (item instanceof Potion) {
if (item instanceof Potion
&& !(item instanceof PotionOfStrength || item instanceof PotionOfMight)) {
item = item.detach( hero.belongings.backpack );
GLog.w( Messages.get(this, "freezes", item.toString()) );

View File

@ -45,7 +45,11 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant.Seed;
@ -223,7 +227,8 @@ public class Heap implements Bundlable {
boolean evaporated = false;
for (Item item : items.toArray( new Item[0] )) {
if (item instanceof Scroll) {
if (item instanceof Scroll
&& !(item instanceof ScrollOfUpgrade || item instanceof ScrollOfMagicalInfusion)) {
items.remove( item );
burnt = true;
} else if (item instanceof Dewdrop) {
@ -321,7 +326,8 @@ public class Heap implements Bundlable {
if (item instanceof MysteryMeat) {
replace( item, FrozenCarpaccio.cook( (MysteryMeat)item ) );
frozen = true;
} else if (item instanceof Potion) {
} else if (item instanceof Potion
&& !(item instanceof PotionOfStrength || item instanceof PotionOfMight)) {
items.remove(item);
((Potion) item).shatter(pos);
frozen = true;