v1.0.2: negative str bonuses now also show in hero stats screen

This commit is contained in:
Evan Debenham 2021-08-27 14:41:36 -04:00
parent 07ad3fcc38
commit 4b0e89af2e
3 changed files with 10 additions and 6 deletions

View File

@ -108,8 +108,10 @@ public class WndGameInProgress extends Window {
pos += GAP;
if (info.strBonus > 0) statSlot( Messages.get(this, "str"), info.str + "+" + info.strBonus );
else statSlot( Messages.get(this, "str"), info.str );
int strBonus = info.strBonus;
if (strBonus > 0) statSlot( Messages.get(this, "str"), info.str + " + " + strBonus );
else if (strBonus < 0) statSlot( Messages.get(this, "str"), info.str + " - " + -strBonus );
else statSlot( Messages.get(this, "str"), info.str );
if (info.shld > 0) statSlot( Messages.get(this, "health"), info.hp + "+" + info.shld + "/" + info.ht );
else statSlot( Messages.get(this, "health"), (info.hp) + "/" + info.ht );
statSlot( Messages.get(this, "exp"), info.exp + "/" + Hero.maxExp(info.level) );

View File

@ -144,8 +144,9 @@ public class WndHero extends WndTabbed {
pos = title.bottom() + 2*GAP;
int strBonus = hero.STR() - hero.STR;
if (strBonus > 0) statSlot( Messages.get(this, "str"), hero.STR + "+" + strBonus );
else statSlot( Messages.get(this, "str"), hero.STR() );
if (strBonus > 0) statSlot( Messages.get(this, "str"), hero.STR + " + " + strBonus );
else if (strBonus < 0) statSlot( Messages.get(this, "str"), hero.STR + " - " + -strBonus );
else statSlot( Messages.get(this, "str"), hero.STR() );
if (hero.shielding() > 0) statSlot( Messages.get(this, "health"), hero.HP + "+" + hero.shielding() + "/" + hero.HT );
else statSlot( Messages.get(this, "health"), (hero.HP) + "/" + hero.HT );
statSlot( Messages.get(this, "exp"), hero.exp + "/" + hero.maxExp() );

View File

@ -224,8 +224,9 @@ public class WndRanking extends WndTabbed {
pos += GAP;
int strBonus = Dungeon.hero.STR() - Dungeon.hero.STR;
if (strBonus > 0) pos = statSlot(this, Messages.get(this, "str"), Dungeon.hero.STR + "+" + strBonus, pos);
else pos = statSlot(this, Messages.get(this, "str"), Integer.toString(Dungeon.hero.STR), pos);
if (strBonus > 0) pos = statSlot(this, Messages.get(this, "str"), Dungeon.hero.STR + " + " + strBonus, pos);
else if (strBonus < 0) pos = statSlot(this, Messages.get(this, "str"), Dungeon.hero.STR + " - " + -strBonus, pos );
else pos = statSlot(this, Messages.get(this, "str"), Integer.toString(Dungeon.hero.STR), pos);
pos = statSlot( this, Messages.get(this, "health"), Integer.toString( Dungeon.hero.HT ), pos );
pos += GAP;