v0.7.0: various fixes:

- fixed typos
- fixed rare cases where item or bag windows could be stacked
- fixed honeyed healing not applying potion of healing curing effects
- fixed a text alyout issue in alchemy scene
This commit is contained in:
Evan Debenham 2018-09-30 20:02:41 -04:00
parent e855617fe8
commit 6e8fe2089d
6 changed files with 38 additions and 4 deletions

View File

@ -44,6 +44,7 @@ public class ElixirOfHoneyedHealing extends Elixir {
@Override
public void apply(Hero hero) {
Buff.affect( hero, Healing.class ).setHeal((int)(0.8f*hero.HT + 14), 0.25f, 0);
PotionOfHealing.cure(hero);
hero.buff(Hunger.class).satisfy(Hunger.STARVING/5f);
}
@ -57,6 +58,7 @@ public class ElixirOfHoneyedHealing extends Elixir {
Char ch = Actor.findChar(cell);
if (ch != null){
Buff.affect( ch, Healing.class ).setHeal((int)(0.8f*ch.HT + 14), 0.25f, 0);
PotionOfHealing.cure(ch);
if (ch instanceof Bee && ch.alignment != curUser.alignment){
ch.alignment = Char.Alignment.ALLY;
((Bee)ch).setPotInfo(-1, null);

View File

@ -127,8 +127,8 @@ public class AlchemyScene extends PixelScene {
int pos = (Camera.main.height - 100)/2;
RenderedTextMultiline desc = PixelScene.renderMultiline(6);
desc.text( Messages.get(AlchemyScene.class, "text") );
desc.maxWidth(w);
desc.text( Messages.get(AlchemyScene.class, "text") );
desc.setPos(left + (w - desc.width())/2, pos);
add(desc);

View File

@ -66,6 +66,9 @@ import com.watabou.utils.RectF;
public class WndBag extends WndTabbed {
//only one wnditem can appear at a time
private static WndBag INSTANCE;
//FIXME this is getting cumbersome, there should be a better way to manage this
public static enum Mode {
ALL,
@ -119,6 +122,11 @@ public class WndBag extends WndTabbed {
super();
if( INSTANCE != null ){
INSTANCE.hide();
}
INSTANCE = this;
this.listener = listener;
this.mode = mode;
this.title = title;
@ -259,6 +267,14 @@ public class WndBag extends WndTabbed {
Game.scene().addToFront(new WndBag(((BagTab) tab).bag, listener, mode, title));
}
@Override
public void hide() {
super.hide();
if (INSTANCE == this){
INSTANCE = null;
}
}
@Override
protected int tabHeight() {
return 20;

View File

@ -37,6 +37,9 @@ import java.util.Comparator;
public class WndItem extends Window {
//only one wnditem can appear at a time
private static WndItem INSTANCE;
private static final float BUTTON_HEIGHT = 16;
private static final float GAP = 2;
@ -52,6 +55,11 @@ public class WndItem extends Window {
super();
if( INSTANCE != null ){
INSTANCE.hide();
}
INSTANCE = this;
int width = WIDTH_MIN;
RenderedTextMultiline info = PixelScene.renderMultiline( item.info(), 6 );
@ -162,6 +170,14 @@ public class WndItem extends Window {
}
}
@Override
public void hide() {
super.hide();
if (INSTANCE == this){
INSTANCE = null;
}
}
private static Comparator<RedButton> widthComparator = new Comparator<RedButton>() {
@Override
public int compare(RedButton lhs, RedButton rhs) {

View File

@ -387,7 +387,7 @@ items.bombs.shockbomb.name=shock bomb
items.bombs.shockbomb.desc=This bomb has been modified to unleash a storm of electricity around it when it explodes.
items.bombs.regrowthbomb.name=regrowth bomb
items.bombs.regrowthbomb.desc=This customized bomb will splash life-giving liquid all around it instead of exploding. The area caught in the blast with rapidly sprout glass and plants, and any allies caught in the blast will be healed.
items.bombs.regrowthbomb.desc=This customized bomb will splash life-giving liquid all around it instead of exploding. The area caught in the blast with rapidly sprout grass and plants, and any allies caught in the blast will be healed.
items.bombs.shrapnelbomb.name=shrapnel bomb
items.bombs.shrapnelbomb.desc=This bomb has been modified with scraps of DM-300's metal, which will fragment and fly everywhere when it explodes. You had better hide behind something when using it...

View File

@ -124,7 +124,7 @@ levels.traps.weakeningtrap.name=weakening trap
levels.traps.weakeningtrap.desc=Dark magic in this trap sucks the energy out of anything that comes into contact with it.
levels.traps.worndarttrap.name=worn dart trap
levels.traps.worndarttrap.desc=A small dart-blower must be hidden nearby, activating this trap will cause it to shoot at the nearest target.\n\nDue to it's age it's not very harmful though, it isn't even hidden...
levels.traps.worndarttrap.desc=A small dart-blower must be hidden nearby, activating this trap will cause it to shoot at the nearest target.\n\nDue to its age it's not very harmful though, it isn't even hidden...