V0.2.0c : made Blandfruit stackable
This commit is contained in:
parent
4aceecf01f
commit
f8d76da5a8
|
@ -34,12 +34,26 @@ public class Blandfruit extends Food {
|
|||
|
||||
{
|
||||
name = "Blandfruit";
|
||||
stackable = false;
|
||||
stackable = true;
|
||||
image = ItemSpriteSheet.BLANDFRUIT;
|
||||
energy = (Hunger.STARVING - Hunger.HUNGRY)/2;
|
||||
hornValue = 6; //only applies when blandfruit is cooked
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSimilar( Item item ) {
|
||||
if (item instanceof Blandfruit){
|
||||
if (potionAttrib == null){
|
||||
if (((Blandfruit)item).potionAttrib == null)
|
||||
return true;
|
||||
} else if (((Blandfruit)item).potionAttrib != null){
|
||||
if (((Blandfruit)item).potionAttrib.getClass() == potionAttrib.getClass())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute( Hero hero, String action ) {
|
||||
if (action.equals( AC_EAT )){
|
||||
|
|
Loading…
Reference in New Issue
Block a user