v0.9.3: improved combo buff descriptions

This commit is contained in:
Evan Debenham 2021-04-01 00:55:48 -04:00
parent d623f3ef71
commit b6bc29ff63
4 changed files with 30 additions and 8 deletions

View File

@ -122,11 +122,11 @@ actors.buffs.combo.name=Combo
actors.buffs.combo.combo=%d hit combo!
actors.buffs.combo.bad_target=You must target an enemy in attack range.
actors.buffs.combo.prompt=Select a target to attack.
actors.buffs.combo.desc=The gladiator builds momentum as they land successful blows. Each attack increases the combo counter by one, but taking too long between hits will reset the combo counter to 0.\n\nBuilding combo unlocks special combo attacks that cannot miss! A different attack is unlocked at 2, 4, 6, 8, and 10 combo count. Some moves reset combo and some do not, but each move can only be used once per combo session.
actors.buffs.combo.desc=The gladiator builds momentum as they land successful blows. Each attack increases the combo counter by one, but taking too long between hits will reset the combo counter to 0.\n\nBuilding combo unlocks special combo attacks that cannot miss! A different attack is unlocked at 2, 4, 6, 8, and 10 combo count. Some moves reset combo and some do not, but each move can only be used once per combo session.\n\nCurrent combo: %1$d.\n\nTurns until Combo is lost: %2$s.
actors.buffs.combo$combomove.clobber_desc=_2 Combo: Clobber_ knocks an enemy back 2 tiles, but deals no damage and cannot knock into pits. Increments combo by 1.
actors.buffs.combo$combomove.slam_desc=_4 Combo: Slam_ deals combo*20% of your armor's blocking power as bonus damage. Resets combo when used.
actors.buffs.combo$combomove.slam_desc=_4 Combo: Slam_ deals %d%% (combo*20%%) of your damage blocking power as bonus damage. Resets combo when used.
actors.buffs.combo$combomove.parry_desc=_6 Combo: Parry_ blocks the next attack within 1 turn when activated, and instantly retaliates to it. Resets combo if nothing is parried.
actors.buffs.combo$combomove.crush_desc=_8 Combo: Crush_ deals combo*25% of your melee damage to the primary target, and half that damage to all other enemies in a 7x7 AOE. Resets combo when used.
actors.buffs.combo$combomove.crush_desc=_8 Combo: Crush_ deals %d%% (combo*25%%) of your melee damage to the primary target, and half that damage to all other enemies in a 7x7 AOE. Resets combo when used.
actors.buffs.combo$combomove.fury_desc=_10 Combo: Fury_ hits an enemy once for each combo you have, each hit deals 60% damage and can trigger enchantments. Resets combo when used.
actors.buffs.corruption.name=Corrupted

View File

@ -124,7 +124,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
@Override
public String desc() {
return Messages.get(this, "desc");
return Messages.get(this, "desc", count, dispTurns(comboTime));
}
private static final String COUNT = "count";
@ -193,8 +193,16 @@ public class Combo extends Buff implements ActionIndicator.Action {
this.tintColor = tintColor;
}
public String desc(){
return Messages.get(this, name()+"_desc");
public String desc(int count){
switch (this){
default:
return Messages.get(this, name()+"_desc");
case SLAM:
return Messages.get(this, name()+"_desc", count*20);
case CRUSH:
return Messages.get(this, name()+"_desc", count*25);
}
}
}

View File

@ -35,6 +35,7 @@ public class StyledButton extends Button {
protected NinePatch bg;
protected RenderedTextBlock text;
protected Image icon;
public boolean leftJustify = false;
public boolean multiline;
@ -85,6 +86,18 @@ public class StyledButton extends Button {
PixelScene.align(icon);
}
if (leftJustify){
if (icon != null){
icon.x = x + bg.marginLeft() + 1;
PixelScene.align(icon);
text.setPos( icon.x + icon.width() + 1, text.top());
PixelScene.align(text);
} else if (text != null) {
text.setPos( x + bg.marginLeft() + 1, text.top());
PixelScene.align(text);
}
}
}
@Override

View File

@ -64,7 +64,7 @@ public class WndCombo extends Window {
for (Combo.ComboMove move : Combo.ComboMove.values()) {
Image ic = new Image(icon);
RedButton moveBtn = new RedButton(move.desc(), 6){
RedButton moveBtn = new RedButton(move.desc(combo.getComboCount()), 6){
@Override
protected void onClick() {
super.onClick();
@ -74,6 +74,7 @@ public class WndCombo extends Window {
};
ic.tint(move.tintColor);
moveBtn.icon(ic);
moveBtn.leftJustify = true;
moveBtn.multiline = true;
moveBtn.setSize(width, moveBtn.reqHeight());
moveBtn.setRect(0, pos, width, moveBtn.reqHeight());