v0.6.2: fixed some very old and buggy code in blandfruit
This commit is contained in:
parent
939c000a22
commit
450894893f
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.food;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.EarthImbue;
|
||||
|
@ -41,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticG
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant.Seed;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
|
@ -180,19 +182,23 @@ public class Blandfruit extends Food {
|
|||
public static final String POTIONATTRIB = "potionattrib";
|
||||
|
||||
@Override
|
||||
public void cast( final Hero user, int dst ) {
|
||||
if (potionAttrib instanceof PotionOfLiquidFlame ||
|
||||
protected void onThrow(int cell) {
|
||||
if (Dungeon.level.map[cell] == Terrain.WELL || Dungeon.level.pit[cell]) {
|
||||
super.onThrow( cell );
|
||||
|
||||
} else if (potionAttrib instanceof PotionOfLiquidFlame ||
|
||||
potionAttrib instanceof PotionOfToxicGas ||
|
||||
potionAttrib instanceof PotionOfParalyticGas ||
|
||||
potionAttrib instanceof PotionOfFrost ||
|
||||
potionAttrib instanceof PotionOfLevitation ||
|
||||
potionAttrib instanceof PotionOfPurity) {
|
||||
potionAttrib.cast(user, dst);
|
||||
detach( user.belongings.backpack );
|
||||
} else {
|
||||
super.cast(user, dst);
|
||||
}
|
||||
|
||||
Dungeon.level.press( cell, null );
|
||||
potionAttrib.shatter( cell );
|
||||
|
||||
} else {
|
||||
super.onThrow( cell );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user