v0.7.0: polished new food items
This commit is contained in:
parent
67a5925e87
commit
a429a55007
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Feast;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
|
@ -62,7 +61,7 @@ public class Hunger extends Buff implements Hero.Doom {
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
|
|
||||||
if (Dungeon.level.locked || target.buff(Feast.WellFed.class) == null){
|
if (Dungeon.level.locked || target.buff(WellFed.class) != null){
|
||||||
spend(STEP);
|
spend(STEP);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
/*
|
||||||
|
* Pixel Dungeon
|
||||||
|
* Copyright (C) 2012-2015 Oleg Dolya
|
||||||
|
*
|
||||||
|
* Shattered Pixel Dungeon
|
||||||
|
* Copyright (C) 2014-2018 Evan Debenham
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
|
import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
|
public class WellFed extends Buff {
|
||||||
|
|
||||||
|
{
|
||||||
|
type = buffType.POSITIVE;
|
||||||
|
announced = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//heals one HP every 10 turns for 450 turns
|
||||||
|
int left = (int)Hunger.STARVING;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean act() {
|
||||||
|
left --;
|
||||||
|
if (left < 0){
|
||||||
|
detach();
|
||||||
|
return true;
|
||||||
|
} else if (left % 10 == 0){
|
||||||
|
target.HP = Math.min(target.HT, target.HP + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
spend(TICK);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int icon() {
|
||||||
|
return BuffIndicator.WELL_FED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return Messages.get(this, "name");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String desc() {
|
||||||
|
return Messages.get(this, "desc", left + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final String LEFT = "left";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void storeInBundle(Bundle bundle) {
|
||||||
|
super.storeInBundle(bundle);
|
||||||
|
bundle.put(LEFT, left);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restoreFromBundle(Bundle bundle) {
|
||||||
|
super.restoreFromBundle(bundle);
|
||||||
|
left = bundle.getInt(LEFT);
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,8 +22,8 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.food;
|
package com.shatteredpixel.shatteredpixeldungeon.items.food;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.WellFed;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
@ -40,18 +40,12 @@ public class Feast extends Food {
|
||||||
@Override
|
@Override
|
||||||
protected void satisfy(Hero hero) {
|
protected void satisfy(Hero hero) {
|
||||||
super.satisfy( hero );
|
super.satisfy( hero );
|
||||||
|
Buff.affect(hero, WellFed.class);
|
||||||
Buff.affect(hero, WellFed.class, Hunger.STARVING);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int price() {
|
public int price() {
|
||||||
return 50 * quantity;
|
return 30 * quantity;
|
||||||
}
|
|
||||||
|
|
||||||
//TODO visuals, is this the effect we want as well?
|
|
||||||
public static class WellFed extends FlavourBuff {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe {
|
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe {
|
||||||
|
|
|
@ -87,6 +87,7 @@ public class BuffIndicator extends Component {
|
||||||
public static final int BERSERK = 40;
|
public static final int BERSERK = 40;
|
||||||
public static final int MOMENTUM = 41;
|
public static final int MOMENTUM = 41;
|
||||||
public static final int PREPARATION = 42;
|
public static final int PREPARATION = 42;
|
||||||
|
public static final int WELL_FED = 43;
|
||||||
|
|
||||||
public static final int SIZE = 7;
|
public static final int SIZE = 7;
|
||||||
|
|
||||||
|
|
|
@ -264,6 +264,9 @@ actors.buffs.weakness.name=Weakened
|
||||||
actors.buffs.weakness.heromsg=You feel weakened!
|
actors.buffs.weakness.heromsg=You feel weakened!
|
||||||
actors.buffs.weakness.desc=Everything suddenly seems much heavier.\n\nWeakening magic reduces a character's physical strength. The hero will lose 2 points of effective strength, while enemies will deal reduced damage.\n\nTurns of weakness remaining: %s.
|
actors.buffs.weakness.desc=Everything suddenly seems much heavier.\n\nWeakening magic reduces a character's physical strength. The hero will lose 2 points of effective strength, while enemies will deal reduced damage.\n\nTurns of weakness remaining: %s.
|
||||||
|
|
||||||
|
actors.buffs.wellfed.name=Well Fed
|
||||||
|
actors.buffs.wellfed.desc=You feel quite satisfied and full.\n\nWhile well fed, your hunger will not increase, and you will heal an additional amount of health over time.\n\nTurns remaining: %d.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###hero
|
###hero
|
||||||
|
|
|
@ -410,7 +410,8 @@ items.food.chargrilledmeat.name=chargrilled meat
|
||||||
items.food.chargrilledmeat.desc=It looks like a decent steak.
|
items.food.chargrilledmeat.desc=It looks like a decent steak.
|
||||||
|
|
||||||
items.food.feast.name=feast
|
items.food.feast.name=feast
|
||||||
items.food.feast.desc=TODO
|
items.food.feast.eat_msg=That meal was incredible!
|
||||||
|
items.food.feast.desc=A great variety of delicious food! This with satiate you far more than any other meal.
|
||||||
|
|
||||||
items.food.food.name=ration of food
|
items.food.food.name=ration of food
|
||||||
items.food.food.ac_eat=EAT
|
items.food.food.ac_eat=EAT
|
||||||
|
@ -445,7 +446,7 @@ items.food.smallration.desc=It looks exactly like a standard ration of food but
|
||||||
|
|
||||||
items.food.stewedmeat.name=stewed meat
|
items.food.stewedmeat.name=stewed meat
|
||||||
items.food.stewedmeat.eat_msg=That food tasted ok.
|
items.food.stewedmeat.eat_msg=That food tasted ok.
|
||||||
items.food.stewedmeat.desc=TODO
|
items.food.stewedmeat.desc=Stewing the meat has cleansed it of any disease or parasites. It should be safe to eat.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user